diff --git a/DataBase/版本日志/SGGLDB_WH_2024-07-29-bwj.sql b/DataBase/版本日志/SGGLDB_WH_2024-07-29-bwj.sql new file mode 100644 index 00000000..012b7ff5 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2024-07-29-bwj.sql @@ -0,0 +1,4 @@ +ALTER TABLE WBS_UnitWork ALTER COLUMN SuperUnitWork NVARCHAR(50) +GO +update WBS_UnitWork set SuperUnitWork='0' +GO \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_WH_V2024-07-27-phf.sql b/DataBase/版本日志/SGGLDB_WH_V2024-07-27-phf.sql new file mode 100644 index 00000000..0dc97a6e --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_V2024-07-27-phf.sql @@ -0,0 +1,46 @@ +alter table sys_menu +alter COLUMN menuname nvarchar(200); + +UPDATE SYS_MENU set MenuName='ϵͳ嵥
          Process System List' +WHERE MENUID='197F9A9A-480C-4CC3-B6B7-3A7D382DC3EB'; + + +UPDATE SYS_MENU set MenuName='ǹϵͳ嵥
          Non-Process System List' +WHERE MENUID='022428DC-FC99-4916-B8AF-6A9DC885DFAF'; + +UPDATE SYS_MENU set MenuName='ܵ
          Piping' +WHERE MENUID='D94C1BA4-9DFD-4514-AE12-6F886C5D8C9B'; + +UPDATE SYS_MENU set MenuName='豸
          Static Equipment' +WHERE MENUID='982F746C-084C-445C-9AE8-8C37BDFE7994'; + +UPDATE SYS_MENU set MenuName='豸
          Rotating Equipment' +WHERE MENUID='7E2FB5F9-FB99-4455-B68F-460F1F9A2676'; + +UPDATE SYS_MENU set MenuName='DZ
          Instrumentation' +WHERE MENUID='88F51059-55B4-4CD5-A38C-36404E5029F6'; + +UPDATE SYS_MENU set MenuName='
          Electrical' +WHERE MENUID='296E75D2-192A-4D1F-8471-DD34263F8691'; + +UPDATE SYS_MENU set MenuName='
          Firefighting' +WHERE MENUID='794E64E2-FDD2-4B7D-8408-F7FB06F9C92A'; + +UPDATE SYS_MENU set MenuName='//ṹ
          Civil Structure' +WHERE MENUID='95C39F86-C060-452E-BA37-D891C466A39B'; + +UPDATE SYS_MENU set MenuName='
          Telecom' +WHERE MENUID='58FFBD80-ACB9-4830-A18A-E025D9600D94'; + +UPDATE SYS_MENU set MenuName='ع
          Plumbing' +WHERE MENUID='95295BF7-FB51-480D-9902-6ADA4E8427FC'; + +UPDATE SYS_MENU set MenuName='β
          Punch List Form' +WHERE MENUID='016903B1-3B86-4CF5-AFF8-FF8BE389BEE5'; + + +alter table Transfer_PunchlistFrom +alter COLUMN Num_No nvarchar(50); + +alter table Transfer_PunchlistFrom +alter COLUMN IsMatI nvarchar(50); diff --git a/DataBase/版本日志/SGGLDB_WH_V2024-07-29-phf.sql b/DataBase/版本日志/SGGLDB_WH_V2024-07-29-phf.sql new file mode 100644 index 00000000..98757ca9 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_V2024-07-29-phf.sql @@ -0,0 +1,21 @@ +alter table Transfer_LHCSystemList +add SystemNo nvarchar(50) NULL; + + +insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +values('E305689E-5D84-4C1A-BF67-85FA2D828115','ƽͳƱ','Transfer/Chart/Systemstatus.aspx',50,'3517DBE2-9728-4BA0-9EA5-AE2147DB883B' +,'Menu_Transfer',0,1,1) +go + + +insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +values('60838E30-4A46-4878-B299-C234900B10B7','ƽͳͼ','Transfer/Chart/SystemstatusChart.aspx',51,'3517DBE2-9728-4BA0-9EA5-AE2147DB883B' +,'Menu_Transfer',0,1,1) +go + + +insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +values('25C13642-AE77-42E2-B0FB-32663B68F93F','ƽ״̬ܱ','Transfer/Chart/SystemStatusSummary.aspx',60,'3517DBE2-9728-4BA0-9EA5-AE2147DB883B', +'Menu_Transfer',0,1,1) +go + diff --git a/SGGL/BLL/ProjectData/UnitWorkService.cs b/SGGL/BLL/ProjectData/UnitWorkService.cs index 524d22ad..5eafa6e3 100644 --- a/SGGL/BLL/ProjectData/UnitWorkService.cs +++ b/SGGL/BLL/ProjectData/UnitWorkService.cs @@ -636,5 +636,41 @@ namespace BLL return string.Empty; } } + + /// + /// 是否可增加子级 + /// + /// + /// true-可以,false-不可以 + public static bool IsCanAddUnitWork(string unitWorkId) + { + var unitWork = Funs.DB.WBS_UnitWork.FirstOrDefault(x => x.UnitWorkId == unitWorkId); + if (unitWork != null) + { + if (unitWork.IsChild == true) + { + return false; + } + else + { + return true; + } + } + else + { + return true; + } + } + + /// + /// 是否存在子级单位工程 + /// + /// + /// + public static bool IsExitsUnitWorkBySuperUnitWork(string superUnitWork) + { + return (from x in Funs.DB.WBS_UnitWork where x.SuperUnitWork == superUnitWork select x).Count() > 0; + } + } } diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index 83bd7d69..85710119 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -750,3 +750,82 @@ IP地址:::1 出错时间:07/25/2024 13:36:33 出错时间:07/25/2024 13:36:33 + +错误信息开始=====> +错误类型:SqlException +错误信息:参数化查询 '(@ProjectId nvarchar(4000),@Type nvarchar(1))select * from Trans' 需要参数 '@ProjectId',但未提供该参数。 +错误堆栈: + 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) + 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) + 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() + 在 System.Data.SqlClient.SqlDataReader.get_MetaData() + 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) + 在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) + 在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\SQLHelper.cs:行号 311 + 在 FineUIPro.Web.Transfer.LHCSystemList.BindGrid() 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\Transfer\LHCSystemList.aspx.cs:行号 78 + 在 FineUIPro.Web.Transfer.LHCSystemList.Page_Load(Object sender, EventArgs e) 位置 G:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\Transfer\LHCSystemList.aspx.cs:行号 42 + 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) + 在 System.EventHandler.Invoke(Object sender, EventArgs e) + 在 System.Web.UI.Control.OnLoad(EventArgs e) + 在 System.Web.UI.Control.LoadRecursive() + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:07/29/2024 16:03:19 +出错文件:http://localhost:8579/Transfer/LHCSystemList.aspx?Type=0 +IP地址:::1 +操作人员:JT + +出错时间:07/29/2024 16:03:19 + + +错误信息开始=====> +错误类型:HttpParseException +错误信息:FineUIPro.ControlBaseCollection 必须具有类型为“FineUIPro.ControlBase”的项。“div”的类型为“System.Web.UI.HtmlControls.HtmlGenericControl”。 +错误堆栈: + 在 System.Web.UI.TemplateParser.ProcessException(Exception ex) + 在 System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) + 在 System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) +----错误类型:HttpException +----错误信息: +----FineUIPro.ControlBaseCollection 必须具有类型为“FineUIPro.ControlBase”的项。“div”的类型为“System.Web.UI.HtmlControls.HtmlGenericControl”。 +----错误堆栈: + 在 System.Web.UI.CollectionBuilder.GetChildControlType(String tagName, IDictionary attribs) + 在 System.Web.UI.ControlBuilder.CreateChildBuilder(String filter, String tagName, IDictionary attribs, TemplateParser parser, ControlBuilder parentBuilder, String id, Int32 line, VirtualPath virtualPath, Type& childType, Boolean defaultProperty) + 在 System.Web.UI.TemplateParser.ProcessBeginTag(Match match, String inputText) + 在 System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) +出错时间:07/29/2024 16:40:04 +出错文件:http://localhost:8579/Transfer/Chart/SystemstatusChart.aspx +IP地址:::1 + +出错时间:07/29/2024 16:40:04 + + +错误信息开始=====> +错误类型:HttpCompileException +错误信息:g:\公司项目\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\Transfer\Chart\SystemstatusChart.aspx(166): error CS0103: 当前上下文中不存在名称“Two” +错误堆栈: + 在 System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) + 在 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) + 在 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) + 在 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) + 在 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) + 在 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) + 在 System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) + 在 System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() + 在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) + 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +出错时间:07/29/2024 16:47:59 +出错文件:http://localhost:8579/Transfer/Chart/SystemstatusChart.aspx +IP地址:::1 + +出错时间:07/29/2024 16:47:59 + diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/NonProcessSystemList导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/NonProcessSystemList导入模板.xls index 9777cbda..122ef869 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/NonProcessSystemList导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/NonProcessSystemList导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/ProcessSystemList导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/ProcessSystemList导入模板.xls index 35340a31..24e57678 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/ProcessSystemList导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/ProcessSystemList导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/PunchlistFrom导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/PunchlistFrom导入模板.xls index 5dcc1217..815c3387 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/PunchlistFrom导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/PunchlistFrom导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataOut/PunchlistFrom导出模板.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataOut/PunchlistFrom导出模板.xlsx new file mode 100644 index 00000000..bab50255 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataOut/PunchlistFrom导出模板.xlsx differ diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 37e95cc3..b2870513 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -2024,6 +2024,9 @@ + + + @@ -2045,6 +2048,7 @@ + @@ -17611,6 +17615,27 @@ PunchlistFromSort.aspx + + Systemstatus.aspx + ASPXCodeBehind + + + Systemstatus.aspx + + + SystemstatusChart.aspx + ASPXCodeBehind + + + SystemstatusChart.aspx + + + SystemStatusSummary.aspx + ASPXCodeBehind + + + SystemStatusSummary.aspx + TransferChart.aspx ASPXCodeBehind @@ -17758,6 +17783,13 @@ PunchlistFromDataIn.aspx + + PunchlistFromEdit.aspx + ASPXCodeBehind + + + PunchlistFromEdit.aspx + RotatingEquipment.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user index cb873201..63722353 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true false diff --git a/SGGL/FineUIPro.Web/ProjectData/UnitWork.aspx b/SGGL/FineUIPro.Web/ProjectData/UnitWork.aspx index b40a4897..2cfc5ae8 100644 --- a/SGGL/FineUIPro.Web/ProjectData/UnitWork.aspx +++ b/SGGL/FineUIPro.Web/ProjectData/UnitWork.aspx @@ -4,129 +4,122 @@ + 单位工程 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%-- - - - - - --%> - <%-- - - - - - --%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ProjectData/UnitWork.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/UnitWork.aspx.cs index 073d2831..ed797e6e 100644 --- a/SGGL/FineUIPro.Web/ProjectData/UnitWork.aspx.cs +++ b/SGGL/FineUIPro.Web/ProjectData/UnitWork.aspx.cs @@ -2,170 +2,28 @@ using System; using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; using System.Linq; namespace FineUIPro.Web.ProjectData { public partial class UnitWork : PageBase { + #region 页面加载 /// - /// 项目id + /// 页面加载 /// - public string ProjectId - { - get - { - return (string)ViewState["ProjectId"]; - } - set - { - ViewState["ProjectId"] = value; - } - } + /// + /// protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { - this.ProjectId = this.CurrUser.LoginProjectId; GetButtonPower(); - ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); - - // 绑定表格 - BindGrid(); - btnNew.OnClientClick = Window1.GetShowReference("UnitWorkEdit.aspx") + "return false;"; - - + InitTreeMenu(); } } - /// - /// 绑定数据 - /// + #endregion - public void BindGrid() - { - if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) - { - DataTable tb = ChecklistData(this.CurrUser.LoginProjectId); - Grid1.RecordCount = tb.Rows.Count; - tb = GetFilteredTable(Grid1.FilteredData, tb); - var table = this.GetPagedDataTable(Grid1, tb); - - Grid1.DataSource = table; - Grid1.DataBind(); - } - } - - - protected DataTable ChecklistData(string projectId) - { - string strSql = @"select UnitWorkId,UnitWorkCode,UnitWorkName,Costs,Weights,MainItemAndDesignProfessionalIds,SuperUnitWork,(case IsChild when '1' then 'true' else 'false' end) isChild,(case ProjectType when '1' then '建筑工程' when '2' then '安装工程' else '' end ) ProjectType ,Unit.UnitName AS UnitId,SupervisorUnit.UnitName AS SupervisorUnitId,NDEUnit.UnitName AS NDEUnit from [dbo].[WBS_UnitWork] AS UnitWork - Left join Base_Unit AS Unit on UnitWork.UnitId=Unit.UnitId - Left join Base_Unit AS SupervisorUnit on UnitWork.SupervisorUnitId=SupervisorUnit.UnitId - Left join Base_Unit AS NDEUnit on UnitWork.NDEUnit=NDEUnit.UnitId where ProjectId=@ProjectId "; - - List listStr = new List - { - new SqlParameter("@ProjectId", projectId) - }; - if (!string.IsNullOrEmpty(this.txtUnitWorkCode.Text.Trim())) - { - strSql += " AND UnitWorkCode like @UnitWorkCode"; - listStr.Add(new SqlParameter("@UnitWorkCode", "%" + this.txtUnitWorkCode.Text.Trim() + "%")); - } - if (!string.IsNullOrEmpty(this.txtUnitWorkName.Text.Trim())) - { - strSql += " AND UnitWorkName like @UnitWorkName"; - listStr.Add(new SqlParameter("@UnitWorkName", "%" + this.txtUnitWorkName.Text.Trim() + "%")); - } - SqlParameter[] parameter = listStr.ToArray(); - DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); - return tb; - } - protected void btnMenuModify_Click(object sender, EventArgs e) - { - EditData(); - } - - protected void btnMenuDel_Click(object sender, EventArgs e) - { - if (Grid1.SelectedRowIndexArray.Length > 0) - { - string message = string.Empty; - foreach (int rowIndex in Grid1.SelectedRowIndexArray) - { - string rowID = Grid1.DataKeys[rowIndex][0].ToString(); - var unitwork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(rowID); - if (unitwork != null) - { - string rowMessage= this.judgementDelete(rowID, unitwork.UnitWorkName); - if (string.IsNullOrEmpty(rowMessage)) - { - BLL.BreakdownProjectService.DeleteAllBreakdownByUnitWorkId(rowID); - BLL.DivisionProjectService.DeleteDivisionProjectByUnitWorkId(rowID); - BLL.UnitWorkService.DeleteUnitWorkById(rowID); - } - else - { - message += rowMessage; - } - } - } - - BindGrid(); - if (string.IsNullOrEmpty(message)) - { - ShowNotify("删除数据成功!", MessageBoxIcon.Success); - } - else - { - Alert.ShowInParent(message, MessageBoxIcon.Warning); - } - } - } - - /// - /// 判断是否可删除 - /// - /// - /// - /// - private string judgementDelete(string rowID,string name) - { - string content = string.Empty; - var inspection = from x in Funs.DB.ProcessControl_InspectionManagement where x.UnitWorkId == rowID select x; - foreach (var item in inspection) - { - content += "共检通知单【"+ item.InspectionCode+ "】"; - } - - if (!string.IsNullOrEmpty(content)) - { - content += "中已使用单位工程【" + name + "】!"; - } - return content; - } - - /// - /// 编辑数据方法 - /// - private void EditData() - { - - if (Grid1.SelectedRowIndexArray.Length == 0) - { - Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning); - return; - } - if (this.btnMenuModify.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面 - { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("UnitWorkView.aspx?UnitWorkId={0}", Grid1.SelectedRowID, "查看 - "))); - } - else - { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("UnitWorkEdit.aspx?UnitWorkId={0}", Grid1.SelectedRowID, "编辑 - "))); - } - } #region 获取按钮权限 /// /// 获取按钮权限 @@ -178,85 +36,498 @@ namespace FineUIPro.Web.ProjectData { return; } - var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.UnitWorkMenuId); + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.UnitWorkMenuId); if (buttonList.Count() > 0) { if (buttonList.Contains(BLL.Const.BtnAdd)) { - this.btnNew.Hidden = false; + this.btnMenuAdd.Hidden = false; } if (buttonList.Contains(BLL.Const.BtnModify)) { - this.btnMenuModify.Hidden = false; + this.btnMenuEdit.Hidden = false; } if (buttonList.Contains(BLL.Const.BtnDelete)) { - this.btnMenuDel.Hidden = false; + this.btnMenuDelete.Hidden = false; } } } #endregion + #region 加载树 /// - /// 获取对应主项及设计专业 + /// 加载树 /// - /// - /// - protected string ConvertDesignProfessionalName(object MainItemAndDesignProfessionalIds) + private void InitTreeMenu() { - string ProfessionalName = string.Empty; - if (MainItemAndDesignProfessionalIds != null) + this.trProjects.Nodes.Clear(); + this.trProjects.ShowBorder = false; + this.trProjects.ShowHeader = false; + this.trProjects.EnableIcons = true; + this.trProjects.AutoScroll = true; + this.trProjects.EnableSingleClickExpand = true; + Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId); + if (project != null) { - ProfessionalName = UnitWorkService.GetMainItemAndDesignProfessionalName(MainItemAndDesignProfessionalIds.ToString(), CurrUser.LoginProjectId); + TreeNode node = new TreeNode(); + node.Text = project.ProjectName; + node.NodeID = project.ProjectId; + node.CommandName = "project"; + node.EnableClickEvent = true; + node.EnableExpandEvent = true; + this.trProjects.Nodes.Add(node); + TreeNode emptyNode = new TreeNode(); + emptyNode.Text = ""; + emptyNode.NodeID = ""; + node.Nodes.Add(emptyNode); } - return ProfessionalName; } - protected void btnSearch_Click(object sender, EventArgs e) + #endregion + + #region 展开树 + /// + /// 展开树 + /// + /// + /// + protected void trProjects_NodeExpand(object sender, TreeNodeEventArgs e) { + e.Node.Nodes.Clear(); + if (e.Node.CommandName == "project") //展开项目节点 + { + var unitWorks = from x in Funs.DB.WBS_UnitWork + where x.ProjectId == e.Node.NodeID && x.SuperUnitWork == "0" + orderby x.UnitWorkCode + select x; + foreach (var unitWork in unitWorks) + { + TreeNode newNode = new TreeNode(); + newNode.Text = unitWork.UnitWorkName; + newNode.NodeID = unitWork.UnitWorkId; + newNode.CommandName = "unitWork"; + newNode.EnableExpandEvent = true; + newNode.EnableClickEvent = true; + e.Node.Nodes.Add(newNode); + var installation2s = from x in Funs.DB.WBS_UnitWork where x.SuperUnitWork == unitWork.UnitWorkId orderby x.UnitWorkCode select x; + if (installation2s.Count() > 0) + { + TreeNode emptyNode = new TreeNode(); + emptyNode.Text = ""; + emptyNode.NodeID = ""; + newNode.Nodes.Add(emptyNode); + } + } + } + else if (e.Node.CommandName == "unitWork") //展开装置/单元节点 + { + var unitWorks = from x in Funs.DB.WBS_UnitWork + where x.SuperUnitWork == e.Node.NodeID + orderby x.UnitWorkCode + select x; + foreach (var unitWork in unitWorks) + { + TreeNode newNode = new TreeNode(); + newNode.Text = unitWork.UnitWorkName; + newNode.NodeID = unitWork.UnitWorkId; + newNode.CommandName = "unitWork"; + newNode.EnableExpandEvent = true; + newNode.EnableClickEvent = true; + e.Node.Nodes.Add(newNode); + var installation3s = from x in Funs.DB.WBS_UnitWork where x.SuperUnitWork == unitWork.UnitWorkId orderby x.UnitWorkCode select x; + if (installation3s.Count() > 0) + { + TreeNode emptyNode = new TreeNode(); + emptyNode.Text = ""; + emptyNode.NodeID = ""; + newNode.Nodes.Add(emptyNode); + } + } + } + } + #endregion + + #region Tree点击事件 + /// + /// Tree点击事件 + /// + /// + /// + protected void trProjects_NodeCommand(object sender, TreeCommandEventArgs e) + { + if (this.Grid1.Rows.Count > 0) + { + SaveData(); + } BindGrid(); } + #endregion - protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + #region 保存方法 + /// + /// 保存方法 + /// + private void SaveData() { - EditData(); + //string rowId = this.Grid1.Rows[0].RowID; + //string type = this.Grid1.Rows[0].Values[4].ToString(); + + //if (type == "unitProject") + //{ + // Model.Wbs_UnitProjectInit unitProject = BLL.UnitProjectInitService.GetUnitProjectInitByUnitProjectCode(rowId); + // if (unitProject != null) + // { + // BLL.UnitProjectInitService.UpdateUnitProjectInit(unitProject); + // } + //} + //else if (type == "wbsSet") + //{ + // Model.WBS_WbsSetInit wbsSet = BLL.WbsSetInitService.GetWbsSetInitByWbsSetCode(rowId); + // if (wbsSet != null) + // { + // var childWbsSets = BLL.WbsSetInitService.GetWbsSetInitsBySuperWbsSetCode(this.trProjects.SelectedNodeID); + // //wbsSet.StartDate = Convert.ToDateTime(this.Grid1.Rows[0].Values[2].ToString()); + // //wbsSet.EndDate = Convert.ToDateTime(this.Grid1.Rows[0].Values[3].ToString()); + // BLL.WbsSetInitService.UpdateWbsSetInit(wbsSet); + // } + //} + } + #endregion + + #region 修改关闭窗口 + /// + /// 关闭窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + ShowNotify("修改成功!", MessageBoxIcon.Success); + + getWBSSet(); + } + #endregion + + #region 拷贝关闭窗口 + /// + /// 拷贝关闭窗口 + /// + /// + /// + protected void Window2_Close(object sender, WindowCloseEventArgs e) + { + ShowNotify("增加成功!", MessageBoxIcon.Success); + + getWBSSet(); + } + #endregion + + #region 右键增加、修改、删除方法 + /// + /// 右键修改事件 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + if (this.trProjects.SelectedNode != null && this.trProjects.SelectedNode.CommandName != "project") + { + if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.UnitWorkMenuId, BLL.Const.BtnModify)) + { + this.hdSelectId.Text = this.trProjects.SelectedNode.NodeID; + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("UnitWorkEdit.aspx?Id={0}", this.trProjects.SelectedNode.NodeID, "编辑 - "))); + } + else + { + ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("项目节点无法修改!", MessageBoxIcon.Warning); + } + } + + /// + /// 增加 + /// + /// + /// + protected void btnMenuAdd_Click(object sender, EventArgs e) + { + if (this.trProjects.SelectedNode != null) + { + if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.UnitWorkMenuId, BLL.Const.BtnAdd)) + { + string openUrl = String.Format("UnitWorkEdit.aspx?SuperId={0}", this.trProjects.SelectedNode.NodeID, "增加 - "); + + PageContext.RegisterStartupScript(Window2.GetSaveStateReference(hdSelectId.ClientID) + + Window2.GetShowReference(openUrl)); + } + else + { + ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请选择树节点!", MessageBoxIcon.Warning); + } } - protected void btnMenuView_Click(object sender, EventArgs e) + + /// + /// 右键删除事件 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) { - if (Grid1.SelectedRowIndexArray.Length == 0) + if (this.trProjects.SelectedNode != null) { - Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); - return; + if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.UnitWorkMenuId, BLL.Const.BtnDelete)) + { + if (this.trProjects.SelectedNode.CommandName != "project") //非专业节点可以删除 + { + string id = this.trProjects.SelectedNode.NodeID; + Model.WBS_UnitWork unitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(id); + if (unitWork.SuperUnitWork == "0") //删除一级装置 + { + BLL.UnitWorkService.DeleteUnitWorkById(id); + var unitWork2s = from x in Funs.DB.WBS_UnitWork where x.SuperUnitWork == id select x; + foreach (var unitWork2 in unitWork2s) + { + BLL.UnitWorkService.DeleteUnitWorkById(unitWork2.UnitWorkId); + var unitWork3s = from x in Funs.DB.WBS_UnitWork where x.SuperUnitWork == unitWork2.UnitWorkId select x; + foreach (var unitWork3 in unitWork3s) + { + BLL.UnitWorkService.DeleteUnitWorkById(unitWork3.UnitWorkId); + } + } + } + else + { + Model.WBS_UnitWork unitWork2 = BLL.UnitWorkService.getUnitWorkByUnitWorkId(id); + Model.WBS_UnitWork unitWork1 = BLL.UnitWorkService.getUnitWorkByUnitWorkId(unitWork2.SuperUnitWork); + if (unitWork1.SuperUnitWork == "0") //删除二级装置 + { + BLL.UnitWorkService.DeleteUnitWorkById(id); + var unitWork3s = from x in Funs.DB.WBS_UnitWork where x.SuperUnitWork == id select x; + foreach (var unitWork3 in unitWork3s) + { + BLL.UnitWorkService.DeleteUnitWorkById(unitWork3.UnitWorkId); + } + } + else //删除二级装置 + { + BLL.UnitWorkService.DeleteUnitWorkById(id); + } + } + ShowNotify("删除成功!", MessageBoxIcon.Success); + InitTreeMenu(); + } + else + { + ShowNotify("项目节点无法删除!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + } } - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("UnitWorkView.aspx?UnitWorkId={0}", Grid1.SelectedRowID, "查看 - "))); + else + { + ShowNotify("请选择树节点!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 绑定数据 + /// + /// 绑定数据 + /// + /// + /// + protected void Grid1_FilterChange(object sender, EventArgs e) + { + BindGrid(); } protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) { + Grid1.PageIndex = e.NewPageIndex; BindGrid(); } + /// + /// Grid1排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + + /// + /// 分页下拉选择事件 + /// + /// + /// protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) { Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); BindGrid(); } - /// - /// 重置 - /// - /// - /// - protected void btnRset_Click(object sender, EventArgs e) - { - txtUnitWorkCode.Text = ""; - txtUnitWorkName.Text = ""; - BindGrid(); - } - protected void Window1_Close(object sender, WindowCloseEventArgs e) + /// + /// 加载Grid + /// + private void BindGrid() { + List items = new List(); + if (this.trProjects.SelectedNode != null) + { + if (this.trProjects.SelectedNode.CommandName == "unitWork") + { + Model.WBS_UnitWork installation = BLL.UnitWorkService.getUnitWorkByUnitWorkId(this.trProjects.SelectedNode.NodeID); + Model.WBS_UnitWork item = new Model.WBS_UnitWork(); + if (installation != null) + { + item.UnitWorkId = installation.UnitWorkId; + item.UnitWorkCode = installation.UnitWorkCode; + item.UnitWorkName = installation.UnitWorkName; + //item.ProjectType = "unitWork"; + items.Add(item); + } + } + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + } + } + #endregion + + #region 根据所给Id定位到对应装置 + /// + /// 根据所给Id定位到对应装置 + /// + private void getWBSSet() + { + string unitWorkId = string.Empty; + string pUnitWorkId = string.Empty; + string ppUnitWorkId = string.Empty; + string projectId = this.CurrUser.LoginProjectId; + string id = this.hdSelectId.Text; + Model.WBS_UnitWork installation = BLL.UnitWorkService.getUnitWorkByUnitWorkId(id); + if (installation.SuperUnitWork == "0") //一级装置 + { + ppUnitWorkId = id; + } + else + { + if (BLL.UnitWorkService.IsCanAddUnitWork(id)) //二级装置 + { + pUnitWorkId = id; + ppUnitWorkId = installation.SuperUnitWork; + } + else //三级装置 + { + unitWorkId = id; + pUnitWorkId = installation.SuperUnitWork; + Model.WBS_UnitWork pInstallation = BLL.UnitWorkService.getUnitWorkByUnitWorkId(installation.SuperUnitWork); + if (pInstallation != null) + { + ppUnitWorkId = pInstallation.SuperUnitWork; + } + } + } + this.trProjects.Nodes.Clear(); + this.trProjects.ShowBorder = false; + this.trProjects.ShowHeader = false; + this.trProjects.EnableIcons = true; + this.trProjects.AutoScroll = true; + this.trProjects.EnableSingleClickExpand = true; + Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId); + if (project != null) + { + TreeNode node = new TreeNode(); + node.Text = project.ProjectName; + node.NodeID = project.ProjectId; + node.EnableClickEvent = true; + this.trProjects.Nodes.Add(node); + node.Expanded = true; + var unitWork1s = from x in Funs.DB.WBS_UnitWork + where x.ProjectId == projectId && x.SuperUnitWork == "0" + orderby x.UnitWorkCode + select x; + foreach (var unitWork1 in unitWork1s) + { + TreeNode newNode1 = new TreeNode(); + newNode1.Text = unitWork1.UnitWorkName; + newNode1.NodeID = unitWork1.UnitWorkId; + newNode1.CommandName = "unitWork"; + newNode1.EnableExpandEvent = true; + newNode1.EnableClickEvent = true; + node.Nodes.Add(newNode1); + if (unitWork1.UnitWorkId == ppUnitWorkId) + { + newNode1.Expanded = true; + var unitWork2s = from x in Funs.DB.WBS_UnitWork where x.SuperUnitWork == unitWork1.SuperUnitWork orderby x.UnitWorkCode select x; + foreach (var unitWork2 in unitWork2s) + { + TreeNode newNode2 = new TreeNode(); + newNode2.Text = unitWork2.UnitWorkName; + newNode2.NodeID = unitWork2.UnitWorkId; + newNode2.CommandName = "unitWork"; + newNode2.EnableExpandEvent = true; + newNode2.EnableClickEvent = true; + newNode1.Nodes.Add(newNode2); + if (unitWork2.UnitWorkId == pUnitWorkId) + { + newNode2.Expanded = true; + var unitWork3s = from x in Funs.DB.WBS_UnitWork where x.SuperUnitWork == unitWork2.UnitWorkId orderby x.UnitWorkCode select x; + foreach (var unitWork3 in unitWork3s) + { + TreeNode newNode3 = new TreeNode(); + newNode3.Text = unitWork3.UnitWorkName; + newNode3.NodeID = unitWork3.UnitWorkId; + newNode3.CommandName = "unitWork"; + newNode3.EnableExpandEvent = true; + newNode3.EnableClickEvent = true; + newNode2.Nodes.Add(newNode3); + } + } + else + { + if (BLL.UnitWorkService.IsExitsUnitWorkBySuperUnitWork(unitWork2.UnitWorkId)) + { + TreeNode emptyNode = new TreeNode(); + emptyNode.Text = ""; + emptyNode.NodeID = ""; + newNode2.Nodes.Add(emptyNode); + } + } + } + } + else + { + if (BLL.UnitWorkService.IsExitsUnitWorkBySuperUnitWork(unitWork1.UnitWorkId)) + { + TreeNode emptyNode = new TreeNode(); + emptyNode.Text = ""; + emptyNode.NodeID = ""; + newNode1.Nodes.Add(emptyNode); + } + } + } + } + this.trProjects.SelectedNodeID = this.hdSelectId.Text; BindGrid(); } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ProjectData/UnitWork.aspx.designer.cs b/SGGL/FineUIPro.Web/ProjectData/UnitWork.aspx.designer.cs index 1f21c25d..17411897 100644 --- a/SGGL/FineUIPro.Web/ProjectData/UnitWork.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/ProjectData/UnitWork.aspx.designer.cs @@ -31,13 +31,58 @@ namespace FineUIPro.Web.ProjectData { protected global::FineUIPro.PageManager PageManager1; /// - /// Panel1 控件。 + /// RegionPanel1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Panel Panel1; + protected global::FineUIPro.RegionPanel RegionPanel1; + + /// + /// Region1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Region Region1; + + /// + /// panel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panel2; + + /// + /// trProjects 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree trProjects; + + /// + /// hdSelectId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdSelectId; + + /// + /// Region2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Region Region2; /// /// Grid1 控件。 @@ -48,69 +93,6 @@ namespace FineUIPro.Web.ProjectData { /// protected global::FineUIPro.Grid Grid1; - /// - /// Toolbar1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Toolbar Toolbar1; - - /// - /// txtUnitWorkCode 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtUnitWorkCode; - - /// - /// txtUnitWorkName 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtUnitWorkName; - - /// - /// btnSearch 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnSearch; - - /// - /// btnRset 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnRset; - - /// - /// btnNew 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnNew; - - /// - /// lblPageIndex 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.WebControls.Label lblPageIndex; - /// /// ToolbarSeparator1 控件。 /// @@ -147,6 +129,15 @@ namespace FineUIPro.Web.ProjectData { /// protected global::FineUIPro.Window Window1; + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + /// /// Menu1 控件。 /// @@ -157,30 +148,30 @@ namespace FineUIPro.Web.ProjectData { protected global::FineUIPro.Menu Menu1; /// - /// btnMenuModify 控件。 + /// btnMenuAdd 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.MenuButton btnMenuModify; + protected global::FineUIPro.MenuButton btnMenuAdd; /// - /// btnMenuView 控件。 + /// btnMenuEdit 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.MenuButton btnMenuView; + protected global::FineUIPro.MenuButton btnMenuEdit; /// - /// btnMenuDel 控件。 + /// btnMenuDelete 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.MenuButton btnMenuDel; + protected global::FineUIPro.MenuButton btnMenuDelete; } } diff --git a/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx b/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx index db93ee75..aa3d2f55 100644 --- a/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx +++ b/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx @@ -4,59 +4,31 @@ -单位工程 - + + 编辑单位工程
