页面提交
This commit is contained in:
		
							parent
							
								
									ccab4e7401
								
							
						
					
					
						commit
						46efe986a8
					
				| 
						 | 
					@ -5,6 +5,11 @@
 | 
				
			||||||
<html xmlns="http://www.w3.org/1999/xhtml">
 | 
					<html xmlns="http://www.w3.org/1999/xhtml">
 | 
				
			||||||
<head runat="server">
 | 
					<head runat="server">
 | 
				
			||||||
    <title></title>
 | 
					    <title></title>
 | 
				
			||||||
 | 
					    <style type="text/css">
 | 
				
			||||||
 | 
					        .f-grid-cell[data-yc=yc] {
 | 
				
			||||||
 | 
					            display: none;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    </style>
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
<body>
 | 
					<body>
 | 
				
			||||||
    <form id="form1" runat="server">
 | 
					    <form id="form1" runat="server">
 | 
				
			||||||
| 
						 | 
					@ -12,10 +17,9 @@
 | 
				
			||||||
        <f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" ShowHeader="false" Layout="VBox" AutoScroll="true" BoxConfigAlign="Stretch">
 | 
					        <f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" ShowHeader="false" Layout="VBox" AutoScroll="true" BoxConfigAlign="Stretch">
 | 
				
			||||||
            <Items>
 | 
					            <Items>
 | 
				
			||||||
                <f:Grid ID="Grid1" IsFluid="true" ShowBorder="true" ShowHeader="true" Title="现场控制点裁剪"
 | 
					                <f:Grid ID="Grid1" IsFluid="true" ShowBorder="true" ShowHeader="true" Title="现场控制点裁剪"
 | 
				
			||||||
                    runat="server" EnableCollapse="true" DataKeyNames="ControlId,ParentId,ControlLevel" EnableTree="true"
 | 
					                    runat="server" EnableCollapse="true" DataKeyNames="ControlId,ParentId,ControlLevel,States" EnableTree="true"
 | 
				
			||||||
                    TreeColumn="DetectionItems" DataIDField="ControlId" AllowPaging="false" DataParentIDField="ParentId" OnRowDataBound="Grid1_RowDataBound"
 | 
					                    TreeColumn="DetectionItems" DataIDField="ControlId" AllowPaging="false" DataParentIDField="ParentId" OnRowDataBound="Grid1_RowDataBound"
 | 
				
			||||||
                    AllowCellEditing="false" ClicksToEdit="1" OnRowCommand="Grid1_RowCommand"
 | 
					                    AllowCellEditing="false" ClicksToEdit="1" OnRowCommand="Grid1_RowCommand" ExpandAllTreeNodes="true" EnableMultiSelect="false">
 | 
				
			||||||
                    EnableMultiSelect="false">
 | 
					 | 
				
			||||||
                    <Toolbars>
 | 
					                    <Toolbars>
 | 
				
			||||||
                        <f:Toolbar ID="Toolbar1" runat="server">
 | 
					                        <f:Toolbar ID="Toolbar1" runat="server">
 | 
				
			||||||
                            <Items>
 | 
					                            <Items>
 | 
				
			||||||
| 
						 | 
					@ -39,10 +43,17 @@
 | 
				
			||||||
                        </f:RenderField>
 | 
					                        </f:RenderField>
 | 
				
			||||||
                        <f:RenderField Width="200px" ColumnID="RecordNumber" DataField="RecordNumber" HeaderText="记录格式文本号">
 | 
					                        <f:RenderField Width="200px" ColumnID="RecordNumber" DataField="RecordNumber" HeaderText="记录格式文本号">
 | 
				
			||||||
                        </f:RenderField>
 | 
					                        </f:RenderField>
 | 
				
			||||||
 | 
					                        <f:RenderField ColumnID="Partition" Width="100px" DataField="Partition" HeaderText="等级划分">
 | 
				
			||||||
 | 
					                        </f:RenderField>
 | 
				
			||||||
                        <f:RenderField ColumnID="ControlCode" Width="100px" DataField="ControlCode" HeaderText="编码">
 | 
					                        <f:RenderField ColumnID="ControlCode" Width="100px" DataField="ControlCode" HeaderText="编码">
 | 
				
			||||||
                        </f:RenderField>
 | 
					                        </f:RenderField>
 | 
				
			||||||
                        <f:LinkButtonField Width="100px" ConfirmText="删除当前选中数据和所有子节点数据?" HeaderText="操作" ConfirmTarget="Top"
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        <f:LinkButtonField Width="100px" ConfirmText="删除当前选中数据和所有子节点数据?" ColumnID="Delete" ToolTip="删除" ConfirmTarget="Top"
 | 
				
			||||||
                            CommandName="Delete" Icon="Delete" />
 | 
					                            CommandName="Delete" Icon="Delete" />
 | 
				
			||||||
 | 
					                        <f:LinkButtonField Width="100px" CommandName="fileView" ToolTip="附件" ConfirmTarget="Top" Icon="TableCell" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    </Columns>
 | 
					                    </Columns>
 | 
				
			||||||
                    <Listeners>
 | 
					                    <Listeners>
 | 
				
			||||||
                        <f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
 | 
					                        <f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
 | 
				
			||||||
| 
						 | 
					@ -54,6 +65,10 @@
 | 
				
			||||||
            Target="Parent" EnableResize="true" runat="server" IsModal="true" OnClose="Window1_Close" CloseAction="HidePostBack"
 | 
					            Target="Parent" EnableResize="true" runat="server" IsModal="true" OnClose="Window1_Close" CloseAction="HidePostBack"
 | 
				
			||||||
            Width="800px" Height="600px">
 | 
					            Width="800px" Height="600px">
 | 
				
			||||||
        </f:Window>
 | 
					        </f:Window>
 | 
				
			||||||
 | 
					        <f:Window ID="WindowAtt" Title="附件查看" Hidden="true" EnableIFrame="true" EnableMaximize="true"
 | 
				
			||||||
 | 
					            Target="Parent" EnableResize="false" OnClose="WindowAtt_Close" runat="server" IsModal="true" Width="700px"
 | 
				
			||||||
 | 
					            Height="500px">
 | 
				
			||||||
 | 
					        </f:Window>
 | 
				
			||||||
        <f:Menu ID="Menu1" runat="server">
 | 
					        <f:Menu ID="Menu1" runat="server">
 | 
				
			||||||
            <Items>
 | 
					            <Items>
 | 
				
			||||||
                <f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Text="修改" Icon="Pencil"
 | 
					                <f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Text="修改" Icon="Pencil"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -9,6 +9,7 @@ using System.Linq;
 | 
				
			||||||
using System.Web;
 | 
					using System.Web;
 | 
				
			||||||
using System.Web.UI;
 | 
					using System.Web.UI;
 | 
				
			||||||
using System.Web.UI.WebControls;
 | 
					using System.Web.UI.WebControls;
 | 
				
			||||||
 | 
					using RestSharp;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace FineUIPro.Web.CQMS.WBS.Control
 | 
					namespace FineUIPro.Web.CQMS.WBS.Control
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -29,16 +30,19 @@ namespace FineUIPro.Web.CQMS.WBS.Control
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
        public void DataBrid()
 | 
					        public void DataBrid()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            string strSql = @"select a.ControlId,a.ProjectId,a.ParentId,a.ControlCode,a.ControlLevel,a.PlanId,a.PlanTypeId,a.SubItemsId,a.DetectionItems,a.BasedCriterion,a.QualityRecordName,a.RecordNumber,a.Subcontractors,a.OperateTime,a.Sort from Control_PointCropping as a order by a.ControlLevel,a.Sort asc";
 | 
					            string strSql = @"select * from(select a.ControlId,a.ProjectId,a.ParentId,a.ControlCode,a.ControlLevel,a.PlanId,a.PlanTypeId,a.SubItemsId,a.DetectionItems,a.BasedCriterion,a.QualityRecordName,a.RecordNumber,a.Subcontractors,a.OperateTime,a.Sort,a.States,a.Partition from Control_PointCropping as a where isnull(a.ProjectId,'')='' ";
 | 
				
			||||||
 | 
					            string strSql1 = "select a.ControlId,a.ProjectId,a.ParentId,a.ControlCode,a.ControlLevel,a.PlanId,a.PlanTypeId,a.SubItemsId,a.DetectionItems,a.BasedCriterion,a.QualityRecordName,a.RecordNumber,a.Subcontractors,a.OperateTime,a.Sort,a.States,a.Partition from Control_PointCropping as a where a.ProjectId=@ProjectId ";
 | 
				
			||||||
            List<SqlParameter> listStr = new List<SqlParameter>();
 | 
					            List<SqlParameter> listStr = new List<SqlParameter>();
 | 
				
			||||||
            listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
 | 
					            listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
 | 
				
			||||||
            if (!string.IsNullOrEmpty(sDetectionItems.Text.Trim()))
 | 
					            if (!string.IsNullOrEmpty(sDetectionItems.Text.Trim()))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                strSql += " and a.DetectionItems like '%@DetectionItems%'";
 | 
					                strSql += " and a.DetectionItems like '%@DetectionItems%'";
 | 
				
			||||||
 | 
					                strSql1 += " and a.DetectionItems like '%@DetectionItems%'";
 | 
				
			||||||
                listStr.Add(new SqlParameter("@DetectionItems", this.sDetectionItems.Text.Trim()));
 | 
					                listStr.Add(new SqlParameter("@DetectionItems", this.sDetectionItems.Text.Trim()));
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            SqlParameter[] parameter = listStr.ToArray();
 | 
					            SqlParameter[] parameter = listStr.ToArray();
 | 
				
			||||||
            DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
 | 
					            var zxsql = strSql + " union all " + strSql1 + " ) as t order by t.ControlLevel,t.Sort asc";
 | 
				
			||||||
 | 
					            DataTable tb = SQLHelper.GetDataTableRunText(zxsql, parameter);
 | 
				
			||||||
            Grid1.DataSource = tb;
 | 
					            Grid1.DataSource = tb;
 | 
				
			||||||
            Grid1.DataBind();
 | 
					            Grid1.DataBind();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					@ -48,13 +52,17 @@ namespace FineUIPro.Web.CQMS.WBS.Control
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
        protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
 | 
					        protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
 | 
					            string rowID = e.RowID;
 | 
				
			||||||
            if (e.CommandName == "Delete")
 | 
					            if (e.CommandName == "Delete")
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                string rowID = e.RowID;
 | 
					 | 
				
			||||||
                DeleteRowByIDInternal(rowID);
 | 
					                DeleteRowByIDInternal(rowID);
 | 
				
			||||||
                DataBrid();
 | 
					                DataBrid();
 | 
				
			||||||
                ShowNotify("删除成功!");
 | 
					                ShowNotify("删除成功!");
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					            else if (e.CommandName == "fileView")
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/CheckControl&menuId={2}", "-1", rowID, Const.InspectTailTerm)));
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
| 
						 | 
					@ -62,11 +70,22 @@ namespace FineUIPro.Web.CQMS.WBS.Control
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
        protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
 | 
					        protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            int controlLevel = Grid1.DataKeys[e.RowIndex][2] != null ? int.Parse(Grid1.DataKeys[e.RowIndex][2].ToString()) : 2;
 | 
					            if (Grid1.DataKeys[e.RowIndex][0].ToString() == "595fd674-ca2b-4557-a7c7-1be1096c3825")
 | 
				
			||||||
            if (controlLevel < 2)
 | 
					 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                e.TreeNodeExpanded = true;
 | 
					
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					            var states = int.Parse(Grid1.DataKeys[e.RowIndex][3].ToString());
 | 
				
			||||||
 | 
					            GridColumn isDelete = Grid1.FindColumn("Delete");
 | 
				
			||||||
 | 
					            if (states == 0)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                e.CellAttributes[isDelete.ColumnIndex]["data-yc"] = "yc";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            //int controlLevel = Grid1.DataKeys[e.RowIndex][2] != null ? int.Parse(Grid1.DataKeys[e.RowIndex][2].ToString()) : 2;
 | 
				
			||||||
 | 
					            //if (controlLevel < 2)
 | 
				
			||||||
 | 
					            //{
 | 
				
			||||||
 | 
					            //    e.TreeNodeExpanded = true;
 | 
				
			||||||
 | 
					            //}
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        #endregion
 | 
					        #endregion
 | 
				
			||||||
| 
						 | 
					@ -94,6 +113,12 @@ namespace FineUIPro.Web.CQMS.WBS.Control
 | 
				
			||||||
            foreach (int rowIndex in Grid1.SelectedRowIndexArray)
 | 
					            foreach (int rowIndex in Grid1.SelectedRowIndexArray)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                string rowID = Grid1.DataKeys[rowIndex][0].ToString();
 | 
					                string rowID = Grid1.DataKeys[rowIndex][0].ToString();
 | 
				
			||||||
 | 
					                var states = int.Parse(Grid1.DataKeys[rowIndex][3].ToString());
 | 
				
			||||||
 | 
					                if (states == 0)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    ShowNotify("系统内置数据,无删除权限!");
 | 
				
			||||||
 | 
					                    return;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
                DeleteRowByIDInternal(rowID);
 | 
					                DeleteRowByIDInternal(rowID);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            DataBrid();
 | 
					            DataBrid();
 | 
				
			||||||
| 
						 | 
					@ -141,8 +166,13 @@ namespace FineUIPro.Web.CQMS.WBS.Control
 | 
				
			||||||
                ShowNotify("请选择一条数据!", MessageBoxIcon.Warning);
 | 
					                ShowNotify("请选择一条数据!", MessageBoxIcon.Warning);
 | 
				
			||||||
                return;
 | 
					                return;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					 | 
				
			||||||
            var rowIndex = Grid1.SelectedRowIndex;
 | 
					            var rowIndex = Grid1.SelectedRowIndex;
 | 
				
			||||||
 | 
					            var states = int.Parse(Grid1.DataKeys[rowIndex][3].ToString());
 | 
				
			||||||
 | 
					            if (states == 0 && !IsEditdata())
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                ShowNotify("系统内置数据,无编辑权限!");
 | 
				
			||||||
 | 
					                return;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            var rowId = Grid1.DataKeys[rowIndex][0].ToString();
 | 
					            var rowId = Grid1.DataKeys[rowIndex][0].ToString();
 | 
				
			||||||
            var parentId = Grid1.DataKeys[rowIndex][1] != null ? Grid1.DataKeys[rowIndex][1].ToString() : string.Empty;
 | 
					            var parentId = Grid1.DataKeys[rowIndex][1] != null ? Grid1.DataKeys[rowIndex][1].ToString() : string.Empty;
 | 
				
			||||||
            PageContext.RegisterStartupScript(Window1.GetShowReference($"PointCroppingEdit.aspx?ControlId={rowId}&ParentId={parentId}", "编辑"));
 | 
					            PageContext.RegisterStartupScript(Window1.GetShowReference($"PointCroppingEdit.aspx?ControlId={rowId}&ParentId={parentId}", "编辑"));
 | 
				
			||||||
| 
						 | 
					@ -156,6 +186,13 @@ namespace FineUIPro.Web.CQMS.WBS.Control
 | 
				
			||||||
            DataBrid();
 | 
					            DataBrid();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 附件关闭
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// 右击修改
 | 
					        /// 右击修改
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
| 
						 | 
					@ -203,6 +240,21 @@ namespace FineUIPro.Web.CQMS.WBS.Control
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 判断是否存在删除权限
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					        public bool IsEditdata()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            var result = false;
 | 
				
			||||||
 | 
					            var userids = new List<string>() { Const.sysglyId, Const.hfnbdId, Const.sedinId };
 | 
				
			||||||
 | 
					            if (userids.Contains(this.CurrUser.UserId))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                result = true;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return result;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        #endregion
 | 
					        #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -122,6 +122,15 @@ namespace FineUIPro.Web.CQMS.WBS.Control
 | 
				
			||||||
        /// </remarks>
 | 
					        /// </remarks>
 | 
				
			||||||
        protected global::FineUIPro.Window Window1;
 | 
					        protected global::FineUIPro.Window Window1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// WindowAtt 控件。
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <remarks>
 | 
				
			||||||
 | 
					        /// 自动生成的字段。
 | 
				
			||||||
 | 
					        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
 | 
				
			||||||
 | 
					        /// </remarks>
 | 
				
			||||||
 | 
					        protected global::FineUIPro.Window WindowAtt;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// Menu1 控件。
 | 
					        /// Menu1 控件。
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -91,6 +91,19 @@
 | 
				
			||||||
                                            <f:NumberBox runat="server" Label="排序" ID="txtSort" LabelAlign="Right" Required="true" LabelWidth="150"></f:NumberBox>
 | 
					                                            <f:NumberBox runat="server" Label="排序" ID="txtSort" LabelAlign="Right" Required="true" LabelWidth="150"></f:NumberBox>
 | 
				
			||||||
                                        </Items>
 | 
					                                        </Items>
 | 
				
			||||||
                                    </f:FormRow>
 | 
					                                    </f:FormRow>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                    <f:FormRow>
 | 
				
			||||||
 | 
					                                        <Items>
 | 
				
			||||||
 | 
					                                            <f:Panel ID="Panel1" ShowHeader="false" ShowBorder="false" Layout="Column" runat="server">
 | 
				
			||||||
 | 
					                                                <Items>
 | 
				
			||||||
 | 
					                                                    <f:Label runat="server" Text="附件:" CssStyle="padding-left:25px" Width="150px" CssClass="marginr" ShowLabel="false"></f:Label>
 | 
				
			||||||
 | 
					                                                    <f:Button ID="BtnFile" Text="附件" ToolTip="附件" Icon="TableCell" runat="server"
 | 
				
			||||||
 | 
					                                                        OnClick="BtnFile_Click">
 | 
				
			||||||
 | 
					                                                    </f:Button>
 | 
				
			||||||
 | 
					                                                </Items>
 | 
				
			||||||
 | 
					                                            </f:Panel>
 | 
				
			||||||
 | 
					                                        </Items>
 | 
				
			||||||
 | 
					                                    </f:FormRow>
 | 
				
			||||||
                                </Rows>
 | 
					                                </Rows>
 | 
				
			||||||
                            </f:Form>
 | 
					                            </f:Form>
 | 
				
			||||||
                        </f:ContentPanel>
 | 
					                        </f:ContentPanel>
 | 
				
			||||||
| 
						 | 
					@ -98,6 +111,10 @@
 | 
				
			||||||
                </f:FormRow>
 | 
					                </f:FormRow>
 | 
				
			||||||
            </Rows>
 | 
					            </Rows>
 | 
				
			||||||
        </f:Form>
 | 
					        </f:Form>
 | 
				
			||||||
 | 
					        <f:Window ID="WindowAtt" Title="附件" Hidden="true" EnableIFrame="true" EnableMaximize="true"
 | 
				
			||||||
 | 
					            Target="Parent" EnableResize="false" OnClose="WindowAtt_Close" runat="server" IsModal="true" Width="700px"
 | 
				
			||||||
 | 
					            Height="500px">
 | 
				
			||||||
 | 
					        </f:Window>
 | 
				
			||||||
    </form>
 | 
					    </form>
 | 
				
			||||||
</body>
 | 
					</body>
 | 
				
			||||||
</html>
 | 
					</html>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -29,12 +29,32 @@ namespace FineUIPro.Web.CQMS.WBS.Control
 | 
				
			||||||
            set { ViewState["ControlId"] = value; }
 | 
					            set { ViewState["ControlId"] = value; }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 主键
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public string FId
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            get { return (string)ViewState["FId"]; }
 | 
				
			||||||
 | 
					            set { ViewState["FId"] = value; }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 问题图片是否可编辑
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public int FileImg
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            get { return (int)ViewState["FileImg"]; }
 | 
				
			||||||
 | 
					            set { ViewState["FileImg"] = value; }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        protected void Page_Load(object sender, EventArgs e)
 | 
					        protected void Page_Load(object sender, EventArgs e)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            if (!IsPostBack)
 | 
					            if (!IsPostBack)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                this.ControlId = Request.Params["ControlId"];
 | 
					                this.ControlId = Request.Params["ControlId"];
 | 
				
			||||||
 | 
					                this.FId = !string.IsNullOrWhiteSpace(this.ControlId) ? this.ControlId : Guid.NewGuid().ToString();
 | 
				
			||||||
                this.ParentId = Request.Params["ParentId"];
 | 
					                this.ParentId = Request.Params["ParentId"];
 | 
				
			||||||
 | 
					                this.FileImg = 0;
 | 
				
			||||||
                //绑定数据
 | 
					                //绑定数据
 | 
				
			||||||
                PageIn();
 | 
					                PageIn();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					@ -125,19 +145,23 @@ namespace FineUIPro.Web.CQMS.WBS.Control
 | 
				
			||||||
        protected void btnSave_Click(object sender, EventArgs e)
 | 
					        protected void btnSave_Click(object sender, EventArgs e)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            var model = new Control_PointCropping();
 | 
					            var model = new Control_PointCropping();
 | 
				
			||||||
            model.ControlId = Guid.NewGuid().ToString();
 | 
					            model.ControlId = this.FId;
 | 
				
			||||||
            var oneControlId = string.Empty;
 | 
					            var oneControlId = string.Empty;
 | 
				
			||||||
            var twoControlId = string.Empty;
 | 
					            var twoControlId = string.Empty;
 | 
				
			||||||
            if (!string.IsNullOrWhiteSpace(this.ControlId))
 | 
					            if (!string.IsNullOrWhiteSpace(this.ControlId))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                model = Funs.DB.Control_PointCropping.FirstOrDefault(p => p.ControlId == this.ControlId);
 | 
					                model = Funs.DB.Control_PointCropping.FirstOrDefault(p => p.ControlId == this.ControlId);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                model.States = 1;
 | 
				
			||||||
 | 
					                model.ProjectId = CurrUser.LoginProjectId;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            if (model == null)
 | 
					            if (model == null)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                ShowNotify("传递参数错误!", MessageBoxIcon.Error);
 | 
					                ShowNotify("传递参数错误!", MessageBoxIcon.Error);
 | 
				
			||||||
                return;
 | 
					                return;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            //model.ProjectId = CurrUser.LoginProjectId;
 | 
					 | 
				
			||||||
            if (!string.IsNullOrWhiteSpace(this.ParentId))
 | 
					            if (!string.IsNullOrWhiteSpace(this.ParentId))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                var parenLs = GetAllCropping(this.ParentId);
 | 
					                var parenLs = GetAllCropping(this.ParentId);
 | 
				
			||||||
| 
						 | 
					@ -183,6 +207,14 @@ namespace FineUIPro.Web.CQMS.WBS.Control
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 附件
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        protected void BtnFile_Click(object sender, EventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/CheckControl&menuId={2}", FileImg, this.FId, Const.InspectTailTerm)));
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        #region 私有方法
 | 
					        #region 私有方法
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
| 
						 | 
					@ -211,6 +243,15 @@ namespace FineUIPro.Web.CQMS.WBS.Control
 | 
				
			||||||
            return result;
 | 
					            return result;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 关闭
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        #endregion
 | 
					        #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -193,5 +193,32 @@ namespace FineUIPro.Web.CQMS.WBS.Control
 | 
				
			||||||
        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
 | 
					        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
 | 
				
			||||||
        /// </remarks>
 | 
					        /// </remarks>
 | 
				
			||||||
        protected global::FineUIPro.NumberBox txtSort;
 | 
					        protected global::FineUIPro.NumberBox txtSort;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// Panel1 控件。
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <remarks>
 | 
				
			||||||
 | 
					        /// 自动生成的字段。
 | 
				
			||||||
 | 
					        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
 | 
				
			||||||
 | 
					        /// </remarks>
 | 
				
			||||||
 | 
					        protected global::FineUIPro.Panel Panel1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// BtnFile 控件。
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <remarks>
 | 
				
			||||||
 | 
					        /// 自动生成的字段。
 | 
				
			||||||
 | 
					        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
 | 
				
			||||||
 | 
					        /// </remarks>
 | 
				
			||||||
 | 
					        protected global::FineUIPro.Button BtnFile;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// WindowAtt 控件。
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <remarks>
 | 
				
			||||||
 | 
					        /// 自动生成的字段。
 | 
				
			||||||
 | 
					        /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
 | 
				
			||||||
 | 
					        /// </remarks>
 | 
				
			||||||
 | 
					        protected global::FineUIPro.Window WindowAtt;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue