diff --git a/DataBase/版本日志/SGGLDB_V2021-12-03-001.sql b/DataBase/版本日志/SGGLDB_V2021-12-03-001.sql new file mode 100644 index 00000000..6bed62ea --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2021-12-03-001.sql @@ -0,0 +1,2 @@ +alter table [dbo].[Base_Project] add CLProjectCode bigint null +GO \ No newline at end of file diff --git a/SGGL/BLL/ProjectData/ProjectService.cs b/SGGL/BLL/ProjectData/ProjectService.cs index 4d24477a..e0a95ad5 100644 --- a/SGGL/BLL/ProjectData/ProjectService.cs +++ b/SGGL/BLL/ProjectData/ProjectService.cs @@ -536,5 +536,20 @@ } return unitName; } + + /// + ///获取项目材料软件ID + /// + /// + public static long GetCLProjectCodeByProjectId(string projectId) + { + long code = 0; + var project = Funs.DB.Base_Project.FirstOrDefault(e => e.ProjectId == projectId); + if (project != null) + { + code = project.CLProjectCode ?? 0; + } + return code; + } } } \ No newline at end of file diff --git a/SGGL/BLL/WebService/MCSWebService.cs b/SGGL/BLL/WebService/MCSWebService.cs index 2e0d6920..c25ee6e0 100644 --- a/SGGL/BLL/WebService/MCSWebService.cs +++ b/SGGL/BLL/WebService/MCSWebService.cs @@ -2,6 +2,7 @@ { using Newtonsoft.Json.Linq; using System; + using System.Timers; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,238 +10,356 @@ public static class MCSWebService { + #region 启动监视器 系统启动5分钟 + /// + /// 监视组件 + /// + private static Timer messageTimer; + + /// + /// 启动监视器,不一定能成功,根据系统设置决定对监视器执行的操作 系统启动5分钟 + /// + public static void StartMonitor() + { + if (messageTimer != null) + { + messageTimer.Stop(); + messageTimer.Dispose(); + messageTimer = null; + } + messageTimer = new Timer + { + AutoReset = true + }; + messageTimer.Elapsed += new ElapsedEventHandler(GetCLData); + messageTimer.Interval = 1000 * 60 * 60 * 24;// 60分钟 60000 * adTimeJ; + messageTimer.Start(); + } + #endregion + + private static void GetCLData(object sender, ElapsedEventArgs e) + { + getPojectInfo(); + getVendor(); + var projects = from x in Funs.DB.Base_Project where x.CLProjectCode != null select x; + foreach (var project in projects) + { + getPoDetails(project.CLProjectCode ?? 0); + getIssueDetails(project.CLProjectCode ?? 0); + getPartNoInfo(project.CLProjectCode ?? 0); + getShelvesNo(project.CLProjectCode ?? 0); + getSubcontractor(project.CLProjectCode ?? 0); + getReqDetails(project.CLProjectCode ?? 0); + } + } + + public static void getPojectInfo() + { + try + { + MCSService.WebService1SoapClient mscsC = new MCSService.WebService1SoapClient(); + var details = mscsC.getPojectInfo(); + if (!string.IsNullOrEmpty(details)) + { + Model.SGGLDB db = Funs.DB; + JArray arr = JArray.Parse(details); + foreach (var item in arr) + { + Model.Base_Project project = db.Base_Project.FirstOrDefault(x => x.ProjectCode == item["项目编码"].ToString()); + if (project != null) + { + project.CLProjectCode = Funs.GetNewInt(item["项目ID"].ToString()); + db.SubmitChanges(); + } + } + } + } + catch (Exception ex) + { + ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getPojectInfo"); + } + } public static void getPoDetails(long projectId) { - MCSService.WebService1SoapClient mscsC = new MCSService.WebService1SoapClient(); - var details = mscsC.getPoDetails(projectId); - if (!string.IsNullOrEmpty(details)) + try { - Model.SGGLDB db = Funs.DB; - var q = from x in db.CLGL_ContractQuantitySheet where x.ProjectId == projectId.ToString() select x; - if (q.Count() > 0) + MCSService.WebService1SoapClient mscsC = new MCSService.WebService1SoapClient(); + var details = mscsC.getPoDetails(projectId); + if (!string.IsNullOrEmpty(details)) { - db.CLGL_ContractQuantitySheet.DeleteAllOnSubmit(q); - db.SubmitChanges(); - } - JArray arr = JArray.Parse(details); - foreach (var item in arr) - { - Model.CLGL_ContractQuantitySheet contractQuantitySheet = new Model.CLGL_ContractQuantitySheet(); - contractQuantitySheet.PPGUID = item["PPGUID"].ToString(); - contractQuantitySheet.ProjectId = projectId.ToString(); - contractQuantitySheet.MaterialUse = item["材料用途"].ToString(); - contractQuantitySheet.ContractCode = item["合同号"].ToString(); - contractQuantitySheet.Major = item["专业"].ToString(); - contractQuantitySheet.PSGUID = item["PSGUID"].ToString(); - contractQuantitySheet.RDGUID = item["RDGUID"].ToString(); - contractQuantitySheet.MaterialCode = item["材料编码"].ToString(); - contractQuantitySheet.TagNo = item["位号"].ToString(); - contractQuantitySheet.BuyQuantity = item["采购量"].ToString(); - contractQuantitySheet.Remark = item["备注"].ToString(); - contractQuantitySheet.DeviceCode = item["装置号"].ToString(); - contractQuantitySheet.MainItemCode = item["主项号"].ToString(); - contractQuantitySheet.UnitName = item["企业中文名称"].ToString(); - db.CLGL_ContractQuantitySheet.InsertOnSubmit(contractQuantitySheet); - db.SubmitChanges(); + Model.SGGLDB db = Funs.DB; + var q = from x in db.CLGL_ContractQuantitySheet where x.ProjectId == projectId.ToString() select x; + if (q.Count() > 0) + { + db.CLGL_ContractQuantitySheet.DeleteAllOnSubmit(q); + db.SubmitChanges(); + } + JArray arr = JArray.Parse(details); + foreach (var item in arr) + { + Model.CLGL_ContractQuantitySheet contractQuantitySheet = new Model.CLGL_ContractQuantitySheet(); + contractQuantitySheet.PPGUID = item["PPGUID"].ToString(); + contractQuantitySheet.ProjectId = projectId.ToString(); + contractQuantitySheet.MaterialUse = item["材料用途"].ToString(); + contractQuantitySheet.ContractCode = item["合同号"].ToString(); + contractQuantitySheet.Major = item["专业"].ToString(); + contractQuantitySheet.PSGUID = item["PSGUID"].ToString(); + contractQuantitySheet.RDGUID = item["RDGUID"].ToString(); + contractQuantitySheet.MaterialCode = item["材料编码"].ToString(); + contractQuantitySheet.TagNo = item["位号"].ToString(); + contractQuantitySheet.BuyQuantity = item["采购量"].ToString(); + contractQuantitySheet.Remark = item["备注"].ToString(); + contractQuantitySheet.DeviceCode = item["装置号"].ToString(); + contractQuantitySheet.MainItemCode = item["主项号"].ToString(); + contractQuantitySheet.UnitName = item["企业中文名称"].ToString(); + db.CLGL_ContractQuantitySheet.InsertOnSubmit(contractQuantitySheet); + db.SubmitChanges(); + } } } + catch (Exception ex) + { + ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getPoDetails"); + } } public static void getIssueDetails(long projectId) { - MCSService.WebService1SoapClient mscsC = new MCSService.WebService1SoapClient(); - var details = mscsC.getIssueDetails(projectId); - if (!string.IsNullOrEmpty(details)) + try { - Model.SGGLDB db = Funs.DB; - var q = from x in db.CLGL_PickMaterialRecord where x.ProjectId == projectId.ToString() select x; - if (q.Count() > 0) + MCSService.WebService1SoapClient mscsC = new MCSService.WebService1SoapClient(); + var details = mscsC.getIssueDetails(projectId); + if (!string.IsNullOrEmpty(details)) { - db.CLGL_PickMaterialRecord.DeleteAllOnSubmit(q); - db.SubmitChanges(); - } - JArray arr = JArray.Parse(details); - foreach (var item in arr) - { - Model.CLGL_PickMaterialRecord pickMaterialRecord = new Model.CLGL_PickMaterialRecord(); - pickMaterialRecord.IDGUID = item["IDGUID"].ToString(); - pickMaterialRecord.ProjectId = projectId.ToString(); - pickMaterialRecord.PickCode = item["领料单号"].ToString(); - pickMaterialRecord.PickDate = Funs.GetNewDateTime(item["领料时间"].ToString()); - pickMaterialRecord.PickUnit = item["领料单位"].ToString(); - pickMaterialRecord.PickLimitDate = Funs.GetNewDateTime(item["领料截止时间"].ToString()); - pickMaterialRecord.State = item["领料单审批状态代码"].ToString(); - pickMaterialRecord.ISGUID = item["ISGUID"].ToString(); - pickMaterialRecord.PLGUID = item["PLGUID"].ToString(); - pickMaterialRecord.Major = item["专业"].ToString(); - pickMaterialRecord.PSGUID = item["PSGUID"].ToString(); - pickMaterialRecord.MaterialCode = item["材料编码"].ToString(); - pickMaterialRecord.TagNo = item["位号"].ToString(); - pickMaterialRecord.ClaimQuantity = item["申领量"].ToString(); - pickMaterialRecord.ApproveQuantity = item["批准量"].ToString(); - pickMaterialRecord.ActualQuantity = item["实发量"].ToString(); - pickMaterialRecord.DHGUID = item["DHGUID"].ToString(); - pickMaterialRecord.Remark = item["发料备注"].ToString(); - pickMaterialRecord.DeviceCode = item["装置号"].ToString(); - pickMaterialRecord.MainItemCode = item["主项号"].ToString(); - db.CLGL_PickMaterialRecord.InsertOnSubmit(pickMaterialRecord); - db.SubmitChanges(); + Model.SGGLDB db = Funs.DB; + var q = from x in db.CLGL_PickMaterialRecord where x.ProjectId == projectId.ToString() select x; + if (q.Count() > 0) + { + db.CLGL_PickMaterialRecord.DeleteAllOnSubmit(q); + db.SubmitChanges(); + } + JArray arr = JArray.Parse(details); + foreach (var item in arr) + { + Model.CLGL_PickMaterialRecord pickMaterialRecord = new Model.CLGL_PickMaterialRecord(); + pickMaterialRecord.IDGUID = item["IDGUID"].ToString(); + pickMaterialRecord.ProjectId = projectId.ToString(); + pickMaterialRecord.PickCode = item["领料单号"].ToString(); + pickMaterialRecord.PickDate = Funs.GetNewDateTime(item["领料时间"].ToString()); + pickMaterialRecord.PickUnit = item["领料单位"].ToString(); + pickMaterialRecord.PickLimitDate = Funs.GetNewDateTime(item["领料截止时间"].ToString()); + pickMaterialRecord.State = item["领料单审批状态代码"].ToString(); + pickMaterialRecord.ISGUID = item["ISGUID"].ToString(); + pickMaterialRecord.PLGUID = item["PLGUID"].ToString(); + pickMaterialRecord.Major = item["专业"].ToString(); + pickMaterialRecord.PSGUID = item["PSGUID"].ToString(); + pickMaterialRecord.MaterialCode = item["材料编码"].ToString(); + pickMaterialRecord.TagNo = item["位号"].ToString(); + pickMaterialRecord.ClaimQuantity = item["申领量"].ToString(); + pickMaterialRecord.ApproveQuantity = item["批准量"].ToString(); + pickMaterialRecord.ActualQuantity = item["实发量"].ToString(); + pickMaterialRecord.DHGUID = item["DHGUID"].ToString(); + pickMaterialRecord.Remark = item["发料备注"].ToString(); + pickMaterialRecord.DeviceCode = item["装置号"].ToString(); + pickMaterialRecord.MainItemCode = item["主项号"].ToString(); + db.CLGL_PickMaterialRecord.InsertOnSubmit(pickMaterialRecord); + db.SubmitChanges(); + } } } + catch (Exception ex) + { + ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getIssueDetails"); + } } public static void getPartNoInfo(long projectId) { - MCSService.WebService1SoapClient mscsC = new MCSService.WebService1SoapClient(); - var details = mscsC.getPartNoInfo(projectId); - if (!string.IsNullOrEmpty(details)) + try { - Model.SGGLDB db = Funs.DB; - var q = from x in db.CLGL_Material where x.ProjectId == projectId.ToString() select x; - if (q.Count() > 0) + MCSService.WebService1SoapClient mscsC = new MCSService.WebService1SoapClient(); + var details = mscsC.getPartNoInfo(projectId); + if (!string.IsNullOrEmpty(details)) { - db.CLGL_Material.DeleteAllOnSubmit(q); - db.SubmitChanges(); - } - JArray arr = JArray.Parse(details); - foreach (var item in arr) - { - Model.CLGL_Material material = new Model.CLGL_Material(); - material.Id = SQLHelper.GetNewID(); - material.ProjectId = projectId.ToString(); - material.MaterialCode = item["材料编码"].ToString(); - material.TagNo = item["位号"].ToString(); - material.MaterialName = item["材料名称"].ToString(); - material.Def = item["规格描述"].ToString(); - material.Unit = item["计量单位"].ToString(); - db.CLGL_Material.InsertOnSubmit(material); - db.SubmitChanges(); + Model.SGGLDB db = Funs.DB; + var q = from x in db.CLGL_Material where x.ProjectId == projectId.ToString() select x; + if (q.Count() > 0) + { + db.CLGL_Material.DeleteAllOnSubmit(q); + db.SubmitChanges(); + } + JArray arr = JArray.Parse(details); + foreach (var item in arr) + { + Model.CLGL_Material material = new Model.CLGL_Material(); + material.Id = SQLHelper.GetNewID(); + material.ProjectId = projectId.ToString(); + material.MaterialCode = item["材料编码"].ToString(); + material.TagNo = item["位号"].ToString(); + material.MaterialName = item["材料名称"].ToString(); + material.Def = item["规格描述"].ToString(); + material.Unit = item["计量单位"].ToString(); + db.CLGL_Material.InsertOnSubmit(material); + db.SubmitChanges(); + } } } + catch (Exception ex) + { + ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getPartNoInfo"); + } } public static void getShelvesNo(long projectId) { - MCSService.WebService1SoapClient mscsC = new MCSService.WebService1SoapClient(); - var details = mscsC.getShelvesNo(projectId); - if (!string.IsNullOrEmpty(details)) + try { - Model.SGGLDB db = Funs.DB; - var q = from x in db.CLGL_GoodsShelves where x.ProjectId == projectId.ToString() select x; - if (q.Count() > 0) + MCSService.WebService1SoapClient mscsC = new MCSService.WebService1SoapClient(); + var details = mscsC.getShelvesNo(projectId); + if (!string.IsNullOrEmpty(details)) { - db.CLGL_GoodsShelves.DeleteAllOnSubmit(q); - db.SubmitChanges(); - } - JArray arr = JArray.Parse(details); - foreach (var item in arr) - { - Model.CLGL_GoodsShelves goodsShelves = new Model.CLGL_GoodsShelves(); - goodsShelves.DHGUID = item["DHGUID"].ToString(); - goodsShelves.ProjectId = projectId.ToString(); - goodsShelves.GoodsShelvesCode = item["货架编号"].ToString(); - goodsShelves.Def = item["货架编号描述"].ToString(); - db.CLGL_GoodsShelves.InsertOnSubmit(goodsShelves); - db.SubmitChanges(); + Model.SGGLDB db = Funs.DB; + var q = from x in db.CLGL_GoodsShelves where x.ProjectId == projectId.ToString() select x; + if (q.Count() > 0) + { + db.CLGL_GoodsShelves.DeleteAllOnSubmit(q); + db.SubmitChanges(); + } + JArray arr = JArray.Parse(details); + foreach (var item in arr) + { + Model.CLGL_GoodsShelves goodsShelves = new Model.CLGL_GoodsShelves(); + goodsShelves.DHGUID = item["DHGUID"].ToString(); + goodsShelves.ProjectId = projectId.ToString(); + goodsShelves.GoodsShelvesCode = item["货架编号"].ToString(); + goodsShelves.Def = item["货架编号描述"].ToString(); + db.CLGL_GoodsShelves.InsertOnSubmit(goodsShelves); + db.SubmitChanges(); + } } } + catch (Exception ex) + { + ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getPartNoInfo"); + } } public static void getSubcontractor(long projectId) { - MCSService.WebService1SoapClient mscsC = new MCSService.WebService1SoapClient(); - var details = mscsC.getSubcontractor(projectId); - if (!string.IsNullOrEmpty(details)) + try { - Model.SGGLDB db = Funs.DB; - var q = from x in db.CLGL_SubUnit where x.ProjectId == projectId.ToString() select x; - if (q.Count() > 0) + MCSService.WebService1SoapClient mscsC = new MCSService.WebService1SoapClient(); + var details = mscsC.getSubcontractor(projectId); + if (!string.IsNullOrEmpty(details)) { - db.CLGL_SubUnit.DeleteAllOnSubmit(q); - db.SubmitChanges(); - } - JArray arr = JArray.Parse(details); - foreach (var item in arr) - { - Model.CLGL_SubUnit subUnit = new Model.CLGL_SubUnit(); - subUnit.Id = SQLHelper.GetNewID(); - subUnit.ProjectId = projectId.ToString(); - subUnit.SubUnitCode = item["分包商编号"].ToString(); - subUnit.SubUnitName = item["分包商名称"].ToString(); - db.CLGL_SubUnit.InsertOnSubmit(subUnit); - db.SubmitChanges(); + Model.SGGLDB db = Funs.DB; + var q = from x in db.CLGL_SubUnit where x.ProjectId == projectId.ToString() select x; + if (q.Count() > 0) + { + db.CLGL_SubUnit.DeleteAllOnSubmit(q); + db.SubmitChanges(); + } + JArray arr = JArray.Parse(details); + foreach (var item in arr) + { + Model.CLGL_SubUnit subUnit = new Model.CLGL_SubUnit(); + subUnit.Id = SQLHelper.GetNewID(); + subUnit.ProjectId = projectId.ToString(); + subUnit.SubUnitCode = item["分包商编号"].ToString(); + subUnit.SubUnitName = item["分包商名称"].ToString(); + db.CLGL_SubUnit.InsertOnSubmit(subUnit); + db.SubmitChanges(); + } } } + catch (Exception ex) + { + ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getSubcontractor"); + } } public static void getVendor() { - MCSService.WebService1SoapClient mscsC = new MCSService.WebService1SoapClient(); - var details = mscsC.getVendor(); - if (!string.IsNullOrEmpty(details)) + try { - Model.SGGLDB db = Funs.DB; - var q = from x in db.CLGL_Supplier select x; - if (q.Count() > 0) + MCSService.WebService1SoapClient mscsC = new MCSService.WebService1SoapClient(); + var details = mscsC.getVendor(); + if (!string.IsNullOrEmpty(details)) { - db.CLGL_Supplier.DeleteAllOnSubmit(q); - db.SubmitChanges(); - } - JArray arr = JArray.Parse(details); - foreach (var item in arr) - { - Model.CLGL_Supplier supplier = new Model.CLGL_Supplier(); - supplier.Id = SQLHelper.GetNewID(); - supplier.SupplierName = item["企业中文名称"].ToString(); - supplier.SupplierCode = item["厂商企标ID"].ToString(); - db.CLGL_Supplier.InsertOnSubmit(supplier); - db.SubmitChanges(); + Model.SGGLDB db = Funs.DB; + var q = from x in db.CLGL_Supplier select x; + if (q.Count() > 0) + { + db.CLGL_Supplier.DeleteAllOnSubmit(q); + db.SubmitChanges(); + } + JArray arr = JArray.Parse(details); + foreach (var item in arr) + { + Model.CLGL_Supplier supplier = new Model.CLGL_Supplier(); + supplier.Id = SQLHelper.GetNewID(); + supplier.SupplierName = item["企业中文名称"].ToString(); + supplier.SupplierCode = item["厂商企标ID"].ToString(); + db.CLGL_Supplier.InsertOnSubmit(supplier); + db.SubmitChanges(); + } } } + catch (Exception ex) + { + ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getVendor"); + } } public static void getReqDetails(long projectId) { - MCSService.WebService1SoapClient mscsC = new MCSService.WebService1SoapClient(); - var details = mscsC.getReqDetails(projectId); - if (!string.IsNullOrEmpty(details)) + try { - Model.SGGLDB db = Funs.DB; - var q = from x in db.CLGL_PurchaseRequisition where x.ProjectId == projectId.ToString() select x; - if (q.Count() > 0) + MCSService.WebService1SoapClient mscsC = new MCSService.WebService1SoapClient(); + var details = mscsC.getReqDetails(projectId); + if (!string.IsNullOrEmpty(details)) { - db.CLGL_PurchaseRequisition.DeleteAllOnSubmit(q); - db.SubmitChanges(); - } - JArray arr = JArray.Parse(details); - foreach (var item in arr) - { - Model.CLGL_PurchaseRequisition purchaseRequisition = new Model.CLGL_PurchaseRequisition(); - purchaseRequisition.Id = SQLHelper.GetNewID(); - purchaseRequisition.RSGUID = item["RSGUID"].ToString(); - purchaseRequisition.ProjectId = projectId.ToString(); - purchaseRequisition.PurchaseRequisitionCode = item["请购单号"].ToString(); - purchaseRequisition.PurchaseRequisitionName = item["请购单名称"].ToString(); - purchaseRequisition.SiteRequisition = item["现场请购"].ToString(); - purchaseRequisition.Major = item["专业名称"].ToString(); - purchaseRequisition.RDGUID = item["RDGUID"].ToString(); - purchaseRequisition.MaterialClass = item["材料等级"].ToString(); - purchaseRequisition.MaterialCode = item["材料编码"].ToString(); - purchaseRequisition.TagNo = item["位号"].ToString(); - purchaseRequisition.DesignQuantity = item["设计量"].ToString(); - purchaseRequisition.SurplusQuantity = item["余量"].ToString(); - purchaseRequisition.RequisitionQuantity = item["请购量"].ToString(); - purchaseRequisition.Def = item["请购说明"].ToString(); - purchaseRequisition.DeviceCode = item["装置号"].ToString(); - purchaseRequisition.MainItemCode = item["主项号"].ToString(); - purchaseRequisition.MaterialUse = item["材料用途"].ToString(); - purchaseRequisition.Remark = item["采购说明"].ToString(); - - db.CLGL_PurchaseRequisition.InsertOnSubmit(purchaseRequisition); - db.SubmitChanges(); + Model.SGGLDB db = Funs.DB; + var q = from x in db.CLGL_PurchaseRequisition where x.ProjectId == projectId.ToString() select x; + if (q.Count() > 0) + { + db.CLGL_PurchaseRequisition.DeleteAllOnSubmit(q); + db.SubmitChanges(); + } + JArray arr = JArray.Parse(details); + foreach (var item in arr) + { + Model.CLGL_PurchaseRequisition purchaseRequisition = new Model.CLGL_PurchaseRequisition(); + purchaseRequisition.Id = SQLHelper.GetNewID(); + purchaseRequisition.RSGUID = item["RSGUID"].ToString(); + purchaseRequisition.ProjectId = projectId.ToString(); + purchaseRequisition.PurchaseRequisitionCode = item["请购单号"].ToString(); + purchaseRequisition.PurchaseRequisitionName = item["请购单名称"].ToString(); + purchaseRequisition.SiteRequisition = item["现场请购"].ToString(); + purchaseRequisition.Major = item["专业名称"].ToString(); + purchaseRequisition.RDGUID = item["RDGUID"].ToString(); + purchaseRequisition.MaterialClass = item["材料等级"].ToString(); + purchaseRequisition.MaterialCode = item["材料编码"].ToString(); + purchaseRequisition.TagNo = item["位号"].ToString(); + purchaseRequisition.DesignQuantity = item["设计量"].ToString(); + purchaseRequisition.SurplusQuantity = item["余量"].ToString(); + purchaseRequisition.RequisitionQuantity = item["请购量"].ToString(); + purchaseRequisition.Def = item["请购说明"].ToString(); + purchaseRequisition.DeviceCode = item["装置号"].ToString(); + purchaseRequisition.MainItemCode = item["主项号"].ToString(); + purchaseRequisition.MaterialUse = item["材料用途"].ToString(); + purchaseRequisition.Remark = item["采购说明"].ToString(); + + db.CLGL_PurchaseRequisition.InsertOnSubmit(purchaseRequisition); + db.SubmitChanges(); + } } } + catch (Exception ex) + { + ErrLogInfo.WriteLog(ex, "材料管理接口定时器", "MCSWebService.getVendor"); + } } } } diff --git a/SGGL/FineUIPro.Web/CLGL/ContractQuantitySheet.aspx b/SGGL/FineUIPro.Web/CLGL/ContractQuantitySheet.aspx index 7a924e9d..0c6c5f30 100644 --- a/SGGL/FineUIPro.Web/CLGL/ContractQuantitySheet.aspx +++ b/SGGL/FineUIPro.Web/CLGL/ContractQuantitySheet.aspx @@ -24,6 +24,14 @@ DataIDField="PPGUID" AllowSorting="true" SortField="PPGUID" SortDirection="desc" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True"> + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CLGL/ContractQuantitySheet.aspx.cs b/SGGL/FineUIPro.Web/CLGL/ContractQuantitySheet.aspx.cs index 70505ecf..c0a7b7ab 100644 --- a/SGGL/FineUIPro.Web/CLGL/ContractQuantitySheet.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/ContractQuantitySheet.aspx.cs @@ -21,13 +21,23 @@ namespace FineUIPro.Web.CLGL { if (!IsPostBack) { - BLL.MCSWebService.getPoDetails(3919); this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); // 绑定表格 this.BindGrid(); } } + /// + /// 获取 + /// + /// + /// + protected void btnGet_Click(object sender, EventArgs e) + { + BLL.MCSWebService.getPoDetails(BLL.ProjectService.GetCLProjectCodeByProjectId(this.CurrUser.LoginProjectId)); + this.BindGrid(); + } + /// /// 绑定数据 /// @@ -37,7 +47,7 @@ namespace FineUIPro.Web.CLGL from dbo.CLGL_ContractQuantitySheet c where c.ProjectId=@ProjectId order by c.ContractCode desc"; List listStr = new List(); - listStr.Add(new SqlParameter("@ProjectId", "3919")); + listStr.Add(new SqlParameter("@ProjectId", BLL.ProjectService.GetCLProjectCodeByProjectId(this.CurrUser.LoginProjectId))); SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; diff --git a/SGGL/FineUIPro.Web/CLGL/ContractQuantitySheet.aspx.designer.cs b/SGGL/FineUIPro.Web/CLGL/ContractQuantitySheet.aspx.designer.cs index ed0f62a5..09c9c046 100644 --- a/SGGL/FineUIPro.Web/CLGL/ContractQuantitySheet.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CLGL/ContractQuantitySheet.aspx.designer.cs @@ -48,6 +48,24 @@ namespace FineUIPro.Web.CLGL { /// protected global::FineUIPro.Grid Grid1; + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnGet 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnGet; + /// /// ToolbarSeparator1 控件。 /// diff --git a/SGGL/FineUIPro.Web/CLGL/GoodsShelves.aspx b/SGGL/FineUIPro.Web/CLGL/GoodsShelves.aspx index 35a34125..9565e85d 100644 --- a/SGGL/FineUIPro.Web/CLGL/GoodsShelves.aspx +++ b/SGGL/FineUIPro.Web/CLGL/GoodsShelves.aspx @@ -24,6 +24,14 @@ DataIDField="DHGUID" AllowSorting="true" SortField="DHGUID" SortDirection="desc" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True"> + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CLGL/GoodsShelves.aspx.cs b/SGGL/FineUIPro.Web/CLGL/GoodsShelves.aspx.cs index 84f77ed8..e335831a 100644 --- a/SGGL/FineUIPro.Web/CLGL/GoodsShelves.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/GoodsShelves.aspx.cs @@ -21,13 +21,23 @@ namespace FineUIPro.Web.CLGL { if (!IsPostBack) { - BLL.MCSWebService.getShelvesNo(3919); this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); // 绑定表格 this.BindGrid(); } } + /// + /// 获取 + /// + /// + /// + protected void btnGet_Click(object sender, EventArgs e) + { + BLL.MCSWebService.getShelvesNo(BLL.ProjectService.GetCLProjectCodeByProjectId(this.CurrUser.LoginProjectId)); + this.BindGrid(); + } + /// /// 绑定数据 /// @@ -37,7 +47,7 @@ namespace FineUIPro.Web.CLGL from dbo.CLGL_GoodsShelves c where c.ProjectId=@ProjectId order by c.GoodsShelvesCode desc"; List listStr = new List(); - listStr.Add(new SqlParameter("@ProjectId", "3919")); + listStr.Add(new SqlParameter("@ProjectId", BLL.ProjectService.GetCLProjectCodeByProjectId(this.CurrUser.LoginProjectId))); SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; diff --git a/SGGL/FineUIPro.Web/CLGL/GoodsShelves.aspx.designer.cs b/SGGL/FineUIPro.Web/CLGL/GoodsShelves.aspx.designer.cs index 614952f3..20e2cbd5 100644 --- a/SGGL/FineUIPro.Web/CLGL/GoodsShelves.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CLGL/GoodsShelves.aspx.designer.cs @@ -48,6 +48,24 @@ namespace FineUIPro.Web.CLGL { /// protected global::FineUIPro.Grid Grid1; + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnGet 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnGet; + /// /// ToolbarSeparator1 控件。 /// diff --git a/SGGL/FineUIPro.Web/CLGL/Material.aspx b/SGGL/FineUIPro.Web/CLGL/Material.aspx index a8cd74c1..c0612114 100644 --- a/SGGL/FineUIPro.Web/CLGL/Material.aspx +++ b/SGGL/FineUIPro.Web/CLGL/Material.aspx @@ -24,6 +24,14 @@ DataIDField="Id" AllowSorting="true" SortField="Id" SortDirection="desc" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True"> + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CLGL/Material.aspx.cs b/SGGL/FineUIPro.Web/CLGL/Material.aspx.cs index 2ce7cd5b..a94965f0 100644 --- a/SGGL/FineUIPro.Web/CLGL/Material.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/Material.aspx.cs @@ -21,13 +21,23 @@ namespace FineUIPro.Web.CLGL { if (!IsPostBack) { - BLL.MCSWebService.getPartNoInfo(3919); this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); // 绑定表格 this.BindGrid(); } } + /// + /// 获取 + /// + /// + /// + protected void btnGet_Click(object sender, EventArgs e) + { + BLL.MCSWebService.getPartNoInfo(BLL.ProjectService.GetCLProjectCodeByProjectId(this.CurrUser.LoginProjectId)); + this.BindGrid(); + } + /// /// 绑定数据 /// @@ -37,7 +47,7 @@ namespace FineUIPro.Web.CLGL from dbo.CLGL_Material c where c.ProjectId=@ProjectId order by c.MaterialCode desc"; List listStr = new List(); - listStr.Add(new SqlParameter("@ProjectId", "3919")); + listStr.Add(new SqlParameter("@ProjectId", BLL.ProjectService.GetCLProjectCodeByProjectId(this.CurrUser.LoginProjectId))); SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; diff --git a/SGGL/FineUIPro.Web/CLGL/Material.aspx.designer.cs b/SGGL/FineUIPro.Web/CLGL/Material.aspx.designer.cs index b77b400d..fa955592 100644 --- a/SGGL/FineUIPro.Web/CLGL/Material.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CLGL/Material.aspx.designer.cs @@ -48,6 +48,24 @@ namespace FineUIPro.Web.CLGL { /// protected global::FineUIPro.Grid Grid1; + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnGet 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnGet; + /// /// ToolbarSeparator1 控件。 /// diff --git a/SGGL/FineUIPro.Web/CLGL/MaterialRecord.aspx b/SGGL/FineUIPro.Web/CLGL/MaterialRecord.aspx index e4a63418..d0dcbf50 100644 --- a/SGGL/FineUIPro.Web/CLGL/MaterialRecord.aspx +++ b/SGGL/FineUIPro.Web/CLGL/MaterialRecord.aspx @@ -24,6 +24,14 @@ DataIDField="IDGUID" AllowSorting="true" SortField="IDGUID" SortDirection="desc" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True"> + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CLGL/MaterialRecord.aspx.cs b/SGGL/FineUIPro.Web/CLGL/MaterialRecord.aspx.cs index 89c534b0..5bcd8cb9 100644 --- a/SGGL/FineUIPro.Web/CLGL/MaterialRecord.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/MaterialRecord.aspx.cs @@ -21,13 +21,23 @@ namespace FineUIPro.Web.CLGL { if (!IsPostBack) { - BLL.MCSWebService.getIssueDetails(3919); this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); // 绑定表格 this.BindGrid(); } } + /// + /// 获取 + /// + /// + /// + protected void btnGet_Click(object sender, EventArgs e) + { + BLL.MCSWebService.getIssueDetails(BLL.ProjectService.GetCLProjectCodeByProjectId(this.CurrUser.LoginProjectId)); + this.BindGrid(); + } + /// /// 绑定数据 /// @@ -37,7 +47,7 @@ namespace FineUIPro.Web.CLGL from dbo.CLGL_PickMaterialRecord c where c.ProjectId=@ProjectId order by c.PickCode desc"; List listStr = new List(); - listStr.Add(new SqlParameter("@ProjectId", "3919")); + listStr.Add(new SqlParameter("@ProjectId", BLL.ProjectService.GetCLProjectCodeByProjectId(this.CurrUser.LoginProjectId))); SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; diff --git a/SGGL/FineUIPro.Web/CLGL/MaterialRecord.aspx.designer.cs b/SGGL/FineUIPro.Web/CLGL/MaterialRecord.aspx.designer.cs index 973be517..8eb54d85 100644 --- a/SGGL/FineUIPro.Web/CLGL/MaterialRecord.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CLGL/MaterialRecord.aspx.designer.cs @@ -48,6 +48,24 @@ namespace FineUIPro.Web.CLGL { /// protected global::FineUIPro.Grid Grid1; + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnGet 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnGet; + /// /// ToolbarSeparator1 控件。 /// diff --git a/SGGL/FineUIPro.Web/CLGL/PurchaseRequisition.aspx b/SGGL/FineUIPro.Web/CLGL/PurchaseRequisition.aspx index 7c5868ac..233ef0b9 100644 --- a/SGGL/FineUIPro.Web/CLGL/PurchaseRequisition.aspx +++ b/SGGL/FineUIPro.Web/CLGL/PurchaseRequisition.aspx @@ -24,6 +24,14 @@ DataIDField="Id" AllowSorting="true" SortField="Id" SortDirection="desc" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True"> + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CLGL/PurchaseRequisition.aspx.cs b/SGGL/FineUIPro.Web/CLGL/PurchaseRequisition.aspx.cs index 32004414..e16330ab 100644 --- a/SGGL/FineUIPro.Web/CLGL/PurchaseRequisition.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/PurchaseRequisition.aspx.cs @@ -21,13 +21,23 @@ namespace FineUIPro.Web.CLGL { if (!IsPostBack) { - BLL.MCSWebService.getReqDetails(3919); this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); // 绑定表格 this.BindGrid(); } } + /// + /// 获取 + /// + /// + /// + protected void btnGet_Click(object sender, EventArgs e) + { + BLL.MCSWebService.getReqDetails(BLL.ProjectService.GetCLProjectCodeByProjectId(this.CurrUser.LoginProjectId)); + this.BindGrid(); + } + /// /// 绑定数据 /// @@ -37,7 +47,7 @@ namespace FineUIPro.Web.CLGL from dbo.CLGL_PurchaseRequisition c where c.ProjectId=@ProjectId order by c.PurchaseRequisitionCode desc"; List listStr = new List(); - listStr.Add(new SqlParameter("@ProjectId", "3919")); + listStr.Add(new SqlParameter("@ProjectId", BLL.ProjectService.GetCLProjectCodeByProjectId(this.CurrUser.LoginProjectId))); SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; diff --git a/SGGL/FineUIPro.Web/CLGL/PurchaseRequisition.aspx.designer.cs b/SGGL/FineUIPro.Web/CLGL/PurchaseRequisition.aspx.designer.cs index 4556b10b..08194f60 100644 --- a/SGGL/FineUIPro.Web/CLGL/PurchaseRequisition.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CLGL/PurchaseRequisition.aspx.designer.cs @@ -48,6 +48,24 @@ namespace FineUIPro.Web.CLGL { /// protected global::FineUIPro.Grid Grid1; + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnGet 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnGet; + /// /// ToolbarSeparator1 控件。 /// diff --git a/SGGL/FineUIPro.Web/CLGL/SubUnit.aspx b/SGGL/FineUIPro.Web/CLGL/SubUnit.aspx index 00c47a07..1e6b7f9e 100644 --- a/SGGL/FineUIPro.Web/CLGL/SubUnit.aspx +++ b/SGGL/FineUIPro.Web/CLGL/SubUnit.aspx @@ -24,6 +24,14 @@ DataIDField="Id" AllowSorting="true" SortField="Id" SortDirection="desc" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True"> + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CLGL/SubUnit.aspx.cs b/SGGL/FineUIPro.Web/CLGL/SubUnit.aspx.cs index 20148cae..b795805d 100644 --- a/SGGL/FineUIPro.Web/CLGL/SubUnit.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/SubUnit.aspx.cs @@ -21,13 +21,23 @@ namespace FineUIPro.Web.CLGL { if (!IsPostBack) { - BLL.MCSWebService.getSubcontractor(3919); this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); // 绑定表格 this.BindGrid(); } } + /// + /// 获取 + /// + /// + /// + protected void btnGet_Click(object sender, EventArgs e) + { + BLL.MCSWebService.getSubcontractor(BLL.ProjectService.GetCLProjectCodeByProjectId(this.CurrUser.LoginProjectId)); + this.BindGrid(); + } + /// /// 绑定数据 /// @@ -37,7 +47,7 @@ namespace FineUIPro.Web.CLGL from dbo.CLGL_SubUnit c where c.ProjectId=@ProjectId order by c.SubUnitCode desc"; List listStr = new List(); - listStr.Add(new SqlParameter("@ProjectId", "3919")); + listStr.Add(new SqlParameter("@ProjectId", BLL.ProjectService.GetCLProjectCodeByProjectId(this.CurrUser.LoginProjectId))); SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; diff --git a/SGGL/FineUIPro.Web/CLGL/SubUnit.aspx.designer.cs b/SGGL/FineUIPro.Web/CLGL/SubUnit.aspx.designer.cs index 03842805..2bd13125 100644 --- a/SGGL/FineUIPro.Web/CLGL/SubUnit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CLGL/SubUnit.aspx.designer.cs @@ -48,6 +48,24 @@ namespace FineUIPro.Web.CLGL { /// protected global::FineUIPro.Grid Grid1; + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnGet 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnGet; + /// /// ToolbarSeparator1 控件。 /// diff --git a/SGGL/FineUIPro.Web/CLGL/Supplier.aspx b/SGGL/FineUIPro.Web/CLGL/Supplier.aspx index b31f8298..d4928df7 100644 --- a/SGGL/FineUIPro.Web/CLGL/Supplier.aspx +++ b/SGGL/FineUIPro.Web/CLGL/Supplier.aspx @@ -24,6 +24,14 @@ DataIDField="Id" AllowSorting="true" SortField="Id" SortDirection="desc" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True"> + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CLGL/Supplier.aspx.cs b/SGGL/FineUIPro.Web/CLGL/Supplier.aspx.cs index 3f016b77..5c539f9e 100644 --- a/SGGL/FineUIPro.Web/CLGL/Supplier.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/Supplier.aspx.cs @@ -28,6 +28,17 @@ namespace FineUIPro.Web.CLGL } } + /// + /// 获取 + /// + /// + /// + protected void btnGet_Click(object sender, EventArgs e) + { + BLL.MCSWebService.getVendor(); + this.BindGrid(); + } + /// /// 绑定数据 /// diff --git a/SGGL/FineUIPro.Web/CLGL/Supplier.aspx.designer.cs b/SGGL/FineUIPro.Web/CLGL/Supplier.aspx.designer.cs index fd1f20a5..0ff1f1f7 100644 --- a/SGGL/FineUIPro.Web/CLGL/Supplier.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CLGL/Supplier.aspx.designer.cs @@ -48,6 +48,24 @@ namespace FineUIPro.Web.CLGL { /// protected global::FineUIPro.Grid Grid1; + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnGet 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnGet; + /// /// ToolbarSeparator1 控件。 /// diff --git a/SGGL/FineUIPro.Web/Global.asax.cs b/SGGL/FineUIPro.Web/Global.asax.cs index 5d3969c3..f884b596 100644 --- a/SGGL/FineUIPro.Web/Global.asax.cs +++ b/SGGL/FineUIPro.Web/Global.asax.cs @@ -42,6 +42,7 @@ { BLL.RealNameMonitorService.StartMonitor(); } + BLL.RealNameMonitorService.StartInOutMonitor(); } catch (Exception ex) { @@ -53,6 +54,7 @@ BLL.MonitorService.StartMonitor(); BLL.MonitorService.StartMonitorEve(); BLL.MonitorService.StartPersonQuarterCheck(); + BLL.MCSWebService.StartMonitor(); } catch (Exception ex) { diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 2934c5c6..9dec9340 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -22508,6 +22508,8 @@ namespace Model private string _KZProjectCode; + private System.Nullable _CLProjectCode; + private EntitySet _Accident_AccidentHandle; private EntitySet _Accident_AccidentPersonRecord; @@ -23118,6 +23120,8 @@ namespace Model partial void OnHJProjectCodeChanged(); partial void OnKZProjectCodeChanging(string value); partial void OnKZProjectCodeChanged(); + partial void OnCLProjectCodeChanging(System.Nullable value); + partial void OnCLProjectCodeChanged(); #endregion public Base_Project() @@ -24082,6 +24086,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CLProjectCode", DbType="BigInt")] + public System.Nullable CLProjectCode + { + get + { + return this._CLProjectCode; + } + set + { + if ((this._CLProjectCode != value)) + { + this.OnCLProjectCodeChanging(value); + this.SendPropertyChanging(); + this._CLProjectCode = value; + this.SendPropertyChanged("CLProjectCode"); + this.OnCLProjectCodeChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Accident_AccidentHandle_Base_Project", Storage="_Accident_AccidentHandle", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet Accident_AccidentHandle { @@ -73309,7 +73333,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QualifiedProjectCode", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QualifiedProjectCode", DbType="NVarChar(500)")] public string QualifiedProjectCode { get @@ -248160,7 +248184,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(2000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(200)")] public string Address { get @@ -248224,7 +248248,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(200)")] public string WorkAreaName { get @@ -329851,7 +329875,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(2000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(200)")] public string Address { get @@ -329867,7 +329891,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(200)")] public string WorkAreaName { get @@ -337654,7 +337678,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(100)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(102)")] public string Name { get