diff --git a/DataBase/版本日志/SGGLDB_V2026-06-15-lpf(防腐委托单_建表脚本).sql b/DataBase/版本日志/SGGLDB_V2026-06-15-lpf(防腐委托单_建表脚本).sql new file mode 100644 index 00000000..f1dcc466 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2026-06-15-lpf(防腐委托单_建表脚本).sql @@ -0,0 +1,119 @@ +/* +防腐委托单建表脚本 +执行后请手动重新生成 LINQ to SQL 模型。 +*/ + +IF OBJECT_ID(N'dbo.Tw_AntiCorrosionTrust', N'U') IS NULL +BEGIN + CREATE TABLE dbo.Tw_AntiCorrosionTrust + ( + Id NVARCHAR(50) NOT NULL CONSTRAINT PK_Tw_AntiCorrosionTrust PRIMARY KEY, + ProjectId NVARCHAR(50) NOT NULL, + UnitWorkId NVARCHAR(50) NOT NULL, + ConstructionPart NVARCHAR(200) NULL, + ConstructionProfessional NVARCHAR(100) NULL, + TrustCode NVARCHAR(200) NOT NULL, + OutputMasterId NVARCHAR(50) NOT NULL, + DemandDate DATETIME NULL, + CompleteDate DATETIME NULL, + CreateMan NVARCHAR(50) NULL, + CreateDate DATETIME NULL, + Remark NVARCHAR(500) NULL + ); +END; +GO + +IF OBJECT_ID(N'dbo.Tw_AntiCorrosionTrustDetail', N'U') IS NULL +BEGIN + CREATE TABLE dbo.Tw_AntiCorrosionTrustDetail + ( + Id NVARCHAR(50) NOT NULL CONSTRAINT PK_Tw_AntiCorrosionTrustDetail PRIMARY KEY, + TrustId NVARCHAR(50) NOT NULL, + SortIndex INT NULL, + MaterialCode NVARCHAR(50) NOT NULL, + Quantity DECIMAL(18, 4) NULL, + PaintCode NVARCHAR(50) NULL, + Primer NVARCHAR(300) NULL, + IntermediatePaint NVARCHAR(300) NULL, + Topcoat NVARCHAR(300) NULL, + ColorCode NVARCHAR(100) NULL, + Remark NVARCHAR(500) NULL + ); +END; +GO + +IF OBJECT_ID(N'dbo.Tw_PaintCodeDict', N'U') IS NULL +BEGIN + CREATE TABLE dbo.Tw_PaintCodeDict + ( + Id NVARCHAR(50) NOT NULL CONSTRAINT PK_Tw_PaintCodeDict PRIMARY KEY, + PaintCode NVARCHAR(50) NOT NULL, + Primer NVARCHAR(300) NULL, + IntermediatePaint NVARCHAR(300) NULL, + Topcoat NVARCHAR(300) NULL, + ColorCode NVARCHAR(100) NULL, + SortIndex INT NULL, + IsUsed BIT NOT NULL CONSTRAINT DF_Tw_PaintCodeDict_IsUsed DEFAULT(1) + ); +END; +GO + +IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE name = N'UX_Tw_AntiCorrosionTrust_Project_TrustCode' AND object_id = OBJECT_ID(N'dbo.Tw_AntiCorrosionTrust')) +BEGIN + CREATE UNIQUE INDEX UX_Tw_AntiCorrosionTrust_Project_TrustCode + ON dbo.Tw_AntiCorrosionTrust(ProjectId, TrustCode); +END; +GO + +IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE name = N'UX_Tw_AntiCorrosionTrust_OutputMasterId' AND object_id = OBJECT_ID(N'dbo.Tw_AntiCorrosionTrust')) +BEGIN + CREATE UNIQUE INDEX UX_Tw_AntiCorrosionTrust_OutputMasterId + ON dbo.Tw_AntiCorrosionTrust(OutputMasterId); +END; +GO + +IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE name = N'IX_Tw_AntiCorrosionTrust_Project_UnitWork' AND object_id = OBJECT_ID(N'dbo.Tw_AntiCorrosionTrust')) +BEGIN + CREATE INDEX IX_Tw_AntiCorrosionTrust_Project_UnitWork + ON dbo.Tw_AntiCorrosionTrust(ProjectId, UnitWorkId); +END; +GO + +IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE name = N'IX_Tw_AntiCorrosionTrustDetail_TrustId' AND object_id = OBJECT_ID(N'dbo.Tw_AntiCorrosionTrustDetail')) +BEGIN + CREATE INDEX IX_Tw_AntiCorrosionTrustDetail_TrustId + ON dbo.Tw_AntiCorrosionTrustDetail(TrustId, SortIndex); +END; +GO + +IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE name = N'UX_Tw_PaintCodeDict_PaintCode' AND object_id = OBJECT_ID(N'dbo.Tw_PaintCodeDict')) +BEGIN + CREATE UNIQUE INDEX UX_Tw_PaintCodeDict_PaintCode + ON dbo.Tw_PaintCodeDict(PaintCode); +END; +GO + +IF NOT EXISTS (SELECT 1 FROM dbo.Tw_PaintCodeDict WHERE PaintCode = N'A.1') +BEGIN + INSERT INTO dbo.Tw_PaintCodeDict (Id, PaintCode, Primer, IntermediatePaint, Topcoat, ColorCode, SortIndex) + VALUES (CONVERT(NVARCHAR(50), NEWID()), N'A.1', N'无机富锌硅酸盐涂层(60μm)', N'聚酰胺环氧树脂涂层(125μm)', N'/', N'无', 1); +END; + +IF NOT EXISTS (SELECT 1 FROM dbo.Tw_PaintCodeDict WHERE PaintCode = N'A.2') +BEGIN + INSERT INTO dbo.Tw_PaintCodeDict (Id, PaintCode, Primer, IntermediatePaint, Topcoat, ColorCode, SortIndex) + VALUES (CONVERT(NVARCHAR(50), NEWID()), N'A.2', N'环氧酚醛树脂涂层(100μm)', N'/', N'/', N'无', 2); +END; + +IF NOT EXISTS (SELECT 1 FROM dbo.Tw_PaintCodeDict WHERE PaintCode = N'B.1') +BEGIN + INSERT INTO dbo.Tw_PaintCodeDict (Id, PaintCode, Primer, IntermediatePaint, Topcoat, ColorCode, SortIndex) + VALUES (CONVERT(NVARCHAR(50), NEWID()), N'B.1', N'无机富锌硅酸盐涂层(60μm)', N'铝硅涂层(25μm)', N'/', N'无', 3); +END; + +IF NOT EXISTS (SELECT 1 FROM dbo.Tw_PaintCodeDict WHERE PaintCode = N'B.2') +BEGIN + INSERT INTO dbo.Tw_PaintCodeDict (Id, PaintCode, Primer, IntermediatePaint, Topcoat, ColorCode, SortIndex) + VALUES (CONVERT(NVARCHAR(50), NEWID()), N'B.2', N'无机富锌硅酸盐涂层(60μm)', N'铝硅涂层(25μm)', N'/', N'无', 4); +END; +GO diff --git a/DataBase/版本日志/SGGLDB_V2026-06-15-lpf(防腐委托单_菜单脚本).sql b/DataBase/版本日志/SGGLDB_V2026-06-15-lpf(防腐委托单_菜单脚本).sql new file mode 100644 index 00000000..3c275c9f --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2026-06-15-lpf(防腐委托单_菜单脚本).sql @@ -0,0 +1,23 @@ +INSERT INTO Sys_Menu (MenuId,MenuName,Icon,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES (N'4E88A676-89E3-44EC-BF50-37BE5F09D903',N'防腐管理',N'tag_blue',NULL,40,N'9B828E92-733B-4AF9-9DD0-55ECD8B64AB8',N'Menu_HJGL',0,0,1); +GO +INSERT INTO Sys_Menu (MenuId,MenuName,Icon,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES (N'0BDA0F5D-BB5B-4F25-8C67-42C654A8A6A2',N'防腐委托单',N'table',N'CLGL/AntiCorrosionTrust.aspx',10,N'4E88A676-89E3-44EC-BF50-37BE5F09D903',N'Menu_HJGL',0,1,1); +GO + INSERT INTO Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES (N'1BCEDE3D-2618-490E-8DA6-68922AB3201F',N'0BDA0F5D-BB5B-4F25-8C67-42C654A8A6A2',N'增加',2); + GO + INSERT INTO Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES (N'47F9ADA6-22D2-42B6-8038-80C3CA5EEB2D',N'0BDA0F5D-BB5B-4F25-8C67-42C654A8A6A2',N'保存',6); + GO + INSERT INTO Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES (N'715440E4-0C8D-4A2F-8456-06544FA7812B',N'0BDA0F5D-BB5B-4F25-8C67-42C654A8A6A2',N'查询',1); + GO + INSERT INTO Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES (N'B846AA33-2767-40E5-B227-FE5B8B5ECCC4',N'0BDA0F5D-BB5B-4F25-8C67-42C654A8A6A2',N'删除',4); + GO + INSERT INTO Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES (N'B937C073-8161-4996-A223-A7A4851791B0',N'0BDA0F5D-BB5B-4F25-8C67-42C654A8A6A2',N'修改',3); + GO + INSERT INTO Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES (N'E7CA37AF-341A-4D3C-BCF4-65670E699962',N'0BDA0F5D-BB5B-4F25-8C67-42C654A8A6A2',N'打印',5); diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 39f14b23..e4612de1 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -299,6 +299,7 @@ + @@ -938,4 +939,4 @@ --> - \ No newline at end of file + diff --git a/SGGL/BLL/CLGL/TwAntiCorrosionTrustService.cs b/SGGL/BLL/CLGL/TwAntiCorrosionTrustService.cs new file mode 100644 index 00000000..4cc318ec --- /dev/null +++ b/SGGL/BLL/CLGL/TwAntiCorrosionTrustService.cs @@ -0,0 +1,455 @@ +using FineUIPro; +using Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; + +namespace BLL +{ + /// + /// 防腐委托单服务。 + /// + public static class TwAntiCorrosionTrustService + { + public static int Count { get; set; } + + public static List GetListData(AntiCorrosionTrustOutput filter) + { + var query = from t in Funs.DB.Tw_AntiCorrosionTrust + join uw in Funs.DB.WBS_UnitWork on t.UnitWorkId equals uw.UnitWorkId into uwJoin + from uw in uwJoin.DefaultIfEmpty() + join om in Funs.DB.Tw_OutputMaster on t.OutputMasterId equals om.Id into omJoin + from om in omJoin.DefaultIfEmpty() + join p in Funs.DB.Person_Persons on t.CreateMan equals p.PersonId into pJoin + from p in pJoin.DefaultIfEmpty() + where (string.IsNullOrEmpty(filter.Id) || t.Id == filter.Id) + && (string.IsNullOrEmpty(filter.ProjectId) || t.ProjectId == filter.ProjectId) + && (string.IsNullOrEmpty(filter.UnitWorkId) || t.UnitWorkId == filter.UnitWorkId) + && (string.IsNullOrEmpty(filter.TrustCode) || t.TrustCode.Contains(filter.TrustCode)) + && (string.IsNullOrEmpty(filter.OutputMasterCode) || om.CusBillCode.Contains(filter.OutputMasterCode)) + orderby t.CreateDate descending, t.TrustCode descending + select new AntiCorrosionTrustOutput + { + Id = t.Id, + ProjectId = t.ProjectId, + UnitWorkId = t.UnitWorkId, + UnitWorkName = uw.UnitWorkName, + ConstructionPart = t.ConstructionPart, + ConstructionProfessional = t.ConstructionProfessional, + TrustCode = t.TrustCode, + OutputMasterId = t.OutputMasterId, + OutputMasterCode = om.CusBillCode, + DemandDate = t.DemandDate, + CompleteDate = t.CompleteDate, + CreateMan = t.CreateMan, + CreateManName = p.PersonName, + CreateDate = t.CreateDate, + Remark = t.Remark + }; + return query.ToList(); + } + + public static IEnumerable GetListData(AntiCorrosionTrustOutput filter, Grid grid) + { + var list = GetListData(filter); + Count = list.Count; + return list.Skip(grid.PageIndex * grid.PageSize).Take(grid.PageSize).ToList(); + } + + public static AntiCorrosionTrustOutput GetById(string id) + { + if (string.IsNullOrEmpty(id)) + { + return null; + } + + return GetListData(new AntiCorrosionTrustOutput { Id = id }) + .FirstOrDefault(x => x.Id == id); + } + + public static bool IsExistTrustCode(string trustCode, string id, string projectId) + { + return Funs.DB.Tw_AntiCorrosionTrust.Any(x => x.TrustCode == trustCode + && x.ProjectId == projectId + && (string.IsNullOrEmpty(id) || x.Id != id)); + } + + public static string GenerateTrustCode(string unitWorkId) + { + var unitWork = UnitWorkService.GetUnitWorkByUnitWorkId(unitWorkId); + if (unitWork == null) + { + return string.Empty; + } + + var prefix = "SXHJ-ECFF-" + unitWork.UnitWorkName + "-"; + var maxSerial = Funs.DB.Tw_AntiCorrosionTrust + .Where(x => x.UnitWorkId == unitWorkId && x.TrustCode.StartsWith(prefix)) + .Select(x => x.TrustCode) + .ToList() + .Select(x => GetTrustCodeSerial(x)) + .DefaultIfEmpty(0) + .Max(); + + return prefix + (maxSerial + 1).ToString("000"); + } + + public static List GetAvailableOutputMasters(string projectId, string unitWorkId, string currentTrustId) + { + var usedOutputIds = Funs.DB.Tw_AntiCorrosionTrust + .Where(x => x.ProjectId == projectId && (string.IsNullOrEmpty(currentTrustId) || x.Id != currentTrustId)) + .Select(x => x.OutputMasterId) + .ToList(); + + var query = from om in Funs.DB.Tw_OutputMaster + join plan in Funs.DB.Tw_InOutPlanMaster on om.InOutPlanMasterId equals plan.Id into planJoin + from plan in planJoin.DefaultIfEmpty() + join createPerson in Funs.DB.Person_Persons on om.CreateMan equals createPerson.PersonId into createJoin + from createPerson in createJoin.DefaultIfEmpty() + join reqUnit in Funs.DB.Base_Unit on om.ReqUnitId equals reqUnit.UnitId into unitJoin + from reqUnit in unitJoin.DefaultIfEmpty() + where om.ProjectId == projectId + && !usedOutputIds.Contains(om.Id) + && (string.IsNullOrEmpty(unitWorkId) || (plan.WeldTaskId != null && plan.WeldTaskId.Contains(unitWorkId))) + orderby om.CreateDate descending, om.CusBillCode descending + select new Tw_InOutMasterOutput + { + Id = om.Id, + ProjectId = om.ProjectId, + CusBillCode = om.CusBillCode, + InOutPlanMasterId = om.InOutPlanMasterId, + WarehouseCode = om.WarehouseCode, + Source = om.Source, + TypeInt = om.TypeInt, + State = om.State, + CreateMan = om.CreateMan, + CreateManName = createPerson.PersonName, + CreateDate = om.CreateDate, + ReqUnitId = om.ReqUnitId, + ReqUnitName = reqUnit.UnitName, + Category = om.Category, + AuditMan = om.AuditMan, + AuditDate = om.AuditDate, + AuditMan2 = om.AuditMan2, + AuditDate2 = om.AuditDate2, + WarehouseMan = om.WarehouseMan, + WarehouseDate = om.WarehouseDate, + WeldTaskId = plan.WeldTaskId, + Remark = plan.Remark + }; + return query.ToList(); + } + + public static Tw_InOutMasterOutput GetOutputMasterById(string id) + { + if (string.IsNullOrEmpty(id)) + { + return null; + } + + var query = from om in Funs.DB.Tw_OutputMaster + join plan in Funs.DB.Tw_InOutPlanMaster on om.InOutPlanMasterId equals plan.Id into planJoin + from plan in planJoin.DefaultIfEmpty() + join reqUnit in Funs.DB.Base_Unit on om.ReqUnitId equals reqUnit.UnitId into unitJoin + from reqUnit in unitJoin.DefaultIfEmpty() + where om.Id == id + select new Tw_InOutMasterOutput + { + Id = om.Id, + ProjectId = om.ProjectId, + CusBillCode = om.CusBillCode, + InOutPlanMasterId = om.InOutPlanMasterId, + WarehouseCode = om.WarehouseCode, + Source = om.Source, + TypeInt = om.TypeInt, + State = om.State, + CreateMan = om.CreateMan, + CreateDate = om.CreateDate, + ReqUnitId = om.ReqUnitId, + ReqUnitName = reqUnit.UnitName, + Category = om.Category, + AuditMan = om.AuditMan, + AuditDate = om.AuditDate, + AuditMan2 = om.AuditMan2, + AuditDate2 = om.AuditDate2, + WarehouseMan = om.WarehouseMan, + WarehouseDate = om.WarehouseDate, + WeldTaskId = plan.WeldTaskId, + Remark = plan.Remark + }; + return query.FirstOrDefault(); + } + + public static List GetDetailList(string trustId) + { + var query = from d in Funs.DB.Tw_AntiCorrosionTrustDetail + join m in Funs.DB.HJGL_MaterialCodeLib on d.MaterialCode equals m.MaterialCode into materialJoin + from m in materialJoin.DefaultIfEmpty() + where d.TrustId == trustId + orderby d.SortIndex + select new AntiCorrosionTrustDetailOutput + { + Id = d.Id, + TrustId = d.TrustId, + SortIndex = d.SortIndex, + MaterialCode = d.MaterialCode, + Code = m.Code, + MaterialName = m.MaterialName, + MaterialSpec = m.MaterialSpec, + MaterialDef = m.MaterialDef, + MaterialUnit = m.MaterialUnit, + Quantity = d.Quantity, + PaintCode = d.PaintCode, + Primer = d.Primer, + IntermediatePaint = d.IntermediatePaint, + Topcoat = d.Topcoat, + ColorCode = d.ColorCode, + Remark = d.Remark + }; + return query.ToList(); + } + + public static List GetDetailsByOutputMasterId(string outputMasterId) + { + var outputDetails = Funs.DB.Tw_OutputDetail + .Where(x => x.OutputMasterId == outputMasterId) + .OrderBy(x => x.Id) + .ToList(); + var materialCodes = outputDetails.Select(x => x.MaterialCode).Where(x => !string.IsNullOrEmpty(x)).Distinct().ToList(); + var materials = Funs.DB.HJGL_MaterialCodeLib + .Where(x => materialCodes.Contains(x.MaterialCode)) + .ToDictionary(x => x.MaterialCode, x => x); + + var index = 0; + var result = new List(); + foreach (var detail in outputDetails) + { + index++; + HJGL_MaterialCodeLib material = null; + if (!string.IsNullOrEmpty(detail.MaterialCode) && materials.ContainsKey(detail.MaterialCode)) + { + material = materials[detail.MaterialCode]; + } + + // 防腐明细只保存材料主编码和数量,展示字段统一由材料编码库补齐。 + result.Add(new AntiCorrosionTrustDetailOutput + { + Id = SQLHelper.GetNewID(), + SortIndex = index, + MaterialCode = detail.MaterialCode, + Code = material == null ? string.Empty : material.Code, + MaterialName = material == null ? string.Empty : material.MaterialName, + MaterialSpec = material == null ? string.Empty : material.MaterialSpec, + MaterialDef = material == null ? string.Empty : material.MaterialDef, + MaterialUnit = material == null ? string.Empty : material.MaterialUnit, + Quantity = detail.ActNum ?? detail.PlanNum + }); + } + return result; + } + + public static List GetPaintCodeList() + { + return Funs.DB.Tw_PaintCodeDict + .Where(x => x.IsUsed) + .OrderBy(x => x.SortIndex) + .ThenBy(x => x.PaintCode) + .Select(x => new PaintCodeDictOutput + { + Id = x.Id, + PaintCode = x.PaintCode, + Primer = x.Primer, + IntermediatePaint = x.IntermediatePaint, + Topcoat = x.Topcoat, + ColorCode = x.ColorCode, + SortIndex = x.SortIndex + }) + .ToList(); + } + + public static void Save(AntiCorrosionTrustOutput trust, List details) + { + var isNew = string.IsNullOrEmpty(trust.Id); + Tw_AntiCorrosionTrust entity; + if (isNew) + { + entity = new Tw_AntiCorrosionTrust + { + Id = SQLHelper.GetNewID(), + ProjectId = trust.ProjectId, + CreateMan = trust.CreateMan, + CreateDate = DateTime.Now + }; + Funs.DB.Tw_AntiCorrosionTrust.InsertOnSubmit(entity); + } + else + { + entity = Funs.DB.Tw_AntiCorrosionTrust.FirstOrDefault(x => x.Id == trust.Id); + if (entity == null) + { + throw new Exception("防腐委托单不存在或已删除!"); + } + } + + entity.UnitWorkId = trust.UnitWorkId; + entity.ConstructionPart = trust.ConstructionPart; + entity.ConstructionProfessional = trust.ConstructionProfessional; + entity.TrustCode = trust.TrustCode; + entity.OutputMasterId = trust.OutputMasterId; + entity.DemandDate = trust.DemandDate; + entity.CompleteDate = trust.CompleteDate; + entity.Remark = trust.Remark; + + var oldDetails = Funs.DB.Tw_AntiCorrosionTrustDetail.Where(x => x.TrustId == entity.Id).ToList(); + Funs.DB.Tw_AntiCorrosionTrustDetail.DeleteAllOnSubmit(oldDetails); + + var paintMap = GetPaintCodeList().ToDictionary(x => x.PaintCode ?? string.Empty, x => x); + var index = 0; + foreach (var detail in details.Where(x => !string.IsNullOrEmpty(x.MaterialCode))) + { + index++; + if (!string.IsNullOrEmpty(detail.PaintCode) && paintMap.ContainsKey(detail.PaintCode)) + { + var paint = paintMap[detail.PaintCode]; + detail.Primer = paint.Primer; + detail.IntermediatePaint = paint.IntermediatePaint; + detail.Topcoat = paint.Topcoat; + detail.ColorCode = paint.ColorCode; + } + + // 涂漆代码保存时按字典补齐,避免前端联动遗漏造成打印字段为空。 + Funs.DB.Tw_AntiCorrosionTrustDetail.InsertOnSubmit(new Tw_AntiCorrosionTrustDetail + { + Id = SQLHelper.GetNewID(), + TrustId = entity.Id, + SortIndex = detail.SortIndex ?? index, + MaterialCode = detail.MaterialCode, + Quantity = detail.Quantity, + PaintCode = detail.PaintCode, + Primer = detail.Primer, + IntermediatePaint = detail.IntermediatePaint, + Topcoat = detail.Topcoat, + ColorCode = detail.ColorCode, + Remark = detail.Remark + }); + } + + Funs.DB.SubmitChanges(); + trust.Id = entity.Id; + } + + public static void DeleteById(string id) + { + var details = Funs.DB.Tw_AntiCorrosionTrustDetail.Where(x => x.TrustId == id).ToList(); + Funs.DB.Tw_AntiCorrosionTrustDetail.DeleteAllOnSubmit(details); + var trust = Funs.DB.Tw_AntiCorrosionTrust.FirstOrDefault(x => x.Id == id); + if (trust != null) + { + Funs.DB.Tw_AntiCorrosionTrust.DeleteOnSubmit(trust); + } + Funs.DB.SubmitChanges(); + } + + public static DataTable GetPrintMasterTable(string id) + { + var query = (from t in Funs.DB.Tw_AntiCorrosionTrust + join p in Funs.DB.Base_Project on t.ProjectId equals p.ProjectId into projectJoin + from p in projectJoin.DefaultIfEmpty() + join uw in Funs.DB.WBS_UnitWork on t.UnitWorkId equals uw.UnitWorkId into uwJoin + from uw in uwJoin.DefaultIfEmpty() + join om in Funs.DB.Tw_OutputMaster on t.OutputMasterId equals om.Id into omJoin + from om in omJoin.DefaultIfEmpty() + join createPerson in Funs.DB.Person_Persons on t.CreateMan equals createPerson.PersonId into personJoin + from createPerson in personJoin.DefaultIfEmpty() + where t.Id == id + select new + { + p.ProjectName, + uw.UnitWorkName, + uw.UnitWorkCode, + t.ConstructionPart, + t.ConstructionProfessional, + t.TrustCode, + OutputMasterCode = om.CusBillCode, + t.DemandDate, + t.CompleteDate, + CreateManName = createPerson.PersonName + }) + .ToList() + .Select(x => new + { + x.ProjectName, + x.UnitWorkName, + x.UnitWorkCode, + x.ConstructionPart, + x.ConstructionProfessional, + x.TrustCode, + x.OutputMasterCode, + DemandDate = x.DemandDate.HasValue ? x.DemandDate.Value.ToString("yyyy-MM-dd") : string.Empty, + CompleteDate = x.CompleteDate.HasValue ? x.CompleteDate.Value.ToString("yyyy-MM-dd") : string.Empty, + x.CreateManName + }); + return ToDataTable(query, "Table1"); + } + + public static DataTable GetPrintDetailTable(string id) + { + var query = from d in Funs.DB.Tw_AntiCorrosionTrustDetail + join m in Funs.DB.HJGL_MaterialCodeLib on d.MaterialCode equals m.MaterialCode into materialJoin + from m in materialJoin.DefaultIfEmpty() + where d.TrustId == id + orderby d.SortIndex + select new + { + d.SortIndex, + m.MaterialName, + m.Code, + m.MaterialSpec, + m.MaterialDef, + m.MaterialUnit, + d.Quantity, + d.PaintCode, + d.Primer, + d.IntermediatePaint, + d.Topcoat, + d.ColorCode, + d.Remark + }; + return ToDataTable(query.ToList(), "Data"); + } + + private static int GetTrustCodeSerial(string trustCode) + { + if (string.IsNullOrEmpty(trustCode) || trustCode.Length < 3) + { + return 0; + } + + int serial; + return int.TryParse(trustCode.Substring(trustCode.Length - 3), out serial) ? serial : 0; + } + + private static DataTable ToDataTable(IEnumerable data, string tableName) + { + var table = new DataTable(tableName); + var properties = typeof(T).GetProperties(); + foreach (var property in properties) + { + var propertyType = Nullable.GetUnderlyingType(property.PropertyType) ?? property.PropertyType; + table.Columns.Add(property.Name, propertyType); + } + + foreach (var item in data) + { + var row = table.NewRow(); + foreach (var property in properties) + { + row[property.Name] = property.GetValue(item, null) ?? DBNull.Value; + } + table.Rows.Add(row); + } + return table; + } + } +} diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 89f90d62..cd0cb11a 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -4938,6 +4938,10 @@ namespace BLL /// public const string Tw_OutputMasterMenuId = "BCCA4D81-410C-4746-B1E4-F882BC3A25F4"; /// + /// 防腐委托单 + /// + public const string Tw_AntiCorrosionTrustMenuId = "0BDA0F5D-BB5B-4F25-8C67-42C654A8A6A2"; + /// /// 库存管理 /// public const string Tw_MaterialStockMenuId = "803F9828-52FA-4EF7-99C7-ADA99DADE9FB"; @@ -5369,4 +5373,4 @@ namespace BLL /// public const string EntryEducationTrainTypeId = "8920c9cc-fa92-49b2-9493-775a55da27bb"; } -} \ No newline at end of file +} diff --git a/SGGL/FineUIPro.Web/CLGL/AntiCorrosionTrust.aspx b/SGGL/FineUIPro.Web/CLGL/AntiCorrosionTrust.aspx new file mode 100644 index 00000000..7af47213 --- /dev/null +++ b/SGGL/FineUIPro.Web/CLGL/AntiCorrosionTrust.aspx @@ -0,0 +1,139 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AntiCorrosionTrust.aspx.cs" Inherits="FineUIPro.Web.CLGL.AntiCorrosionTrust" %> + + + + + + 防腐委托单 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CLGL/AntiCorrosionTrust.aspx.cs b/SGGL/FineUIPro.Web/CLGL/AntiCorrosionTrust.aspx.cs new file mode 100644 index 00000000..315a656f --- /dev/null +++ b/SGGL/FineUIPro.Web/CLGL/AntiCorrosionTrust.aspx.cs @@ -0,0 +1,259 @@ +using BLL; +using MiniExcelLibs; +using Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.IO; +using System.Linq; + +namespace FineUIPro.Web.CLGL +{ + public partial class AntiCorrosionTrust : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + InitTreeMenu(); + BindGrid(); + } + } + + private void BindGrid() + { + var filter = new AntiCorrosionTrustOutput + { + ProjectId = this.CurrUser.LoginProjectId, + UnitWorkId = tvControlItem.SelectedNodeID, + TrustCode = txtTrustCode.Text.Trim(), + OutputMasterCode = txtOutputMasterCode.Text.Trim() + }; + Grid1.DataSource = TwAntiCorrosionTrustService.GetListData(filter, Grid1); + Grid1.RecordCount = TwAntiCorrosionTrustService.Count; + Grid1.DataBind(); + } + + private void InitTreeMenu() + { + this.tvControlItem.Nodes.Clear(); + + TreeNode rootNode1 = new TreeNode(); + rootNode1.NodeID = "1"; + rootNode1.Text = "建筑工程"; + rootNode1.CommandName = "建筑工程"; + rootNode1.Selectable = false; + this.tvControlItem.Nodes.Add(rootNode1); + + TreeNode rootNode2 = new TreeNode(); + rootNode2.NodeID = "2"; + rootNode2.Text = "安装工程"; + rootNode2.CommandName = "安装工程"; + rootNode2.Expanded = true; + rootNode2.Selectable = false; + this.tvControlItem.Nodes.Add(rootNode2); + + var keyword = txtTreeSearch.Text.Trim(); + var unitWorkList = (from x in Funs.DB.WBS_UnitWork + where x.ProjectId == this.CurrUser.LoginProjectId + && x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null + && (string.IsNullOrEmpty(keyword) || x.UnitWorkName.Contains(keyword) || x.UnitWorkCode.Contains(keyword)) + select x).ToList(); + + foreach (var q in unitWorkList.Where(x => x.ProjectType == "1")) + { + TreeNode tn = BuildUnitWorkNode(q); + rootNode1.Nodes.Add(tn); + } + foreach (var q in unitWorkList.Where(x => x.ProjectType == "2")) + { + TreeNode tn = BuildUnitWorkNode(q); + rootNode2.Nodes.Add(tn); + } + } + + private TreeNode BuildUnitWorkNode(Model.WBS_UnitWork unitWork) + { + var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(unitWork.UnitId); + TreeNode node = new TreeNode(); + node.NodeID = unitWork.UnitWorkId; + node.Text = unitWork.UnitWorkName; + node.ToolTip = "施工单位:" + unitNamesUnitIds; + node.EnableClickEvent = true; + return node; + } + + protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e) + { + BindGrid(); + } + + protected void btnTreeFind_Click(object sender, EventArgs e) + { + InitTreeMenu(); + } + + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + + protected void btnNew_Click(object sender, EventArgs e) + { + if (!CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.Tw_AntiCorrosionTrustMenuId, Const.BtnAdd)) + { + ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrEmpty(tvControlItem.SelectedNodeID) || tvControlItem.SelectedNodeID == "1" || tvControlItem.SelectedNodeID == "2") + { + Alert.ShowInTop("请选择单位工程!", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("AntiCorrosionTrustEdit.aspx?UnitWorkId={0}", tvControlItem.SelectedNodeID))); + } + + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditSelected(); + } + + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + EditSelected(); + } + + private void EditSelected() + { + if (!CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.Tw_AntiCorrosionTrustMenuId, Const.BtnModify)) + { + ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrEmpty(Grid1.SelectedRowID)) + { + Alert.ShowInTop("请选择要编辑的项", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("AntiCorrosionTrustEdit.aspx?Id={0}", Grid1.SelectedRowID))); + } + + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + if (!CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.Tw_AntiCorrosionTrustMenuId, Const.BtnDelete)) + { + ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + return; + } + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning); + return; + } + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + TwAntiCorrosionTrustService.DeleteById(rowID); + } + BindGrid(); + ShowNotify("删除成功!", MessageBoxIcon.Success); + } + + protected void btnPrint_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(Grid1.SelectedRowID)) + { + ShowNotify("请选择要打印的项", MessageBoxIcon.Warning); + return; + } + BLL.FastReportService.ResetData(); + DataTable master = TwAntiCorrosionTrustService.GetPrintMasterTable(Grid1.SelectedRowID); + DataTable detail = TwAntiCorrosionTrustService.GetPrintDetailTable(Grid1.SelectedRowID); + BLL.FastReportService.AddFastreportTable(master); + BLL.FastReportService.AddFastreportTable(detail); + + string rootPath = Server.MapPath("~/"); + string initTemplatePath = "File\\Fastreport\\防腐委托单.frx"; + if (File.Exists(rootPath + initTemplatePath)) + { + PageContext.RegisterStartupScript(Window3.GetShowReference(string.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); + } + else + { + ShowNotify("打印模板不存在!", MessageBoxIcon.Warning); + } + } + + protected void btnExportTrust_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(Grid1.SelectedRowID)) + { + ShowNotify("请选择要导出的项", MessageBoxIcon.Warning); + return; + } + + string templatePath = Funs.RootPath + @"File\Excel\DataOut\防腐委托单.xlsx"; + if (!File.Exists(templatePath)) + { + ShowNotify("导出模板不存在!", MessageBoxIcon.Warning); + return; + } + + DataTable master = TwAntiCorrosionTrustService.GetPrintMasterTable(Grid1.SelectedRowID); + DataTable detail = TwAntiCorrosionTrustService.GetPrintDetailTable(Grid1.SelectedRowID); + if (master.Rows.Count == 0) + { + ShowNotify("未找到防腐委托单数据!", MessageBoxIcon.Warning); + return; + } + + var value = GetExportValue(master.Rows[0], detail); + string tempPath = Funs.RootPath + @"File\Excel\Temp\防腐委托单.xlsx"; + tempPath = tempPath.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm-ss}", DateTime.Now) + ".xlsx"); + Directory.CreateDirectory(Path.GetDirectoryName(tempPath)); + MiniExcel.SaveAsByTemplate(tempPath, templatePath, value); + + string trustCode = Convert.ToString(master.Rows[0]["TrustCode"]); + string fileName = string.IsNullOrEmpty(trustCode) ? "防腐委托单.xlsx" : trustCode + ".xlsx"; + FileInfo info = new FileInfo(tempPath); + long fileSize = info.Length; + System.Web.HttpContext.Current.Response.Clear(); + System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed"; + System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString()); + System.Web.HttpContext.Current.Response.TransmitFile(tempPath, 0, fileSize); + System.Web.HttpContext.Current.Response.Flush(); + File.Delete(tempPath); + System.Web.HttpContext.Current.Response.End(); + } + + private Dictionary GetExportValue(DataRow master, DataTable detail) + { + var value = new Dictionary(); + foreach (DataColumn column in master.Table.Columns) + { + value[column.ColumnName] = master[column] == DBNull.Value ? string.Empty : master[column]; + } + value["Data"] = detail; + return value; + } + + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.Tw_AntiCorrosionTrustMenuId); + if (buttonList.Count > 0) + { + btnNew.Hidden = !buttonList.Contains(BLL.Const.BtnAdd); + btnMenuEdit.Hidden = !buttonList.Contains(BLL.Const.BtnModify); + btnMenuDelete.Hidden = !buttonList.Contains(BLL.Const.BtnDelete); + btnExportTrust.Hidden = !buttonList.Contains(BLL.Const.BtnPrint); + } + } + } +} diff --git a/SGGL/FineUIPro.Web/CLGL/AntiCorrosionTrust.aspx.designer.cs b/SGGL/FineUIPro.Web/CLGL/AntiCorrosionTrust.aspx.designer.cs new file mode 100644 index 00000000..1177f5a6 --- /dev/null +++ b/SGGL/FineUIPro.Web/CLGL/AntiCorrosionTrust.aspx.designer.cs @@ -0,0 +1,242 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CLGL +{ + + + public partial class AntiCorrosionTrust + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// txtTreeSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTreeSearch; + + /// + /// btnTreeFind 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnTreeFind; + + /// + /// tvControlItem 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree tvControlItem; + + /// + /// Panel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel2; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Toolbar3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// txtTrustCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTrustCode; + + /// + /// txtOutputMasterCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtOutputMasterCode; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPrint; + + /// + /// btnExportTrust 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnExportTrust; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window3; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/CLGL/AntiCorrosionTrustEdit.aspx b/SGGL/FineUIPro.Web/CLGL/AntiCorrosionTrustEdit.aspx new file mode 100644 index 00000000..485d3464 --- /dev/null +++ b/SGGL/FineUIPro.Web/CLGL/AntiCorrosionTrustEdit.aspx @@ -0,0 +1,166 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AntiCorrosionTrustEdit.aspx.cs" Inherits="FineUIPro.Web.CLGL.AntiCorrosionTrustEdit" %> + + + + + + 防腐委托单编辑 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CLGL/AntiCorrosionTrustEdit.aspx.cs b/SGGL/FineUIPro.Web/CLGL/AntiCorrosionTrustEdit.aspx.cs new file mode 100644 index 00000000..89f75728 --- /dev/null +++ b/SGGL/FineUIPro.Web/CLGL/AntiCorrosionTrustEdit.aspx.cs @@ -0,0 +1,223 @@ +using BLL; +using Model; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Linq; + +namespace FineUIPro.Web.CLGL +{ + public partial class AntiCorrosionTrustEdit : PageBase + { + public string TrustId + { + get { return (string)ViewState["TrustId"]; } + set { ViewState["TrustId"] = value; } + } + + public string UnitWorkId + { + get { return (string)ViewState["UnitWorkId"]; } + set { ViewState["UnitWorkId"] = value; } + } + + public string PaintCodeJson + { + get + { + var list = TwAntiCorrosionTrustService.GetPaintCodeList(); + return JsonConvert.SerializeObject(list); + } + } + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + TrustId = Request.Params["Id"]; + InitPaintCodeEditor(); + PageInfoLoad(); + } + } + + private void PageInfoLoad() + { + var trust = TwAntiCorrosionTrustService.GetById(TrustId); + if (trust != null) + { + UnitWorkId = trust.UnitWorkId; + txtUnitWorkName.Text = trust.UnitWorkName; + txtConstructionPart.Text = trust.ConstructionPart; + txtConstructionProfessional.Text = trust.ConstructionProfessional; + txtTrustCode.Text = trust.TrustCode; + txtDemandDate.Text = string.Format("{0:yyyy-MM-dd}", trust.DemandDate); + txtCompleteDate.Text = string.Format("{0:yyyy-MM-dd}", trust.CompleteDate); + txtRemark.Text = trust.Remark; + InitOutputMasterDropDown(trust.OutputMasterId); + BindGrid(TwAntiCorrosionTrustService.GetDetailList(TrustId)); + } + else + { + UnitWorkId = Request.Params["UnitWorkId"]; + var unitWork = UnitWorkService.GetUnitWorkByUnitWorkId(UnitWorkId); + if (unitWork != null) + { + txtUnitWorkName.Text = unitWork.UnitWorkName; + } + txtTrustCode.Text = TwAntiCorrosionTrustService.GenerateTrustCode(UnitWorkId); + InitOutputMasterDropDown(null); + BindGrid(new List()); + } + } + + private void InitOutputMasterDropDown(string selectedOutputMasterId) + { + drpOutputMaster.DataTextField = "CusBillCode"; + drpOutputMaster.DataValueField = "Id"; + var list = TwAntiCorrosionTrustService.GetAvailableOutputMasters(this.CurrUser.LoginProjectId, UnitWorkId, TrustId); + if (!string.IsNullOrEmpty(selectedOutputMasterId) && list.All(x => x.Id != selectedOutputMasterId)) + { + var current = TwAntiCorrosionTrustService.GetOutputMasterById(selectedOutputMasterId); + if (current != null) + { + list.Insert(0, current); + } + } + drpOutputMaster.DataSource = list; + drpOutputMaster.DataBind(); + Funs.FineUIPleaseSelect(drpOutputMaster); + if (!string.IsNullOrEmpty(selectedOutputMasterId)) + { + drpOutputMaster.SelectedValue = selectedOutputMasterId; + } + } + + private void InitPaintCodeEditor() + { + drpPaintCodeEditor.DataTextField = "PaintCode"; + drpPaintCodeEditor.DataValueField = "PaintCode"; + drpPaintCodeEditor.DataSource = TwAntiCorrosionTrustService.GetPaintCodeList(); + drpPaintCodeEditor.DataBind(); + Funs.FineUIPleaseSelect(drpPaintCodeEditor); + } + + private void BindGrid(List list) + { + Grid1.DataSource = list; + Grid1.DataBind(); + } + + protected void drpOutputMaster_SelectedIndexChanged(object sender, EventArgs e) + { + if (drpOutputMaster.SelectedValue != Const._Null) + { + BindGrid(TwAntiCorrosionTrustService.GetDetailsByOutputMasterId(drpOutputMaster.SelectedValue)); + } + else + { + BindGrid(new List()); + } + } + + protected void btnSave_Click(object sender, EventArgs e) + { + var trust = SaveTrust(); + if (trust == null) + { + return; + } + + TrustId = trust.Id; + ShowNotify("保存成功!", MessageBoxIcon.Success); + } + + protected void btnSubmit_Click(object sender, EventArgs e) + { + var trust = SaveTrust(); + if (trust == null) + { + return; + } + + TrustId = trust.Id; + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + + private AntiCorrosionTrustOutput SaveTrust() + { + if (!CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.Tw_AntiCorrosionTrustMenuId, Const.BtnSave)) + { + ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + return null; + } + if (drpOutputMaster.SelectedValue == Const._Null) + { + ShowNotify("请选择出库单编号!", MessageBoxIcon.Warning); + return null; + } + if (TwAntiCorrosionTrustService.IsExistTrustCode(txtTrustCode.Text.Trim(), TrustId, this.CurrUser.LoginProjectId)) + { + ShowNotify("委托单编号已存在,请重新生成!", MessageBoxIcon.Warning); + return null; + } + + var trust = new AntiCorrosionTrustOutput + { + Id = TrustId, + ProjectId = this.CurrUser.LoginProjectId, + UnitWorkId = UnitWorkId, + ConstructionPart = txtConstructionPart.Text.Trim(), + ConstructionProfessional = txtConstructionProfessional.Text.Trim(), + TrustCode = txtTrustCode.Text.Trim(), + OutputMasterId = drpOutputMaster.SelectedValue, + DemandDate = Funs.GetNewDateTime(txtDemandDate.Text.Trim()), + CompleteDate = Funs.GetNewDateTime(txtCompleteDate.Text.Trim()), + CreateMan = this.CurrUser.PersonId, + Remark = txtRemark.Text.Trim() + }; + + var details = CollectGridDetailInfo(); + if (details.Count == 0) + { + ShowNotify("防腐委托单明细不能为空!", MessageBoxIcon.Warning); + return null; + } + + TwAntiCorrosionTrustService.Save(trust, details); + return trust; + } + + private List CollectGridDetailInfo() + { + var result = new List(); + int sortIndex = 0; + JArray mergedData = Grid1.GetMergedData(); + foreach (JObject mergedRow in mergedData) + { + JObject values = mergedRow.Value("values"); + sortIndex++; + result.Add(new AntiCorrosionTrustDetailOutput + { + Id = values.Value("Id"), + SortIndex = sortIndex, + MaterialCode = values.Value("MaterialCode"), + Quantity = GetDecimal(values.Value("Quantity")), + PaintCode = values.Value("PaintCode"), + Remark = values.Value("Remark") + }); + } + return result; + } + + private decimal? GetDecimal(string value) + { + decimal result; + if (decimal.TryParse(value, out result)) + { + return result; + } + return null; + } + } +} diff --git a/SGGL/FineUIPro.Web/CLGL/AntiCorrosionTrustEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CLGL/AntiCorrosionTrustEdit.aspx.designer.cs new file mode 100644 index 00000000..42ee4c40 --- /dev/null +++ b/SGGL/FineUIPro.Web/CLGL/AntiCorrosionTrustEdit.aspx.designer.cs @@ -0,0 +1,206 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CLGL +{ + + + public partial class AntiCorrosionTrustEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtUnitWorkName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUnitWorkName; + + /// + /// txtConstructionPart 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtConstructionPart; + + /// + /// txtConstructionProfessional 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtConstructionProfessional; + + /// + /// txtTrustCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTrustCode; + + /// + /// drpOutputMaster 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpOutputMaster; + + /// + /// txtDemandDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtDemandDate; + + /// + /// txtCompleteDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtCompleteDate; + + /// + /// txtRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRemark; + + /// + /// lblBlank 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblBlank; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// drpPaintCodeEditor 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpPaintCodeEditor; + + /// + /// txtDetailRemarkEditor 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDetailRemarkEditor; + } +} diff --git a/SGGL/FineUIPro.Web/File/Excel/DataOut/防腐委托单.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataOut/防腐委托单.xlsx new file mode 100644 index 00000000..853830fe Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataOut/防腐委托单.xlsx differ diff --git a/SGGL/FineUIPro.Web/File/Fastreport/焊口打印_80x42.frx b/SGGL/FineUIPro.Web/File/Fastreport/焊口打印_80x42.frx index 4a4a3452..e180c4ca 100644 --- a/SGGL/FineUIPro.Web/File/Fastreport/焊口打印_80x42.frx +++ b/SGGL/FineUIPro.Web/File/Fastreport/焊口打印_80x42.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -99,7 +99,7 @@ namespace FastReport } - + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/管道焊口返修委托单NoPic.frx b/SGGL/FineUIPro.Web/File/Fastreport/管道焊口返修委托单NoPic.frx index 539d7f15..ba33c882 100644 --- a/SGGL/FineUIPro.Web/File/Fastreport/管道焊口返修委托单NoPic.frx +++ b/SGGL/FineUIPro.Web/File/Fastreport/管道焊口返修委托单NoPic.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -89,7 +89,7 @@ namespace FastReport } - + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/管道焊接任务单.frx b/SGGL/FineUIPro.Web/File/Fastreport/管道焊接任务单.frx index ac0ae869..d901b971 100644 --- a/SGGL/FineUIPro.Web/File/Fastreport/管道焊接任务单.frx +++ b/SGGL/FineUIPro.Web/File/Fastreport/管道焊接任务单.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -59,7 +59,7 @@ namespace FastReport } - + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/防腐委托单.frx b/SGGL/FineUIPro.Web/File/Fastreport/防腐委托单.frx new file mode 100644 index 00000000..ff65d144 --- /dev/null +++ b/SGGL/FineUIPro.Web/File/Fastreport/防腐委托单.frx @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 29e8444e..3aa70c7b 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -365,6 +365,10 @@ + + + + @@ -8310,6 +8314,20 @@ OutputMasterEdit.aspx + + AntiCorrosionTrust.aspx + ASPXCodeBehind + + + AntiCorrosionTrust.aspx + + + AntiCorrosionTrustEdit.aspx + ASPXCodeBehind + + + AntiCorrosionTrustEdit.aspx + main2.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs index 2e70d43c..bca9532f 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs @@ -1525,7 +1525,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage keyValuePairs.Add("Code", weldTask?.TaskCode ?? weldTask_CreateName?.TaskCode ?? string.Empty); keyValuePairs.Add("TaskDate", string.Format("{0:yyyy-MM-dd}", taskTime.Value)); keyValuePairs.Add("UnitName", UnitService.GetUnitNameByUnitId(tvControlItem.SelectedNodeID.Split('|')[1])); - keyValuePairs.Add("UnitWorkName", UnitWorkService.getUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID.Split('|')[0]).UnitWorkName); + var unitWorkModel = UnitWorkService.getUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID.Split('|')[0]); + keyValuePairs.Add("UnitWorkName", unitWorkModel?.UnitWorkName ?? string.Empty); // 创建一个新的DataTable DataTable dataTable = new DataTable(); dataTable.TableName = "Data"; @@ -1541,13 +1542,21 @@ namespace FineUIPro.Web.HJGL.WeldingManage { DataRow dr = dataTable.NewRow(); var pipelineModel = PipelineService.GetPipelineByPipelineId(pipeline); - List list = new List { pipeline }; + if (pipelineModel == null) + { + continue; + } dr["PipelineCode"] = pipelineModel.PipelineCode; dr["FlowingSection"] = pipelineModel.FlowingSection; - dr["MaterialCode"] = Base_MaterialService.GetMaterialByMaterialId(pipelineModel.MaterialId).MaterialCode; + // 管线基础资料可能未维护材质,打印时保留空值,避免整张任务单打印失败。 + var materialModel = string.IsNullOrEmpty(pipelineModel.MaterialId) ? null : Base_MaterialService.GetMaterialByMaterialId(pipelineModel.MaterialId); + dr["MaterialCode"] = materialModel?.MaterialCode ?? string.Empty; dr["MaterialSpec"] = string.Join(",", weldTaskList.Select(x => x.Specification).Distinct().ToList()); - dr["MatchRate"] = Math.Round((decimal)TwArrivalStatisticsService.GetPipeMatch(pipeline) * 100, 2).ToString() + "%"; + // 匹配率计算依赖管线仓库,未维护仓库时按0显示,避免基础资料缺项阻断打印。 + var warehouseModel = string.IsNullOrEmpty(pipelineModel.WarehouseId) ? null : Base_WarehouseService.GetWarehouseByWarehouseId(pipelineModel.WarehouseId); + var matchRate = warehouseModel == null ? 0 : TwArrivalStatisticsService.GetPipeMatch(pipeline) ?? 0; + dr["MatchRate"] = Math.Round(matchRate * 100, 2).ToString() + "%"; dr["Dia"] = weldTaskList.Where(x => x.PipelineId == pipeline).Sum(x => x.Size ?? 0) .ToString(); dataTable.Rows.Add(dr); diff --git a/SGGL/FineUIPro.Web/common/3.xml b/SGGL/FineUIPro.Web/common/3.xml new file mode 100644 index 00000000..91d9fd84 --- /dev/null +++ b/SGGL/FineUIPro.Web/common/3.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/Menu_DigData.xml b/SGGL/FineUIPro.Web/common/Menu_DigData.xml index b532a9bb..bb7a7a34 100644 --- a/SGGL/FineUIPro.Web/common/Menu_DigData.xml +++ b/SGGL/FineUIPro.Web/common/Menu_DigData.xml @@ -1,9 +1,51 @@  - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -16,12 +58,15 @@ + + + - - - - - + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml index a01be0df..7b7f8d23 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml @@ -27,13 +27,15 @@ + + - + - + diff --git a/SGGL/FineUIPro.Web/common/Menu_HTGL.xml b/SGGL/FineUIPro.Web/common/Menu_HTGL.xml index 95eeab91..129ab5fd 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HTGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HTGL.xml @@ -1,8 +1,8 @@  - - - + + + diff --git a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml index 8d4aa005..fd6a0762 100644 --- a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml @@ -1,7 +1,11 @@  - + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml b/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml index 56efca63..53b0bd32 100644 --- a/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml @@ -4,10 +4,10 @@ - + diff --git a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml index 33fbfbf6..bd506a52 100644 --- a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml @@ -58,51 +58,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SGGL/FineUIPro.Web/indexProject.aspx b/SGGL/FineUIPro.Web/indexProject.aspx index 9d020e4b..6ec61307 100644 --- a/SGGL/FineUIPro.Web/indexProject.aspx +++ b/SGGL/FineUIPro.Web/indexProject.aspx @@ -232,42 +232,42 @@
    -
  • + <%--
  • -
  • + --%>
  • -
  • + <%--
  • -
  • -
  • +
  • --%> + <%--
  • -
  • + --%>
  • -
  • + <%--
  • -
  • + --%>
  • -
  • + <%--
  • @@ -277,7 +277,7 @@ EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btnPDigData"> -
  • + --%>
diff --git a/SGGL/FineUIPro.Web/indexProject.aspx.designer.cs b/SGGL/FineUIPro.Web/indexProject.aspx.designer.cs index af5c55fc..8b83cc6a 100644 --- a/SGGL/FineUIPro.Web/indexProject.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/indexProject.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web { - - - public partial class indexProject { - +namespace FineUIPro.Web +{ + + + public partial class indexProject + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// topPanel 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ContentPanel topPanel; - + /// /// ContentPanel1 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ContentPanel ContentPanel1; - + /// /// Button21 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button Button21; - + /// /// drpProject 控件。 /// @@ -74,16 +76,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpProject; - - /// - /// btnPHTGL 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnPHTGL; - + /// /// btnHSSE 控件。 /// @@ -92,25 +85,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnHSSE; - - /// - /// btnCQMS 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnCQMS; - - /// - /// btnJDGL 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnJDGL; - + /// /// Button1 控件。 /// @@ -119,16 +94,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button Button1; - - /// - /// btnDigitalSite 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnDigitalSite; - + /// /// btnPPerson 控件。 /// @@ -137,25 +103,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnPPerson; - - /// - /// btnPZHGL 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnPZHGL; - - /// - /// btnPDigData 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnPDigData; - + /// /// btnHelp 控件。 /// @@ -164,7 +112,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnHelp; - + /// /// btnToDoItem 控件。 /// @@ -173,7 +121,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnToDoItem; - + /// /// userName 控件。 /// @@ -182,7 +130,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl userName; - + /// /// btnPersonal 控件。 /// @@ -191,7 +139,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnPersonal; - + /// /// btnSysSet 控件。 /// @@ -200,7 +148,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSysSet; - + /// /// leftPanel 控件。 /// @@ -209,7 +157,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel leftPanel; - + /// /// leftPanelToolCollapse 控件。 /// @@ -218,7 +166,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tool leftPanelToolCollapse; - + /// /// leftPanelToolGear 控件。 /// @@ -227,7 +175,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tool leftPanelToolGear; - + /// /// btnExpandAll 控件。 /// @@ -236,7 +184,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnExpandAll; - + /// /// btnCollapseAll 控件。 /// @@ -245,7 +193,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnCollapseAll; - + /// /// MenuMode 控件。 /// @@ -254,7 +202,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton MenuMode; - + /// /// MenuModeNormal 控件。 /// @@ -263,7 +211,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuCheckBox MenuModeNormal; - + /// /// MenuModeCompact 控件。 /// @@ -272,7 +220,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuCheckBox MenuModeCompact; - + /// /// MenuModeLarge 控件。 /// @@ -281,7 +229,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuCheckBox MenuModeLarge; - + /// /// MenuStyle 控件。 /// @@ -290,7 +238,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton MenuStyle; - + /// /// MenuStyleTree 控件。 /// @@ -299,7 +247,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuCheckBox MenuStyleTree; - + /// /// MenuStyleMiniModeTree 控件。 /// @@ -308,7 +256,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuCheckBox MenuStyleMiniModeTree; - + /// /// MenuStylePlainTree 控件。 /// @@ -317,7 +265,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuCheckBox MenuStylePlainTree; - + /// /// MenuLang 控件。 /// @@ -326,7 +274,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton MenuLang; - + /// /// MenuLangZHCN 控件。 /// @@ -335,7 +283,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuCheckBox MenuLangZHCN; - + /// /// mainTabStrip 控件。 /// @@ -344,7 +292,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TabStrip mainTabStrip; - + /// /// Tab1 控件。 /// @@ -353,7 +301,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tab Tab1; - + /// /// toolRefresh 控件。 /// @@ -362,7 +310,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tool toolRefresh; - + /// /// toolNewWindow 控件。 /// @@ -371,7 +319,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tool toolNewWindow; - + /// /// toolMaximize 控件。 /// @@ -380,7 +328,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tool toolMaximize; - + /// /// toolSignOut 控件。 /// @@ -389,7 +337,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tool toolSignOut; - + /// /// windowCustomQuery 控件。 /// @@ -398,7 +346,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window windowCustomQuery; - + /// /// XmlDataSource1 控件。 /// diff --git a/SGGL/Model/CLGL/AntiCorrosionTrustDetailOutput.cs b/SGGL/Model/CLGL/AntiCorrosionTrustDetailOutput.cs new file mode 100644 index 00000000..6066c1b8 --- /dev/null +++ b/SGGL/Model/CLGL/AntiCorrosionTrustDetailOutput.cs @@ -0,0 +1,22 @@ +namespace Model +{ + public class AntiCorrosionTrustDetailOutput + { + public string Id { get; set; } + public string TrustId { get; set; } + public int? SortIndex { get; set; } + public string MaterialCode { get; set; } + public string Code { get; set; } + public string MaterialName { get; set; } + public string MaterialSpec { get; set; } + public string MaterialDef { get; set; } + public string MaterialUnit { get; set; } + public decimal? Quantity { get; set; } + public string PaintCode { get; set; } + public string Primer { get; set; } + public string IntermediatePaint { get; set; } + public string Topcoat { get; set; } + public string ColorCode { get; set; } + public string Remark { get; set; } + } +} diff --git a/SGGL/Model/CLGL/AntiCorrosionTrustOutput.cs b/SGGL/Model/CLGL/AntiCorrosionTrustOutput.cs new file mode 100644 index 00000000..76e267c7 --- /dev/null +++ b/SGGL/Model/CLGL/AntiCorrosionTrustOutput.cs @@ -0,0 +1,23 @@ +using System; + +namespace Model +{ + public class AntiCorrosionTrustOutput + { + public string Id { get; set; } + public string ProjectId { get; set; } + public string UnitWorkId { get; set; } + public string UnitWorkName { get; set; } + public string ConstructionPart { get; set; } + public string ConstructionProfessional { get; set; } + public string TrustCode { get; set; } + public string OutputMasterId { get; set; } + public string OutputMasterCode { get; set; } + public DateTime? DemandDate { get; set; } + public DateTime? CompleteDate { get; set; } + public string CreateMan { get; set; } + public string CreateManName { get; set; } + public DateTime? CreateDate { get; set; } + public string Remark { get; set; } + } +} diff --git a/SGGL/Model/CLGL/PaintCodeDictOutput.cs b/SGGL/Model/CLGL/PaintCodeDictOutput.cs new file mode 100644 index 00000000..59df9a67 --- /dev/null +++ b/SGGL/Model/CLGL/PaintCodeDictOutput.cs @@ -0,0 +1,13 @@ +namespace Model +{ + public class PaintCodeDictOutput + { + public string Id { get; set; } + public string PaintCode { get; set; } + public string Primer { get; set; } + public string IntermediatePaint { get; set; } + public string Topcoat { get; set; } + public string ColorCode { get; set; } + public int? SortIndex { get; set; } + } +} diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 41256529..b6bf7b35 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -173,6 +173,9 @@ namespace Model partial void InsertBase_MaterialType(Base_MaterialType instance); partial void UpdateBase_MaterialType(Base_MaterialType instance); partial void DeleteBase_MaterialType(Base_MaterialType instance); + partial void InsertBase_MaterialUnit(Base_MaterialUnit instance); + partial void UpdateBase_MaterialUnit(Base_MaterialUnit instance); + partial void DeleteBase_MaterialUnit(Base_MaterialUnit instance); partial void InsertBase_Medium(Base_Medium instance); partial void UpdateBase_Medium(Base_Medium instance); partial void DeleteBase_Medium(Base_Medium instance); @@ -1019,6 +1022,9 @@ namespace Model partial void InsertMaterial_NoticeAndSupervision(Material_NoticeAndSupervision instance); partial void UpdateMaterial_NoticeAndSupervision(Material_NoticeAndSupervision instance); partial void DeleteMaterial_NoticeAndSupervision(Material_NoticeAndSupervision instance); + partial void InsertMaterialInAndOutRecord(MaterialInAndOutRecord instance); + partial void UpdateMaterialInAndOutRecord(MaterialInAndOutRecord instance); + partial void DeleteMaterialInAndOutRecord(MaterialInAndOutRecord instance); partial void InsertMeeting_AttendMeeting(Meeting_AttendMeeting instance); partial void UpdateMeeting_AttendMeeting(Meeting_AttendMeeting instance); partial void DeleteMeeting_AttendMeeting(Meeting_AttendMeeting instance); @@ -1781,6 +1787,12 @@ namespace Model partial void InsertTraining_TrainTestDBItem(Training_TrainTestDBItem instance); partial void UpdateTraining_TrainTestDBItem(Training_TrainTestDBItem instance); partial void DeleteTraining_TrainTestDBItem(Training_TrainTestDBItem instance); + partial void InsertTw_AntiCorrosionTrust(Tw_AntiCorrosionTrust instance); + partial void UpdateTw_AntiCorrosionTrust(Tw_AntiCorrosionTrust instance); + partial void DeleteTw_AntiCorrosionTrust(Tw_AntiCorrosionTrust instance); + partial void InsertTw_AntiCorrosionTrustDetail(Tw_AntiCorrosionTrustDetail instance); + partial void UpdateTw_AntiCorrosionTrustDetail(Tw_AntiCorrosionTrustDetail instance); + partial void DeleteTw_AntiCorrosionTrustDetail(Tw_AntiCorrosionTrustDetail instance); partial void InsertTw_InOutPlanDetail(Tw_InOutPlanDetail instance); partial void UpdateTw_InOutPlanDetail(Tw_InOutPlanDetail instance); partial void DeleteTw_InOutPlanDetail(Tw_InOutPlanDetail instance); @@ -1808,6 +1820,9 @@ namespace Model partial void InsertTw_OutputMaster(Tw_OutputMaster instance); partial void UpdateTw_OutputMaster(Tw_OutputMaster instance); partial void DeleteTw_OutputMaster(Tw_OutputMaster instance); + partial void InsertTw_PaintCodeDict(Tw_PaintCodeDict instance); + partial void UpdateTw_PaintCodeDict(Tw_PaintCodeDict instance); + partial void DeleteTw_PaintCodeDict(Tw_PaintCodeDict instance); partial void InsertUnqualified_WorkContact(Unqualified_WorkContact instance); partial void UpdateUnqualified_WorkContact(Unqualified_WorkContact instance); partial void DeleteUnqualified_WorkContact(Unqualified_WorkContact instance); @@ -2347,6 +2362,14 @@ namespace Model } } + public System.Data.Linq.Table Base_MaterialUnit + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Base_Medium { get @@ -4611,6 +4634,14 @@ namespace Model } } + public System.Data.Linq.Table MaterialInAndOutRecord + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Meeting_AttendMeeting { get @@ -6651,6 +6682,22 @@ namespace Model } } + public System.Data.Linq.Table Tw_AntiCorrosionTrust + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Tw_AntiCorrosionTrustDetail + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Tw_InOutPlanDetail { get @@ -6723,6 +6770,14 @@ namespace Model } } + public System.Data.Linq.Table Tw_PaintCodeDict + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Unqualified_WorkContact { get @@ -12453,7 +12508,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(2000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(200)")] public string ApproveIdea { get @@ -22632,6 +22687,8 @@ namespace Model private string _UnitId; + private string _ProjectId; + private string _MaterialId; private string _ColorName; @@ -22642,8 +22699,6 @@ namespace Model private string _Remark; - private string _ProjectId; - #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -22652,6 +22707,8 @@ namespace Model partial void OnMaterialColorIdChanged(); partial void OnUnitIdChanging(string value); partial void OnUnitIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); partial void OnMaterialIdChanging(string value); partial void OnMaterialIdChanged(); partial void OnColorNameChanging(string value); @@ -22662,8 +22719,6 @@ namespace Model partial void OnRGBChanged(); partial void OnRemarkChanging(string value); partial void OnRemarkChanged(); - partial void OnProjectIdChanging(string value); - partial void OnProjectIdChanged(); #endregion public Base_MaterialColor() @@ -22711,6 +22766,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialId", DbType="NVarChar(50)")] public string MaterialId { @@ -22811,26 +22886,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] - public string ProjectId - { - get - { - return this._ProjectId; - } - set - { - if ((this._ProjectId != value)) - { - this.OnProjectIdChanging(value); - this.SendPropertyChanging(); - this._ProjectId = value; - this.SendPropertyChanged("ProjectId"); - this.OnProjectIdChanged(); - } - } - } - public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -23014,6 +23069,140 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_MaterialUnit")] + public partial class Base_MaterialUnit : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _MaterialUnitId; + + private string _MaterialUnitName; + + private string _MaterialUnitCode; + + private string _Remark; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnMaterialUnitIdChanging(string value); + partial void OnMaterialUnitIdChanged(); + partial void OnMaterialUnitNameChanging(string value); + partial void OnMaterialUnitNameChanged(); + partial void OnMaterialUnitCodeChanging(string value); + partial void OnMaterialUnitCodeChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + #endregion + + public Base_MaterialUnit() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialUnitId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string MaterialUnitId + { + get + { + return this._MaterialUnitId; + } + set + { + if ((this._MaterialUnitId != value)) + { + this.OnMaterialUnitIdChanging(value); + this.SendPropertyChanging(); + this._MaterialUnitId = value; + this.SendPropertyChanged("MaterialUnitId"); + this.OnMaterialUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialUnitName", DbType="NVarChar(100)")] + public string MaterialUnitName + { + get + { + return this._MaterialUnitName; + } + set + { + if ((this._MaterialUnitName != value)) + { + this.OnMaterialUnitNameChanging(value); + this.SendPropertyChanging(); + this._MaterialUnitName = value; + this.SendPropertyChanged("MaterialUnitName"); + this.OnMaterialUnitNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialUnitCode", DbType="NVarChar(50)")] + public string MaterialUnitCode + { + get + { + return this._MaterialUnitCode; + } + set + { + if ((this._MaterialUnitCode != value)) + { + this.OnMaterialUnitCodeChanging(value); + this.SendPropertyChanging(); + this._MaterialUnitCode = value; + this.SendPropertyChanged("MaterialUnitCode"); + this.OnMaterialUnitCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(200)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + 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.Base_Medium")] public partial class Base_Medium : INotifyPropertyChanging, INotifyPropertyChanged { @@ -24808,8 +24997,6 @@ namespace Model private EntitySet _Base_ProjectSate; - private EntitySet _Base_Warehouse; - private EntitySet _HJGL_Batch_NDE; private EntitySet _HJGL_Batch_PointBatch; @@ -25094,6 +25281,8 @@ namespace Model private EntitySet _Sys_FlowOperate; + private EntitySet _Sys_Log; + private EntitySet _Sys_RoleItem; private EntitySet _Sys_UserRead; @@ -25240,7 +25429,6 @@ namespace Model this._Base_ProjectType = default(EntityRef); this._Base_Unit = default(EntityRef); this._Base_ProjectSate = new EntitySet(new Action(this.attach_Base_ProjectSate), new Action(this.detach_Base_ProjectSate)); - this._Base_Warehouse = new EntitySet(new Action(this.attach_Base_Warehouse), new Action(this.detach_Base_Warehouse)); this._HJGL_Batch_NDE = new EntitySet(new Action(this.attach_HJGL_Batch_NDE), new Action(this.detach_HJGL_Batch_NDE)); this._HJGL_Batch_PointBatch = new EntitySet(new Action(this.attach_HJGL_Batch_PointBatch), new Action(this.detach_HJGL_Batch_PointBatch)); this._Check_CheckColligation = new EntitySet(new Action(this.attach_Check_CheckColligation), new Action(this.detach_Check_CheckColligation)); @@ -25383,6 +25571,7 @@ namespace Model this._Sys_CodeRecords = new EntitySet(new Action(this.attach_Sys_CodeRecords), new Action(this.detach_Sys_CodeRecords)); this._Sys_CQMS_DataInTemp = new EntitySet(new Action(this.attach_Sys_CQMS_DataInTemp), new Action(this.detach_Sys_CQMS_DataInTemp)); this._Sys_FlowOperate = new EntitySet(new Action(this.attach_Sys_FlowOperate), new Action(this.detach_Sys_FlowOperate)); + this._Sys_Log = new EntitySet(new Action(this.attach_Sys_Log), new Action(this.detach_Sys_Log)); this._Sys_RoleItem = new EntitySet(new Action(this.attach_Sys_RoleItem), new Action(this.detach_Sys_RoleItem)); this._Sys_UserRead = new EntitySet(new Action(this.attach_Sys_UserRead), new Action(this.detach_Sys_UserRead)); this._Technical_TechnicalDisclose = new EntitySet(new Action(this.attach_Technical_TechnicalDisclose), new Action(this.detach_Technical_TechnicalDisclose)); @@ -26427,19 +26616,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_Warehouse_Project", Storage="_Base_Warehouse", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] - public EntitySet Base_Warehouse - { - get - { - return this._Base_Warehouse; - } - set - { - this._Base_Warehouse.Assign(value); - } - } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Batch_NDECheck_Base_Project", Storage="_HJGL_Batch_NDE", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet HJGL_Batch_NDE { @@ -28286,6 +28462,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Sys_Log_Base_Project", Storage="_Sys_Log", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet Sys_Log + { + get + { + return this._Sys_Log; + } + set + { + this._Sys_Log.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Sys_RoleItem_Base_Project", Storage="_Sys_RoleItem", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet Sys_RoleItem { @@ -28773,18 +28962,6 @@ namespace Model entity.Base_Project = null; } - private void attach_Base_Warehouse(Base_Warehouse entity) - { - this.SendPropertyChanging(); - entity.Base_Project = this; - } - - private void detach_Base_Warehouse(Base_Warehouse entity) - { - this.SendPropertyChanging(); - entity.Base_Project = null; - } - private void attach_HJGL_Batch_NDE(HJGL_Batch_NDE entity) { this.SendPropertyChanging(); @@ -30489,6 +30666,18 @@ namespace Model entity.Base_Project = null; } + private void attach_Sys_Log(Sys_Log entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_Sys_Log(Sys_Log entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_Sys_RoleItem(Sys_RoleItem entity) { this.SendPropertyChanging(); @@ -39019,8 +39208,6 @@ namespace Model private System.Nullable _ModifyTime; - private EntityRef _Base_Project; - #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -39045,7 +39232,6 @@ namespace Model public Base_Warehouse() { - this._Base_Project = default(EntityRef); OnCreated(); } @@ -39120,10 +39306,6 @@ namespace Model { if ((this._ProjectId != value)) { - if (this._Base_Project.HasLoadedOrAssignedValue) - { - throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); - } this.OnProjectIdChanging(value); this.SendPropertyChanging(); this._ProjectId = value; @@ -39213,40 +39395,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_Warehouse_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] - public Base_Project Base_Project - { - get - { - return this._Base_Project.Entity; - } - set - { - Base_Project previousValue = this._Base_Project.Entity; - if (((previousValue != value) - || (this._Base_Project.HasLoadedOrAssignedValue == false))) - { - this.SendPropertyChanging(); - if ((previousValue != null)) - { - this._Base_Project.Entity = null; - previousValue.Base_Warehouse.Remove(this); - } - this._Base_Project.Entity = value; - if ((value != null)) - { - value.Base_Warehouse.Add(this); - this._ProjectId = value.ProjectId; - } - else - { - this._ProjectId = default(string); - } - this.SendPropertyChanged("Base_Project"); - } - } - } - public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -61320,6 +61468,8 @@ namespace Model private string _SType; + private string _SourceDes; + private string _MeasurementRange; private string _Precision; @@ -61346,8 +61496,6 @@ namespace Model private string _Remark; - private string _SourceDes; - private EntityRef _Base_CNProfessional; private EntityRef _Base_Project; @@ -61402,6 +61550,8 @@ namespace Model partial void OnIsCheckOKChanged(); partial void OnSTypeChanging(string value); partial void OnSTypeChanged(); + partial void OnSourceDesChanging(string value); + partial void OnSourceDesChanged(); partial void OnMeasurementRangeChanging(string value); partial void OnMeasurementRangeChanged(); partial void OnPrecisionChanging(string value); @@ -61428,8 +61578,6 @@ namespace Model partial void OnCalibrationWarningChanged(); partial void OnRemarkChanging(string value); partial void OnRemarkChanged(); - partial void OnSourceDesChanging(string value); - partial void OnSourceDesChanged(); #endregion public Comprehensive_InspectionMachine() @@ -61892,6 +62040,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SourceDes", DbType="NVarChar(500)")] + public string SourceDes + { + get + { + return this._SourceDes; + } + set + { + if ((this._SourceDes != value)) + { + this.OnSourceDesChanging(value); + this.SendPropertyChanging(); + this._SourceDes = value; + this.SendPropertyChanged("SourceDes"); + this.OnSourceDesChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MeasurementRange", DbType="NVarChar(50)")] public string MeasurementRange { @@ -62152,26 +62320,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SourceDes", DbType="NVarChar(500)")] - public string SourceDes - { - get - { - return this._SourceDes; - } - set - { - if ((this._SourceDes != value)) - { - this.OnSourceDesChanging(value); - this.SendPropertyChanging(); - this._SourceDes = value; - this.SendPropertyChanged("SourceDes"); - this.OnSourceDesChanged(); - } - } - } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Comprehensive_InspectionMachine_Base_CNProfessional", Storage="_Base_CNProfessional", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", IsForeignKey=true)] public Base_CNProfessional Base_CNProfessional { @@ -101519,10 +101667,10 @@ namespace Model private string _TrainNumber; - private System.Nullable _TypeInt; - private string _TrainNumberId; + private System.Nullable _TypeInt; + private string _CompileMan; private System.Nullable _CompileDate; @@ -101557,10 +101705,10 @@ namespace Model partial void OnReceiveDateChanged(); partial void OnTrainNumberChanging(string value); partial void OnTrainNumberChanged(); - partial void OnTypeIntChanging(System.Nullable value); - partial void OnTypeIntChanged(); partial void OnTrainNumberIdChanging(string value); partial void OnTrainNumberIdChanged(); + partial void OnTypeIntChanging(System.Nullable value); + partial void OnTypeIntChanged(); partial void OnCompileManChanging(string value); partial void OnCompileManChanged(); partial void OnCompileDateChanging(System.Nullable value); @@ -101814,26 +101962,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TypeInt", DbType="Int")] - public System.Nullable TypeInt - { - get - { - return this._TypeInt; - } - set - { - if ((this._TypeInt != value)) - { - this.OnTypeIntChanging(value); - this.SendPropertyChanging(); - this._TypeInt = value; - this.SendPropertyChanged("TypeInt"); - this.OnTypeIntChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrainNumberId", DbType="VarChar(50)")] public string TrainNumberId { @@ -101854,6 +101982,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TypeInt", DbType="Int")] + public System.Nullable TypeInt + { + get + { + return this._TypeInt; + } + set + { + if ((this._TypeInt != value)) + { + this.OnTypeIntChanging(value); + this.SendPropertyChanging(); + this._TypeInt = value; + this.SendPropertyChanged("TypeInt"); + this.OnTypeIntChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] public string CompileMan { @@ -113787,7 +113935,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rectification", DbType="NVarChar(500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rectification", DbType="NVarChar(50)")] public string Rectification { get @@ -113913,7 +114061,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Measures", DbType="NVarChar(500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Measures", DbType="NVarChar(50)")] public string Measures { get @@ -164951,6 +165099,356 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.MaterialInAndOutRecord")] + public partial class MaterialInAndOutRecord : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _ProjectId; + + private string _GoodsCategoryId; + + private string _GoodsCategoryName; + + private string _MaterialModel; + + private System.Nullable _InOutDate; + + private string _UnitId; + + private string _InOrOut; + + private System.Nullable _Number; + + private string _MaterialUnitId; + + private string _Remark; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + #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 OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnGoodsCategoryIdChanging(string value); + partial void OnGoodsCategoryIdChanged(); + partial void OnGoodsCategoryNameChanging(string value); + partial void OnGoodsCategoryNameChanged(); + partial void OnMaterialModelChanging(string value); + partial void OnMaterialModelChanged(); + partial void OnInOutDateChanging(System.Nullable value); + partial void OnInOutDateChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnInOrOutChanging(string value); + partial void OnInOrOutChanged(); + partial void OnNumberChanging(System.Nullable value); + partial void OnNumberChanged(); + partial void OnMaterialUnitIdChanging(string value); + partial void OnMaterialUnitIdChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public MaterialInAndOutRecord() + { + 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="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GoodsCategoryId", DbType="NVarChar(50)")] + public string GoodsCategoryId + { + get + { + return this._GoodsCategoryId; + } + set + { + if ((this._GoodsCategoryId != value)) + { + this.OnGoodsCategoryIdChanging(value); + this.SendPropertyChanging(); + this._GoodsCategoryId = value; + this.SendPropertyChanged("GoodsCategoryId"); + this.OnGoodsCategoryIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GoodsCategoryName", DbType="NVarChar(100)")] + public string GoodsCategoryName + { + get + { + return this._GoodsCategoryName; + } + set + { + if ((this._GoodsCategoryName != value)) + { + this.OnGoodsCategoryNameChanging(value); + this.SendPropertyChanging(); + this._GoodsCategoryName = value; + this.SendPropertyChanged("GoodsCategoryName"); + this.OnGoodsCategoryNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialModel", DbType="NVarChar(100)")] + public string MaterialModel + { + get + { + return this._MaterialModel; + } + set + { + if ((this._MaterialModel != value)) + { + this.OnMaterialModelChanging(value); + this.SendPropertyChanging(); + this._MaterialModel = value; + this.SendPropertyChanged("MaterialModel"); + this.OnMaterialModelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InOutDate", DbType="DateTime")] + public System.Nullable InOutDate + { + get + { + return this._InOutDate; + } + set + { + if ((this._InOutDate != value)) + { + this.OnInOutDateChanging(value); + this.SendPropertyChanging(); + this._InOutDate = value; + this.SendPropertyChanged("InOutDate"); + this.OnInOutDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InOrOut", DbType="NVarChar(10)")] + public string InOrOut + { + get + { + return this._InOrOut; + } + set + { + if ((this._InOrOut != value)) + { + this.OnInOrOutChanging(value); + this.SendPropertyChanging(); + this._InOrOut = value; + this.SendPropertyChanged("InOrOut"); + this.OnInOrOutChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Number", DbType="Decimal(18,2)")] + public System.Nullable Number + { + get + { + return this._Number; + } + set + { + if ((this._Number != value)) + { + this.OnNumberChanging(value); + this.SendPropertyChanging(); + this._Number = value; + this.SendPropertyChanged("Number"); + this.OnNumberChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialUnitId", DbType="NVarChar(50)")] + public string MaterialUnitId + { + get + { + return this._MaterialUnitId; + } + set + { + if ((this._MaterialUnitId != value)) + { + this.OnMaterialUnitIdChanging(value); + this.SendPropertyChanging(); + this._MaterialUnitId = value; + this.SendPropertyChanged("MaterialUnitId"); + this.OnMaterialUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(200)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + 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.Meeting_AttendMeeting")] public partial class Meeting_AttendMeeting : INotifyPropertyChanging, INotifyPropertyChanged { @@ -167290,7 +167788,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(3000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(500)")] public string AttentPerson { get @@ -198297,7 +198795,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(255)")] public string ProjectDescription { get @@ -198417,7 +198915,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(255)")] public string CalculationRule { get @@ -198477,7 +198975,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(100)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(50)")] public string ConstructionSubcontractor { get @@ -198861,7 +199359,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,3)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,2)")] public System.Nullable WorkPackageEstimate { get @@ -199166,16 +199664,6 @@ namespace Model private string _ProjectId; - private string _ContractId; - - private string _OrderCode; - - private System.Nullable _OrderInDate; - - private System.Nullable _OrderOutDate; - - private string _MaterialRequisitionUnit; - private System.Nullable _State; private string _InvoiceCode; @@ -199204,6 +199692,16 @@ namespace Model private string _CreateUser; + private string _ContractId; + + private System.Nullable _OrderInDate; + + private string _OrderCode; + + private System.Nullable _OrderOutDate; + + private string _MaterialRequisitionUnit; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -199212,16 +199710,6 @@ namespace Model partial void OnInvoiceIdChanged(); partial void OnProjectIdChanging(string value); partial void OnProjectIdChanged(); - partial void OnContractIdChanging(string value); - partial void OnContractIdChanged(); - partial void OnOrderCodeChanging(string value); - partial void OnOrderCodeChanged(); - partial void OnOrderInDateChanging(System.Nullable value); - partial void OnOrderInDateChanged(); - partial void OnOrderOutDateChanging(System.Nullable value); - partial void OnOrderOutDateChanged(); - partial void OnMaterialRequisitionUnitChanging(string value); - partial void OnMaterialRequisitionUnitChanged(); partial void OnStateChanging(System.Nullable value); partial void OnStateChanged(); partial void OnInvoiceCodeChanging(string value); @@ -199250,6 +199738,16 @@ namespace Model partial void OnCreateDateChanged(); partial void OnCreateUserChanging(string value); partial void OnCreateUserChanged(); + partial void OnContractIdChanging(string value); + partial void OnContractIdChanged(); + partial void OnOrderInDateChanging(System.Nullable value); + partial void OnOrderInDateChanged(); + partial void OnOrderCodeChanging(string value); + partial void OnOrderCodeChanged(); + partial void OnOrderOutDateChanging(System.Nullable value); + partial void OnOrderOutDateChanged(); + partial void OnMaterialRequisitionUnitChanging(string value); + partial void OnMaterialRequisitionUnitChanged(); #endregion public PHTGL_Invoice() @@ -199297,106 +199795,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractId", DbType="NVarChar(50)")] - public string ContractId - { - get - { - return this._ContractId; - } - set - { - if ((this._ContractId != value)) - { - this.OnContractIdChanging(value); - this.SendPropertyChanging(); - this._ContractId = value; - this.SendPropertyChanged("ContractId"); - this.OnContractIdChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderCode", DbType="NVarChar(50)")] - public string OrderCode - { - get - { - return this._OrderCode; - } - set - { - if ((this._OrderCode != value)) - { - this.OnOrderCodeChanging(value); - this.SendPropertyChanging(); - this._OrderCode = value; - this.SendPropertyChanged("OrderCode"); - this.OnOrderCodeChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderInDate", DbType="Date")] - public System.Nullable OrderInDate - { - get - { - return this._OrderInDate; - } - set - { - if ((this._OrderInDate != value)) - { - this.OnOrderInDateChanging(value); - this.SendPropertyChanging(); - this._OrderInDate = value; - this.SendPropertyChanged("OrderInDate"); - this.OnOrderInDateChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderOutDate", DbType="Date")] - public System.Nullable OrderOutDate - { - get - { - return this._OrderOutDate; - } - set - { - if ((this._OrderOutDate != value)) - { - this.OnOrderOutDateChanging(value); - this.SendPropertyChanging(); - this._OrderOutDate = value; - this.SendPropertyChanged("OrderOutDate"); - this.OnOrderOutDateChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialRequisitionUnit", DbType="NVarChar(100)")] - public string MaterialRequisitionUnit - { - get - { - return this._MaterialRequisitionUnit; - } - set - { - if ((this._MaterialRequisitionUnit != value)) - { - this.OnMaterialRequisitionUnitChanging(value); - this.SendPropertyChanging(); - this._MaterialRequisitionUnit = value; - this.SendPropertyChanged("MaterialRequisitionUnit"); - this.OnMaterialRequisitionUnitChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="Int")] public System.Nullable State { @@ -199677,6 +200075,106 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractId", DbType="NVarChar(50)")] + public string ContractId + { + get + { + return this._ContractId; + } + set + { + if ((this._ContractId != value)) + { + this.OnContractIdChanging(value); + this.SendPropertyChanging(); + this._ContractId = value; + this.SendPropertyChanged("ContractId"); + this.OnContractIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderInDate", DbType="Date")] + public System.Nullable OrderInDate + { + get + { + return this._OrderInDate; + } + set + { + if ((this._OrderInDate != value)) + { + this.OnOrderInDateChanging(value); + this.SendPropertyChanging(); + this._OrderInDate = value; + this.SendPropertyChanged("OrderInDate"); + this.OnOrderInDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderCode", DbType="NVarChar(50)")] + public string OrderCode + { + get + { + return this._OrderCode; + } + set + { + if ((this._OrderCode != value)) + { + this.OnOrderCodeChanging(value); + this.SendPropertyChanging(); + this._OrderCode = value; + this.SendPropertyChanged("OrderCode"); + this.OnOrderCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderOutDate", DbType="Date")] + public System.Nullable OrderOutDate + { + get + { + return this._OrderOutDate; + } + set + { + if ((this._OrderOutDate != value)) + { + this.OnOrderOutDateChanging(value); + this.SendPropertyChanging(); + this._OrderOutDate = value; + this.SendPropertyChanged("OrderOutDate"); + this.OnOrderOutDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialRequisitionUnit", DbType="NVarChar(100)")] + public string MaterialRequisitionUnit + { + get + { + return this._MaterialRequisitionUnit; + } + set + { + if ((this._MaterialRequisitionUnit != value)) + { + this.OnMaterialRequisitionUnitChanging(value); + this.SendPropertyChanging(); + this._MaterialRequisitionUnit = value; + this.SendPropertyChanged("MaterialRequisitionUnit"); + this.OnMaterialRequisitionUnitChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -201055,7 +201553,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReviewResults", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReviewResults", DbType="NVarChar(1000)")] public string ReviewResults { get @@ -260167,6 +260665,8 @@ namespace Model private System.Nullable _LogSource; + private EntityRef _Base_Project; + private EntityRef _Person_Persons; #region 可扩展性方法定义 @@ -260201,6 +260701,7 @@ namespace Model public Sys_Log() { + this._Base_Project = default(EntityRef); this._Person_Persons = default(EntityRef); OnCreated(); } @@ -260340,6 +260841,10 @@ namespace Model { if ((this._ProjectId != value)) { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } this.OnProjectIdChanging(value); this.SendPropertyChanging(); this._ProjectId = value; @@ -260449,6 +260954,40 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Sys_Log_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.Sys_Log.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.Sys_Log.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Sys_Log_Person_Persons", Storage="_Person_Persons", ThisKey="UserId", OtherKey="PersonId", IsForeignKey=true)] public Person_Persons Person_Persons { @@ -276285,6 +276824,634 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Tw_AntiCorrosionTrust")] + public partial class Tw_AntiCorrosionTrust : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _ProjectId; + + private string _UnitWorkId; + + private string _ConstructionPart; + + private string _ConstructionProfessional; + + private string _TrustCode; + + private string _OutputMasterId; + + private System.Nullable _DemandDate; + + private System.Nullable _CompleteDate; + + private string _CreateMan; + + private System.Nullable _CreateDate; + + private string _Remark; + + #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 OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnUnitWorkIdChanging(string value); + partial void OnUnitWorkIdChanged(); + partial void OnConstructionPartChanging(string value); + partial void OnConstructionPartChanged(); + partial void OnConstructionProfessionalChanging(string value); + partial void OnConstructionProfessionalChanged(); + partial void OnTrustCodeChanging(string value); + partial void OnTrustCodeChanged(); + partial void OnOutputMasterIdChanging(string value); + partial void OnOutputMasterIdChanged(); + partial void OnDemandDateChanging(System.Nullable value); + partial void OnDemandDateChanged(); + partial void OnCompleteDateChanging(System.Nullable value); + partial void OnCompleteDateChanged(); + partial void OnCreateManChanging(string value); + partial void OnCreateManChanged(); + partial void OnCreateDateChanging(System.Nullable value); + partial void OnCreateDateChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + #endregion + + public Tw_AntiCorrosionTrust() + { + 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="_ProjectId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorkId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string UnitWorkId + { + get + { + return this._UnitWorkId; + } + set + { + if ((this._UnitWorkId != value)) + { + this.OnUnitWorkIdChanging(value); + this.SendPropertyChanging(); + this._UnitWorkId = value; + this.SendPropertyChanged("UnitWorkId"); + this.OnUnitWorkIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionPart", DbType="NVarChar(200)")] + public string ConstructionPart + { + get + { + return this._ConstructionPart; + } + set + { + if ((this._ConstructionPart != value)) + { + this.OnConstructionPartChanging(value); + this.SendPropertyChanging(); + this._ConstructionPart = value; + this.SendPropertyChanged("ConstructionPart"); + this.OnConstructionPartChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionProfessional", DbType="NVarChar(100)")] + public string ConstructionProfessional + { + get + { + return this._ConstructionProfessional; + } + set + { + if ((this._ConstructionProfessional != value)) + { + this.OnConstructionProfessionalChanging(value); + this.SendPropertyChanging(); + this._ConstructionProfessional = value; + this.SendPropertyChanged("ConstructionProfessional"); + this.OnConstructionProfessionalChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrustCode", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] + public string TrustCode + { + get + { + return this._TrustCode; + } + set + { + if ((this._TrustCode != value)) + { + this.OnTrustCodeChanging(value); + this.SendPropertyChanging(); + this._TrustCode = value; + this.SendPropertyChanged("TrustCode"); + this.OnTrustCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OutputMasterId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string OutputMasterId + { + get + { + return this._OutputMasterId; + } + set + { + if ((this._OutputMasterId != value)) + { + this.OnOutputMasterIdChanging(value); + this.SendPropertyChanging(); + this._OutputMasterId = value; + this.SendPropertyChanged("OutputMasterId"); + this.OnOutputMasterIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DemandDate", DbType="DateTime")] + public System.Nullable DemandDate + { + get + { + return this._DemandDate; + } + set + { + if ((this._DemandDate != value)) + { + this.OnDemandDateChanging(value); + this.SendPropertyChanging(); + this._DemandDate = value; + this.SendPropertyChanged("DemandDate"); + this.OnDemandDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompleteDate", DbType="DateTime")] + public System.Nullable CompleteDate + { + get + { + return this._CompleteDate; + } + set + { + if ((this._CompleteDate != value)) + { + this.OnCompleteDateChanging(value); + this.SendPropertyChanging(); + this._CompleteDate = value; + this.SendPropertyChanged("CompleteDate"); + this.OnCompleteDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateMan", DbType="NVarChar(50)")] + public string CreateMan + { + get + { + return this._CreateMan; + } + set + { + if ((this._CreateMan != value)) + { + this.OnCreateManChanging(value); + this.SendPropertyChanging(); + this._CreateMan = value; + this.SendPropertyChanged("CreateMan"); + this.OnCreateManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateDate", DbType="DateTime")] + public System.Nullable CreateDate + { + get + { + return this._CreateDate; + } + set + { + if ((this._CreateDate != value)) + { + this.OnCreateDateChanging(value); + this.SendPropertyChanging(); + this._CreateDate = value; + this.SendPropertyChanged("CreateDate"); + this.OnCreateDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(500)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + 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.Tw_AntiCorrosionTrustDetail")] + public partial class Tw_AntiCorrosionTrustDetail : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _TrustId; + + private System.Nullable _SortIndex; + + private string _MaterialCode; + + private System.Nullable _Quantity; + + private string _PaintCode; + + private string _Primer; + + private string _IntermediatePaint; + + private string _Topcoat; + + private string _ColorCode; + + private string _Remark; + + #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 OnTrustIdChanging(string value); + partial void OnTrustIdChanged(); + partial void OnSortIndexChanging(System.Nullable value); + partial void OnSortIndexChanged(); + partial void OnMaterialCodeChanging(string value); + partial void OnMaterialCodeChanged(); + partial void OnQuantityChanging(System.Nullable value); + partial void OnQuantityChanged(); + partial void OnPaintCodeChanging(string value); + partial void OnPaintCodeChanged(); + partial void OnPrimerChanging(string value); + partial void OnPrimerChanged(); + partial void OnIntermediatePaintChanging(string value); + partial void OnIntermediatePaintChanged(); + partial void OnTopcoatChanging(string value); + partial void OnTopcoatChanged(); + partial void OnColorCodeChanging(string value); + partial void OnColorCodeChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + #endregion + + public Tw_AntiCorrosionTrustDetail() + { + 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="_TrustId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string TrustId + { + get + { + return this._TrustId; + } + set + { + if ((this._TrustId != value)) + { + this.OnTrustIdChanging(value); + this.SendPropertyChanging(); + this._TrustId = value; + this.SendPropertyChanged("TrustId"); + this.OnTrustIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] + public System.Nullable SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this.OnSortIndexChanging(value); + this.SendPropertyChanging(); + this._SortIndex = value; + this.SendPropertyChanged("SortIndex"); + this.OnSortIndexChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string MaterialCode + { + get + { + return this._MaterialCode; + } + set + { + if ((this._MaterialCode != value)) + { + this.OnMaterialCodeChanging(value); + this.SendPropertyChanging(); + this._MaterialCode = value; + this.SendPropertyChanged("MaterialCode"); + this.OnMaterialCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quantity", DbType="Decimal(18,4)")] + public System.Nullable Quantity + { + get + { + return this._Quantity; + } + set + { + if ((this._Quantity != value)) + { + this.OnQuantityChanging(value); + this.SendPropertyChanging(); + this._Quantity = value; + this.SendPropertyChanged("Quantity"); + this.OnQuantityChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PaintCode", DbType="NVarChar(50)")] + public string PaintCode + { + get + { + return this._PaintCode; + } + set + { + if ((this._PaintCode != value)) + { + this.OnPaintCodeChanging(value); + this.SendPropertyChanging(); + this._PaintCode = value; + this.SendPropertyChanged("PaintCode"); + this.OnPaintCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Primer", DbType="NVarChar(300)")] + public string Primer + { + get + { + return this._Primer; + } + set + { + if ((this._Primer != value)) + { + this.OnPrimerChanging(value); + this.SendPropertyChanging(); + this._Primer = value; + this.SendPropertyChanged("Primer"); + this.OnPrimerChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IntermediatePaint", DbType="NVarChar(300)")] + public string IntermediatePaint + { + get + { + return this._IntermediatePaint; + } + set + { + if ((this._IntermediatePaint != value)) + { + this.OnIntermediatePaintChanging(value); + this.SendPropertyChanging(); + this._IntermediatePaint = value; + this.SendPropertyChanged("IntermediatePaint"); + this.OnIntermediatePaintChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Topcoat", DbType="NVarChar(300)")] + public string Topcoat + { + get + { + return this._Topcoat; + } + set + { + if ((this._Topcoat != value)) + { + this.OnTopcoatChanging(value); + this.SendPropertyChanging(); + this._Topcoat = value; + this.SendPropertyChanged("Topcoat"); + this.OnTopcoatChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ColorCode", DbType="NVarChar(100)")] + public string ColorCode + { + get + { + return this._ColorCode; + } + set + { + if ((this._ColorCode != value)) + { + this.OnColorCodeChanging(value); + this.SendPropertyChanging(); + this._ColorCode = value; + this.SendPropertyChanged("ColorCode"); + this.OnColorCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(500)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + 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.Tw_InOutPlanDetail")] public partial class Tw_InOutPlanDetail : INotifyPropertyChanging, INotifyPropertyChanged { @@ -276402,7 +277569,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(300)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50)")] public string MaterialCode { get @@ -278931,6 +280098,236 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Tw_PaintCodeDict")] + public partial class Tw_PaintCodeDict : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _PaintCode; + + private string _Primer; + + private string _IntermediatePaint; + + private string _Topcoat; + + private string _ColorCode; + + private System.Nullable _SortIndex; + + private bool _IsUsed; + + #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 OnPaintCodeChanging(string value); + partial void OnPaintCodeChanged(); + partial void OnPrimerChanging(string value); + partial void OnPrimerChanged(); + partial void OnIntermediatePaintChanging(string value); + partial void OnIntermediatePaintChanged(); + partial void OnTopcoatChanging(string value); + partial void OnTopcoatChanged(); + partial void OnColorCodeChanging(string value); + partial void OnColorCodeChanged(); + partial void OnSortIndexChanging(System.Nullable value); + partial void OnSortIndexChanged(); + partial void OnIsUsedChanging(bool value); + partial void OnIsUsedChanged(); + #endregion + + public Tw_PaintCodeDict() + { + 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="_PaintCode", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string PaintCode + { + get + { + return this._PaintCode; + } + set + { + if ((this._PaintCode != value)) + { + this.OnPaintCodeChanging(value); + this.SendPropertyChanging(); + this._PaintCode = value; + this.SendPropertyChanged("PaintCode"); + this.OnPaintCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Primer", DbType="NVarChar(300)")] + public string Primer + { + get + { + return this._Primer; + } + set + { + if ((this._Primer != value)) + { + this.OnPrimerChanging(value); + this.SendPropertyChanging(); + this._Primer = value; + this.SendPropertyChanged("Primer"); + this.OnPrimerChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IntermediatePaint", DbType="NVarChar(300)")] + public string IntermediatePaint + { + get + { + return this._IntermediatePaint; + } + set + { + if ((this._IntermediatePaint != value)) + { + this.OnIntermediatePaintChanging(value); + this.SendPropertyChanging(); + this._IntermediatePaint = value; + this.SendPropertyChanged("IntermediatePaint"); + this.OnIntermediatePaintChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Topcoat", DbType="NVarChar(300)")] + public string Topcoat + { + get + { + return this._Topcoat; + } + set + { + if ((this._Topcoat != value)) + { + this.OnTopcoatChanging(value); + this.SendPropertyChanging(); + this._Topcoat = value; + this.SendPropertyChanged("Topcoat"); + this.OnTopcoatChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ColorCode", DbType="NVarChar(100)")] + public string ColorCode + { + get + { + return this._ColorCode; + } + set + { + if ((this._ColorCode != value)) + { + this.OnColorCodeChanging(value); + this.SendPropertyChanging(); + this._ColorCode = value; + this.SendPropertyChanged("ColorCode"); + this.OnColorCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] + public System.Nullable SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this.OnSortIndexChanging(value); + this.SendPropertyChanging(); + this._SortIndex = value; + this.SendPropertyChanged("SortIndex"); + this.OnSortIndexChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsUsed", DbType="Bit NOT NULL")] + public bool IsUsed + { + get + { + return this._IsUsed; + } + set + { + if ((this._IsUsed != value)) + { + this.OnIsUsedChanging(value); + this.SendPropertyChanging(); + this._IsUsed = value; + this.SendPropertyChanged("IsUsed"); + this.OnIsUsedChanged(); + } + } + } + + 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.Unqualified_WorkContact")] public partial class Unqualified_WorkContact : INotifyPropertyChanging, INotifyPropertyChanged { @@ -325102,7 +326499,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")] public string Name { get @@ -325679,7 +327076,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] public string PackageContent { get @@ -325870,7 +327267,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] public string PackageContent { get @@ -331209,7 +332606,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] public string PackageContent { get @@ -332681,7 +334078,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] public string PackageContent { get @@ -342582,7 +343979,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(1500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(500)")] public string ContractNo { get @@ -342602,7 +343999,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(1500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(500)")] public string UnitWorks { get diff --git a/SGGL/Model/Model.csproj b/SGGL/Model/Model.csproj index 0371a7f1..415dbd1a 100644 --- a/SGGL/Model/Model.csproj +++ b/SGGL/Model/Model.csproj @@ -232,6 +232,9 @@ + + +