- + - + - - - - - - - - + - - - - - - - - - - - - - - - - - + + - - - - - + diff --git a/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.cs index 5ae96edc..d54e298c 100644 --- a/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.cs @@ -1,372 +1,68 @@ using BLL; using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.ProjectData { public partial class UnitWorkEdit : PageBase { - /// - /// 项目id - /// - public string ProjectId - { - get - { - return (string)ViewState["ProjectId"]; - } - set - { - ViewState["ProjectId"] = value; - } - } + private static string superId; + private static string id; + protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { - - this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); - BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpUnit, this.CurrUser.LoginProjectId, Const.ProjectUnitType_2, true);//施工 - BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpSupervisorUnit, this.CurrUser.LoginProjectId, Const.ProjectUnitType_3, true);//监理 - BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpNDEUnit, this.CurrUser.LoginProjectId, Const.ProjectUnitType_5, true);//检测 - string UnitWorkId = Request.Params["UnitWorkId"]; - if (!string.IsNullOrEmpty(UnitWorkId)) + superId = Request.Params["SuperId"]; + id = Request.Params["Id"]; + Model.WBS_UnitWork unitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(id); + if (unitWork != null) { - - Model.WBS_UnitWork UnitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(UnitWorkId); - if (UnitWork != null) - { - this.ProjectId = UnitWork.ProjectId; - this.txtUnitWorkCode.Text = UnitWork.UnitWorkCode; - this.txtUnitWorkName.Text = UnitWork.UnitWorkName; - if (UnitWork.Costs != null) - { - this.txtCosts.Text = UnitWork.Costs.ToString(); - } - if (!string.IsNullOrEmpty(UnitWork.UnitId)) - { - this.drpUnit.SelectedValue = UnitWork.UnitId; - } - if (!string.IsNullOrEmpty(UnitWork.SupervisorUnitId)) - { - this.drpSupervisorUnit.SelectedValue = UnitWork.SupervisorUnitId; - } - if (!string.IsNullOrEmpty(UnitWork.NDEUnit)) - { - this.drpNDEUnit.SelectedValue = UnitWork.NDEUnit; - } - } + this.txtUnitWorkCode.Text = unitWork.UnitWorkCode; + this.txtUnitWorkName.Text = unitWork.UnitWorkName; } } - } protected void btnSave_Click(object sender, EventArgs e) { - SaveData(true); - } - - private void SaveData(bool bl) - { - //if (this.drpProjectType.SelectedValue == BLL.Const._Null) - //{ - // Alert.ShowInTop("所属工程不能为空!", MessageBoxIcon.Warning); - // return; - //} - string UnitWorkId = Request.Params["UnitWorkId"]; - Model.WBS_UnitWork UnitWork = new Model.WBS_UnitWork(); - UnitWork.ProjectId = this.CurrUser.LoginProjectId; - UnitWork.UnitWorkCode = this.txtUnitWorkCode.Text.Trim(); - UnitWork.UnitWorkName = this.txtUnitWorkName.Text.Trim(); - //if (this.drpUnit.SelectedValue != BLL.Const._Null) - //{ - // UnitWork.UnitId = this.drpUnit.SelectedValue; - //} - //else - //{ - // Alert.ShowInTop("请选择施工单位!"); - // return; - //} - if (this.drpSupervisorUnit.SelectedValue != BLL.Const._Null) + string projectId = string.Empty; + string superUnitWorkId = string.Empty; + Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(superId); + Model.WBS_UnitWork parUnitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(superId); + if (project != null) { - UnitWork.SupervisorUnitId = this.drpSupervisorUnit.SelectedValue; + projectId = project.ProjectId; + superUnitWorkId = "0"; } - if (this.drpNDEUnit.SelectedValue != BLL.Const._Null) + else if (parUnitWork != null) { - UnitWork.NDEUnit = this.drpNDEUnit.SelectedValue; + projectId = parUnitWork.ProjectId; + superUnitWorkId = superId; } - if (!string.IsNullOrEmpty(this.txtCosts.Text.Trim())) - { - UnitWork.Costs = Convert.ToDecimal(this.txtCosts.Text.Trim()); - } - if (!string.IsNullOrEmpty(UnitWorkId)) - { - UnitWork.UnitWorkId = UnitWorkId; - BLL.UnitWorkService.UpdateUnitWork(UnitWork); - var divisionProject = Funs.DB.WBS_DivisionProject.FirstOrDefault(x => x.UnitWorkId == UnitWork.UnitWorkId); - if (divisionProject == null) - { - #region 拷贝WBS内容 - //拷贝分部及子分部 - var divisions1 = from x in Funs.DB.WBS_Division where x.SuperDivisionId == null select x; - foreach (var d1 in divisions1) - { - Model.WBS_DivisionProject newDivisionProject = new Model.WBS_DivisionProject(); - newDivisionProject.DivisionProjectId = SQLHelper.GetNewID(typeof(Model.WBS_DivisionProject)); - newDivisionProject.ProjectId = this.CurrUser.LoginProjectId; - newDivisionProject.DivisionCode = d1.DivisionCode; - newDivisionProject.DivisionName = d1.DivisionName; - newDivisionProject.SortIndex = d1.SortIndex; - newDivisionProject.SuperDivisionId = d1.SuperDivisionId; - newDivisionProject.CNProfessionalId = d1.CNProfessionalId; - newDivisionProject.UnitWorkId = UnitWork.UnitWorkId; - newDivisionProject.OldDivisionId = d1.DivisionId; - newDivisionProject.SubItemType = d1.SubItemType; - BLL.DivisionProjectService.AddDivisionProject(newDivisionProject); //分部 - List divisions2 = (from x in Funs.DB.WBS_Division where x.SuperDivisionId == d1.DivisionId select x).ToList(); - if (divisions2.Count() > 0) - { - this.InsertDivisionDetail(divisions2, newDivisionProject.DivisionProjectId, UnitWork.UnitWorkId); - } - } - //拷贝分项 - var breakdowns = from x in Funs.DB.WBS_Breakdown select x; - foreach (var b in breakdowns) - { - Model.WBS_BreakdownProject bp = new Model.WBS_BreakdownProject(); - bp.BreakdownProjectId = SQLHelper.GetNewID(typeof(Model.WBS_BreakdownProject)); - bp.ProjectId = this.CurrUser.LoginProjectId; - bp.BreakdownCode = b.BreakdownCode; - bp.BreakdownName = b.BreakdownName; - bp.DivisionProjectId = (from x in Funs.DB.WBS_DivisionProject where x.OldDivisionId == b.DivisionId && x.UnitWorkId == UnitWork.UnitWorkId select x.DivisionProjectId).FirstOrDefault(); - bp.Basis = b.Basis; - bp.CheckPoints = b.CheckPoints; - bp.RecordAndCode = b.RecordAndCode; - bp.Class = b.Class; - bp.SortIndex = b.SortIndex; - bp.Remark = b.Remark; - bp.ModelURL = b.ModelURL; - bp.UnitWorkId = UnitWork.UnitWorkId; - bp.IsAcceptance = b.IsAcceptance; - bp.IsYellow = b.IsYellow; - bp.WuHuan = b.WuHuan; - bp.JianLi = b.JianLi; - bp.FenBao = b.FenBao; - bp.YeZhu = b.YeZhu; - bp.SourceBreakdownId = b.BreakdownId; - bp.CheckAcceptType = b.CheckAcceptType; - BLL.BreakdownProjectService.AddBreakdownProject(bp); - } - #endregion - } - else - { - #region 拷贝建筑工程WBS内容 - //拷贝分部及子分部 - var divisions1 = from x in Funs.DB.WBS_Division where x.SuperDivisionId == null && x.CNProfessionalId == BLL.Const.CNProfessionalConstructId select x; - foreach (var d1 in divisions1) - { - Model.WBS_DivisionProject newDivisionProject = new Model.WBS_DivisionProject(); - newDivisionProject.DivisionProjectId = SQLHelper.GetNewID(typeof(Model.WBS_DivisionProject)); - newDivisionProject.ProjectId = this.CurrUser.LoginProjectId; - newDivisionProject.DivisionCode = d1.DivisionCode; - newDivisionProject.DivisionName = d1.DivisionName; - newDivisionProject.SortIndex = d1.SortIndex; - newDivisionProject.SuperDivisionId = d1.SuperDivisionId; - newDivisionProject.CNProfessionalId = d1.CNProfessionalId; - newDivisionProject.UnitWorkId = UnitWork.UnitWorkId; - newDivisionProject.OldDivisionId = d1.DivisionId; - BLL.DivisionProjectService.AddDivisionProject(newDivisionProject); //分部 - List divisions2 = (from x in Funs.DB.WBS_Division where x.SuperDivisionId == d1.DivisionId select x).ToList(); - if (divisions2.Count() > 0) - { - this.InsertDivisionDetail(divisions2, newDivisionProject.DivisionProjectId, UnitWork.UnitWorkId); - } - } - //拷贝分项 - var breakdowns = from x in Funs.DB.WBS_Breakdown - join y in Funs.DB.WBS_Division on x.DivisionId equals y.DivisionId - where y.CNProfessionalId == BLL.Const.CNProfessionalConstructId - select x; - foreach (var b in breakdowns) - { - Model.WBS_BreakdownProject bp = new Model.WBS_BreakdownProject(); - bp.BreakdownProjectId = SQLHelper.GetNewID(typeof(Model.WBS_BreakdownProject)); - bp.ProjectId = this.CurrUser.LoginProjectId; - bp.BreakdownCode = b.BreakdownCode; - bp.BreakdownName = b.BreakdownName; - bp.DivisionProjectId = (from x in Funs.DB.WBS_DivisionProject where x.OldDivisionId == b.DivisionId && x.UnitWorkId == UnitWork.UnitWorkId select x.DivisionProjectId).FirstOrDefault(); - bp.Basis = b.Basis; - bp.CheckPoints = b.CheckPoints; - bp.RecordAndCode = b.RecordAndCode; - bp.Class = b.Class; - bp.SortIndex = b.SortIndex; - bp.Remark = b.Remark; - bp.ModelURL = b.ModelURL; - bp.UnitWorkId = UnitWork.UnitWorkId; - bp.IsAcceptance = b.IsAcceptance; - bp.IsYellow = b.IsYellow; - bp.WuHuan = b.WuHuan; - bp.JianLi = b.JianLi; - bp.FenBao = b.FenBao; - bp.YeZhu = b.YeZhu; - bp.SourceBreakdownId = b.BreakdownId; + Model.WBS_UnitWork unitWork = new Model.WBS_UnitWork(); + unitWork.UnitWorkCode = txtUnitWorkCode.Text.Trim(); + unitWork.UnitWorkName = txtUnitWorkName.Text.Trim(); + unitWork.ProjectId = projectId; + unitWork.SuperUnitWork = superUnitWorkId; + if (string.IsNullOrEmpty(id)) + { + unitWork.UnitWorkId = SQLHelper.GetNewID(typeof(Model.WBS_UnitWork)); + BLL.UnitWorkService.AddUnitWork(unitWork); - BLL.BreakdownProjectService.AddBreakdownProject(bp); - } - #endregion - } - Model.DataBase_DataTypeProject dp = Funs.DB.DataBase_DataTypeProject.FirstOrDefault(x=>x.UnitWorkId== UnitWorkId); - if (dp == null) - { - #region 拷贝资料库内容 - Model.DataBase_DataTypeProject dataTypeProject = BLL.DataTypeProjectService.GetDataTypeProjectBySourceDataTypeId(Const.DataTypeNewConstructId, this.CurrUser.LoginProjectId); - List childDataTypes = BLL.DataTypeService.GetDataTypesBySuperDataTypeId(Const.DataTypeNewConstructId); - if (childDataTypes.Count > 0) - { - if (dataTypeProject != null) - { - InsertDataTypeDetail(childDataTypes, dataTypeProject.DataTypeProjectId, this.CurrUser.LoginProjectId, UnitWork.UnitWorkId); - } - } - #endregion - } + BLL.LogService.AddSys_Log(this.CurrUser, unitWork.UnitWorkId, unitWork.UnitWorkId, BLL.Const.UnitWorkMenuId, "增加单位工程!"); + PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(unitWork.UnitWorkId) + ActiveWindow.GetHidePostBackReference()); } else { - UnitWork.UnitWorkId = SQLHelper.GetNewID(typeof(Model.WBS_UnitWork)); - BLL.UnitWorkService.AddUnitWork(UnitWork); - #region 拷贝WBS内容 - //拷贝分部及子分部 - var divisions1 = from x in Funs.DB.WBS_Division where x.SuperDivisionId == null select x; - foreach (var d1 in divisions1) - { - Model.WBS_DivisionProject newDivisionProject = new Model.WBS_DivisionProject(); - newDivisionProject.DivisionProjectId = SQLHelper.GetNewID(typeof(Model.WBS_DivisionProject)); - newDivisionProject.ProjectId = this.CurrUser.LoginProjectId; - newDivisionProject.DivisionCode = d1.DivisionCode; - newDivisionProject.DivisionName = d1.DivisionName; - newDivisionProject.SortIndex = d1.SortIndex; - newDivisionProject.SuperDivisionId = d1.SuperDivisionId; - newDivisionProject.CNProfessionalId = d1.CNProfessionalId; - newDivisionProject.UnitWorkId = UnitWork.UnitWorkId; - newDivisionProject.OldDivisionId = d1.DivisionId; - BLL.DivisionProjectService.AddDivisionProject(newDivisionProject); //分部 - List divisions2 = (from x in Funs.DB.WBS_Division where x.SuperDivisionId == d1.DivisionId select x).ToList(); - if (divisions2.Count() > 0) - { - this.InsertDivisionDetail(divisions2, newDivisionProject.DivisionProjectId, UnitWork.UnitWorkId); - } - } - //拷贝分项 - var breakdowns = from x in Funs.DB.WBS_Breakdown select x; - foreach (var b in breakdowns) - { - Model.WBS_BreakdownProject bp = new Model.WBS_BreakdownProject(); - bp.BreakdownProjectId = SQLHelper.GetNewID(typeof(Model.WBS_BreakdownProject)); - bp.ProjectId = this.CurrUser.LoginProjectId; - bp.BreakdownCode = b.BreakdownCode; - bp.BreakdownName = b.BreakdownName; - bp.DivisionProjectId = (from x in Funs.DB.WBS_DivisionProject where x.OldDivisionId == b.DivisionId && x.UnitWorkId == UnitWork.UnitWorkId select x.DivisionProjectId).FirstOrDefault(); - bp.Basis = b.Basis; - bp.CheckPoints = b.CheckPoints; - bp.RecordAndCode = b.RecordAndCode; - bp.Class = b.Class; - bp.SortIndex = b.SortIndex; - bp.Remark = b.Remark; - bp.ModelURL = b.ModelURL; - bp.UnitWorkId = UnitWork.UnitWorkId; - bp.IsAcceptance = b.IsAcceptance; - bp.IsYellow = b.IsYellow; - bp.WuHuan = b.WuHuan; - bp.JianLi = b.JianLi; - bp.FenBao = b.FenBao; - bp.YeZhu = b.YeZhu; - bp.SourceBreakdownId = b.BreakdownId; - - BLL.BreakdownProjectService.AddBreakdownProject(bp); - } - #endregion - #region 拷贝资料库内容 - Model.DataBase_DataTypeProject dataTypeProject = BLL.DataTypeProjectService.GetDataTypeProjectBySourceDataTypeId(Const.DataTypeNewConstructId, this.CurrUser.LoginProjectId); - List childDataTypes = BLL.DataTypeService.GetDataTypesBySuperDataTypeId(Const.DataTypeNewConstructId); - if (childDataTypes.Count > 0) - { - if (dataTypeProject != null) - { - InsertDataTypeDetail(childDataTypes, dataTypeProject.DataTypeProjectId, this.CurrUser.LoginProjectId, UnitWork.UnitWorkId); - } - } - #endregion - } - ShowNotify("保存成功!", MessageBoxIcon.Success); - PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); - } - - /// - /// 循环拷贝子级分部 - /// - /// - private void InsertDivisionDetail(List divisions, string superDivisionId, string unitWorkId) - { - foreach (var d in divisions) - { - Model.WBS_DivisionProject newDivisionProject = new Model.WBS_DivisionProject(); - newDivisionProject.DivisionProjectId = SQLHelper.GetNewID(typeof(Model.WBS_DivisionProject)); - newDivisionProject.ProjectId = this.CurrUser.LoginProjectId; - newDivisionProject.DivisionCode = d.DivisionCode; - newDivisionProject.DivisionName = d.DivisionName; - newDivisionProject.SortIndex = d.SortIndex; - newDivisionProject.SuperDivisionId = superDivisionId; - newDivisionProject.CNProfessionalId = d.CNProfessionalId; - newDivisionProject.UnitWorkId = unitWorkId; - newDivisionProject.OldDivisionId = d.DivisionId; - newDivisionProject.SubItemType = d.SubItemType; - BLL.DivisionProjectService.AddDivisionProject(newDivisionProject); //子级分部 - List divisions2 = (from x in Funs.DB.WBS_Division where x.SuperDivisionId == d.DivisionId select x).ToList(); - if (divisions2.Count() > 0) - { - this.InsertDivisionDetail(divisions2, newDivisionProject.DivisionProjectId, unitWorkId); - } - } - } - - /// - /// 循环拷贝子级类别 - /// - /// - private void InsertDataTypeDetail(List dataTypes, string superDataTypeId, string projectId, string unitWorkId) - { - foreach (var d in dataTypes) - { - - Model.DataBase_DataTypeProject newDataTypeProject = new Model.DataBase_DataTypeProject(); - newDataTypeProject.DataTypeProjectId = SQLHelper.GetNewID(typeof(Model.DataBase_DataTypeProject)); - newDataTypeProject.ProjectId = projectId; - newDataTypeProject.DataTypeCode = d.DataTypeCode; - newDataTypeProject.DataTypeName = d.DataTypeName; - newDataTypeProject.SuperDataTypeId = superDataTypeId; - newDataTypeProject.SortIndex = d.SortIndex; - newDataTypeProject.Pages = d.Pages; - newDataTypeProject.Remark = d.Remark; - newDataTypeProject.IsRelatedWBS = d.IsRelatedWBS; - newDataTypeProject.SourceDataTypeId = d.DataTypeId; - - newDataTypeProject.UnitWorkId = unitWorkId; - - BLL.DataTypeProjectService.AddDataTypeProject(newDataTypeProject); - - List childDataTypes = BLL.DataTypeService.GetDataTypesBySuperDataTypeId(d.DataTypeId); - if (childDataTypes.Count > 0) - { - InsertDataTypeDetail(childDataTypes, newDataTypeProject.DataTypeProjectId, projectId, unitWorkId); - } + Model.WBS_UnitWork unitWork1 = BLL.UnitWorkService.getUnitWorkByUnitWorkId(id); + unitWork.UnitWorkId = id; + unitWork.ProjectId = unitWork1.ProjectId; + unitWork.SuperUnitWork = unitWork1.SuperUnitWork; + BLL.UnitWorkService.UpdateUnitWork(unitWork); + BLL.LogService.AddSys_Log(this.CurrUser, unitWork.UnitWorkId, unitWork.UnitWorkId, BLL.Const.UnitWorkMenuId, "修改单位工程!"); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } } } diff --git a/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.designer.cs index a4daced3..cb5ed98b 100644 --- a/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.designer.cs @@ -57,42 +57,6 @@ namespace FineUIPro.Web.ProjectData { /// protected global::FineUIPro.TextBox txtUnitWorkName; - /// - /// txtCosts 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.NumberBox txtCosts; - - /// - /// drpUnit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpUnit; - - /// - /// drpSupervisorUnit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpSupervisorUnit; - - /// - /// drpNDEUnit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpNDEUnit; - /// /// Toolbar1 控件。 /// @@ -102,15 +66,6 @@ namespace FineUIPro.Web.ProjectData { /// protected global::FineUIPro.Toolbar Toolbar1; - /// - /// hdCheckerId 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.HiddenField hdCheckerId; - /// /// btnSave 控件。 /// @@ -119,14 +74,5 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - - /// - /// btnClose 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnClose; } } diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx b/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx index 860f1125..77148509 100644 --- a/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx +++ b/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx @@ -10,7 +10,7 @@ - + @@ -30,7 +30,7 @@ OnSelectedIndexChanged="drpChartType_SelectedIndexChanged" Width="300px" LabelWidth="80px"> - <%-- + <%-- @@ -52,7 +52,7 @@ - @@ -62,6 +62,15 @@ + + + +
+ +
+
+
+
diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx.cs b/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx.cs index 611f28d4..0c92cb08 100644 --- a/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx.cs @@ -58,11 +58,34 @@ namespace FineUIPro.Web.Transfer.Chart rowTime["日期"] = QueryTime.ToString("yyyy/MM/dd"); DateTime startTime = Convert.ToDateTime(QueryTime.ToString("yyyy-MM-dd") + " 00:00:00"); DateTime endTime = Convert.ToDateTime(QueryTime.ToString("yyyy-MM-dd") + " 23:59:59"); - rowTime["计划完成数量"] = forms.Where(x => x.Required_Date >= startTime && x.Required_Date <= endTime).Count(); - rowTime["实际完成数量"] = forms.Where(x => x.Actual_Date >= startTime && x.Actual_Date <= endTime).Count(); + //rowTime["计划完成数量"] = forms.Where(x => x.Required_Date >= startTime && x.Required_Date <= endTime).Count(); + //rowTime["实际完成数量"] = forms.Where(x => x.Actual_Date >= startTime && x.Actual_Date <= endTime).Count(); + rowTime["计划完成数量"] = forms.Where(x => x.Required_Date <= endTime).Count(); + rowTime["实际完成数量"] = forms.Where(x => x.Actual_Date <= endTime).Count(); dtTime.Rows.Add(rowTime); } this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "尾项完成统计分析", this.drpChartType.SelectedValue, 1300, 550, false)); + + ///按单位统计 + DataTable dtTime1 = new DataTable(); + dtTime1.Columns.Add("日期", typeof(string)); + dtTime1.Columns.Add("计划完成百分比(%)", typeof(string)); + dtTime1.Columns.Add("实际完成百分比(%)", typeof(string)); + for (int i = 6; i >= 0; i--) + { + DataRow rowTime = dtTime1.NewRow(); + DateTime QueryTime = DateTime.Now.AddDays(i * -1); + rowTime["日期"] = QueryTime.ToString("yyyy/MM/dd"); + DateTime startTime = Convert.ToDateTime(QueryTime.ToString("yyyy-MM-dd") + " 00:00:00"); + DateTime endTime = Convert.ToDateTime(QueryTime.ToString("yyyy-MM-dd") + " 23:59:59"); + double jhCount = forms.Where(x => x.Required_Date <= endTime).Count(); + double sjCount = forms.Where(x => x.Actual_Date <= endTime).Count(); + double allCount = forms.Count(); + rowTime["计划完成百分比(%)"] = allCount == 0 ? "0.00" : (jhCount / allCount * 100).ToString("0.00"); + rowTime["实际完成百分比(%)"] = allCount == 0 ? "0.00" : (sjCount / allCount * 100).ToString("0.00"); + dtTime1.Rows.Add(rowTime); + } + this.ChartAccidentTime1.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime1, "尾项完成统计分析", this.drpChartType.SelectedValue, 1300, 550, false)); } #endregion @@ -81,11 +104,34 @@ namespace FineUIPro.Web.Transfer.Chart rowTime["月份"] = QueryTime.ToString("yyyy/MM"); DateTime startTime = QueryTime; DateTime endTime = Convert.ToDateTime(QueryTime.AddMonths(1).AddDays(-1).ToString("yyyy-MM-dd") + " 23:59:59"); - rowTime["计划完成数量"] = forms.Where(x => x.Required_Date >= startTime && x.Required_Date <= endTime).Count(); - rowTime["实际完成数量"] = forms.Where(x => x.Actual_Date >= startTime && x.Actual_Date <= endTime).Count(); + //rowTime["计划完成数量"] = forms.Where(x => x.Required_Date >= startTime && x.Required_Date <= endTime).Count(); + //rowTime["实际完成数量"] = forms.Where(x => x.Actual_Date >= startTime && x.Actual_Date <= endTime).Count(); + rowTime["计划完成数量"] = forms.Where(x => x.Required_Date <= endTime).Count(); + rowTime["实际完成数量"] = forms.Where(x => x.Actual_Date <= endTime).Count(); dtTime.Rows.Add(rowTime); } this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "尾项完成统计分析", this.drpChartType.SelectedValue, 1300, 550, false)); + + ///按单位统计 + DataTable dtTime1 = new DataTable(); + dtTime1.Columns.Add("月份", typeof(string)); + dtTime1.Columns.Add("计划完成百分比(%)", typeof(string)); + dtTime1.Columns.Add("实际完成百分比(%)", typeof(string)); + for (int i = 1; i <= DateTime.Now.Month; i++) + { + DataRow rowTime = dtTime1.NewRow(); + DateTime QueryTime = Convert.ToDateTime($"{DateTime.Now.Year.ToString()}-{i}-1 00:00:00"); + rowTime["月份"] = QueryTime.ToString("yyyy/MM"); + DateTime startTime = QueryTime; + DateTime endTime = Convert.ToDateTime(QueryTime.AddMonths(1).AddDays(-1).ToString("yyyy-MM-dd") + " 23:59:59"); + double jhCount = forms.Where(x => x.Required_Date <= endTime).Count(); + double sjCount = forms.Where(x => x.Actual_Date <= endTime).Count(); + double allCount = forms.Count(); + rowTime["计划完成百分比(%)"] = allCount == 0 ? "0.00" : (jhCount / allCount * 100).ToString("0.00"); + rowTime["实际完成百分比(%)"] = allCount == 0 ? "0.00" : (sjCount / allCount * 100).ToString("0.00"); + dtTime1.Rows.Add(rowTime); + } + this.ChartAccidentTime1.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime1, "尾项完成统计分析", this.drpChartType.SelectedValue, 1300, 550, false)); } } diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx.designer.cs index 6997ce9c..f785b9ec 100644 --- a/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromChartNew.aspx.designer.cs @@ -105,13 +105,13 @@ namespace FineUIPro.Web.Transfer.Chart protected global::FineUIPro.TabStrip TabStrip1; /// - /// Tab2 控件。 + /// Tab1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Tab Tab2; + protected global::FineUIPro.Tab Tab1; /// /// cpAccidentTime 控件。 @@ -130,5 +130,32 @@ namespace FineUIPro.Web.Transfer.Chart /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::Web.Controls.ChartControl ChartAccidentTime; + + /// + /// Tab2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tab Tab2; + + /// + /// ContentPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel1; + + /// + /// ChartAccidentTime1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::Web.Controls.ChartControl ChartAccidentTime1; } } diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromSort.aspx b/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromSort.aspx index f8c2f5b5..3d67a69b 100644 --- a/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromSort.aspx +++ b/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromSort.aspx @@ -88,6 +88,7 @@ EnableRowDoubleClickEvent="true" EnableTextSelection="true" EnableSummary="true" SummaryPosition="Flow"> + diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromSort.aspx.cs b/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromSort.aspx.cs index 969123b8..efb1159f 100644 --- a/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromSort.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/Chart/PunchlistFromSort.aspx.cs @@ -196,12 +196,13 @@ namespace FineUIPro.Web.Transfer.Chart strSql.AppendLine(" AND System_No=@System_No "); listStr.Add(new SqlParameter("@System_No", _systemNo)); } - strSql.AppendLine(" select Action_By,cast(0 as decimal(18,2)) Cat_A_Count,cast(0 as decimal(18,2)) Cat_B_Count,cast(0 as decimal(18,2)) Cat_C_Count,cast(0 as decimal(18,2)) Cat_D_Count INTO #PunchlistFromSortTemp2 from #AllPunchlistFromSortTemp2 Group by Action_By; "); + strSql.AppendLine(" select Action_By,cast(0 as decimal(18,2)) Cat_All_Count,cast(0 as decimal(18,2)) Cat_A_Count,cast(0 as decimal(18,2)) Cat_B_Count,cast(0 as decimal(18,2)) Cat_C_Count,cast(0 as decimal(18,2)) Cat_D_Count INTO #PunchlistFromSortTemp2 from #AllPunchlistFromSortTemp2 Group by Action_By; "); strSql.AppendLine(" update a set a.Cat_A_Count=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='A' or isnull(b.Cat,'')='a')) "); strSql.AppendLine(",a.Cat_B_Count=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='B' or isnull(b.Cat,'')='b')) "); strSql.AppendLine(",a.Cat_C_Count=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='C' or isnull(b.Cat,'')='c')) "); strSql.AppendLine(",a.Cat_D_Count=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='D' or isnull(b.Cat,'')='d')) "); strSql.AppendLine("from #PunchlistFromSortTemp2 a;"); + strSql.AppendLine(" update #PunchlistFromSortTemp2 set Cat_All_Count=Cat_A_Count+Cat_B_Count+Cat_C_Count+Cat_D_Count; "); strSql.AppendLine("select * from #PunchlistFromSortTemp2 "); listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); strSql.AppendLine(" order by Action_By "); @@ -217,8 +218,10 @@ namespace FineUIPro.Web.Transfer.Chart int cat_B_Count = 0; int cat_C_Count = 0; int cat_D_Count = 0; + int cat_All_Count = 0; foreach (DataRow row in tb.Rows) { + cat_All_Count += Convert.ToInt32(row["Cat_All_Count"]); cat_A_Count += Convert.ToInt32(row["Cat_A_Count"]); cat_B_Count += Convert.ToInt32(row["Cat_B_Count"]); cat_C_Count += Convert.ToInt32(row["Cat_C_Count"]); @@ -228,6 +231,7 @@ namespace FineUIPro.Web.Transfer.Chart JObject summary = new JObject(); summary.Add("Action_By", "合计"); + summary.Add("Cat_All_Count", cat_All_Count.ToString()); summary.Add("Cat_A_Count", cat_A_Count.ToString()); summary.Add("Cat_B_Count", cat_B_Count.ToString()); summary.Add("Cat_C_Count", cat_C_Count.ToString()); diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/SystemStatusSummary.aspx b/SGGL/FineUIPro.Web/Transfer/Chart/SystemStatusSummary.aspx new file mode 100644 index 00000000..c1948b4e --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Chart/SystemStatusSummary.aspx @@ -0,0 +1,16 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SystemStatusSummary.aspx.cs" Inherits="FineUIPro.Web.Transfer.Chart.SystemStatusSummary" %> + + + + + + + 移交状态汇总表 + + + +
+
+ + + diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/SystemStatusSummary.aspx.cs b/SGGL/FineUIPro.Web/Transfer/Chart/SystemStatusSummary.aspx.cs new file mode 100644 index 00000000..5a18bba7 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Chart/SystemStatusSummary.aspx.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.Transfer.Chart +{ + public partial class SystemStatusSummary : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/SystemStatusSummary.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/Chart/SystemStatusSummary.aspx.designer.cs new file mode 100644 index 00000000..a45770e1 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Chart/SystemStatusSummary.aspx.designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer.Chart +{ + + + public partial class SystemStatusSummary + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/Systemstatus.aspx b/SGGL/FineUIPro.Web/Transfer/Chart/Systemstatus.aspx new file mode 100644 index 00000000..32b12de0 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Chart/Systemstatus.aspx @@ -0,0 +1,16 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Systemstatus.aspx.cs" Inherits="FineUIPro.Web.Transfer.Chart.Systemstatus" %> + + + + + + + 移交统计表 + + +
+
+
+
+ + diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/Systemstatus.aspx.cs b/SGGL/FineUIPro.Web/Transfer/Chart/Systemstatus.aspx.cs new file mode 100644 index 00000000..23fe1cfe --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Chart/Systemstatus.aspx.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.Transfer.Chart +{ + public partial class Systemstatus : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/Systemstatus.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/Chart/Systemstatus.aspx.designer.cs new file mode 100644 index 00000000..2d01287e --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Chart/Systemstatus.aspx.designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer.Chart +{ + + + public partial class Systemstatus + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/SystemstatusChart.aspx b/SGGL/FineUIPro.Web/Transfer/Chart/SystemstatusChart.aspx new file mode 100644 index 00000000..5a8cd0b7 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Chart/SystemstatusChart.aspx @@ -0,0 +1,246 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SystemstatusChart.aspx.cs" Inherits="FineUIPro.Web.Transfer.Chart.SystemstatusChart" %> + +<%@ Register Src="~/Controls/ChartControl.ascx" TagName="ChartControl" TagPrefix="uc1" %> + + + + + + 移交统计图表 + + +
+ + +
+ <%-- --%> + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/SystemstatusChart.aspx.cs b/SGGL/FineUIPro.Web/Transfer/Chart/SystemstatusChart.aspx.cs new file mode 100644 index 00000000..efe5a15f --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Chart/SystemstatusChart.aspx.cs @@ -0,0 +1,124 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Web.Services.Description; +using BLL; +using NPOI.SS.Formula.Functions; + +namespace FineUIPro.Web.Transfer.Chart +{ + public partial class SystemstatusChart : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) { + var systemCode = Funs.DB.Transfer_LHCSystemList + .Where(x => x.ProjectId == CurrUser.LoginProjectId) + .GroupBy(p => new { p.SystemNo }) + .Select(p => new { SystemNo = p.Key.SystemNo }).ToList(); + int indexRow = 1; + ddlSystemNo.Items.Insert(0, new FineUIPro.ListItem("ALL", "")); + foreach (var t in systemCode) + { + ddlSystemNo.Items.Insert(indexRow, new FineUIPro.ListItem(t.SystemNo, t.SystemNo)); + indexRow++; + } + + AnalyseData(); + } + } + public string AllSystemNo; + + public string completed; + public string Inprogress; + public string NotStart; + + public void AnalyseData() { + var pid = CurrUser.LoginProjectId; + #region 统计所有 + var systemCode = Funs.DB.Transfer_LHCSystemList + .Where(x => x.ProjectId == CurrUser.LoginProjectId) + .GroupBy(p => new { p.SystemNo }) + .Select(p => new { SystemNo = p.Key.SystemNo }).ToList(); + + if (!string.IsNullOrEmpty(ddlSystemNo.SelectedValue)) + { + systemCode= Funs.DB.Transfer_LHCSystemList + .Where(x => x.ProjectId == CurrUser.LoginProjectId && x.SystemNo == ddlSystemNo.SelectedValue) + .GroupBy(p => new { p.SystemNo }) + .Select(p => new { SystemNo = p.Key.SystemNo }).ToList(); + } + #region 九个表的数据 + var list1 = Funs.DB.Transfer_Piping.Where(x => x.ProjectId == pid).ToList(); + var list2= Funs.DB.Transfer_StaticEquipment.Where(x => x.ProjectId == pid).ToList(); + var list3= Funs.DB.Transfer_RotatingEquipment.Where(x => x.ProjectId == pid).ToList(); + var list4 = Funs.DB.Transfer_Instrumentation.Where(x => x.ProjectId == pid).ToList(); + var list5 = Funs.DB.Transfer_Electrical.Where(x => x.ProjectId == pid).ToList(); + var list6 = Funs.DB.Transfer_Civil_Structure.Where(x => x.ProjectId == pid).ToList(); + var list7 = Funs.DB.Transfer_Firefighting.Where(x => x.ProjectId == pid).ToList(); + var list8 = Funs.DB.Transfer_Telecom.Where(x => x.ProjectId == pid).ToList(); + var list9 = Funs.DB.Transfer_PunchlistFrom.Where(x => x.ProjectId == pid).ToList(); + #endregion + DataTable dt = new DataTable(); + dt.Columns.Add("系统编号", typeof(string)); + dt.Columns.Add("完成数量", typeof(string)); + dt.Columns.Add("进行中数量", typeof(string)); + dt.Columns.Add("未完成数量", typeof(string)); + foreach (var t in systemCode) { + var scode = t.SystemNo; + AllSystemNo += "'" + scode + "',"; + DataRow dr = dt.NewRow(); + dr["系统编号"] = scode; + #region 根据系统编号获取完成的数量 + var completedCount = list1.Where(x => x.SYSTEM == scode && x.FINALStatus == "Completed").ToList().Count() + + list2.Where(x => x.SYSTEM == scode && x.MechanicalFINALStatus == "Completed").ToList().Count() + + list3.Where(x => x.SYSTEM == scode && x.MechanicalFINALStatus == "Completed").ToList().Count() + + list4.Where(x => x.SystemName == scode && x.FINAL_Status == "Completed").ToList().Count() + + list5.Where(x => x.SystemName == scode && x.FINAL_Status == "Completed").ToList().Count() + + list6.Where(x => x.SystemName == scode && x.FINAL_Status == "Completed").ToList().Count() + + list7.Where(x => x.SystemName == scode && x.FINAL_Status == "Completed").ToList().Count() + + list8.Where(x => x.SystemName == scode && x.FINAL_Status == "Completed").ToList().Count() + + list9.Where(x => x.SystemName == scode && x.Status == "Completed").ToList().Count(); + #endregion + dr["完成数量"] = completedCount; + completed+= "'" + completedCount.ToString() + "',"; + #region 根据系统编号获取进行中数量 + var InprogressCount = list1.Where(x => x.SYSTEM == scode && x.FINALStatus == "In progress").ToList().Count() + + list2.Where(x => x.SYSTEM == scode && x.MechanicalFINALStatus == "In progress").ToList().Count() + + list3.Where(x => x.SYSTEM == scode && x.MechanicalFINALStatus == "In progress").ToList().Count() + + list4.Where(x => x.SystemName == scode && x.FINAL_Status == "In progress").ToList().Count() + + list5.Where(x => x.SystemName == scode && x.FINAL_Status == "In progress").ToList().Count() + + list6.Where(x => x.SystemName == scode && x.FINAL_Status == "In progress").ToList().Count() + + list7.Where(x => x.SystemName == scode && x.FINAL_Status == "In progress").ToList().Count() + + list8.Where(x => x.SystemName == scode && x.FINAL_Status == "In progress").ToList().Count() + + list9.Where(x => x.SystemName == scode && x.Status == "In progress").ToList().Count(); + #endregion + dr["进行中数量"] = InprogressCount; + Inprogress += "'" + InprogressCount.ToString() + "',"; + #region 根据系统编号获取未完成数量 + var NotStartCount = list1.Where(x => x.SYSTEM == scode && x.FINALStatus == "Not Start").ToList().Count() + + list2.Where(x => x.SYSTEM == scode && x.MechanicalFINALStatus == "Not Start").ToList().Count() + + list3.Where(x => x.SYSTEM == scode && x.MechanicalFINALStatus == "Not Start").ToList().Count() + + list4.Where(x => x.SystemName == scode && x.FINAL_Status == "Not Start").ToList().Count() + + list5.Where(x => x.SystemName == scode && x.FINAL_Status == "Not Start").ToList().Count() + + list6.Where(x => x.SystemName == scode && x.FINAL_Status == "Not Start").ToList().Count() + + list7.Where(x => x.SystemName == scode && x.FINAL_Status == "Not Start").ToList().Count() + + list8.Where(x => x.SystemName == scode && x.FINAL_Status == "Not Start").ToList().Count() + + list9.Where(x => x.SystemName == scode && x.Status == "Not Start").ToList().Count(); + #endregion + dr["未完成数量"] = NotStartCount; + NotStart += "'" + NotStartCount.ToString() + "',"; + dt.Rows.Add(dr); + } + //this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dt, "移交状态统计", "Column", 1300, 550, false)); + #endregion + } + + protected void ddlSystemNo_SelectedIndexChanged(object sender, EventArgs e) + { + this.AnalyseData(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/Chart/SystemstatusChart.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/Chart/SystemstatusChart.aspx.designer.cs new file mode 100644 index 00000000..efce66c4 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Chart/SystemstatusChart.aspx.designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer.Chart +{ + + + public partial class SystemstatusChart + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel3; + + /// + /// Form2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form2; + + /// + /// ddlSystemNo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlSystemNo; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx b/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx index c8ca38dc..23c52378 100644 --- a/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx +++ b/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx @@ -56,50 +56,50 @@ - + - - - + + + + HeaderTextAlign="Center" minWidth="120px"> + HeaderTextAlign="Center" minWidth="140px"> + HeaderTextAlign="Center" minWidth="140px"> + HeaderTextAlign="Center" minWidth="120px"> + HeaderTextAlign="Center" minWidth="120px"> + HeaderTextAlign="Center" minWidth="120px"> + HeaderTextAlign="Center" minWidth="120px"> + HeaderTextAlign="Center" minWidth="100px"> diff --git a/SGGL/FineUIPro.Web/Transfer/Electrical.aspx b/SGGL/FineUIPro.Web/Transfer/Electrical.aspx index dd3bc5e2..6339062c 100644 --- a/SGGL/FineUIPro.Web/Transfer/Electrical.aspx +++ b/SGGL/FineUIPro.Web/Transfer/Electrical.aspx @@ -57,34 +57,34 @@ - + - - - + + + + HeaderTextAlign="Center" minWidth="150px"> + HeaderTextAlign="Center" minWidth="140px"> + HeaderTextAlign="Center" minWidth="140px"> + HeaderTextAlign="Center" minWidth="140px"> diff --git a/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx b/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx index d5b7e303..3c6bc6e1 100644 --- a/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx +++ b/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx @@ -57,30 +57,30 @@ - + - - - + + + + HeaderTextAlign="Center" minWidth="120px"> + HeaderTextAlign="Center" minWidth="120px"> + HeaderTextAlign="Center" minWidth="140px"> diff --git a/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx b/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx index 999b3a27..6d42864e 100644 --- a/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx +++ b/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx @@ -57,38 +57,38 @@ - + - - - + + + + HeaderTextAlign="Center" minWidth="140px"> + HeaderTextAlign="Center" minWidth="150px"> + HeaderTextAlign="Center" minWidth="140px"> + HeaderTextAlign="Center" minWidth="140px"> + HeaderTextAlign="Center" minWidth="140px"> diff --git a/SGGL/FineUIPro.Web/Transfer/LHCSystemList.aspx b/SGGL/FineUIPro.Web/Transfer/LHCSystemList.aspx index 798f356c..9c8295af 100644 --- a/SGGL/FineUIPro.Web/Transfer/LHCSystemList.aspx +++ b/SGGL/FineUIPro.Web/Transfer/LHCSystemList.aspx @@ -49,11 +49,17 @@ HeaderTextAlign="Center" MinWidth="50px">
+ + + + @@ -65,15 +71,10 @@ - - - @@ -81,7 +82,7 @@ + HeaderText="Plan Finish of Testing Date" TextAlign="Center" HeaderTextAlign="Center" MinWidth="200px"> + @@ -140,6 +142,10 @@ F(menuID).show(); //showAt(event.pageX, event.pageY); return false; } + function onGridDataLoad(event) { + this.mergeColumns(['SystemNo', 'Commissioningsystemcode', 'CommissioningCodeDescription']); + } + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/LHCSystemListDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/LHCSystemListDataIn.aspx.cs index 955eea30..07df687d 100644 --- a/SGGL/FineUIPro.Web/Transfer/LHCSystemListDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/LHCSystemListDataIn.aspx.cs @@ -116,7 +116,7 @@ namespace FineUIPro.Web.Transfer oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; oleDBConnString += "Data Source="; oleDBConnString += fileName; - oleDBConnString += ";Extended Properties=Excel 8.0;"; + oleDBConnString += ";Extended Properties='Excel 8.0;IMEX=1; 8.0;HDR=1;'"; OleDbConnection oleDBConn = null; OleDbDataAdapter oleAdMaster = null; DataTable m_tableName = new DataTable(); @@ -420,11 +420,11 @@ namespace FineUIPro.Web.Transfer oleDBConn.Dispose(); if (Type == "0") { - AddDatasetToSQL2(ds.Tables[0], 8); + AddDatasetToSQL2(ds.Tables[0], 9); } else { - AddDatasetToSQL2(ds.Tables[0], 9); + AddDatasetToSQL2(ds.Tables[0], 10); } } @@ -472,7 +472,7 @@ namespace FineUIPro.Web.Transfer //根据项目id查询sn var snModel = Funs.DB.Transfer_LHCSystemList.Where(x => x.ProjectId == CurrUser.LoginProjectId && x.Type == Type).OrderByDescending(x => x.SN).FirstOrDefault(); - if (snModel == null && Sn!=1001) + if (snModel == null && Sn==0) { Sn = 1001; model.SN = Sn; @@ -490,13 +490,15 @@ namespace FineUIPro.Web.Transfer } } + model.SystemNo = pds.Rows[i][0].ToString().Trim(); - model.Commissioningsystemcode= pds.Rows[i][0].ToString().Trim(); - model.CommissioningCodeDescription = pds.Rows[i][1].ToString().Trim(); + model.Commissioningsystemcode= pds.Rows[i][1].ToString().Trim(); + + model.CommissioningCodeDescription = pds.Rows[i][2].ToString().Trim(); if (Type == "0") { - model.SubCommissioningsystem = pds.Rows[i][2].ToString().Trim(); - model.Turnover_Code= pds.Rows[i][3].ToString().Trim(); + model.SubCommissioningsystem = pds.Rows[i][3].ToString().Trim(); + //model.Turnover_Code= pds.Rows[i][4].ToString().Trim(); DateTime t1, t2,t3; if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) model.PlanStartofTestingDate = t1; @@ -508,9 +510,9 @@ namespace FineUIPro.Web.Transfer } else { - model.Describe = pds.Rows[i][2].ToString().Trim(); - model.SubCommissioningsystem = pds.Rows[i][3].ToString().Trim(); - model.Turnover_Code = pds.Rows[i][4].ToString().Trim(); + model.Describe = pds.Rows[i][3].ToString().Trim(); + model.SubCommissioningsystem = pds.Rows[i][4].ToString().Trim(); + //model.Turnover_Code = pds.Rows[i][5].ToString().Trim(); DateTime t1, t2, t3; if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) model.PlanStartofTestingDate = t1; diff --git a/SGGL/FineUIPro.Web/Transfer/Piping.aspx b/SGGL/FineUIPro.Web/Transfer/Piping.aspx index 75d86f91..c205a6da 100644 --- a/SGGL/FineUIPro.Web/Transfer/Piping.aspx +++ b/SGGL/FineUIPro.Web/Transfer/Piping.aspx @@ -52,7 +52,7 @@
- - + - - - + + + + HeaderTextAlign="Center" minWidth="100px"> + HeaderTextAlign="Center" minWidth="120px"> + HeaderTextAlign="Center" minWidth="120px"> diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx index 321a0b8e..95720d13 100644 --- a/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx @@ -21,9 +21,16 @@ - + + + + + + + + @@ -33,26 +40,44 @@ + + - - - - - + - <%-- --%> - <%-- - --%> + + + + + + + + + + + + + + + + + + + + + + - + - + - + @@ -137,29 +162,29 @@ <%----%> - + - + - + - + - + - + - + - + - + - + - + - + @@ -170,9 +195,9 @@ <%----%> - + - + - + - + - + - +
@@ -225,14 +250,18 @@ Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true" Width="700px" Height="560px"> + - <%----%> + diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.cs b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.cs index 7eeabcf8..afbd3ffb 100644 --- a/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.cs @@ -1,10 +1,20 @@ using BLL; +using BLL.Common; using BLL.CQMS.Comprehensive; +using FineUIPro.Web.AttachFile; +using NPOI.SS.Formula.Functions; +using NPOI.SS.UserModel; +using NPOI.XSSF.Streaming.Values; +using NPOI.XSSF.UserModel; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; +using System.Drawing.Imaging; +using System.IO; using System.Linq; +using System.Web.Services.Description; +using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel; namespace FineUIPro.Web.Transfer { @@ -22,26 +32,25 @@ namespace FineUIPro.Web.Transfer { GetButtonPower(); BindGrid(); + + this.btnNew.OnClientClick = Window1.GetShowReference("PunchlistFromEdit.aspx") + "return false;"; } } - /// - /// 数据绑定 - /// - public void BindGrid() + public DataTable DataSql() { string strSql = @"select * ,(CASE isnull(IsEng,0) WHEN 1 THEN 'Y' ELSE 'N' END) IsEngStr - ,(CASE isnull(IsMatI,0) WHEN 1 THEN 'Y' ELSE 'N' END) IsMatIStr + ,IsMatI IsMatIStr from Transfer_PunchlistFrom where ProjectId = @ProjectId"; List listStr = new List(); listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); - if (!string.IsNullOrEmpty(this.txtNum_NO.Text.Trim())) + if (!string.IsNullOrEmpty(this.txtRaised_By.Text.Trim())) { - strSql += " AND Num_NO like @Num_NO"; - listStr.Add(new SqlParameter("@Num_NO", "%" + this.txtNum_NO.Text.Trim() + "%")); + strSql += " AND Raised_By = @Raised_By"; + listStr.Add(new SqlParameter("@Raised_By", this.txtRaised_By.Text.Trim())); } if (!string.IsNullOrEmpty(this.txtSystem_No.Text.Trim())) { @@ -96,16 +105,49 @@ namespace FineUIPro.Web.Transfer if (!string.IsNullOrEmpty(ddlMatI.SelectedValue.Trim())) { strSql += " AND IsMatI = @IsMatI"; - listStr.Add(new SqlParameter("@IsMatI", ddlMatI.SelectedValue.Trim() == "Y" ? 1 : 0)); + listStr.Add(new SqlParameter("@IsMatI", ddlMatI.SelectedValue.Trim())); } if (!string.IsNullOrEmpty(ddlPunchType.SelectedValue.Trim())) { strSql += " AND Punch_Type = @Punch_Type"; listStr.Add(new SqlParameter("@Punch_Type", ddlPunchType.SelectedValue.Trim())); } + if (!string.IsNullOrEmpty(ddlCat.SelectedValue.Trim())) + { + strSql += " AND Cat = @Cat"; + listStr.Add(new SqlParameter("@Cat", ddlCat.SelectedValue.Trim())); + } + if (!string.IsNullOrEmpty(txtAction_By.Text.Trim())) + { + strSql += " AND Action_By = @Action_By"; + listStr.Add(new SqlParameter("@Action_By", txtAction_By.Text.Trim())); + } + if (!string.IsNullOrEmpty(txtPIC.Text.Trim())) + { + strSql += " AND PIC = @PIC"; + listStr.Add(new SqlParameter("@PIC", txtPIC.Text.Trim())); + } + if (!string.IsNullOrEmpty(txtPIC_WUH.Text.Trim())) + { + strSql += " AND PIC_WUH = @PIC_WUH"; + listStr.Add(new SqlParameter("@PIC_WUH", txtPIC_WUH.Text.Trim())); + } + if (!string.IsNullOrEmpty(ddlStatus.SelectedValue.Trim())) + { + strSql += " AND Status = @Status"; + listStr.Add(new SqlParameter("@Status", ddlStatus.SelectedValue.Trim())); + } strSql += " order by Num_No "; SqlParameter[] parameter = listStr.ToArray(); - DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + return SQLHelper.GetDataTableRunText(strSql, parameter); + } + + /// + /// 数据绑定 + /// + public void BindGrid() + { + DataTable tb = DataSql(); Grid1.RecordCount = tb.Rows.Count; var table = this.GetPagedDataTable(Grid1, tb); Grid1.DataSource = table; @@ -277,13 +319,13 @@ namespace FineUIPro.Web.Transfer { if (buttonList.Contains(BLL.Const.BtnAdd)) { - //this.btnNew.Hidden = false; + this.btnNew.Hidden = false; btnMenuAttachA.Hidden = false; btnMenuAttachB.Hidden = false; } if (buttonList.Contains(BLL.Const.BtnModify)) { - //this.btnMenuModify.Hidden = false; + this.btnMenuModify.Hidden = false; this.Grid1.EnableRowDoubleClickEvent = true; btnMenuAttachA.Hidden = false; btnMenuAttachB.Hidden = false; @@ -304,25 +346,230 @@ namespace FineUIPro.Web.Transfer } #endregion - #region 附件上传 + #region 编辑 /// - /// 附件上传 + /// 右键编辑事件 /// /// /// - protected void btnAttach_Click(object sender, EventArgs e) + protected void btnMenuModify_Click(object sender, EventArgs e) { - var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.PunchlistFromMenuId); - if (buttonList.Contains(BLL.Const.BtnAdd)) + if (Grid1.SelectedRowIndexArray.Length == 0) { - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/Transfer/PunchlistFrom&menuId={1}", this.CurrUser.LoginProjectId + "PunchlistFrom", BLL.Const.PunchlistFromMenuId))); + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; } - else + string id = Grid1.SelectedRowID; + var accidentPersonRecord = Funs.DB.Transfer_PunchlistFrom.FirstOrDefault(p => p.Id == id); + if (accidentPersonRecord == null) { - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/Transfer/PunchlistFrom&menuId={1}", this.CurrUser.LoginProjectId + "PunchlistFrom", BLL.Const.PunchlistFromMenuId))); - + Alert.ShowInTop("修改的数据已经不存在,请检查!", MessageBoxIcon.Warning); + return; } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PunchlistFromEdit.aspx?Id={0}", id, "编辑 - "))); } #endregion + + /// 导出按钮 + ///
+ /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + string rootPath = Server.MapPath("~/"); + string initTemplatePath = string.Empty; + string uploadfilepath = string.Empty; + string newUrl = string.Empty; + string filePath = string.Empty; + initTemplatePath = "File\\Excel\\DataOut\\PunchlistFrom导出模板.xlsx"; + uploadfilepath = rootPath + initTemplatePath; + + DataTable tb = DataSql(); + if (tb.Rows.Count <= 0) + { + ShowNotify("没有要导出的数据!!!", MessageBoxIcon.Warning); + return; + } + newUrl = uploadfilepath.Replace("导出模板", "导出数据").Replace(".xlsx", DateTime.Now.ToString("yyyyMMddHHmmss") + ".xlsx"); + File.Copy(uploadfilepath, newUrl); + NPOI.SS.UserModel.IWorkbook workbook; + using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read)) + { + workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream); + } + + NPOI.SS.UserModel.ICellStyle cellStyleC = workbook.CreateCellStyle(); + cellStyleC.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyleC.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyleC.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyleC.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyleC.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; + cellStyleC.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyleC.WrapText = true; + + NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); + + var pcList = Funs.DB.AttachFile.Where(p => p.MenuId == BLL.Const.PunchlistFromMenuId && p.AttachUrl != null && p.AttachUrl != "").ToList(); + + int i = 2; + foreach (DataRow tbRow in tb.Rows) + { + string Id = tbRow["Id"].ToString(); + + NPOI.SS.UserModel.IRow row = sheet.CreateRow(i); + NPOI.SS.UserModel.ICell cell; + cell = row.CreateCell(0); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["Num_NO"] == null ? "" : tbRow["Num_NO"].ToString()); + cell = row.CreateCell(1); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["System_No"] == null ? "" : tbRow["System_No"].ToString()); + cell = row.CreateCell(2); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["Sub_Sys_No"] == null ? "" : tbRow["Sub_Sys_No"].ToString()); + cell = row.CreateCell(3); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["DESCRIPTION"] == null ? "" : tbRow["DESCRIPTION"].ToString()); + + //Photoes附件 + var photoesUrl = pcList.FirstOrDefault(p => p.ToKeyId == $"{Id}_A"); + if (photoesUrl != null && !string.IsNullOrWhiteSpace(photoesUrl.AttachUrl)) + { + string[] arrUrl = photoesUrl.AttachUrl.Split(','); + sheet.SetColumnWidth(4, 30 * 256); + row.Height = (short)(90 * 20 * arrUrl.Length); + foreach (string url in arrUrl) + { + var oneUrl = Server.MapPath("~/") + url; + byte[] bytes = System.IO.File.ReadAllBytes(oneUrl); + int pictureIdx = workbook.AddPicture(bytes, PictureType.JPEG); + + // 第三步:创建画部 + IDrawing patriarch = sheet.CreateDrawingPatriarch(); + // 第四步:设置锚点 + int rowline = 1; // y方向 + // 参数说明:(在起始单元格的X坐标0-1023,Y的坐标0-255,在终止单元格的X坐标0-1023,Y的坐标0-255,起始单元格列数,行数,终止单元格列数,行数) + IClientAnchor anchor = patriarch.CreateAnchor(0, 0, 0, 0, 4, i, 5, i + 1); + // 第五步:把图片插到相应的位置+1 + IPicture pict = patriarch.CreatePicture(anchor, pictureIdx); + //就取第一张,如果后期想取全部 那把下面这个跳出语句去掉 + break; + } + } + + cell = row.CreateCell(5); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["Cat"] == null ? "" : tbRow["Cat"].ToString()); + cell = row.CreateCell(6); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["Raised_By"] == null ? "" : tbRow["Raised_By"].ToString()); + cell = row.CreateCell(7); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["Date_Raised"] == DBNull.Value ? "" : Convert.ToDateTime(tbRow["Date_Raised"]).ToString("yyyy-MM-dd")); + cell = row.CreateCell(8); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["Disc"] == null ? "" : tbRow["Disc"].ToString()); + cell = row.CreateCell(9); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["IsEngStr"] == null ? "" : tbRow["IsEngStr"].ToString()); + cell = row.CreateCell(10); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["IsMatIStr"] == null ? "" : tbRow["IsMatIStr"].ToString()); + cell = row.CreateCell(11); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["Punch_Type"] == null ? "" : tbRow["Punch_Type"].ToString()); + cell = row.CreateCell(12); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["Required_Date"] == DBNull.Value ? "" : Convert.ToDateTime(tbRow["Required_Date"]).ToString("yyyy-MM-dd")); + cell = row.CreateCell(13); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["Action_By"] == null ? "" : tbRow["Action_By"].ToString()); + cell = row.CreateCell(14); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["PIC"] == null ? "" : tbRow["PIC"].ToString()); + cell = row.CreateCell(15); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["PIC_WUH"] == null ? "" : tbRow["PIC_WUH"].ToString()); + cell = row.CreateCell(16); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["Correction_Action"] == null ? "" : tbRow["Correction_Action"].ToString()); + + //CorrectedPhotos附件 + var correctedPhotosUrl = pcList.FirstOrDefault(p => p.ToKeyId == $"{Id}_B"); + if (correctedPhotosUrl != null && !string.IsNullOrWhiteSpace(correctedPhotosUrl.AttachUrl)) + { + string[] arrUrl = correctedPhotosUrl.AttachUrl.Split(','); + sheet.SetColumnWidth(17, 30 * 256); + row.Height = (short)(90 * 20); + foreach (string url in arrUrl) + { + var oneUrl = Server.MapPath("~/") + url; + byte[] bytes = System.IO.File.ReadAllBytes(oneUrl); + int pictureIdx = workbook.AddPicture(bytes, PictureType.JPEG); + + // 第三步:创建画部 + IDrawing patriarch = sheet.CreateDrawingPatriarch(); + // 第四步:设置锚点 + int rowline = 1; // y方向 + // 参数说明:(在起始单元格的X坐标0-1023,Y的坐标0-255,在终止单元格的X坐标0-1023,Y的坐标0-255,起始单元格列数,行数,终止单元格列数,行数) + IClientAnchor anchor = patriarch.CreateAnchor(0, 0, 0, 0, 17, i, 18, i + 1); + // 第五步:把图片插到相应的位置+1 + IPicture pict = patriarch.CreatePicture(anchor, pictureIdx); + //就取第一张,如果后期想取全部 那把下面这个跳出语句去掉 + break; + } + } + + cell = row.CreateCell(18); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["Actual_Date"] == DBNull.Value ? "" : Convert.ToDateTime(tbRow["Actual_Date"]).ToString("yyyy-MM-dd")); + cell = row.CreateCell(19); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["Cleared_By"] == null ? "" : tbRow["Cleared_By"].ToString()); + cell = row.CreateCell(20); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["Cleared_Date"] == DBNull.Value ? "" : Convert.ToDateTime(tbRow["Cleared_Date"]).ToString("yyyy-MM-dd")); + cell = row.CreateCell(21); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["Confirmed_By"] == null ? "" : tbRow["Confirmed_By"].ToString()); + cell = row.CreateCell(22); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["Confirmed_Date"] == DBNull.Value ? "" : Convert.ToDateTime(tbRow["Confirmed_Date"]).ToString("yyyy-MM-dd")); + cell = row.CreateCell(23); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["Verified_By"] == null ? "" : tbRow["Verified_By"].ToString()); + cell = row.CreateCell(24); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["Verified_Date"] == DBNull.Value ? "" : Convert.ToDateTime(tbRow["Verified_Date"]).ToString("yyyy-MM-dd")); + cell = row.CreateCell(25); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["Status"] == null ? "" : tbRow["Status"].ToString()); + cell = row.CreateCell(26); + cell.CellStyle = cellStyleC; + cell.SetCellValue(tbRow["Remark"] == null ? "" : tbRow["Remark"].ToString()); + + + i++; + } + + // 第三步:写入文件流 + using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write)) + { + workbook.Write(stream); + workbook.Close(); + } + string fileName = Path.GetFileName(newUrl); + FileInfo info = new FileInfo(newUrl); + long fileSize = info.Length; + Response.Clear(); + Response.ContentType = "application/x-zip-compressed"; + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.AddHeader("Content-Length", fileSize.ToString()); + Response.TransmitFile(newUrl, 0, fileSize); + Response.Flush(); + Response.Close(); + File.Delete(newUrl); + + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.designer.cs index 6eb8ee22..043fe382 100644 --- a/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.designer.cs @@ -59,15 +59,6 @@ namespace FineUIPro.Web.Transfer /// protected global::FineUIPro.Toolbar ToolSearch; - /// - /// txtNum_NO 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtNum_NO; - /// /// txtSystem_No 控件。 /// @@ -86,6 +77,24 @@ namespace FineUIPro.Web.Transfer /// protected global::FineUIPro.TextBox txtSub_Sys_No; + /// + /// ddlCat 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlCat; + + /// + /// txtRaised_By 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRaised_By; + /// /// txtDisc 控件。 /// @@ -113,15 +122,6 @@ namespace FineUIPro.Web.Transfer /// protected global::FineUIPro.DropDownList ddlMatI; - /// - /// ddlPunchType 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList ddlPunchType; - /// /// btnSearch 控件。 /// @@ -131,6 +131,15 @@ namespace FineUIPro.Web.Transfer /// protected global::FineUIPro.Button btnSearch; + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + /// /// btnImport 控件。 /// @@ -140,6 +149,69 @@ namespace FineUIPro.Web.Transfer /// protected global::FineUIPro.Button btnImport; + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// ddlPunchType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPunchType; + + /// + /// txtAction_By 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAction_By; + + /// + /// txtPIC 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPIC; + + /// + /// txtPIC_WUH 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPIC_WUH; + + /// + /// ddlStatus 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlStatus; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// Toolbar1 控件。 /// @@ -284,6 +356,15 @@ namespace FineUIPro.Web.Transfer /// protected global::FineUIPro.Window Window2; + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + /// /// Menu1 控件。 /// @@ -311,6 +392,15 @@ namespace FineUIPro.Web.Transfer /// protected global::FineUIPro.MenuButton btnMenuAttachB; + /// + /// btnMenuModify 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuModify; + /// /// btnMenuDel 控件。 /// diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFromDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/PunchlistFromDataIn.aspx.cs index 3ef944e4..604b5e5d 100644 --- a/SGGL/FineUIPro.Web/Transfer/PunchlistFromDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFromDataIn.aspx.cs @@ -106,7 +106,7 @@ namespace FineUIPro.Web.Transfer oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; oleDBConnString += "Data Source="; oleDBConnString += fileName; - oleDBConnString += ";Extended Properties=Excel 8.0;"; + oleDBConnString += ";Extended Properties='Excel 8.0;IMEX=1; 8.0;HDR=1;'"; OleDbConnection oleDBConn = null; OleDbDataAdapter oleAdMaster = null; DataTable m_tableName = new DataTable(); @@ -130,7 +130,7 @@ namespace FineUIPro.Web.Transfer oleDBConn.Close(); oleDBConn.Dispose(); - AddDatasetToSQL(ds.Tables[0], 24); + AddDatasetToSQL(ds.Tables[0], 23); hdCheckResult.Text = "1"; } catch (Exception exc) @@ -169,7 +169,7 @@ namespace FineUIPro.Web.Transfer for (int i = 1; i < ir; i++) { string allRowData = string.Empty; - for (int j = 0; j < 24; j++) + for (int j = 0; j < 23; j++) { allRowData += pds.Rows[i][j].ToString(); } @@ -343,7 +343,7 @@ namespace FineUIPro.Web.Transfer oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; oleDBConnString += "Data Source="; oleDBConnString += fileName; - oleDBConnString += ";Extended Properties=Excel 8.0;"; + oleDBConnString += ";Extended Properties='Excel 8.0;IMEX=1; 8.0;HDR=1;'"; OleDbConnection oleDBConn = null; OleDbDataAdapter oleAdMaster = null; DataTable m_tableName = new DataTable(); @@ -367,7 +367,7 @@ namespace FineUIPro.Web.Transfer oleDBConn.Close(); oleDBConn.Dispose(); - AddDatasetToSQL2(ds.Tables[0], 24); + AddDatasetToSQL2(ds.Tables[0], 23); } catch (Exception ex) { @@ -393,7 +393,7 @@ namespace FineUIPro.Web.Transfer } string result = string.Empty; ir = pds.Rows.Count; - long? maxNumNO = -1; + var maxNumNO = 0; if (pds != null && ir > 0) { List list = new List(); @@ -402,10 +402,12 @@ namespace FineUIPro.Web.Transfer if (!string.IsNullOrEmpty(pds.Rows[i][1].ToString().Trim())) { //查询第一列,没查到的情况下作导入处理 - if (maxNumNO == -1) { - maxNumNO = Funs.DB.Transfer_PunchlistFrom.Where(x => x.ProjectId == CurrUser.LoginProjectId).Max(p => p.Num_NO); - if (maxNumNO == null) - maxNumNO = 1001; + if (maxNumNO == 0) { + var modelTp = Funs.DB.Transfer_PunchlistFrom.OrderByDescending(x=>x.Num_NO).FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId); + if (modelTp == null) + maxNumNO = 1; + else + maxNumNO = Convert.ToInt32(modelTp.Num_NO) + 1; } @@ -414,7 +416,7 @@ namespace FineUIPro.Web.Transfer model.Id = Guid.NewGuid().ToString(); model.ProjectId = CurrUser.LoginProjectId; - model.Num_NO = maxNumNO; + model.Num_NO = maxNumNO.ToString("0000"); model.System_No = pds.Rows[i][0].ToString().Trim(); model.Sub_Sys_No = pds.Rows[i][1].ToString().Trim(); model.DESCRIPTION = pds.Rows[i][2].ToString().Trim(); @@ -431,10 +433,8 @@ namespace FineUIPro.Web.Transfer else model.IsEng = false; - if (pds.Rows[i][8].ToString().Trim().Contains("Y")) - model.IsMatI = true; - else - model.IsMatI = false; + model.IsMatI = pds.Rows[i][8].ToString().Trim(); + model.Punch_Type = pds.Rows[i][9].ToString().Trim(); DateTime t10; if (DateTime.TryParse(pds.Rows[i][10].ToString(), out t10) && !string.IsNullOrEmpty(pds.Rows[i][10].ToString())) @@ -445,7 +445,7 @@ namespace FineUIPro.Web.Transfer model.Correction_Action = pds.Rows[i][14].ToString().Trim(); DateTime t15; if (DateTime.TryParse(pds.Rows[i][15].ToString(), out t15) && !string.IsNullOrEmpty(pds.Rows[i][15].ToString())) - model.PUNCH_ITEM_FINISH_DATE = t15; + model.Actual_Date = t15; model.Cleared_By = pds.Rows[i][16].ToString().Trim(); DateTime t17; if (DateTime.TryParse(pds.Rows[i][17].ToString(), out t17) && !string.IsNullOrEmpty(pds.Rows[i][17].ToString())) @@ -458,8 +458,16 @@ namespace FineUIPro.Web.Transfer DateTime t21; if (DateTime.TryParse(pds.Rows[i][21].ToString(), out t21) && !string.IsNullOrEmpty(pds.Rows[i][21].ToString())) model.Verified_Date = t21; - model.Status = pds.Rows[i][22].ToString().Trim(); - model.Remark = pds.Rows[i][23].ToString().Trim(); + model.Remark = pds.Rows[i][22].ToString().Trim(); + + + if (model.Cleared_Date == null && model.Confirmed_Date == null && model.Verified_Date == null) + model.Status = "Not Start"; + else if (model.Cleared_Date != null && model.Confirmed_Date != null && model.Verified_Date != null) + model.Status = "Completed"; + else + model.Status = "In Progress"; + list.Add(model); maxNumNO++; } diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx b/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx new file mode 100644 index 00000000..d4a631ad --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx @@ -0,0 +1,162 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PunchlistFromEdit.aspx.cs" Inherits="FineUIPro.Web.Transfer.PunchlistFromEdit" %> + + + + + + + 尾项管理新增编辑 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.cs b/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.cs new file mode 100644 index 00000000..b599f9ef --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.cs @@ -0,0 +1,222 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Xml; +using static System.Windows.Forms.VisualStyles.VisualStyleElement; + +namespace FineUIPro.Web.Transfer +{ + public partial class PunchlistFromEdit : PageBase + { + #region 定义项 + /// + /// 主键 + /// + private string Id + { + get + { + return (string)ViewState["Id"]; + } + set + { + ViewState["Id"] = value; + } + } + /// + /// 项目主键 + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.Id = Request.Params["Id"]; + this.ProjectId = this.CurrUser.LoginProjectId; + var TransferPunchlistFrom = Funs.DB.Transfer_PunchlistFrom.FirstOrDefault(p => p.Id == this.Id); + if (TransferPunchlistFrom != null) + { + this.txtSystem_No.Text = TransferPunchlistFrom.System_No; + this.txtSub_Sys_No.Text = TransferPunchlistFrom.Sub_Sys_No; + this.txtDESCRIPTION.Text = TransferPunchlistFrom.DESCRIPTION; + this.ddlCat.SelectedValue = TransferPunchlistFrom.Cat; + this.txtRaised_By.Text = TransferPunchlistFrom.Raised_By; + if (TransferPunchlistFrom.Date_Raised != null) + this.txtDate_Raised.Text = Convert.ToDateTime(TransferPunchlistFrom.Date_Raised).ToString("yyyy-MM-dd"); + this.txtDisc.Text = TransferPunchlistFrom.Disc; + if (TransferPunchlistFrom.IsEng == true) + this.ddlIsEng.SelectedValue = "Y"; + else + this.ddlIsEng.SelectedValue = "N"; + this.ddlIsMatI.SelectedValue = TransferPunchlistFrom.IsMatI ?? ""; + this.txtPunch_Type.Text = TransferPunchlistFrom.Punch_Type; + if (TransferPunchlistFrom.Required_Date != null) + this.txtRequired_Date.Text = Convert.ToDateTime(TransferPunchlistFrom.Required_Date).ToString("yyyy-MM-dd"); + this.txtAction_By.Text = TransferPunchlistFrom.Action_By; + this.txtPIC.Text = TransferPunchlistFrom.PIC; + this.txtPIC_WUH.Text = TransferPunchlistFrom.PIC_WUH; + this.txtCorrection_Action.Text = TransferPunchlistFrom.Correction_Action; + if (TransferPunchlistFrom.Actual_Date != null) + this.txtActual_Date.Text = Convert.ToDateTime(TransferPunchlistFrom.Actual_Date).ToString("yyyy-MM-dd"); + this.txtCleared_By.Text = TransferPunchlistFrom.Cleared_By; + if (TransferPunchlistFrom.Cleared_Date != null) + this.txtCleared_Date.Text = Convert.ToDateTime(TransferPunchlistFrom.Cleared_Date).ToString("yyyy-MM-dd"); + this.txtConfirmed_By.Text = TransferPunchlistFrom.Confirmed_By; + if (TransferPunchlistFrom.Confirmed_Date != null) + this.txtConfirmed_Date.Text = Convert.ToDateTime(TransferPunchlistFrom.Confirmed_Date).ToString("yyyy-MM-dd"); + this.txtVerified_By.Text = TransferPunchlistFrom.Verified_By; + if (TransferPunchlistFrom.Verified_Date != null) + this.txtVerified_Date.Text = Convert.ToDateTime(TransferPunchlistFrom.Verified_Date).ToString("yyyy-MM-dd"); + this.txtRemark.Text = TransferPunchlistFrom.Remark; + } + } + } + + /// + /// Photoes附件上传 + /// + /// + /// + protected void btnAttachA_Click(object sender, EventArgs e) + { + AttachFileClick("A"); + } + /// + /// Corrected Photos附件上传 + /// + /// + /// + protected void btnAttachB_Click(object sender, EventArgs e) + { + AttachFileClick("B"); + } + + /// + /// 通过不同的type来保存附件 + /// + /// + private void AttachFileClick(string type) + { + SaveData(); + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader.aspx?type=0&toKeyId={0}_{1}&path=FileUpload/Transfer/PunchlistFrom&menuId={2}", this.Id, type, BLL.Const.PunchlistFromMenuId))); + } + + /// + /// 保存 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (SaveData() == 0) { + Alert.ShowInTop("保存失败!", MessageBoxIcon.Warning); + return; + } + ShowNotify("保存成功",MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + + /// + /// 保存数据 + /// + /// + private int SaveData() + { + int reutState = 0; + var maxNumNO = 0; + var modelTp = Funs.DB.Transfer_PunchlistFrom.OrderByDescending(x => x.Num_NO).FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId); + if (modelTp == null) + maxNumNO = 1; + else + maxNumNO = Convert.ToInt32(modelTp.Num_NO) + 1; + + Model.Transfer_PunchlistFrom newTransferFrom = new Model.Transfer_PunchlistFrom() + { + Id= Guid.NewGuid().ToString(), + Num_NO = maxNumNO.ToString("0000"), + ProjectId=this.ProjectId, + System_No = this.txtSystem_No.Text.Trim(), + Sub_Sys_No = this.txtSub_Sys_No.Text.Trim(), + DESCRIPTION = this.txtDESCRIPTION.Text.Trim(), + Cat = this.ddlCat.SelectedValue, + Raised_By = this.txtRaised_By.Text.Trim(), + Date_Raised = Funs.GetNewDateTime(this.txtDate_Raised.Text), + Disc = this.txtDisc.Text.Trim(), + IsEng = this.ddlIsEng.SelectedValue == "Y" ? true : false, + IsMatI = this.ddlIsMatI.SelectedValue, + Punch_Type = this.txtPunch_Type.Text.Trim(), + Required_Date= Funs.GetNewDateTime(this.txtRequired_Date.Text), + Action_By= this.txtAction_By.Text.Trim(), + PIC= this.txtPIC.Text.Trim(), + PIC_WUH=this.txtPIC_WUH.Text.Trim(), + Correction_Action= this.txtCorrection_Action.Text.Trim(), + Actual_Date = Funs.GetNewDateTime(this.txtActual_Date.Text), + Cleared_By= this.txtCleared_By.Text.Trim(), + Cleared_Date = Funs.GetNewDateTime(this.txtCleared_Date.Text), + Confirmed_By= this.txtConfirmed_By.Text.Trim(), + Confirmed_Date = Funs.GetNewDateTime(this.txtConfirmed_Date.Text), + Verified_By= this.txtVerified_By.Text.Trim(), + Verified_Date = Funs.GetNewDateTime(this.txtVerified_Date.Text), + Remark= this.txtRemark.Text.Trim() + }; + + if (newTransferFrom.Cleared_Date == null && newTransferFrom.Confirmed_Date == null && newTransferFrom.Verified_Date == null) + newTransferFrom.Status = "Not Start"; + else if (newTransferFrom.Cleared_Date != null && newTransferFrom.Confirmed_Date != null && newTransferFrom.Verified_Date != null) + newTransferFrom.Status = "Completed"; + else + newTransferFrom.Status = "In Progress"; + + var TransferPunchlistFrom = Funs.DB.Transfer_PunchlistFrom.FirstOrDefault(p => p.Id == this.Id); + if (TransferPunchlistFrom == null) + { + Funs.DB.Transfer_PunchlistFrom.InsertOnSubmit(newTransferFrom); + this.Id = newTransferFrom.Id; + } + else + { + TransferPunchlistFrom.System_No = newTransferFrom.System_No; + TransferPunchlistFrom.Sub_Sys_No = newTransferFrom.Sub_Sys_No; + TransferPunchlistFrom.DESCRIPTION = newTransferFrom.DESCRIPTION; + TransferPunchlistFrom.Cat = newTransferFrom.Cat; + TransferPunchlistFrom.Raised_By = newTransferFrom.Raised_By; + TransferPunchlistFrom.Date_Raised = newTransferFrom.Date_Raised; + TransferPunchlistFrom.Disc = newTransferFrom.Disc; + TransferPunchlistFrom.IsEng = newTransferFrom.IsEng; + TransferPunchlistFrom.IsMatI = newTransferFrom.IsMatI; + TransferPunchlistFrom.Punch_Type = newTransferFrom.Punch_Type; + TransferPunchlistFrom.Required_Date = newTransferFrom.Required_Date; + TransferPunchlistFrom.Action_By = newTransferFrom.Action_By; + TransferPunchlistFrom.PIC = newTransferFrom.PIC; + TransferPunchlistFrom.PIC_WUH = newTransferFrom.PIC_WUH; + TransferPunchlistFrom.Correction_Action = newTransferFrom.Correction_Action; + TransferPunchlistFrom.Actual_Date = newTransferFrom.Actual_Date; + TransferPunchlistFrom.Cleared_By = newTransferFrom.Cleared_By; + TransferPunchlistFrom.Cleared_Date = newTransferFrom.Cleared_Date; + TransferPunchlistFrom.Confirmed_By = newTransferFrom.Confirmed_By; + TransferPunchlistFrom.Confirmed_Date = newTransferFrom.Confirmed_Date; + TransferPunchlistFrom.Verified_By = newTransferFrom.Verified_By; + TransferPunchlistFrom.Verified_Date = newTransferFrom.Verified_Date; + TransferPunchlistFrom.Remark = newTransferFrom.Remark; + TransferPunchlistFrom.Status = newTransferFrom.Status; + } + Funs.DB.SubmitChanges(); + reutState = 1; + return reutState; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.designer.cs new file mode 100644 index 00000000..ef019b0c --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFromEdit.aspx.designer.cs @@ -0,0 +1,332 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class PunchlistFromEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtSystem_No 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSystem_No; + + /// + /// txtSub_Sys_No 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSub_Sys_No; + + /// + /// ddlCat 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlCat; + + /// + /// txtRaised_By 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRaised_By; + + /// + /// txtDate_Raised 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtDate_Raised; + + /// + /// txtDisc 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDisc; + + /// + /// ddlIsEng 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlIsEng; + + /// + /// ddlIsMatI 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlIsMatI; + + /// + /// txtPunch_Type 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPunch_Type; + + /// + /// txtRequired_Date 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtRequired_Date; + + /// + /// txtAction_By 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAction_By; + + /// + /// txtPIC 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPIC; + + /// + /// txtPIC_WUH 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPIC_WUH; + + /// + /// txtActual_Date 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtActual_Date; + + /// + /// txtDESCRIPTION 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtDESCRIPTION; + + /// + /// txtCorrection_Action 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtCorrection_Action; + + /// + /// Panel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel2; + + /// + /// txtCleared_By 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCleared_By; + + /// + /// txtCleared_Date 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtCleared_Date; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// txtConfirmed_By 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtConfirmed_By; + + /// + /// txtConfirmed_Date 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtConfirmed_Date; + + /// + /// Panel3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel3; + + /// + /// txtVerified_By 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtVerified_By; + + /// + /// txtVerified_Date 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtVerified_Date; + + /// + /// txtRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtRemark; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnAttach_A 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttach_A; + + /// + /// btnAttach_B 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttach_B; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/RotatingEquipment.aspx b/SGGL/FineUIPro.Web/Transfer/RotatingEquipment.aspx index 4c737b46..c7482359 100644 --- a/SGGL/FineUIPro.Web/Transfer/RotatingEquipment.aspx +++ b/SGGL/FineUIPro.Web/Transfer/RotatingEquipment.aspx @@ -24,7 +24,7 @@ - + @@ -57,36 +57,36 @@ --%> + HeaderTextAlign="Center" minWidth="140px"> - + + HeaderTextAlign="Center" minWidth="140px"> + HeaderTextAlign="Center" minWidth="160px"> + HeaderTextAlign="Center" minWidth="140px"> + HeaderTextAlign="Center" Width="140px"> + HeaderTextAlign="Center" minWidth="140px"> + HeaderTextAlign="Center" minWidth="200px"> diff --git a/SGGL/FineUIPro.Web/Transfer/StaticEquipment.aspx b/SGGL/FineUIPro.Web/Transfer/StaticEquipment.aspx index 14c8f360..51419a3f 100644 --- a/SGGL/FineUIPro.Web/Transfer/StaticEquipment.aspx +++ b/SGGL/FineUIPro.Web/Transfer/StaticEquipment.aspx @@ -24,7 +24,7 @@ - + <%-- @@ -59,35 +59,35 @@ + HeaderTextAlign="Center" Width="140px"> - + + HeaderTextAlign="Center" Width="140px"> + HeaderTextAlign="Center" Width="160px"> + HeaderTextAlign="Center" Width="160px"> + HeaderTextAlign="Center" Width="160px"> + HeaderTextAlign="Center" Width="160px"> diff --git a/SGGL/FineUIPro.Web/Transfer/Telecom.aspx b/SGGL/FineUIPro.Web/Transfer/Telecom.aspx index 9304dda6..44df42ed 100644 --- a/SGGL/FineUIPro.Web/Transfer/Telecom.aspx +++ b/SGGL/FineUIPro.Web/Transfer/Telecom.aspx @@ -24,7 +24,7 @@ - + @@ -56,34 +56,34 @@ - + - - - + + + + HeaderTextAlign="Center" minWidth="160px"> + HeaderTextAlign="Center" minWidth="160px"> + HeaderTextAlign="Center" minWidth="160px"> + HeaderTextAlign="Center" minWidth="160px"> diff --git a/SGGL/FineUIPro.Web/Web.config b/SGGL/FineUIPro.Web/Web.config index 963148f2..9fc55c34 100644 --- a/SGGL/FineUIPro.Web/Web.config +++ b/SGGL/FineUIPro.Web/Web.config @@ -12,7 +12,7 @@ - + @@ -77,7 +77,7 @@ - + diff --git a/SGGL/FineUIPro.Web/common/Menu_Transfer.xml b/SGGL/FineUIPro.Web/common/Menu_Transfer.xml index 31fd29bc..cfea114a 100644 --- a/SGGL/FineUIPro.Web/common/Menu_Transfer.xml +++ b/SGGL/FineUIPro.Web/common/Menu_Transfer.xml @@ -1,20 +1,23 @@  - + - - - - - - - - - - - + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 004fb04a..4f0e208a 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -1478,6 +1478,9 @@ namespace Model partial void InsertManager_Month_CheckC(Manager_Month_CheckC instance); partial void UpdateManager_Month_CheckC(Manager_Month_CheckC instance); partial void DeleteManager_Month_CheckC(Manager_Month_CheckC instance); + partial void InsertManager_Month_ComplianceObligations(Manager_Month_ComplianceObligations instance); + partial void UpdateManager_Month_ComplianceObligations(Manager_Month_ComplianceObligations instance); + partial void DeleteManager_Month_ComplianceObligations(Manager_Month_ComplianceObligations instance); partial void InsertManager_Month_ComplianceObligationsC(Manager_Month_ComplianceObligationsC instance); partial void UpdateManager_Month_ComplianceObligationsC(Manager_Month_ComplianceObligationsC instance); partial void DeleteManager_Month_ComplianceObligationsC(Manager_Month_ComplianceObligationsC instance); @@ -2045,6 +2048,9 @@ namespace Model partial void InsertReport_CQMS_MonthReportItem(Report_CQMS_MonthReportItem instance); partial void UpdateReport_CQMS_MonthReportItem(Report_CQMS_MonthReportItem instance); partial void DeleteReport_CQMS_MonthReportItem(Report_CQMS_MonthReportItem instance); + partial void InsertReport_CQMS_ProblemHandle(Report_CQMS_ProblemHandle instance); + partial void UpdateReport_CQMS_ProblemHandle(Report_CQMS_ProblemHandle instance); + partial void DeleteReport_CQMS_ProblemHandle(Report_CQMS_ProblemHandle instance); partial void InsertReport_CqmsTarget(Report_CqmsTarget instance); partial void UpdateReport_CqmsTarget(Report_CqmsTarget instance); partial void DeleteReport_CqmsTarget(Report_CqmsTarget instance); @@ -6597,6 +6603,14 @@ namespace Model } } + public System.Data.Linq.Table Manager_Month_ComplianceObligations + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Manager_Month_ComplianceObligationsC { get @@ -8109,6 +8123,14 @@ namespace Model } } + public System.Data.Linq.Table Report_CQMS_ProblemHandle + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Report_CqmsTarget { get @@ -21750,8 +21772,6 @@ namespace Model private string _CodeRule; - private EntitySet _Doc_DocManage; - #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -21768,7 +21788,6 @@ namespace Model public Base_DocType() { - this._Doc_DocManage = new EntitySet(new Action(this.attach_Doc_DocManage), new Action(this.detach_Doc_DocManage)); OnCreated(); } @@ -21852,19 +21871,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Doc_DocManage_Base_DocType", Storage="_Doc_DocManage", ThisKey="DocTypeId", OtherKey="DocTypeId", DeleteRule="NO ACTION")] - public EntitySet Doc_DocManage - { - get - { - return this._Doc_DocManage; - } - set - { - this._Doc_DocManage.Assign(value); - } - } - public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -21884,18 +21890,6 @@ namespace Model this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } - - private void attach_Doc_DocManage(Doc_DocManage entity) - { - this.SendPropertyChanging(); - entity.Base_DocType = this; - } - - private void detach_Doc_DocManage(Doc_DocManage entity) - { - this.SendPropertyChanging(); - entity.Base_DocType = null; - } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_EmergencyType")] @@ -39721,6 +39715,8 @@ namespace Model private EntitySet _Check_CheckRectify; + private EntitySet _Check_CheckSpecialDetail; + private EntitySet _Check_ContactList; private EntitySet _Check_IncentiveNotice; @@ -40112,6 +40108,7 @@ namespace Model this._Check_CheckDayDetail = new EntitySet(new Action(this.attach_Check_CheckDayDetail), new Action(this.detach_Check_CheckDayDetail)); this._Check_CheckInfo = new EntitySet(new Action(this.attach_Check_CheckInfo), new Action(this.detach_Check_CheckInfo)); this._Check_CheckRectify = new EntitySet(new Action(this.attach_Check_CheckRectify), new Action(this.detach_Check_CheckRectify)); + this._Check_CheckSpecialDetail = new EntitySet(new Action(this.attach_Check_CheckSpecialDetail), new Action(this.detach_Check_CheckSpecialDetail)); this._Check_ContactList = new EntitySet(new Action(this.attach_Check_ContactList), new Action(this.detach_Check_ContactList)); this._Check_IncentiveNotice = new EntitySet(new Action(this.attach_Check_IncentiveNotice), new Action(this.detach_Check_IncentiveNotice)); this._Check_JointCheck = new EntitySet(new Action(this.attach_Check_JointCheck), new Action(this.detach_Check_JointCheck)); @@ -41019,6 +41016,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckSpecialDetail_Base_Unit", Storage="_Check_CheckSpecialDetail", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet Check_CheckSpecialDetail + { + get + { + return this._Check_CheckSpecialDetail; + } + set + { + this._Check_CheckSpecialDetail.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_ContactList_Base_Unit", Storage="_Check_ContactList", ThisKey="UnitId", OtherKey="SponsorUnitId", DeleteRule="NO ACTION")] public EntitySet Check_ContactList { @@ -43308,6 +43318,18 @@ namespace Model entity.Base_Unit = null; } + private void attach_Check_CheckSpecialDetail(Check_CheckSpecialDetail entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Check_CheckSpecialDetail(Check_CheckSpecialDetail entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + private void attach_Check_ContactList(Check_ContactList entity) { this.SendPropertyChanging(); @@ -62655,6 +62677,8 @@ namespace Model private string _HiddenType; + private EntityRef _Base_Unit; + private EntityRef _WBS_UnitWork; #region 可扩展性方法定义 @@ -62713,6 +62737,7 @@ namespace Model public Check_CheckSpecialDetail() { + this._Base_Unit = default(EntityRef); this._WBS_UnitWork = default(EntityRef); OnCreated(); } @@ -62852,6 +62877,10 @@ namespace Model { if ((this._UnitId != value)) { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } this.OnUnitIdChanging(value); this.SendPropertyChanging(); this._UnitId = value; @@ -63201,6 +63230,40 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckSpecialDetail_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.Check_CheckSpecialDetail.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Check_CheckSpecialDetail.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckSpecialDetail_ProjectData_WorkArea", Storage="_WBS_UnitWork", ThisKey="CheckArea", OtherKey="UnitWorkId", IsForeignKey=true)] public WBS_UnitWork WBS_UnitWork { @@ -98641,10 +98704,10 @@ namespace Model private string _AuditMan; - private string _Problem; - private string _Measure; + private string _Problem; + private System.Nullable _RemarkCode; private string _Supervisor; @@ -98697,10 +98760,10 @@ namespace Model partial void OnStatusChanged(); partial void OnAuditManChanging(string value); partial void OnAuditManChanged(); - partial void OnProblemChanging(string value); - partial void OnProblemChanged(); partial void OnMeasureChanging(string value); partial void OnMeasureChanged(); + partial void OnProblemChanging(string value); + partial void OnProblemChanged(); partial void OnRemarkCodeChanging(System.Nullable value); partial void OnRemarkCodeChanged(); partial void OnSupervisorChanging(string value); @@ -99073,26 +99136,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Problem", DbType="NVarChar(1000)")] - public string Problem - { - get - { - return this._Problem; - } - set - { - if ((this._Problem != value)) - { - this.OnProblemChanging(value); - this.SendPropertyChanging(); - this._Problem = value; - this.SendPropertyChanged("Problem"); - this.OnProblemChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Measure", DbType="NVarChar(1000)")] public string Measure { @@ -99113,6 +99156,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Problem", DbType="NVarChar(1000)")] + public string Problem + { + get + { + return this._Problem; + } + set + { + if ((this._Problem != value)) + { + this.OnProblemChanging(value); + this.SendPropertyChanging(); + this._Problem = value; + this.SendPropertyChanged("Problem"); + this.OnProblemChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")] public System.Nullable RemarkCode { @@ -123145,8 +123208,6 @@ namespace Model private EntityRef _Base_CNProfessional; - private EntityRef _Base_DocType; - private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -123198,7 +123259,6 @@ namespace Model public Doc_DocManage() { this._Base_CNProfessional = default(EntityRef); - this._Base_DocType = default(EntityRef); this._Base_Project = default(EntityRef); this._Base_Unit = default(EntityRef); this._Sys_User = default(EntityRef); @@ -123277,10 +123337,6 @@ namespace Model { if ((this._DocTypeId != value)) { - if (this._Base_DocType.HasLoadedOrAssignedValue) - { - throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); - } this.OnDocTypeIdChanging(value); this.SendPropertyChanging(); this._DocTypeId = value; @@ -123600,40 +123656,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Doc_DocManage_Base_DocType", Storage="_Base_DocType", ThisKey="DocTypeId", OtherKey="DocTypeId", IsForeignKey=true)] - public Base_DocType Base_DocType - { - get - { - return this._Base_DocType.Entity; - } - set - { - Base_DocType previousValue = this._Base_DocType.Entity; - if (((previousValue != value) - || (this._Base_DocType.HasLoadedOrAssignedValue == false))) - { - this.SendPropertyChanging(); - if ((previousValue != null)) - { - this._Base_DocType.Entity = null; - previousValue.Doc_DocManage.Remove(this); - } - this._Base_DocType.Entity = value; - if ((value != null)) - { - value.Doc_DocManage.Add(this); - this._DocTypeId = value.DocTypeId; - } - else - { - this._DocTypeId = default(string); - } - this.SendPropertyChanged("Base_DocType"); - } - } - } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Doc_DocManage_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -123804,8 +123826,6 @@ namespace Model private EntityRef _Doc_DocManage; - private EntityRef _Sys_User; - #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -123829,7 +123849,6 @@ namespace Model public Doc_DocManageApprove() { this._Doc_DocManage = default(EntityRef); - this._Sys_User = default(EntityRef); OnCreated(); } @@ -123877,7 +123896,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(500)")] public string ApproveMan { get @@ -123888,10 +123907,6 @@ namespace Model { if ((this._ApproveMan != value)) { - if (this._Sys_User.HasLoadedOrAssignedValue) - { - throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); - } this.OnApproveManChanging(value); this.SendPropertyChanging(); this._ApproveMan = value; @@ -124015,40 +124030,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Doc_DocManageApprove_Sys_User", Storage="_Sys_User", ThisKey="ApproveMan", OtherKey="UserId", IsForeignKey=true)] - public Sys_User Sys_User - { - get - { - return this._Sys_User.Entity; - } - set - { - Sys_User previousValue = this._Sys_User.Entity; - if (((previousValue != value) - || (this._Sys_User.HasLoadedOrAssignedValue == false))) - { - this.SendPropertyChanging(); - if ((previousValue != null)) - { - this._Sys_User.Entity = null; - previousValue.Doc_DocManageApprove.Remove(this); - } - this._Sys_User.Entity = value; - if ((value != null)) - { - value.Doc_DocManageApprove.Add(this); - this._ApproveMan = value.UserId; - } - else - { - this._ApproveMan = default(string); - } - this.SendPropertyChanged("Sys_User"); - } - } - } - public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -238919,6 +238900,229 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Manager_Month_ComplianceObligations")] + public partial class Manager_Month_ComplianceObligations : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ComplianceObligationsId; + + private string _MonthReportId; + + private string _InformationContent; + + private string _ResponseMeasures; + + private string _ImplementationStatus; + + private string _EvaluationConclusion; + + private EntityRef _Manager_MonthReportC; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnComplianceObligationsIdChanging(string value); + partial void OnComplianceObligationsIdChanged(); + partial void OnMonthReportIdChanging(string value); + partial void OnMonthReportIdChanged(); + partial void OnInformationContentChanging(string value); + partial void OnInformationContentChanged(); + partial void OnResponseMeasuresChanging(string value); + partial void OnResponseMeasuresChanged(); + partial void OnImplementationStatusChanging(string value); + partial void OnImplementationStatusChanged(); + partial void OnEvaluationConclusionChanging(string value); + partial void OnEvaluationConclusionChanged(); + #endregion + + public Manager_Month_ComplianceObligations() + { + this._Manager_MonthReportC = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ComplianceObligationsId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ComplianceObligationsId + { + get + { + return this._ComplianceObligationsId; + } + set + { + if ((this._ComplianceObligationsId != value)) + { + this.OnComplianceObligationsIdChanging(value); + this.SendPropertyChanging(); + this._ComplianceObligationsId = value; + this.SendPropertyChanged("ComplianceObligationsId"); + this.OnComplianceObligationsIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MonthReportId", DbType="NVarChar(50)")] + public string MonthReportId + { + get + { + return this._MonthReportId; + } + set + { + if ((this._MonthReportId != value)) + { + if (this._Manager_MonthReportC.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnMonthReportIdChanging(value); + this.SendPropertyChanging(); + this._MonthReportId = value; + this.SendPropertyChanged("MonthReportId"); + this.OnMonthReportIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InformationContent", DbType="NVarChar(500)")] + public string InformationContent + { + get + { + return this._InformationContent; + } + set + { + if ((this._InformationContent != value)) + { + this.OnInformationContentChanging(value); + this.SendPropertyChanging(); + this._InformationContent = value; + this.SendPropertyChanged("InformationContent"); + this.OnInformationContentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponseMeasures", DbType="NVarChar(500)")] + public string ResponseMeasures + { + get + { + return this._ResponseMeasures; + } + set + { + if ((this._ResponseMeasures != value)) + { + this.OnResponseMeasuresChanging(value); + this.SendPropertyChanging(); + this._ResponseMeasures = value; + this.SendPropertyChanged("ResponseMeasures"); + this.OnResponseMeasuresChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ImplementationStatus", DbType="NVarChar(500)")] + public string ImplementationStatus + { + get + { + return this._ImplementationStatus; + } + set + { + if ((this._ImplementationStatus != value)) + { + this.OnImplementationStatusChanging(value); + this.SendPropertyChanging(); + this._ImplementationStatus = value; + this.SendPropertyChanged("ImplementationStatus"); + this.OnImplementationStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EvaluationConclusion", DbType="NVarChar(50)")] + public string EvaluationConclusion + { + get + { + return this._EvaluationConclusion; + } + set + { + if ((this._EvaluationConclusion != value)) + { + this.OnEvaluationConclusionChanging(value); + this.SendPropertyChanging(); + this._EvaluationConclusion = value; + this.SendPropertyChanged("EvaluationConclusion"); + this.OnEvaluationConclusionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Manager_Month_ComplianceObligations_Manager_MonthReportC", Storage="_Manager_MonthReportC", ThisKey="MonthReportId", OtherKey="MonthReportId", IsForeignKey=true)] + public Manager_MonthReportC Manager_MonthReportC + { + get + { + return this._Manager_MonthReportC.Entity; + } + set + { + Manager_MonthReportC previousValue = this._Manager_MonthReportC.Entity; + if (((previousValue != value) + || (this._Manager_MonthReportC.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Manager_MonthReportC.Entity = null; + previousValue.Manager_Month_ComplianceObligations.Remove(this); + } + this._Manager_MonthReportC.Entity = value; + if ((value != null)) + { + value.Manager_Month_ComplianceObligations.Add(this); + this._MonthReportId = value.MonthReportId; + } + else + { + this._MonthReportId = default(string); + } + this.SendPropertyChanged("Manager_MonthReportC"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Manager_Month_ComplianceObligationsC")] public partial class Manager_Month_ComplianceObligationsC : INotifyPropertyChanging, INotifyPropertyChanged { @@ -245118,6 +245322,8 @@ namespace Model private EntitySet _Manager_Month_CheckC; + private EntitySet _Manager_Month_ComplianceObligations; + private EntitySet _Manager_Month_ComplianceObligationsC; private EntitySet _Manager_Month_CostInvestmentPlanC; @@ -245390,6 +245596,7 @@ namespace Model this._Manager_Month_ActivitiesC = new EntitySet(new Action(this.attach_Manager_Month_ActivitiesC), new Action(this.detach_Manager_Month_ActivitiesC)); this._Manager_Month_ActivityDesC = new EntitySet(new Action(this.attach_Manager_Month_ActivityDesC), new Action(this.detach_Manager_Month_ActivityDesC)); this._Manager_Month_CheckC = new EntitySet(new Action(this.attach_Manager_Month_CheckC), new Action(this.detach_Manager_Month_CheckC)); + this._Manager_Month_ComplianceObligations = new EntitySet(new Action(this.attach_Manager_Month_ComplianceObligations), new Action(this.detach_Manager_Month_ComplianceObligations)); this._Manager_Month_ComplianceObligationsC = new EntitySet(new Action(this.attach_Manager_Month_ComplianceObligationsC), new Action(this.detach_Manager_Month_ComplianceObligationsC)); this._Manager_Month_CostInvestmentPlanC = new EntitySet(new Action(this.attach_Manager_Month_CostInvestmentPlanC), new Action(this.detach_Manager_Month_CostInvestmentPlanC)); this._Manager_Month_EmergencyExercisesC = new EntitySet(new Action(this.attach_Manager_Month_EmergencyExercisesC), new Action(this.detach_Manager_Month_EmergencyExercisesC)); @@ -247570,6 +247777,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Manager_Month_ComplianceObligations_Manager_MonthReportC", Storage="_Manager_Month_ComplianceObligations", ThisKey="MonthReportId", OtherKey="MonthReportId", DeleteRule="NO ACTION")] + public EntitySet Manager_Month_ComplianceObligations + { + get + { + return this._Manager_Month_ComplianceObligations; + } + set + { + this._Manager_Month_ComplianceObligations.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Manager_Month_ComplianceObligationsC_Manager_MonthReportC", Storage="_Manager_Month_ComplianceObligationsC", ThisKey="MonthReportId", OtherKey="MonthReportId", DeleteRule="NO ACTION")] public EntitySet Manager_Month_ComplianceObligationsC { @@ -248151,6 +248371,18 @@ namespace Model entity.Manager_MonthReportC = null; } + private void attach_Manager_Month_ComplianceObligations(Manager_Month_ComplianceObligations entity) + { + this.SendPropertyChanging(); + entity.Manager_MonthReportC = this; + } + + private void detach_Manager_Month_ComplianceObligations(Manager_Month_ComplianceObligations entity) + { + this.SendPropertyChanging(); + entity.Manager_MonthReportC = null; + } + private void attach_Manager_Month_ComplianceObligationsC(Manager_Month_ComplianceObligationsC entity) { this.SendPropertyChanging(); @@ -276495,7 +276727,7 @@ namespace Model private System.Nullable _ProblemType; - private string _SubInspectId; + private string _QuestionTechnologyId; private string _TermItemId; @@ -276509,18 +276741,20 @@ namespace Model private string _InspectUser; - private string _HandleUser; - private string _ApproveUser; - private System.Nullable _AdjustCompleteTime; - private System.Nullable _ApproveState; private string _AddUser; private System.Nullable _AddTime; + private string _HandleUser; + + private System.Nullable _AdjustCompleteTime; + + private string _SubInspectId; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -276537,8 +276771,8 @@ namespace Model partial void OnConstructionUnitChanged(); partial void OnProblemTypeChanging(System.Nullable value); partial void OnProblemTypeChanged(); - partial void OnSubInspectIdChanging(string value); - partial void OnSubInspectIdChanged(); + partial void OnQuestionTechnologyIdChanging(string value); + partial void OnQuestionTechnologyIdChanged(); partial void OnTermItemIdChanging(string value); partial void OnTermItemIdChanged(); partial void OnWorkPackIdChanging(string value); @@ -276551,18 +276785,20 @@ namespace Model partial void OnRectifyTimeChanged(); partial void OnInspectUserChanging(string value); partial void OnInspectUserChanged(); - partial void OnHandleUserChanging(string value); - partial void OnHandleUserChanged(); partial void OnApproveUserChanging(string value); partial void OnApproveUserChanged(); - partial void OnAdjustCompleteTimeChanging(System.Nullable value); - partial void OnAdjustCompleteTimeChanged(); partial void OnApproveStateChanging(System.Nullable value); partial void OnApproveStateChanged(); partial void OnAddUserChanging(string value); partial void OnAddUserChanged(); partial void OnAddTimeChanging(System.Nullable value); partial void OnAddTimeChanged(); + partial void OnHandleUserChanging(string value); + partial void OnHandleUserChanged(); + partial void OnAdjustCompleteTimeChanging(System.Nullable value); + partial void OnAdjustCompleteTimeChanged(); + partial void OnSubInspectIdChanging(string value); + partial void OnSubInspectIdChanged(); #endregion public PreRun_InspectTailTerm() @@ -276690,22 +276926,22 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubInspectId", DbType="VarChar(50)")] - public string SubInspectId + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QuestionTechnologyId", DbType="VarChar(50)")] + public string QuestionTechnologyId { get { - return this._SubInspectId; + return this._QuestionTechnologyId; } set { - if ((this._SubInspectId != value)) + if ((this._QuestionTechnologyId != value)) { - this.OnSubInspectIdChanging(value); + this.OnQuestionTechnologyIdChanging(value); this.SendPropertyChanging(); - this._SubInspectId = value; - this.SendPropertyChanged("SubInspectId"); - this.OnSubInspectIdChanged(); + this._QuestionTechnologyId = value; + this.SendPropertyChanged("QuestionTechnologyId"); + this.OnQuestionTechnologyIdChanged(); } } } @@ -276830,26 +277066,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleUser", DbType="VarChar(50)")] - public string HandleUser - { - get - { - return this._HandleUser; - } - set - { - if ((this._HandleUser != value)) - { - this.OnHandleUserChanging(value); - this.SendPropertyChanging(); - this._HandleUser = value; - this.SendPropertyChanged("HandleUser"); - this.OnHandleUserChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveUser", DbType="VarChar(50)")] public string ApproveUser { @@ -276870,26 +277086,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AdjustCompleteTime", DbType="DateTime")] - public System.Nullable AdjustCompleteTime - { - get - { - return this._AdjustCompleteTime; - } - set - { - if ((this._AdjustCompleteTime != value)) - { - this.OnAdjustCompleteTimeChanging(value); - this.SendPropertyChanging(); - this._AdjustCompleteTime = value; - this.SendPropertyChanged("AdjustCompleteTime"); - this.OnAdjustCompleteTimeChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveState", DbType="Int")] public System.Nullable ApproveState { @@ -276950,6 +277146,66 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleUser", DbType="VarChar(50)")] + public string HandleUser + { + get + { + return this._HandleUser; + } + set + { + if ((this._HandleUser != value)) + { + this.OnHandleUserChanging(value); + this.SendPropertyChanging(); + this._HandleUser = value; + this.SendPropertyChanged("HandleUser"); + this.OnHandleUserChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AdjustCompleteTime", DbType="DateTime")] + public System.Nullable AdjustCompleteTime + { + get + { + return this._AdjustCompleteTime; + } + set + { + if ((this._AdjustCompleteTime != value)) + { + this.OnAdjustCompleteTimeChanging(value); + this.SendPropertyChanging(); + this._AdjustCompleteTime = value; + this.SendPropertyChanged("AdjustCompleteTime"); + this.OnAdjustCompleteTimeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubInspectId", DbType="NVarChar(50)")] + public string SubInspectId + { + get + { + return this._SubInspectId; + } + set + { + if ((this._SubInspectId != value)) + { + this.OnSubInspectIdChanging(value); + this.SendPropertyChanging(); + this._SubInspectId = value; + this.SendPropertyChanged("SubInspectId"); + this.OnSubInspectIdChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -276991,14 +277247,14 @@ namespace Model private string _ApproveUser; - private System.Nullable _ApproveType; - private System.Nullable _ApproveState; private string _AddUser; private System.Nullable _AddTime; + private System.Nullable _ApproveType; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -277017,14 +277273,14 @@ namespace Model partial void OnApproveTimeChanged(); partial void OnApproveUserChanging(string value); partial void OnApproveUserChanged(); - partial void OnApproveTypeChanging(System.Nullable value); - partial void OnApproveTypeChanged(); partial void OnApproveStateChanging(System.Nullable value); partial void OnApproveStateChanged(); partial void OnAddUserChanging(string value); partial void OnAddUserChanged(); partial void OnAddTimeChanging(System.Nullable value); partial void OnAddTimeChanged(); + partial void OnApproveTypeChanging(System.Nullable value); + partial void OnApproveTypeChanged(); #endregion public PreRun_InspectTermApproveRecords() @@ -277172,26 +277428,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="Int")] - public System.Nullable ApproveType - { - get - { - return this._ApproveType; - } - set - { - if ((this._ApproveType != value)) - { - this.OnApproveTypeChanging(value); - this.SendPropertyChanging(); - this._ApproveType = value; - this.SendPropertyChanged("ApproveType"); - this.OnApproveTypeChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveState", DbType="Int")] public System.Nullable ApproveState { @@ -277252,6 +277488,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="Int")] + public System.Nullable ApproveType + { + get + { + return this._ApproveType; + } + set + { + if ((this._ApproveType != value)) + { + this.OnApproveTypeChanging(value); + this.SendPropertyChanging(); + this._ApproveType = value; + this.SendPropertyChanged("ApproveType"); + this.OnApproveTypeChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -278184,7 +278440,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string Remark { get @@ -278307,6 +278563,12 @@ namespace Model private string _InspectResult; + private System.Nullable _InspectTime; + + private string _AddUser; + + private System.Nullable _AddTime; + private string _Subcontractor; private string _Contractor; @@ -278315,6 +278577,12 @@ namespace Model private string _Owner; + private System.Nullable _IsUnifyWanderAbout; + + private System.Nullable _UnifyWanderAboutData; + + private string _UnifyWanderAboutOpinion; + private System.Nullable _InspectionIsAllPass; private System.Nullable _SubcontractorIsAllPass; @@ -278325,9 +278593,7 @@ namespace Model private System.Nullable _OwnerIsAllPass; - private System.Nullable _WorkPackType; - - private string _PropertyTechnologyId; + private System.Nullable _WanderIsComplete; private System.Nullable _SubcontractorAllPassData; @@ -278337,35 +278603,25 @@ namespace Model private System.Nullable _OwnerAllPassData; - private System.Nullable _WanderIsComplete; - private System.Nullable _WanderCompleteData; + private System.Nullable _WorkPackType; + private System.Nullable _IsSiteImplement; - private string _SiteImplementUser; - - private System.Nullable _SiteImplementConfirmData; - - private System.Nullable _RecordUploadData; - private System.Nullable _InspectIsClose; - private string _InspectIsCloseUser; - private System.Nullable _InspectCloseData; - private System.Nullable _IsUnifyWanderAbout; + private string _InspectIsCloseUser; - private System.Nullable _UnifyWanderAboutData; + private string _PropertyTechnologyId; - private string _UnifyWanderAboutOpinion; + private System.Nullable _RecordUploadData; - private System.Nullable _InspectTime; + private System.Nullable _SiteImplementConfirmData; - private string _AddUser; - - private System.Nullable _AddTime; + private string _SiteImplementUser; #region 可扩展性方法定义 partial void OnLoaded(); @@ -278387,6 +278643,12 @@ namespace Model partial void OnWorkPackIdChanged(); partial void OnInspectResultChanging(string value); partial void OnInspectResultChanged(); + partial void OnInspectTimeChanging(System.Nullable value); + partial void OnInspectTimeChanged(); + partial void OnAddUserChanging(string value); + partial void OnAddUserChanged(); + partial void OnAddTimeChanging(System.Nullable value); + partial void OnAddTimeChanged(); partial void OnSubcontractorChanging(string value); partial void OnSubcontractorChanged(); partial void OnContractorChanging(string value); @@ -278395,6 +278657,12 @@ namespace Model partial void OnSupervisionChanged(); partial void OnOwnerChanging(string value); partial void OnOwnerChanged(); + partial void OnIsUnifyWanderAboutChanging(System.Nullable value); + partial void OnIsUnifyWanderAboutChanged(); + partial void OnUnifyWanderAboutDataChanging(System.Nullable value); + partial void OnUnifyWanderAboutDataChanged(); + partial void OnUnifyWanderAboutOpinionChanging(string value); + partial void OnUnifyWanderAboutOpinionChanged(); partial void OnInspectionIsAllPassChanging(System.Nullable value); partial void OnInspectionIsAllPassChanged(); partial void OnSubcontractorIsAllPassChanging(System.Nullable value); @@ -278405,10 +278673,8 @@ namespace Model partial void OnSupervisionIsAllPassChanged(); partial void OnOwnerIsAllPassChanging(System.Nullable value); partial void OnOwnerIsAllPassChanged(); - partial void OnWorkPackTypeChanging(System.Nullable value); - partial void OnWorkPackTypeChanged(); - partial void OnPropertyTechnologyIdChanging(string value); - partial void OnPropertyTechnologyIdChanged(); + partial void OnWanderIsCompleteChanging(System.Nullable value); + partial void OnWanderIsCompleteChanged(); partial void OnSubcontractorAllPassDataChanging(System.Nullable value); partial void OnSubcontractorAllPassDataChanged(); partial void OnContractorAllPassDataChanging(System.Nullable value); @@ -278417,36 +278683,26 @@ namespace Model partial void OnSupervisionAllPassDataChanged(); partial void OnOwnerAllPassDataChanging(System.Nullable value); partial void OnOwnerAllPassDataChanged(); - partial void OnWanderIsCompleteChanging(System.Nullable value); - partial void OnWanderIsCompleteChanged(); partial void OnWanderCompleteDataChanging(System.Nullable value); partial void OnWanderCompleteDataChanged(); + partial void OnWorkPackTypeChanging(System.Nullable value); + partial void OnWorkPackTypeChanged(); partial void OnIsSiteImplementChanging(System.Nullable value); partial void OnIsSiteImplementChanged(); - partial void OnSiteImplementUserChanging(string value); - partial void OnSiteImplementUserChanged(); - partial void OnSiteImplementConfirmDataChanging(System.Nullable value); - partial void OnSiteImplementConfirmDataChanged(); - partial void OnRecordUploadDataChanging(System.Nullable value); - partial void OnRecordUploadDataChanged(); partial void OnInspectIsCloseChanging(System.Nullable value); partial void OnInspectIsCloseChanged(); - partial void OnInspectIsCloseUserChanging(string value); - partial void OnInspectIsCloseUserChanged(); partial void OnInspectCloseDataChanging(System.Nullable value); partial void OnInspectCloseDataChanged(); - partial void OnIsUnifyWanderAboutChanging(System.Nullable value); - partial void OnIsUnifyWanderAboutChanged(); - partial void OnUnifyWanderAboutDataChanging(System.Nullable value); - partial void OnUnifyWanderAboutDataChanged(); - partial void OnUnifyWanderAboutOpinionChanging(string value); - partial void OnUnifyWanderAboutOpinionChanged(); - partial void OnInspectTimeChanging(System.Nullable value); - partial void OnInspectTimeChanged(); - partial void OnAddUserChanging(string value); - partial void OnAddUserChanged(); - partial void OnAddTimeChanging(System.Nullable value); - partial void OnAddTimeChanged(); + partial void OnInspectIsCloseUserChanging(string value); + partial void OnInspectIsCloseUserChanged(); + partial void OnPropertyTechnologyIdChanging(string value); + partial void OnPropertyTechnologyIdChanged(); + partial void OnRecordUploadDataChanging(System.Nullable value); + partial void OnRecordUploadDataChanged(); + partial void OnSiteImplementConfirmDataChanging(System.Nullable value); + partial void OnSiteImplementConfirmDataChanged(); + partial void OnSiteImplementUserChanging(string value); + partial void OnSiteImplementUserChanged(); #endregion public PreRun_SubInspectTerm() @@ -278614,6 +278870,66 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectTime", DbType="DateTime")] + public System.Nullable InspectTime + { + get + { + return this._InspectTime; + } + set + { + if ((this._InspectTime != value)) + { + this.OnInspectTimeChanging(value); + this.SendPropertyChanging(); + this._InspectTime = value; + this.SendPropertyChanged("InspectTime"); + this.OnInspectTimeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AddUser", DbType="VarChar(50)")] + public string AddUser + { + get + { + return this._AddUser; + } + set + { + if ((this._AddUser != value)) + { + this.OnAddUserChanging(value); + this.SendPropertyChanging(); + this._AddUser = value; + this.SendPropertyChanged("AddUser"); + this.OnAddUserChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AddTime", DbType="DateTime")] + public System.Nullable AddTime + { + get + { + return this._AddTime; + } + set + { + if ((this._AddTime != value)) + { + this.OnAddTimeChanging(value); + this.SendPropertyChanging(); + this._AddTime = value; + this.SendPropertyChanged("AddTime"); + this.OnAddTimeChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Subcontractor", DbType="VarChar(50)")] public string Subcontractor { @@ -278694,6 +279010,66 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsUnifyWanderAbout", DbType="Int")] + public System.Nullable IsUnifyWanderAbout + { + get + { + return this._IsUnifyWanderAbout; + } + set + { + if ((this._IsUnifyWanderAbout != value)) + { + this.OnIsUnifyWanderAboutChanging(value); + this.SendPropertyChanging(); + this._IsUnifyWanderAbout = value; + this.SendPropertyChanged("IsUnifyWanderAbout"); + this.OnIsUnifyWanderAboutChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnifyWanderAboutData", DbType="DateTime")] + public System.Nullable UnifyWanderAboutData + { + get + { + return this._UnifyWanderAboutData; + } + set + { + if ((this._UnifyWanderAboutData != value)) + { + this.OnUnifyWanderAboutDataChanging(value); + this.SendPropertyChanging(); + this._UnifyWanderAboutData = value; + this.SendPropertyChanged("UnifyWanderAboutData"); + this.OnUnifyWanderAboutDataChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnifyWanderAboutOpinion", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string UnifyWanderAboutOpinion + { + get + { + return this._UnifyWanderAboutOpinion; + } + set + { + if ((this._UnifyWanderAboutOpinion != value)) + { + this.OnUnifyWanderAboutOpinionChanging(value); + this.SendPropertyChanging(); + this._UnifyWanderAboutOpinion = value; + this.SendPropertyChanged("UnifyWanderAboutOpinion"); + this.OnUnifyWanderAboutOpinionChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionIsAllPass", DbType="Int")] public System.Nullable InspectionIsAllPass { @@ -278794,42 +279170,22 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackType", DbType="Int")] - public System.Nullable WorkPackType + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WanderIsComplete", DbType="Int")] + public System.Nullable WanderIsComplete { get { - return this._WorkPackType; + return this._WanderIsComplete; } set { - if ((this._WorkPackType != value)) + if ((this._WanderIsComplete != value)) { - this.OnWorkPackTypeChanging(value); + this.OnWanderIsCompleteChanging(value); this.SendPropertyChanging(); - this._WorkPackType = value; - this.SendPropertyChanged("WorkPackType"); - this.OnWorkPackTypeChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PropertyTechnologyId", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] - public string PropertyTechnologyId - { - get - { - return this._PropertyTechnologyId; - } - set - { - if ((this._PropertyTechnologyId != value)) - { - this.OnPropertyTechnologyIdChanging(value); - this.SendPropertyChanging(); - this._PropertyTechnologyId = value; - this.SendPropertyChanged("PropertyTechnologyId"); - this.OnPropertyTechnologyIdChanged(); + this._WanderIsComplete = value; + this.SendPropertyChanged("WanderIsComplete"); + this.OnWanderIsCompleteChanged(); } } } @@ -278914,26 +279270,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WanderIsComplete", DbType="Int")] - public System.Nullable WanderIsComplete - { - get - { - return this._WanderIsComplete; - } - set - { - if ((this._WanderIsComplete != value)) - { - this.OnWanderIsCompleteChanging(value); - this.SendPropertyChanging(); - this._WanderIsComplete = value; - this.SendPropertyChanged("WanderIsComplete"); - this.OnWanderIsCompleteChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WanderCompleteData", DbType="DateTime")] public System.Nullable WanderCompleteData { @@ -278954,6 +279290,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackType", DbType="Int")] + public System.Nullable WorkPackType + { + get + { + return this._WorkPackType; + } + set + { + if ((this._WorkPackType != value)) + { + this.OnWorkPackTypeChanging(value); + this.SendPropertyChanging(); + this._WorkPackType = value; + this.SendPropertyChanged("WorkPackType"); + this.OnWorkPackTypeChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsSiteImplement", DbType="Int")] public System.Nullable IsSiteImplement { @@ -278974,66 +279330,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SiteImplementUser", DbType="VarChar(50)")] - public string SiteImplementUser - { - get - { - return this._SiteImplementUser; - } - set - { - if ((this._SiteImplementUser != value)) - { - this.OnSiteImplementUserChanging(value); - this.SendPropertyChanging(); - this._SiteImplementUser = value; - this.SendPropertyChanged("SiteImplementUser"); - this.OnSiteImplementUserChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SiteImplementConfirmData", DbType="DateTime")] - public System.Nullable SiteImplementConfirmData - { - get - { - return this._SiteImplementConfirmData; - } - set - { - if ((this._SiteImplementConfirmData != value)) - { - this.OnSiteImplementConfirmDataChanging(value); - this.SendPropertyChanging(); - this._SiteImplementConfirmData = value; - this.SendPropertyChanged("SiteImplementConfirmData"); - this.OnSiteImplementConfirmDataChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RecordUploadData", DbType="DateTime")] - public System.Nullable RecordUploadData - { - get - { - return this._RecordUploadData; - } - set - { - if ((this._RecordUploadData != value)) - { - this.OnRecordUploadDataChanging(value); - this.SendPropertyChanging(); - this._RecordUploadData = value; - this.SendPropertyChanged("RecordUploadData"); - this.OnRecordUploadDataChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectIsClose", DbType="Int")] public System.Nullable InspectIsClose { @@ -279054,26 +279350,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectIsCloseUser", DbType="VarChar(50)")] - public string InspectIsCloseUser - { - get - { - return this._InspectIsCloseUser; - } - set - { - if ((this._InspectIsCloseUser != value)) - { - this.OnInspectIsCloseUserChanging(value); - this.SendPropertyChanging(); - this._InspectIsCloseUser = value; - this.SendPropertyChanged("InspectIsCloseUser"); - this.OnInspectIsCloseUserChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectCloseData", DbType="DateTime")] public System.Nullable InspectCloseData { @@ -279094,122 +279370,102 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsUnifyWanderAbout", DbType="Int")] - public System.Nullable IsUnifyWanderAbout + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectIsCloseUser", DbType="NVarChar(50)")] + public string InspectIsCloseUser { get { - return this._IsUnifyWanderAbout; + return this._InspectIsCloseUser; } set { - if ((this._IsUnifyWanderAbout != value)) + if ((this._InspectIsCloseUser != value)) { - this.OnIsUnifyWanderAboutChanging(value); + this.OnInspectIsCloseUserChanging(value); this.SendPropertyChanging(); - this._IsUnifyWanderAbout = value; - this.SendPropertyChanged("IsUnifyWanderAbout"); - this.OnIsUnifyWanderAboutChanged(); + this._InspectIsCloseUser = value; + this.SendPropertyChanged("InspectIsCloseUser"); + this.OnInspectIsCloseUserChanged(); } } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnifyWanderAboutData", DbType="DateTime")] - public System.Nullable UnifyWanderAboutData + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PropertyTechnologyId", DbType="NVarChar(500)")] + public string PropertyTechnologyId { get { - return this._UnifyWanderAboutData; + return this._PropertyTechnologyId; } set { - if ((this._UnifyWanderAboutData != value)) + if ((this._PropertyTechnologyId != value)) { - this.OnUnifyWanderAboutDataChanging(value); + this.OnPropertyTechnologyIdChanging(value); this.SendPropertyChanging(); - this._UnifyWanderAboutData = value; - this.SendPropertyChanged("UnifyWanderAboutData"); - this.OnUnifyWanderAboutDataChanged(); + this._PropertyTechnologyId = value; + this.SendPropertyChanged("PropertyTechnologyId"); + this.OnPropertyTechnologyIdChanged(); } } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnifyWanderAboutOpinion", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] - public string UnifyWanderAboutOpinion + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RecordUploadData", DbType="DateTime")] + public System.Nullable RecordUploadData { get { - return this._UnifyWanderAboutOpinion; + return this._RecordUploadData; } set { - if ((this._UnifyWanderAboutOpinion != value)) + if ((this._RecordUploadData != value)) { - this.OnUnifyWanderAboutOpinionChanging(value); + this.OnRecordUploadDataChanging(value); this.SendPropertyChanging(); - this._UnifyWanderAboutOpinion = value; - this.SendPropertyChanged("UnifyWanderAboutOpinion"); - this.OnUnifyWanderAboutOpinionChanged(); + this._RecordUploadData = value; + this.SendPropertyChanged("RecordUploadData"); + this.OnRecordUploadDataChanged(); } } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectTime", DbType="DateTime")] - public System.Nullable InspectTime + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SiteImplementConfirmData", DbType="DateTime")] + public System.Nullable SiteImplementConfirmData { get { - return this._InspectTime; + return this._SiteImplementConfirmData; } set { - if ((this._InspectTime != value)) + if ((this._SiteImplementConfirmData != value)) { - this.OnInspectTimeChanging(value); + this.OnSiteImplementConfirmDataChanging(value); this.SendPropertyChanging(); - this._InspectTime = value; - this.SendPropertyChanged("InspectTime"); - this.OnInspectTimeChanged(); + this._SiteImplementConfirmData = value; + this.SendPropertyChanged("SiteImplementConfirmData"); + this.OnSiteImplementConfirmDataChanged(); } } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AddUser", DbType="VarChar(50)")] - public string AddUser + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SiteImplementUser", DbType="NVarChar(50)")] + public string SiteImplementUser { get { - return this._AddUser; + return this._SiteImplementUser; } set { - if ((this._AddUser != value)) + if ((this._SiteImplementUser != value)) { - this.OnAddUserChanging(value); + this.OnSiteImplementUserChanging(value); this.SendPropertyChanging(); - this._AddUser = value; - this.SendPropertyChanged("AddUser"); - this.OnAddUserChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AddTime", DbType="DateTime")] - public System.Nullable AddTime - { - get - { - return this._AddTime; - } - set - { - if ((this._AddTime != value)) - { - this.OnAddTimeChanging(value); - this.SendPropertyChanging(); - this._AddTime = value; - this.SendPropertyChanged("AddTime"); - this.OnAddTimeChanged(); + this._SiteImplementUser = value; + this.SendPropertyChanged("SiteImplementUser"); + this.OnSiteImplementUserChanged(); } } } @@ -279277,22 +279533,6 @@ namespace Model private string _Owner; - private System.Nullable _SubcontractorIsPass; - - private System.Nullable _ContractorIsPass; - - private System.Nullable _SupervisionIsPass; - - private System.Nullable _OwnerIsPass; - - private string _SubcontractorRemark; - - private string _ContractorRemark; - - private string _SupervisionRemark; - - private string _OwnerRemark; - private System.Nullable _WorkPackType; private string _PropertyTechnologyId; @@ -279305,6 +279545,22 @@ namespace Model private System.Nullable _Sort; + private string _SubcontractorRemark; + + private string _ContractorRemark; + + private string _SupervisionRemark; + + private string _OwnerRemark; + + private System.Nullable _SubcontractorIsPass; + + private System.Nullable _ContractorIsPass; + + private System.Nullable _SupervisionIsPass; + + private System.Nullable _OwnerIsPass; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -279345,22 +279601,6 @@ namespace Model partial void OnSupervisionChanged(); partial void OnOwnerChanging(string value); partial void OnOwnerChanged(); - partial void OnSubcontractorIsPassChanging(System.Nullable value); - partial void OnSubcontractorIsPassChanged(); - partial void OnContractorIsPassChanging(System.Nullable value); - partial void OnContractorIsPassChanged(); - partial void OnSupervisionIsPassChanging(System.Nullable value); - partial void OnSupervisionIsPassChanged(); - partial void OnOwnerIsPassChanging(System.Nullable value); - partial void OnOwnerIsPassChanged(); - partial void OnSubcontractorRemarkChanging(string value); - partial void OnSubcontractorRemarkChanged(); - partial void OnContractorRemarkChanging(string value); - partial void OnContractorRemarkChanged(); - partial void OnSupervisionRemarkChanging(string value); - partial void OnSupervisionRemarkChanged(); - partial void OnOwnerRemarkChanging(string value); - partial void OnOwnerRemarkChanged(); partial void OnWorkPackTypeChanging(System.Nullable value); partial void OnWorkPackTypeChanged(); partial void OnPropertyTechnologyIdChanging(string value); @@ -279373,6 +279613,22 @@ namespace Model partial void OnAddTimeChanged(); partial void OnSortChanging(System.Nullable value); partial void OnSortChanged(); + partial void OnSubcontractorRemarkChanging(string value); + partial void OnSubcontractorRemarkChanged(); + partial void OnContractorRemarkChanging(string value); + partial void OnContractorRemarkChanged(); + partial void OnSupervisionRemarkChanging(string value); + partial void OnSupervisionRemarkChanged(); + partial void OnOwnerRemarkChanging(string value); + partial void OnOwnerRemarkChanged(); + partial void OnSubcontractorIsPassChanging(System.Nullable value); + partial void OnSubcontractorIsPassChanged(); + partial void OnContractorIsPassChanging(System.Nullable value); + partial void OnContractorIsPassChanged(); + partial void OnSupervisionIsPassChanging(System.Nullable value); + partial void OnSupervisionIsPassChanged(); + partial void OnOwnerIsPassChanging(System.Nullable value); + partial void OnOwnerIsPassChanged(); #endregion public PreRun_SubInspectTermItem() @@ -279740,166 +279996,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubcontractorIsPass", DbType="Int")] - public System.Nullable SubcontractorIsPass - { - get - { - return this._SubcontractorIsPass; - } - set - { - if ((this._SubcontractorIsPass != value)) - { - this.OnSubcontractorIsPassChanging(value); - this.SendPropertyChanging(); - this._SubcontractorIsPass = value; - this.SendPropertyChanged("SubcontractorIsPass"); - this.OnSubcontractorIsPassChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractorIsPass", DbType="Int")] - public System.Nullable ContractorIsPass - { - get - { - return this._ContractorIsPass; - } - set - { - if ((this._ContractorIsPass != value)) - { - this.OnContractorIsPassChanging(value); - this.SendPropertyChanging(); - this._ContractorIsPass = value; - this.SendPropertyChanged("ContractorIsPass"); - this.OnContractorIsPassChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupervisionIsPass", DbType="Int")] - public System.Nullable SupervisionIsPass - { - get - { - return this._SupervisionIsPass; - } - set - { - if ((this._SupervisionIsPass != value)) - { - this.OnSupervisionIsPassChanging(value); - this.SendPropertyChanging(); - this._SupervisionIsPass = value; - this.SendPropertyChanged("SupervisionIsPass"); - this.OnSupervisionIsPassChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OwnerIsPass", DbType="Int")] - public System.Nullable OwnerIsPass - { - get - { - return this._OwnerIsPass; - } - set - { - if ((this._OwnerIsPass != value)) - { - this.OnOwnerIsPassChanging(value); - this.SendPropertyChanging(); - this._OwnerIsPass = value; - this.SendPropertyChanged("OwnerIsPass"); - this.OnOwnerIsPassChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubcontractorRemark", DbType="VarChar(1000)")] - public string SubcontractorRemark - { - get - { - return this._SubcontractorRemark; - } - set - { - if ((this._SubcontractorRemark != value)) - { - this.OnSubcontractorRemarkChanging(value); - this.SendPropertyChanging(); - this._SubcontractorRemark = value; - this.SendPropertyChanged("SubcontractorRemark"); - this.OnSubcontractorRemarkChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractorRemark", DbType="VarChar(1000)")] - public string ContractorRemark - { - get - { - return this._ContractorRemark; - } - set - { - if ((this._ContractorRemark != value)) - { - this.OnContractorRemarkChanging(value); - this.SendPropertyChanging(); - this._ContractorRemark = value; - this.SendPropertyChanged("ContractorRemark"); - this.OnContractorRemarkChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupervisionRemark", DbType="VarChar(1000)")] - public string SupervisionRemark - { - get - { - return this._SupervisionRemark; - } - set - { - if ((this._SupervisionRemark != value)) - { - this.OnSupervisionRemarkChanging(value); - this.SendPropertyChanging(); - this._SupervisionRemark = value; - this.SendPropertyChanged("SupervisionRemark"); - this.OnSupervisionRemarkChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OwnerRemark", DbType="VarChar(1000)")] - public string OwnerRemark - { - get - { - return this._OwnerRemark; - } - set - { - if ((this._OwnerRemark != value)) - { - this.OnOwnerRemarkChanging(value); - this.SendPropertyChanging(); - this._OwnerRemark = value; - this.SendPropertyChanged("OwnerRemark"); - this.OnOwnerRemarkChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackType", DbType="Int")] public System.Nullable WorkPackType { @@ -279920,7 +280016,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PropertyTechnologyId", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PropertyTechnologyId", DbType="VarChar(50)")] public string PropertyTechnologyId { get @@ -280020,6 +280116,166 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubcontractorRemark", DbType="VarChar(1000)")] + public string SubcontractorRemark + { + get + { + return this._SubcontractorRemark; + } + set + { + if ((this._SubcontractorRemark != value)) + { + this.OnSubcontractorRemarkChanging(value); + this.SendPropertyChanging(); + this._SubcontractorRemark = value; + this.SendPropertyChanged("SubcontractorRemark"); + this.OnSubcontractorRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractorRemark", DbType="VarChar(1000)")] + public string ContractorRemark + { + get + { + return this._ContractorRemark; + } + set + { + if ((this._ContractorRemark != value)) + { + this.OnContractorRemarkChanging(value); + this.SendPropertyChanging(); + this._ContractorRemark = value; + this.SendPropertyChanged("ContractorRemark"); + this.OnContractorRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupervisionRemark", DbType="VarChar(1000)")] + public string SupervisionRemark + { + get + { + return this._SupervisionRemark; + } + set + { + if ((this._SupervisionRemark != value)) + { + this.OnSupervisionRemarkChanging(value); + this.SendPropertyChanging(); + this._SupervisionRemark = value; + this.SendPropertyChanged("SupervisionRemark"); + this.OnSupervisionRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OwnerRemark", DbType="VarChar(1000)")] + public string OwnerRemark + { + get + { + return this._OwnerRemark; + } + set + { + if ((this._OwnerRemark != value)) + { + this.OnOwnerRemarkChanging(value); + this.SendPropertyChanging(); + this._OwnerRemark = value; + this.SendPropertyChanged("OwnerRemark"); + this.OnOwnerRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubcontractorIsPass", DbType="Int")] + public System.Nullable SubcontractorIsPass + { + get + { + return this._SubcontractorIsPass; + } + set + { + if ((this._SubcontractorIsPass != value)) + { + this.OnSubcontractorIsPassChanging(value); + this.SendPropertyChanging(); + this._SubcontractorIsPass = value; + this.SendPropertyChanged("SubcontractorIsPass"); + this.OnSubcontractorIsPassChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractorIsPass", DbType="Int")] + public System.Nullable ContractorIsPass + { + get + { + return this._ContractorIsPass; + } + set + { + if ((this._ContractorIsPass != value)) + { + this.OnContractorIsPassChanging(value); + this.SendPropertyChanging(); + this._ContractorIsPass = value; + this.SendPropertyChanged("ContractorIsPass"); + this.OnContractorIsPassChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupervisionIsPass", DbType="Int")] + public System.Nullable SupervisionIsPass + { + get + { + return this._SupervisionIsPass; + } + set + { + if ((this._SupervisionIsPass != value)) + { + this.OnSupervisionIsPassChanging(value); + this.SendPropertyChanging(); + this._SupervisionIsPass = value; + this.SendPropertyChanged("SupervisionIsPass"); + this.OnSupervisionIsPassChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OwnerIsPass", DbType="Int")] + public System.Nullable OwnerIsPass + { + get + { + return this._OwnerIsPass; + } + set + { + if ((this._OwnerIsPass != value)) + { + this.OnOwnerIsPassChanging(value); + this.SendPropertyChanging(); + this._OwnerIsPass = value; + this.SendPropertyChanged("OwnerIsPass"); + this.OnOwnerIsPassChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -281021,8 +281277,6 @@ namespace Model private string _RestrictCondition; - private System.Nullable _ResponsibilityProposeSatate; - private System.Nullable _ResponsibilityConfirm; private System.Nullable _ProposeConfirm; @@ -281033,11 +281287,9 @@ namespace Model private System.Nullable _OwnerConfirm; - private System.Nullable _ProposeConfirmData; - private System.Nullable _ResponsibilityConfirmData; - private System.Nullable _ProposeHandleData; + private System.Nullable _ProposeConfirmData; private System.Nullable _GeneraConfirmData; @@ -281053,6 +281305,10 @@ namespace Model private System.Nullable _Sort; + private System.Nullable _ResponsibilityProposeSatate; + + private System.Nullable _ProposeHandleData; + private string _FourDecisionCode; #region 可扩展性方法定义 @@ -281089,8 +281345,6 @@ namespace Model partial void OnRealityDestructionTimeChanged(); partial void OnRestrictConditionChanging(string value); partial void OnRestrictConditionChanged(); - partial void OnResponsibilityProposeSatateChanging(System.Nullable value); - partial void OnResponsibilityProposeSatateChanged(); partial void OnResponsibilityConfirmChanging(System.Nullable value); partial void OnResponsibilityConfirmChanged(); partial void OnProposeConfirmChanging(System.Nullable value); @@ -281101,12 +281355,10 @@ namespace Model partial void OnSupervisionConfirmChanged(); partial void OnOwnerConfirmChanging(System.Nullable value); partial void OnOwnerConfirmChanged(); - partial void OnProposeConfirmDataChanging(System.Nullable value); - partial void OnProposeConfirmDataChanged(); partial void OnResponsibilityConfirmDataChanging(System.Nullable value); partial void OnResponsibilityConfirmDataChanged(); - partial void OnProposeHandleDataChanging(System.Nullable value); - partial void OnProposeHandleDataChanged(); + partial void OnProposeConfirmDataChanging(System.Nullable value); + partial void OnProposeConfirmDataChanged(); partial void OnGeneraConfirmDataChanging(System.Nullable value); partial void OnGeneraConfirmDataChanged(); partial void OnSupervisionConfirmDataChanging(System.Nullable value); @@ -281121,6 +281373,10 @@ namespace Model partial void OnAddTimeChanged(); partial void OnSortChanging(System.Nullable value); partial void OnSortChanged(); + partial void OnResponsibilityProposeSatateChanging(System.Nullable value); + partial void OnResponsibilityProposeSatateChanged(); + partial void OnProposeHandleDataChanging(System.Nullable value); + partial void OnProposeHandleDataChanged(); partial void OnFourDecisionCodeChanging(string value); partial void OnFourDecisionCodeChanged(); #endregion @@ -281430,26 +281686,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponsibilityProposeSatate", DbType="Int")] - public System.Nullable ResponsibilityProposeSatate - { - get - { - return this._ResponsibilityProposeSatate; - } - set - { - if ((this._ResponsibilityProposeSatate != value)) - { - this.OnResponsibilityProposeSatateChanging(value); - this.SendPropertyChanging(); - this._ResponsibilityProposeSatate = value; - this.SendPropertyChanged("ResponsibilityProposeSatate"); - this.OnResponsibilityProposeSatateChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponsibilityConfirm", DbType="Int")] public System.Nullable ResponsibilityConfirm { @@ -281550,26 +281786,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProposeConfirmData", DbType="DateTime")] - public System.Nullable ProposeConfirmData - { - get - { - return this._ProposeConfirmData; - } - set - { - if ((this._ProposeConfirmData != value)) - { - this.OnProposeConfirmDataChanging(value); - this.SendPropertyChanging(); - this._ProposeConfirmData = value; - this.SendPropertyChanged("ProposeConfirmData"); - this.OnProposeConfirmDataChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponsibilityConfirmData", DbType="DateTime")] public System.Nullable ResponsibilityConfirmData { @@ -281590,22 +281806,22 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProposeHandleData", DbType="DateTime")] - public System.Nullable ProposeHandleData + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProposeConfirmData", DbType="DateTime")] + public System.Nullable ProposeConfirmData { get { - return this._ProposeHandleData; + return this._ProposeConfirmData; } set { - if ((this._ProposeHandleData != value)) + if ((this._ProposeConfirmData != value)) { - this.OnProposeHandleDataChanging(value); + this.OnProposeConfirmDataChanging(value); this.SendPropertyChanging(); - this._ProposeHandleData = value; - this.SendPropertyChanged("ProposeHandleData"); - this.OnProposeHandleDataChanged(); + this._ProposeConfirmData = value; + this.SendPropertyChanged("ProposeConfirmData"); + this.OnProposeConfirmDataChanged(); } } } @@ -281750,6 +281966,46 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponsibilityProposeSatate", DbType="Int")] + public System.Nullable ResponsibilityProposeSatate + { + get + { + return this._ResponsibilityProposeSatate; + } + set + { + if ((this._ResponsibilityProposeSatate != value)) + { + this.OnResponsibilityProposeSatateChanging(value); + this.SendPropertyChanging(); + this._ResponsibilityProposeSatate = value; + this.SendPropertyChanged("ResponsibilityProposeSatate"); + this.OnResponsibilityProposeSatateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProposeHandleData", DbType="DateTime")] + public System.Nullable ProposeHandleData + { + get + { + return this._ProposeHandleData; + } + set + { + if ((this._ProposeHandleData != value)) + { + this.OnProposeHandleDataChanging(value); + this.SendPropertyChanging(); + this._ProposeHandleData = value; + this.SendPropertyChanged("ProposeHandleData"); + this.OnProposeHandleDataChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FourDecisionCode", DbType="VarChar(20)")] public string FourDecisionCode { @@ -282462,7 +282718,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string Remark { get @@ -318283,6 +318539,164 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Report_CQMS_ProblemHandle")] + public partial class Report_CQMS_ProblemHandle : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _ReportId; + + private string _ReType; + + private string _UnitName; + + private string _ProblemDes; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnReportIdChanging(string value); + partial void OnReportIdChanged(); + partial void OnReTypeChanging(string value); + partial void OnReTypeChanged(); + partial void OnUnitNameChanging(string value); + partial void OnUnitNameChanged(); + partial void OnProblemDesChanging(string value); + partial void OnProblemDesChanged(); + #endregion + + public Report_CQMS_ProblemHandle() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportId", DbType="NVarChar(50)")] + public string ReportId + { + get + { + return this._ReportId; + } + set + { + if ((this._ReportId != value)) + { + this.OnReportIdChanging(value); + this.SendPropertyChanging(); + this._ReportId = value; + this.SendPropertyChanged("ReportId"); + this.OnReportIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReType", DbType="NChar(20)")] + public string ReType + { + get + { + return this._ReType; + } + set + { + if ((this._ReType != value)) + { + this.OnReTypeChanging(value); + this.SendPropertyChanging(); + this._ReType = value; + this.SendPropertyChanged("ReType"); + this.OnReTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(100)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this.OnUnitNameChanging(value); + this.SendPropertyChanging(); + this._UnitName = value; + this.SendPropertyChanged("UnitName"); + this.OnUnitNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProblemDes", DbType="NVarChar(100)")] + public string ProblemDes + { + get + { + return this._ProblemDes; + } + set + { + if ((this._ProblemDes != value)) + { + this.OnProblemDesChanging(value); + this.SendPropertyChanging(); + this._ProblemDes = value; + this.SendPropertyChanged("ProblemDes"); + this.OnProblemDesChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Report_CqmsTarget")] public partial class Report_CqmsTarget : INotifyPropertyChanging, INotifyPropertyChanged { @@ -353474,7 +353888,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MenuName", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MenuName", DbType="NVarChar(200)")] public string MenuName { get @@ -355398,8 +355812,6 @@ namespace Model private EntitySet _Doc_DocManage; - private EntitySet _Doc_DocManageApprove; - private EntitySet _Driver_DriverProgress; private EntitySet _Driver_DriverReport; @@ -356128,7 +356540,6 @@ namespace Model this._DataBase_File = new EntitySet(new Action(this.attach_DataBase_File), new Action(this.detach_DataBase_File)); this._DataBase_StartWorkReport = new EntitySet(new Action(this.attach_DataBase_StartWorkReport), new Action(this.detach_DataBase_StartWorkReport)); this._Doc_DocManage = new EntitySet(new Action(this.attach_Doc_DocManage), new Action(this.detach_Doc_DocManage)); - this._Doc_DocManageApprove = new EntitySet(new Action(this.attach_Doc_DocManageApprove), new Action(this.detach_Doc_DocManageApprove)); this._Driver_DriverProgress = new EntitySet(new Action(this.attach_Driver_DriverProgress), new Action(this.detach_Driver_DriverProgress)); this._Driver_DriverReport = new EntitySet(new Action(this.attach_Driver_DriverReport), new Action(this.detach_Driver_DriverReport)); this._Driver_DriverScheme = new EntitySet(new Action(this.attach_Driver_DriverScheme), new Action(this.detach_Driver_DriverScheme)); @@ -358552,19 +358963,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Doc_DocManageApprove_Sys_User", Storage="_Doc_DocManageApprove", ThisKey="UserId", OtherKey="ApproveMan", DeleteRule="NO ACTION")] - public EntitySet Doc_DocManageApprove - { - get - { - return this._Doc_DocManageApprove; - } - set - { - this._Doc_DocManageApprove.Assign(value); - } - } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Driver_DriverProgress_Sys_User", Storage="_Driver_DriverProgress", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] public EntitySet Driver_DriverProgress { @@ -363159,18 +363557,6 @@ namespace Model entity.Sys_User = null; } - private void attach_Doc_DocManageApprove(Doc_DocManageApprove entity) - { - this.SendPropertyChanging(); - entity.Sys_User = this; - } - - private void detach_Doc_DocManageApprove(Doc_DocManageApprove entity) - { - this.SendPropertyChanging(); - entity.Sys_User = null; - } - private void attach_Driver_DriverProgress(Driver_DriverProgress entity) { this.SendPropertyChanging(); @@ -392682,6 +393068,8 @@ namespace Model private string _Describe; + private string _SystemNo; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -392712,6 +393100,8 @@ namespace Model partial void OnActualFinishedDateChanged(); partial void OnDescribeChanging(string value); partial void OnDescribeChanged(); + partial void OnSystemNoChanging(string value); + partial void OnSystemNoChanged(); #endregion public Transfer_LHCSystemList() @@ -392979,6 +393369,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SystemNo", DbType="NVarChar(50)")] + public string SystemNo + { + get + { + return this._SystemNo; + } + set + { + if ((this._SystemNo != value)) + { + this.OnSystemNoChanging(value); + this.SendPropertyChanging(); + this._SystemNo = value; + this.SendPropertyChanged("SystemNo"); + this.OnSystemNoChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -394352,7 +394762,7 @@ namespace Model private string _Comments; - private System.Nullable _Num_NO; + private string _Num_NO; private string _System_No; @@ -394368,7 +394778,7 @@ namespace Model private System.Nullable _IsEng; - private System.Nullable _IsMatI; + private string _IsMatI; private string _Punch_Type; @@ -394434,7 +394844,7 @@ namespace Model partial void OnPUNCH_ITEM_STATUSChanged(); partial void OnCommentsChanging(string value); partial void OnCommentsChanged(); - partial void OnNum_NOChanging(System.Nullable value); + partial void OnNum_NOChanging(string value); partial void OnNum_NOChanged(); partial void OnSystem_NoChanging(string value); partial void OnSystem_NoChanged(); @@ -394450,7 +394860,7 @@ namespace Model partial void OnDiscChanged(); partial void OnIsEngChanging(System.Nullable value); partial void OnIsEngChanged(); - partial void OnIsMatIChanging(System.Nullable value); + partial void OnIsMatIChanging(string value); partial void OnIsMatIChanged(); partial void OnPunch_TypeChanging(string value); partial void OnPunch_TypeChanged(); @@ -394807,8 +395217,8 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Num_NO", DbType="BigInt")] - public System.Nullable Num_NO + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Num_NO", DbType="NVarChar(50)")] + public string Num_NO { get { @@ -394967,8 +395377,8 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsMatI", DbType="Bit")] - public System.Nullable IsMatI + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsMatI", DbType="NVarChar(50)")] + public string IsMatI { get { @@ -430890,7 +431300,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MenuName", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MenuName", DbType="NVarChar(200)")] public string MenuName { get @@ -451137,7 +451547,7 @@ namespace Model private string _NDEUnit; - private System.Nullable _SuperUnitWork; + private string _SuperUnitWork; private System.Nullable _IsChild; @@ -451259,7 +451669,7 @@ namespace Model partial void OnSupervisorUnitIdChanged(); partial void OnNDEUnitChanging(string value); partial void OnNDEUnitChanged(); - partial void OnSuperUnitWorkChanging(System.Nullable value); + partial void OnSuperUnitWorkChanging(string value); partial void OnSuperUnitWorkChanged(); partial void OnIsChildChanging(System.Nullable value); partial void OnIsChildChanged(); @@ -451476,8 +451886,8 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperUnitWork", DbType="Int")] - public System.Nullable SuperUnitWork + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperUnitWork", DbType="NVarChar(50)")] + public string SuperUnitWork { get { diff --git a/SGGL/WebAPI/WebAPI.csproj.user b/SGGL/WebAPI/WebAPI.csproj.user index bd497c6b..5fe155da 100644 --- a/SGGL/WebAPI/WebAPI.csproj.user +++ b/SGGL/WebAPI/WebAPI.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true