diff --git a/.vs/SGGL_SeDin_New/v17/.wsuo b/.vs/SGGL_SeDin_New/v17/.wsuo index c9ebe860..60ab5882 100644 Binary files a/.vs/SGGL_SeDin_New/v17/.wsuo and b/.vs/SGGL_SeDin_New/v17/.wsuo differ diff --git a/.vs/SGGL_SeDin_New/v17/DocumentLayout.backup.json b/.vs/SGGL_SeDin_New/v17/DocumentLayout.backup.json index 526a4537..d8a6cc55 100644 --- a/.vs/SGGL_SeDin_New/v17/DocumentLayout.backup.json +++ b/.vs/SGGL_SeDin_New/v17/DocumentLayout.backup.json @@ -11,10 +11,6 @@ "DockedWidth": 386, "SelectedChildIndex": -1, "Children": [ - { - "$type": "Bookmark", - "Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}" - }, { "$type": "Bookmark", "Name": "ST:0:0:{e506b91c-c606-466a-90a9-123d1d1e12b3}" diff --git a/.vs/SGGL_SeDin_New/v17/DocumentLayout.json b/.vs/SGGL_SeDin_New/v17/DocumentLayout.json index 526a4537..d8a6cc55 100644 --- a/.vs/SGGL_SeDin_New/v17/DocumentLayout.json +++ b/.vs/SGGL_SeDin_New/v17/DocumentLayout.json @@ -11,10 +11,6 @@ "DockedWidth": 386, "SelectedChildIndex": -1, "Children": [ - { - "$type": "Bookmark", - "Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}" - }, { "$type": "Bookmark", "Name": "ST:0:0:{e506b91c-c606-466a-90a9-123d1d1e12b3}" diff --git a/DataBase/版本日志/SGGLDB_V2025-04-18-001.sql b/DataBase/版本日志/SGGLDB_V2025-04-18-001.sql new file mode 100644 index 00000000..506a5ea3 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2025-04-18-001.sql @@ -0,0 +1,101 @@ + + +ALTER VIEW [dbo].[View_Batch_BatchTrustItem] +AS +/********无损委托********/ +SELECT +ROW_NUMBER() OVER(ORDER BY WeldJointCode) AS Number, +BatchTrustItem.TrustBatchItemId, +BatchTrustItem.TrustBatchId, +BatchTrustItem.PointBatchItemId, +BatchTrustItem.WeldJointId, +BatchTrustItem.CreateDate, +BatchTrustItem.TrustNum, +BatchTrust.TrustType, +BatchTrustItem.RepairNum, +BatchTrust.TrustBatchCode, --委托单号 +BatchTrust.ProjectId, +UnitWork.UnitWorkCode, --单位工程 +pipe.PipelineCode, --管线号 +pipingClass.PipingClassCode, --管线等级 +jot.WeldJointCode+isnull((select top 1 RepairMark from [dbo].[HJGL_RepairRecord] where [WeldJointId]=BatchTrustItem.WeldJointId and RepairRecordId=BatchTrustItem.RepairRecordId),'')+(case when PointBatchItem.PointState='2' then 'K' else '' end) as WeldJointCode, --焊口号 +mat.MaterialCode, --材质 +jot.JointArea, --焊接区域 +welder.WelderCode AS WelderCode, --焊工号 +weldType.WeldTypeCode, --焊缝类型 +jot.Dia, --外径 +jot.Size, --寸径 +jot.Thickness, --壁厚 +method.WeldingMethodCode, --焊接方法 +rate.DetectionRateCode, +null as CheckDefects, +PointBatchItem.PointDate --点口日期 + + +FROM dbo.HJGL_Batch_BatchTrustItem AS BatchTrustItem +LEFT JOIN dbo.HJGL_Batch_BatchTrust AS BatchTrust ON BatchTrust.TrustBatchId=BatchTrustItem.TrustBatchId +LEFT JOIN dbo.HJGL_Batch_PointBatchItem AS PointBatchItem ON PointBatchItem.PointBatchItemId=BatchTrustItem.PointBatchItemId +LEFT JOIN dbo.HJGL_Batch_PointBatch point ON point.PointBatchId = PointBatchItem.PointBatchId +LEFT JOIN dbo.Base_DetectionRate rate ON rate.DetectionRateId = point.DetectionRateId +LEFT JOIN dbo.HJGL_WeldJoint jot ON jot.WeldJointId = BatchTrustItem.WeldJointId +LEFT JOIN dbo.HJGL_Pipeline pipe ON pipe.PipelineId = jot.PipelineId +LEFT JOIN Base_PipingClass AS pipingClass ON PipingClass.PipingClassId=pipe.PipingClassId +LEFT JOIN dbo.WBS_UnitWork UnitWork ON UnitWork.UnitWorkId = BatchTrust.UnitWorkId +LEFT JOIN dbo.Base_WeldType weldType ON weldType.WeldTypeId = jot.WeldTypeId +LEFT JOIN dbo.SitePerson_Person welder ON welder.PersonId = jot.BackingWelderId and welder.ProjectId=BatchTrust.ProjectId +LEFT JOIN dbo.Base_Material mat ON mat.MaterialId = jot.Material1Id +LEFT JOIN dbo.Base_WeldingMethod method ON method.WeldingMethodId = jot.WeldingMethodId + + + + + + + + + +GO + + + + +ALTER VIEW [dbo].[View_GenerateTrustItem] +AS +SELECT point.ProjectId,point.UnitWorkId ,point.UnitId,point.DetectionTypeId,point.DetectionRateId, + --上面是条件 + pipe.PipelineCode, --管线号 +pipingClass.PipingClassCode, --管线等级 +jot.WeldJointCode+isnull((select RepairMark from [dbo].[HJGL_RepairRecord] where [WeldJointId]=trustItem.WeldJointId),'')+(case when pointItem.PointState='2' then 'K' else '' end) as WeldJointCode, --焊口号 +mat.MaterialCode, --材质 +jot.JointArea, --焊接区域 +welder.WelderCode AS WelderCode, --焊工号 +weldType.WeldTypeCode, --焊缝类型 +jot.Dia, --外径 +jot.Size, --寸径 +jot.Thickness, --壁厚 +method.WeldingMethodCode, --焊接方法 +rate.DetectionRateCode, +pointItem.PointDate, --点口日期 + pointItem.PointBatchItemId,pointItem.PointBatchId,pointItem.WeldJointId +FROM dbo.HJGL_Batch_PointBatchItem pointItem +LEFT JOIN dbo.HJGL_Batch_PointBatch point ON point.PointBatchId = pointItem.PointBatchId +LEFT JOIN dbo.HJGL_WeldJoint jot ON jot.WeldJointId = pointItem.WeldJointId +LEFT JOIN dbo.HJGL_Pipeline pipe ON pipe.PipelineId = jot.PipelineId +LEFT JOIN Base_PipingClass AS pipingClass ON PipingClass.PipingClassId=pipe.PipingClassId +LEFT JOIN dbo.HJGL_Batch_BatchTrustItem trustItem ON trustItem.PointBatchItemId = pointItem.PointBatchItemId +LEFT JOIN dbo.Base_Material mat ON mat.MaterialId = jot.Material1Id +LEFT JOIN dbo.Base_WeldType weldType ON weldType.WeldTypeId = jot.WeldTypeId +LEFT JOIN dbo.SitePerson_Person welder ON welder.PersonId = jot.BackingWelderId and welder.ProjectId=point.ProjectId +LEFT JOIN dbo.Base_WeldingMethod method ON method.WeldingMethodId = jot.WeldingMethodId +LEFT JOIN dbo.Base_DetectionRate rate ON rate.DetectionRateId = point.DetectionRateId +WHERE pointItem.PointState IS NOT NULL AND pointItem.CutDate IS NULL + AND trustItem.TrustBatchItemId IS NULL + + + + +GO + + + + diff --git a/DataBase/版本日志/SGGLDB_V2025-05-08-001.sql b/DataBase/版本日志/SGGLDB_V2025-05-08-001.sql new file mode 100644 index 00000000..753b191e --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2025-05-08-001.sql @@ -0,0 +1,96 @@ + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('EEC0D060-C15E-4D25-B015-C2B91F735DAC','车次管理','HJGL/PreDesign/TrainNumberManager.aspx',40,'1E36EA73-D536-4215-BFB9-A8771937BD89','Menu_HJGL',0,1,1) + GO + /*'车次管理*/ + INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('75ED227C-3DB8-4F6D-8AC3-B0B3FD8D21AC','EEC0D060-C15E-4D25-B015-C2B91F735DAC','增加',1) + INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('B4295318-92C4-4072-9F30-6E50CB2E007D','EEC0D060-C15E-4D25-B015-C2B91F735DAC','修改',2) + INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('35D1601D-ED59-4C0B-8069-178B2780310E','EEC0D060-C15E-4D25-B015-C2B91F735DAC','保存',3) + INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('99A2A6C8-A679-4FAF-942C-B663BFE9B9D9','EEC0D060-C15E-4D25-B015-C2B91F735DAC','查看',4) + INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('DC684D40-EE08-4689-A2D1-73AC4EB04B60','EEC0D060-C15E-4D25-B015-C2B91F735DAC','删除',5) + GO + + alter table dbo.HJGL_PackagingManage + add TypeInt int + go + + + create table dbo.HJGL_PackagingManageDetail + ( + Id nvarchar(50) not null + constraint HJGL_PackagingManageDetail_pk + primary key, + PackagingManageId nvarchar(50), + PipelineId nvarchar(50), + PipelineComponentId nvarchar(50), + MaterialCode nvarchar(50), + Number decimal(9, 2), + CreateTime datetime, + CreateUser nvarchar(50), + + ) +create table dbo.HJGL_TrainNumberManage +( + Id nvarchar(50) not null + constraint PK_HJGL_TrainNumberManage + primary key, + TrainNumber nvarchar(50), + ProjectId nvarchar(50), + State int, + DriverName nvarchar(50), + DriverPhone nvarchar(50), + LicensePlateNumber nvarchar(50), + ContactName nvarchar(50), + ContactPhone nvarchar(50), + Remark nvarchar(800), +) +go + +exec sp_addextendedproperty 'MS_Description', N'主键', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN', + 'Id' +go + +exec sp_addextendedproperty 'MS_Description', N'驾驶员姓名', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN', + 'DriverName' +go +exec sp_addextendedproperty 'MS_Description', N'驾驶员电话', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN', + 'DriverPhone' +go +exec sp_addextendedproperty 'MS_Description', N'车牌号', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN', + 'LicensePlateNumber' +go +exec sp_addextendedproperty 'MS_Description', N'联系人姓名', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN', + 'ContactName' +go +exec sp_addextendedproperty 'MS_Description', N'联系人电话', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN', + 'ContactPhone' +go +exec sp_addextendedproperty 'MS_Description', N'车次', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN', + 'TrainNumber' +go +exec sp_addextendedproperty 'MS_Description', N'项目id', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN', + 'ProjectId' +go + +exec sp_addextendedproperty 'MS_Description', N'状态', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN', + 'State' +go + +exec sp_addextendedproperty 'MS_Description', N'备注', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN', + 'Remark' +go + +exec sp_addextendedproperty 'MS_Description', N'车次管理表', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage' +go + +alter table dbo.HJGL_PackagingManage + add TrainNumberId varchar(50) +go +alter table dbo.HJGL_PackagingManage + add TypeInt int +go +exec sp_addextendedproperty 'MS_Description', N'车次管理主键id', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_PackagingManage', + 'COLUMN', 'TrainNumberId' +go +exec sp_addextendedproperty 'MS_Description', N'包装类别', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_PackagingManage', + 'COLUMN', 'TypeInt' +go \ No newline at end of file diff --git a/DataBase/菜单初始化脚本/1-5焊接管理(Menu_HJGL).sql b/DataBase/菜单初始化脚本/1-5焊接管理(Menu_HJGL).sql index 1d2fb0b4..f205aa29 100644 --- a/DataBase/菜单初始化脚本/1-5焊接管理(Menu_HJGL).sql +++ b/DataBase/菜单初始化脚本/1-5焊接管理(Menu_HJGL).sql @@ -128,6 +128,16 @@ GO INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('41655145-E541-42A6-B975-4CF2B19DA31D','F18CFC0E-47E0-477A-9AB3-72B88D438299','鿴',4) INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('5D69F8CE-44D4-44D7-9C52-4A379B894D38','F18CFC0E-47E0-477A-9AB3-72B88D438299','ɾ',5) GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('EEC0D060-C15E-4D25-B015-C2B91F735DAC','ι','HJGL/PreDesign/TrainNumberManager.aspx',40,'1E36EA73-D536-4215-BFB9-A8771937BD89','Menu_HJGL',0,1,1) + GO + /*'װ*/ + INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('75ED227C-3DB8-4F6D-8AC3-B0B3FD8D21AC','EEC0D060-C15E-4D25-B015-C2B91F735DAC','',1) + INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('B4295318-92C4-4072-9F30-6E50CB2E007D','EEC0D060-C15E-4D25-B015-C2B91F735DAC','޸',2) + INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('35D1601D-ED59-4C0B-8069-178B2780310E','EEC0D060-C15E-4D25-B015-C2B91F735DAC','',3) + INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('99A2A6C8-A679-4FAF-942C-B663BFE9B9D9','EEC0D060-C15E-4D25-B015-C2B91F735DAC','鿴',4) + INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('DC684D40-EE08-4689-A2D1-73AC4EB04B60','EEC0D060-C15E-4D25-B015-C2B91F735DAC','ɾ',5) + GO INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('25DED954-10C9-47CC-99F2-C44FDE9E0A81','װ','HJGL/PreDesign/PackagingManage.aspx',40,'1E36EA73-D536-4215-BFB9-A8771937BD89','Menu_HJGL',0,1,1) GO diff --git a/SGGL/.vscode/settings.json b/SGGL/.vscode/settings.json new file mode 100644 index 00000000..013007bb --- /dev/null +++ b/SGGL/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dotnet.preferCSharpExtension": true +} \ No newline at end of file diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 5e1398c9..1cf2f498 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -405,7 +405,9 @@ + + diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 153ce344..5a9981a1 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -2952,6 +2952,10 @@ namespace BLL /// 包装管理 /// public const string HJGL_PackagingManageMenuId = "25DED954-10C9-47CC-99F2-C44FDE9E0A81"; + /// + /// 车次管理 + /// + public const string HJGL_TrainNumberManageMenuId = "EEC0D060-C15E-4D25-B015-C2B91F735DAC"; #endregion #region 数据导入 diff --git a/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs b/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs index 9e8d18c3..63a82ecb 100644 --- a/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs +++ b/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs @@ -21,6 +21,9 @@ namespace BLL public string PackagingCode { get; set; } public string ProjectId { get; set; } public string ProjectName { get; set; } + public string DriverName { get; set; } + public string DriverPhone { get; set; } + public string LicensePlateNumber { get; set; } public string ContactName { get; set; } public string ContactPhone { get; set; } public string StackingPosition { get; set; } @@ -32,6 +35,7 @@ namespace BLL public string Code { get; set; } public string TrainNumber { get; set; } + public string TrainNumberOld { get; set; } } @@ -56,56 +60,19 @@ namespace BLL list[2] = new ListItem("已到场", state_2.ToString()); return list; } - #region 获取列表 - /// - /// 记录数 - /// - public static int count - { - get; - set; - } - /// 获取分页列表 - /// - /// 页码 - /// 每页数量 - /// - public static IEnumerable getListData(string name, Grid Grid1) + public enum TypeInt : int { - var db1 = Funs.DB; - IQueryable q1 = (from x in db1.HJGL_PackagingManage - join y in db1.HJGL_Pipeline_Component on x.PipelineComponentId equals y.PipelineComponentId - join z in db1.HJGL_Pipeline on y.PipelineId equals z.PipelineId - select x - ); - if (!string.IsNullOrEmpty(name)) - { - q1 = q1.Where(e => e.PackagingManageId.Contains(name)); - } - count = q1.Count(); - if (count == 0) - { - return null; - } - q1 = SortConditionHelper.SortingAndPaging(q1, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); - return from x in q1 - select new - { - x.PackagingManageId, - x.PackagingCode, - x.ProjectId, - x.PipelineComponentId, - x.StackingPosition, - x.State, - x.ContactName, - x.ContactPhone, - x.Remark, - x.TrainNumber - }; + 预制组件 = 10, + 预制散件 = 20, + 其他材料 = 30, } - #endregion - + public static Dictionary TypeIntMap = new Dictionary + { + { "预制组件" ,(int)TypeInt.预制组件}, + { "预制散件" ,(int)TypeInt.预制散件}, + { "其他材料" ,(int)TypeInt.其他材料}, + }; public static Model.HJGL_PackagingManage GetHJGL_PackagingManageById(string PackagingManageId) { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) @@ -128,37 +95,52 @@ namespace BLL } return PlanStartDate; } - public static List GetPackagingManageList(string projectId, string PackagingCode, int pageIndex, int pageSize) + public static (List Data, int Total) GetPackagingManageList(string projectId, string PackagingCode, int pageIndex = 0, int pageSize = 20) { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - var q = (from x in db.HJGL_PackagingManage + var baseQuery = (from x in db.HJGL_PackagingManage join n in db.Base_Project on x.ProjectId equals n.ProjectId - join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into tt + join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into tt from t in tt.DefaultIfEmpty() - where x.ProjectId == projectId + join train in db.HJGL_TrainNumberManage on x.TrainNumberId equals train.Id into trains + from train in trains.DefaultIfEmpty() + where x.ProjectId == projectId && (string.IsNullOrEmpty(PackagingCode) || x.PackagingCode.Contains(PackagingCode)) select new PackagingManageItem { PackagingManageId = x.PackagingManageId, PackagingCode = x.PackagingCode, ProjectName = n.ProjectName, - ContactName = x.ContactName, - ContactPhone = x.ContactPhone, + ContactName = train.ContactName, + ContactPhone = train.ContactPhone, + DriverName = train.DriverName, + DriverPhone = train.DriverPhone, + LicensePlateNumber = train.LicensePlateNumber, StackingPosition = x.StackingPosition, State = x.State, ReceiveMan = t.PersonName, ReceiveDate = x.ReceiveDate.HasValue ? string.Format("{0:g}", x.ReceiveDate) : "", PlanStartDate = GetMinPlanStartDate(x.PackagingManageId), - TrainNumber = x.TrainNumber, + TrainNumberOld = x.TrainNumber, + TrainNumber = train.TrainNumber, Code = x.PackagingCode.Substring(0, x.PackagingCode.LastIndexOf("-")).Substring(x.PackagingCode.Substring(0, x.PackagingCode.LastIndexOf("-")).LastIndexOf("-") + 1), }).Distinct(); - return q.OrderByDescending(x => x.Code).Skip(pageIndex * pageSize).Take(pageSize).ToList(); + + var pagedData = baseQuery + .OrderByDescending(x => x.Code) + .Skip((pageIndex) * pageSize) + .Take(pageSize) + .ToList(); + + // 获取总记录数(延迟计数优化) + var totalCount = baseQuery.Count(); + return (pagedData, totalCount); } - } + } /// /// 形成出库单 /// @@ -233,7 +215,9 @@ namespace BLL Remark = newtable.Remark, ReceiveDate = newtable.ReceiveDate, ReceiveMan = newtable.ReceiveMan, - TrainNumber = newtable.TrainNumber + TrainNumber = newtable.TrainNumber, + TrainNumberId = newtable.TrainNumberId, + TypeInt = newtable.TypeInt, }; var db1 = Funs.DB; db1.HJGL_PackagingManage.InsertOnSubmit(table); @@ -259,6 +243,8 @@ namespace BLL table.ReceiveMan = newtable.ReceiveMan; table.ReceiveDate = newtable.ReceiveDate; table.TrainNumber = newtable.TrainNumber; + table.TrainNumberId = newtable.TrainNumberId; + table.TypeInt = newtable.TypeInt; db1.SubmitChanges(); } diff --git a/SGGL/BLL/HJGL/PreDesign/PackagingmanagedetailService.cs b/SGGL/BLL/HJGL/PreDesign/PackagingmanagedetailService.cs new file mode 100644 index 00000000..57ccb6d5 --- /dev/null +++ b/SGGL/BLL/HJGL/PreDesign/PackagingmanagedetailService.cs @@ -0,0 +1,201 @@ +using FineUIPro; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + +namespace BLL +{ + + public static class PackagingmanagedetailService + { + + + + #region 获取列表 + /// + /// 记录数 + /// + public static int Count + { + get; + set; + } + private static IQueryable GetByQueryModle(Model.HJGL_PackagingManageDetail table) + { + var q = from x in Funs.DB.HJGL_PackagingManageDetail select x; + if (table == null) + { + return q; + } + if (!string.IsNullOrEmpty(table.Id)) + { + q = q.Where(x => x.Id.Contains(table.Id)); + } + if (!string.IsNullOrEmpty(table.PackagingManageId)) + { + q = q.Where(x => x.PackagingManageId.Contains(table.PackagingManageId)); + } + if (!string.IsNullOrEmpty(table.PipelineId)) + { + q = q.Where(x => x.PipelineId.Contains(table.PipelineId)); + } + if (!string.IsNullOrEmpty(table.PipelineComponentId)) + { + q = q.Where(x => x.PipelineComponentId.Contains(table.PipelineComponentId)); + } + if (!string.IsNullOrEmpty(table.MaterialCode)) + { + q = q.Where(x => x.MaterialCode.Contains(table.MaterialCode)); + } + if (table.Number != null) + { + q = q.Where(x => x.Number == table.Number); + } + if (table.CreateTime != null) + { + q = q.Where(x => x.CreateTime == table.CreateTime); + } + if (!string.IsNullOrEmpty(table.CreateUser)) + { + q = q.Where(x => x.CreateUser.Contains(table.CreateUser)); + } + ; + + return q; + } + public static List GetListByQueryModle(Model.HJGL_PackagingManageDetail table) + { + return GetByQueryModle(table).ToList(); + + } + public static (List Data, int Total) GetListByQueryModle(Model.HJGL_PackagingManageDetail table, int pageIndex = 0, int pageSize = 20) + { + var baseQuery = GetByQueryModle(table); + var pagedData = baseQuery + .Skip((pageIndex) * pageSize) + .Take(pageSize) + .ToList(); + + // 获取总记录数(延迟计数优化) + var totalCount = baseQuery.Count(); + + return (pagedData, totalCount); + + } + /// + /// 获取分页列表 + /// + /// + /// + /// + public static IEnumerable GetListData(Model.HJGL_PackagingManageDetail table, Grid grid1) + { + var q = GetByQueryModle(table); + Count = q.Count(); + if (Count == 0) + { + return null; + } + q = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize); + // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return from x in q + select new + { + x.Id, + x.PackagingManageId, + x.PipelineId, + x.PipelineComponentId, + x.MaterialCode, + x.Number, + x.CreateTime, + x.CreateUser, + + }; + } + + #endregion + + public static Model.HJGL_PackagingManageDetail GetModelById(string Id) + { + return Funs.DB.HJGL_PackagingManageDetail.FirstOrDefault(x => x.Id == Id); + } + public static IEnumerable GetPackagingData(string PackagingManageId) + { + var q = from detail in Funs.DB.HJGL_PackagingManageDetail + join lib in Funs.DB.HJGL_MaterialCodeLib on detail.MaterialCode equals lib.MaterialCode into libJoin + from libItem in libJoin.DefaultIfEmpty() + join line in Funs.DB.HJGL_Pipeline on detail.PipelineId equals line.PipelineId into lineJoin + from lineItem in lineJoin.DefaultIfEmpty() + where detail.PackagingManageId == PackagingManageId + select new + { + detail.Id, + libItem.MaterialCode, + libItem.MaterialName, + libItem.MaterialUnit, + libItem.MaterialSpec, + libItem.MaterialMade, + libItem.MaterialDef, + detail.Number, + lineItem.PipelineId, + lineItem.PipelineCode, + + }; + return q; + } + + + public static void Add(Model.HJGL_PackagingManageDetail newtable) + { + + Model.HJGL_PackagingManageDetail table = new Model.HJGL_PackagingManageDetail + { + Id = newtable.Id, + PackagingManageId = newtable.PackagingManageId, + PipelineId = newtable.PipelineId, + PipelineComponentId = newtable.PipelineComponentId, + MaterialCode = newtable.MaterialCode, + Number = newtable.Number, + CreateTime = newtable.CreateTime, + CreateUser = newtable.CreateUser, + }; + Funs.DB.HJGL_PackagingManageDetail.InsertOnSubmit(table); + Funs.DB.SubmitChanges(); + } + + + public static void Update(Model.HJGL_PackagingManageDetail newtable) + { + + Model.HJGL_PackagingManageDetail table = Funs.DB.HJGL_PackagingManageDetail.FirstOrDefault(x => x.Id == newtable.Id); + if (table != null) + { + table.Id = newtable.Id; + table.PackagingManageId = newtable.PackagingManageId; + table.PipelineId = newtable.PipelineId; + table.PipelineComponentId = newtable.PipelineComponentId; + table.MaterialCode = newtable.MaterialCode; + table.Number = newtable.Number; + table.CreateTime = newtable.CreateTime; + table.CreateUser = newtable.CreateUser; + Funs.DB.SubmitChanges(); + } + + } + public static void DeleteById(string Id) + { + + Model.HJGL_PackagingManageDetail table = Funs.DB.HJGL_PackagingManageDetail.FirstOrDefault(x => x.Id == Id); + if (table != null) + { + Funs.DB.HJGL_PackagingManageDetail.DeleteOnSubmit(table); + Funs.DB.SubmitChanges(); + } + + } + + } +} \ No newline at end of file diff --git a/SGGL/BLL/HJGL/PreDesign/TrainNumberManageService.cs b/SGGL/BLL/HJGL/PreDesign/TrainNumberManageService.cs new file mode 100644 index 00000000..acb3a45f --- /dev/null +++ b/SGGL/BLL/HJGL/PreDesign/TrainNumberManageService.cs @@ -0,0 +1,202 @@ +using FineUIPro; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace BLL +{ + public static class TrainNumberManageService + { + /// + /// 记录数 + /// + public static int Count + { + get; + set; + } + + private static IQueryable GetByQueryModle(Model.HJGL_TrainNumberManage table) + { + var q = from x in Funs.DB.HJGL_TrainNumberManage select x; + if (table == null) + { + return q; + } + if (!string.IsNullOrEmpty(table.Id)) + { + q = q.Where(x => x.Id.Contains(table.Id)); + } + if (!string.IsNullOrEmpty(table.TrainNumber)) + { + q = q.Where(x => x.TrainNumber.Contains(table.TrainNumber)); + } + if (!string.IsNullOrEmpty(table.ProjectId)) + { + q = q.Where(x => x.ProjectId.Contains(table.ProjectId)); + } + if (table.State != null) + { + q = q.Where(x => x.State == table.State); + } + if (!string.IsNullOrEmpty(table.DriverName)) + { + q = q.Where(x => x.DriverName.Contains(table.DriverName)); + } + if (!string.IsNullOrEmpty(table.DriverPhone)) + { + q = q.Where(x => x.DriverPhone.Contains(table.DriverPhone)); + } + if (!string.IsNullOrEmpty(table.LicensePlateNumber)) + { + q = q.Where(x => x.LicensePlateNumber.Contains(table.LicensePlateNumber)); + } + if (!string.IsNullOrEmpty(table.ContactName)) + { + q = q.Where(x => x.ContactName.Contains(table.ContactName)); + } + if (!string.IsNullOrEmpty(table.ContactPhone)) + { + q = q.Where(x => x.ContactPhone.Contains(table.ContactPhone)); + } + if (!string.IsNullOrEmpty(table.Remark)) + { + q = q.Where(x => x.Remark.Contains(table.Remark)); + } + q = q.OrderByDescending(x => x.TrainNumber); + + return q; + } + + public static List GetListByQueryModle(Model.HJGL_TrainNumberManage table) + { + return GetByQueryModle(table).ToList(); + } + + public static (List Data, int Total) GetListByQueryModle(Model.HJGL_TrainNumberManage table, int pageIndex = 0, int pageSize = 20) + { + var baseQuery = GetByQueryModle(table); + var pagedData = baseQuery + .Skip((pageIndex) * pageSize) + .Take(pageSize) + .ToList(); + + // 获取总记录数(延迟计数优化) + var totalCount = baseQuery.Count(); + + return (pagedData, totalCount); + } + + /// + /// 获取分页列表 + /// + /// + /// + /// + public static IEnumerable GetListData(Model.HJGL_TrainNumberManage table, Grid grid1) + { + var q = GetByQueryModle(table); + Count = q.Count(); + if (Count == 0) + { + return null; + } + q = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize); + // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return from x in q + select new + { + x.Id, + x.TrainNumber, + x.ProjectId, + x.State, + x.DriverName, + x.DriverPhone, + x.LicensePlateNumber, + x.ContactName, + x.ContactPhone, + x.Remark, + }; + } + + public static Model.HJGL_TrainNumberManage GetModelById(string Id) + { + return Funs.DB.HJGL_TrainNumberManage.FirstOrDefault(x => x.Id == Id); + } + + //根据projectid 获取最新车次号 + public static string GetNewTrainNumber(string ProjectId) + { + var q = from x in Funs.DB.HJGL_TrainNumberManage + where x.ProjectId == ProjectId + select x.TrainNumber; + var max = q.Count(); + var NewTrainNumber=(max+1).ToString().PadLeft(2, '0'); + return NewTrainNumber; + + } + + public static void Add(Model.HJGL_TrainNumberManage newtable) + { + Model.HJGL_TrainNumberManage table = new Model.HJGL_TrainNumberManage + { + Id = newtable.Id, + TrainNumber = newtable.TrainNumber, + ProjectId = newtable.ProjectId, + State = newtable.State, + DriverName = newtable.DriverName, + DriverPhone = newtable.DriverPhone, + LicensePlateNumber = newtable.LicensePlateNumber, + ContactName = newtable.ContactName, + ContactPhone = newtable.ContactPhone, + Remark = newtable.Remark, + }; + Funs.DB.HJGL_TrainNumberManage.InsertOnSubmit(table); + Funs.DB.SubmitChanges(); + } + + public static void Update(Model.HJGL_TrainNumberManage newtable) + { + Model.HJGL_TrainNumberManage table = Funs.DB.HJGL_TrainNumberManage.FirstOrDefault(x => x.Id == newtable.Id); + if (table != null) + { + table.Id = newtable.Id; + table.TrainNumber = newtable.TrainNumber; + table.ProjectId = newtable.ProjectId; + table.State = newtable.State; + table.DriverName = newtable.DriverName; + table.DriverPhone = newtable.DriverPhone; + table.LicensePlateNumber = newtable.LicensePlateNumber; + table.ContactName = newtable.ContactName; + table.ContactPhone = newtable.ContactPhone; + table.Remark = newtable.Remark; + Funs.DB.SubmitChanges(); + } + } + + public static void DeleteById(string Id) + { + Model.HJGL_TrainNumberManage table = Funs.DB.HJGL_TrainNumberManage.FirstOrDefault(x => x.Id == Id); + if (table != null) + { + Funs.DB.HJGL_TrainNumberManage.DeleteOnSubmit(table); + Funs.DB.SubmitChanges(); + } + } + + public static void InitDownListOfTrainNumber(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease) + { + Model.HJGL_TrainNumberManage table = new Model.HJGL_TrainNumberManage(); + table.ProjectId = projectId; + + dropName.DataValueField = "Id"; + dropName.DataTextField = "TrainNumber"; + dropName.DataSource = GetListByQueryModle(table); + dropName.DataBind(); + if (isShowPlease) + { + Funs.FineUIPleaseSelect(dropName); + } + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 884338d2..41f14550 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1553,8 +1553,12 @@ + + + + @@ -10544,6 +10548,20 @@ PackagingManageEdit.aspx + + PackagingManageSelect.aspx + ASPXCodeBehind + + + PackagingManageSelect.aspx + + + PackagingManageSelectStock.aspx + ASPXCodeBehind + + + PackagingManageSelectStock.aspx + PackagingManageView.aspx ASPXCodeBehind @@ -10558,6 +10576,20 @@ PrePipelineQRCodeIn.aspx + + TrainNumberManager.aspx + ASPXCodeBehind + + + TrainNumberManager.aspx + + + TrainNumberManageEdit.aspx + ASPXCodeBehind + + + TrainNumberManageEdit.aspx + YardPlanning.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx index f323f9e1..7c753271 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx @@ -49,7 +49,10 @@ --%> - + + + @@ -59,6 +62,15 @@ + + + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs index 1e440eb3..562bbcdb 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs @@ -66,10 +66,9 @@ namespace FineUIPro.Web.HJGL.PreDesign //var table = this.GetPagedDataTable(Grid1, tb); //Grid1.DataSource = table; //Grid1.DataBind(); - var list2 = BLL.HJGL_PackagingmanageService.GetPackagingManageList(this.CurrUser.LoginProjectId, this.txtPackagingCode.Text.Trim(), 0, 10000); var list = BLL.HJGL_PackagingmanageService.GetPackagingManageList(this.CurrUser.LoginProjectId, this.txtPackagingCode.Text.Trim(), this.Grid1.PageIndex, this.Grid1.PageSize); - Grid1.RecordCount = list2.Count; - Grid1.DataSource = list; + Grid1.RecordCount = list.Total; + Grid1.DataSource = list.Data; Grid1.DataBind(); } #endregion diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx index b0e9b881..147a8c7e 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx @@ -14,19 +14,23 @@ - <%-- - --%> - - - + + + + + + + + + - <%-- - --%> - - - - - <%-- - --%> - - - - - - - - - - - - - - + + + + + + + <%-- + --%> + + + + + + + + + + @@ -100,6 +135,11 @@ + diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs index 1bae74d9..171f7ac5 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs @@ -26,29 +26,37 @@ namespace FineUIPro.Web.HJGL.PreDesign if (!IsPostBack) { PackagingManageId = Request.Params["PackagingManageId"]; - //HJGL_PipelineComponentService.InitPipelineDownList(drpPipelineComponentCode, this.CurrUser.LoginProjectId, false); + TrainNumberManageService.InitDownListOfTrainNumber(drpTrainNumber, this.CurrUser.LoginProjectId, false); + + drpTypeInt.DataTextField = "Key"; + drpTypeInt.DataValueField = "Value"; + drpTypeInt.DataSource = HJGL_PackagingmanageService.TypeIntMap; + drpTypeInt.DataBind(); + + BindGrid(); - //HJGL_PackagingmanageService.InitPipelineDownList(txtPackagingCode, this.CurrUser.LoginProjectId, false); btnClose.OnClientClick = ActiveWindow.GetHideReference(); if (!string.IsNullOrEmpty(PackagingManageId)) { var model = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(PackagingManageId); txtPackagingCode.Text = model.PackagingCode; - dropPipelineComponentCode.Values = model.PipelineComponentId.Split(','); - txtStackingPosition.Text = model.StackingPosition; - txtContactName.Text = model.ContactName; - txtContactPhone.Text = model.ContactPhone; - txtTrainNumber.Text = model.TrainNumber; + dropPipelineComponentCode.Values = model.PipelineComponentId?.Split(','); + txtStackingPosition.Text = model.StackingPosition; + drpTrainNumber.SelectedValue = model.TrainNumberId; + drpTypeInt.SelectedValue = model.TypeInt.ToString(); + BindGrid2(this.PackagingManageId); if (model.State== HJGL_PackagingmanageService.state_0) { btnSave.Hidden = false; } } else - {btnSave.Hidden = false; + { + btnSave.Hidden = false; txtPackagingCode.Text = ProjectService.GetProjectCodeByProjectId(this.CurrUser.LoginProjectId)+"-"+ string.Format("{0:yyyyMMdd}", DateTime.Now)+"-"; } + drpTypeInt_SelectedIndexChanged(null, null); } } @@ -60,6 +68,12 @@ namespace FineUIPro.Web.HJGL.PreDesign Grid1 .DataBind(); } + private void BindGrid2(string PackagingManageId) + { + Grid2.DataSource = PackagingmanagedetailService.GetPackagingData(PackagingManageId); + Grid2.DataBind(); + } + //protected void drpPipelineComponentCode_SelectedIndexChanged(object sender, EventArgs e) //{ // if (!string .IsNullOrEmpty(drpPipelineComponentCode.SelectedValue)) @@ -77,26 +91,35 @@ namespace FineUIPro.Web.HJGL.PreDesign //} protected void btnSave_Click(object sender, EventArgs e) + { + Save(); + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + + private void Save() { - /*if (dropPipelineComponentCode.Values.Length==0) - { - ShowNotify("请选择预制组件", MessageBoxIcon.Warning); - return; - }*/ if (string.IsNullOrEmpty(PackagingManageId)) { - Model.HJGL_PackagingManage table = new Model.HJGL_PackagingManage() ; - + Model.HJGL_PackagingManage table = new Model.HJGL_PackagingManage(); + table.PackagingManageId = SQLHelper.GetNewID(); table.PackagingCode = txtPackagingCode.Text; table.ProjectId = this.CurrUser.LoginProjectId; - table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values); table.StackingPosition = txtStackingPosition.Text; table.State = 0; - table.ContactName = txtContactName.Text; - table.ContactPhone = txtContactPhone.Text; - table.TrainNumber=txtTrainNumber.Text; + //table.ContactName = txtContactName.Text; + //table.ContactPhone = txtContactPhone.Text; + table.TrainNumberId = drpTrainNumber.SelectedValue; + table.TypeInt = int.Parse(drpTypeInt.SelectedValue); + if (drpTypeInt.SelectedValue == HJGL_PackagingmanageService.TypeInt.预制组件.ToString()) + { + table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values); + + } BLL.HJGL_PackagingmanageService.AddHJGL_PackagingManage(table); + + PackagingManageId= table.PackagingManageId; } else { @@ -105,22 +128,78 @@ namespace FineUIPro.Web.HJGL.PreDesign { table.PackagingCode = txtPackagingCode.Text; table.ProjectId = this.CurrUser.LoginProjectId; - table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values); - table.StackingPosition = txtStackingPosition.Text ; + table.StackingPosition = txtStackingPosition.Text; table.State = 0; - table.ContactName = txtContactName.Text; - table.ContactPhone =txtContactPhone.Text; - table.TrainNumber = txtTrainNumber.Text; + //table.ContactName = txtContactName.Text; + //table.ContactPhone =txtContactPhone.Text; + table.TrainNumberId = drpTrainNumber.SelectedValue; + table.TypeInt = int.Parse(drpTypeInt.SelectedValue); + if (drpTypeInt.SelectedValue == HJGL_PackagingmanageService.TypeInt.预制组件.ToString()) + { + table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values); + + } } BLL.HJGL_PackagingmanageService.UpdateHJGL_PackagingManage(table); } - ShowNotify("保存成功!", MessageBoxIcon.Success); - PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); } protected void btnFind_Click1(object sender, EventArgs e) { BindGrid(); } + + #region 选择按钮 + /// + /// 选择按钮 + /// + /// + /// + protected void btnSelect_Click(object sender, EventArgs e) + { + Save(); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PackagingManageSelect.aspx?PackagingManageId={0}", PackagingManageId, "选择- "))); + + } + protected void btnSelectStock_Click(object sender, EventArgs e) + { + Save(); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PackagingManageSelectStock.aspx?PackagingManageId={0}", PackagingManageId, "选择- "))); + + } + #endregion + + protected void drpTypeInt_SelectedIndexChanged(object sender, EventArgs e) + { + if (drpTypeInt.SelectedValue == ((int)HJGL_PackagingmanageService.TypeInt.预制组件).ToString()) + { + dropPipelineComponentCode.Hidden=false; + Grid2.Hidden=true; + } + else if (drpTypeInt.SelectedValue == ((int)HJGL_PackagingmanageService.TypeInt.预制散件).ToString()) + { + dropPipelineComponentCode.Hidden = true; + Grid2.Hidden = false; + } + else if (drpTypeInt.SelectedValue == ((int)HJGL_PackagingmanageService.TypeInt.其他材料).ToString()) + { + dropPipelineComponentCode.Hidden = true; + Grid2.Hidden = false; + } + + } + protected void Grid2_RowCommand(object sender, GridCommandEventArgs e) + { + if (e.CommandName == "delete") + { + string id = e.RowID; + PackagingmanagedetailService.DeleteById(id); + BindGrid2(this.PackagingManageId); + } + } + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid2(this.PackagingManageId); + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.designer.cs index b09abf8a..d1023ab2 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.designer.cs @@ -50,6 +50,15 @@ namespace FineUIPro.Web.HJGL.PreDesign /// protected global::FineUIPro.TextBox txtPackagingCode; + /// + /// drpTypeInt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpTypeInt; + /// /// dropPipelineComponentCode 控件。 /// @@ -123,31 +132,58 @@ namespace FineUIPro.Web.HJGL.PreDesign protected global::FineUIPro.TextBox txtStackingPosition; /// - /// txtTrainNumber 控件。 + /// drpTrainNumber 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtTrainNumber; + protected global::FineUIPro.DropDownList drpTrainNumber; /// - /// txtContactName 控件。 + /// Grid2 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtContactName; + protected global::FineUIPro.Grid Grid2; /// - /// txtContactPhone 控件。 + /// Toolbar3 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtContactPhone; + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// btnSelect 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSelect; + + /// + /// btnSelectStock 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSelectStock; + + /// + /// tbNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox tbNumber; /// /// Toolbar2 控件。 @@ -175,5 +211,14 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnClose; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; } } diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelect.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelect.aspx new file mode 100644 index 00000000..1f33b8aa --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelect.aspx @@ -0,0 +1,119 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PackagingManageSelect.aspx.cs" Inherits="FineUIPro.Web.HJGL.PreDesign.PackagingManageSelect" %> + + + + + + 查询焊口 + + + + +
+ + < + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelect.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelect.aspx.cs new file mode 100644 index 00000000..73206c13 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelect.aspx.cs @@ -0,0 +1,399 @@ +using BLL; +using FastReport.DevComponents.DotNetBar; +using FineUIPro.Web.HJGL.WeldingManage; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.HJGL.PreDesign +{ + public partial class PackagingManageSelect : PageBase + { + #region 定义项 + + // public List Tree_hJGL_Pipelines; + public int pageSize = PipelineService.pageSize; + + public string PackagingManageId + { + get + { + return (string)ViewState["PackagingManageId"]; + } + set + { + ViewState["PackagingManageId"] = value; + } + } + + #endregion 定义项 + + #region 加载页面 + + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + PackagingManageId = Request.QueryString["PackagingManageId"]; + this.InitTreeMenu();//加载树 + InitDropList(); + } + } + + #endregion 加载页面 + + #region 加载树 + + private void BindNodes(TreeNode node) + { + BLL.PipelineService.BindTreeNodes(node, this.tvPipeCode.Text.Trim(), txtMaterialCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize); + } + + /// + /// 加载树 + /// + 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; + this.tvControlItem.Nodes.Add(rootNode2); + + var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList(); + // 获取当前用户所在单位 + var currUnit = pUnits.FirstOrDefault(x => x.UnitId == this.CurrUser.UnitId); + + var unitWorkList = (from x in Funs.DB.WBS_UnitWork + where x.ProjectId == this.CurrUser.LoginProjectId + && x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null + select x).ToList(); + + List unitWork1 = null; + List unitWork2 = null; + + //// 当前为施工单位,只能操作本单位的数据 + //if (currUnit != null && currUnit.UnitType == Const.ProjectUnitType_2) + //{ + // unitWork1 = (from x in unitWorkList + // where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "1" + // select x).ToList(); + // unitWork2 = (from x in unitWorkList + // where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "2" + // select x).ToList(); + //} + //else + //{ + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + //} + //var dbpipeLineMat = from x in Funs.DB.HJGL_PipeLineMat select x; + //var DBpipeline = from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId select x; + if (unitWork1.Count() > 0) + { + foreach (var q in unitWork1) + { + string strSql = " SELECT DISTINCT [t0].[PipelineId] FROM [dbo].[HJGL_Pipeline] AS [t0]\r\nleft JOIN [dbo].[HJGL_PipeLineMat] AS [t1] ON [t0].[PipelineId] = [t1].[PipelineId]"; + strSql += "where [t0].[UnitWorkId] =@UnitWorkId "; + List listStr = new List(); + listStr.Add(new SqlParameter("@UnitWorkId", q.UnitWorkId)); + + if (!string.IsNullOrEmpty(txtMaterialCode.Text.Trim())) + { + strSql += " and [t1].[MaterialCode] like @MaterialCode"; + listStr.Add(new SqlParameter("@MaterialCode", "%" + txtMaterialCode.Text.Trim() + "%")); + + } + if (!string.IsNullOrEmpty(tvPipeCode.Text.Trim())) + { + strSql += " and [t0].[PipelineCode] like @PipelineCode"; + listStr.Add(new SqlParameter("@PipelineCode", "%" + tvPipeCode.Text.Trim() + "%")); + + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter); + var a = dt.Rows.Count; + + //int a = (from x in DBpipeline + // join y in dbpipeLineMat on x.PipelineId equals y.PipelineId + // where x.PipelineCode.Contains(tvPipeCode.Text.Trim()) && x.UnitWorkId == q.UnitWorkId + // && y.MaterialCode.Contains(txtMaterialCode.Text.Trim()) + // select x.PipelineId).Distinct().Count(); + var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); + TreeNode tn1 = new TreeNode(); + tn1.NodeID = q.UnitWorkId; + tn1.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线"; + tn1.ToolTip = "施工单位:" + unitNamesUnitIds; + tn1.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize); + tn1.EnableExpandEvent = true; + rootNode1.Nodes.Add(tn1); + if (a > 0) + { + // BindNodes(tn1); + TreeNode newNode = new TreeNode(); + newNode.Text = "加载管线..."; + newNode.NodeID = "加载管线..."; + tn1.Nodes.Add(newNode); + } + } + } + if (unitWork2.Count() > 0) + { + + foreach (var q in unitWork2) + { + string strSql = " SELECT DISTINCT [t0].[PipelineId] FROM [dbo].[HJGL_Pipeline] AS [t0]\r\nleft JOIN [dbo].[HJGL_PipeLineMat] AS [t1] ON [t0].[PipelineId] = [t1].[PipelineId]"; + strSql += "where [t0].[UnitWorkId] =@UnitWorkId "; + List listStr = new List(); + listStr.Add(new SqlParameter("@UnitWorkId", q.UnitWorkId)); + + if (!string.IsNullOrEmpty(txtMaterialCode.Text.Trim())) + { + strSql += " and [t1].[MaterialCode] like @MaterialCode"; + listStr.Add(new SqlParameter("@MaterialCode", "%" + txtMaterialCode.Text.Trim() + "%")); + + } + if (!string.IsNullOrEmpty(tvPipeCode.Text.Trim())) + { + strSql += " and [t0].[PipelineCode] like @PipelineCode"; + listStr.Add(new SqlParameter("@PipelineCode", "%" + tvPipeCode.Text.Trim() + "%")); + + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter); + + var a = dt.Rows.Count; + + //var b = (from x in Funs.DB.HJGL_Pipeline + // join y in Funs.DB.HJGL_PipeLineMat on x.PipelineId equals y.PipelineId + // where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && y.MaterialCode.Contains(txtMaterialCode.Text.Trim()) + // select x).Distinct(); + //var b = (from x in DBpipeline + // join y in dbpipeLineMat on x.PipelineId equals y.PipelineId + // where x.PipelineCode.Contains(tvPipeCode.Text.Trim()) && x.UnitWorkId == q.UnitWorkId + // && y.MaterialCode.Contains(txtMaterialCode.Text.Trim()) + // select x.PipelineId).Distinct(); + //int a = (from x in DBpipeline + // join y in dbpipeLineMat on x.PipelineId equals y.PipelineId + // where x.PipelineCode.Contains(tvPipeCode.Text.Trim()) && x.UnitWorkId == q.UnitWorkId + // && y.MaterialCode.Contains(txtMaterialCode.Text.Trim()) + // select x.PipelineId).Distinct().Count(); + var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); + TreeNode tn2 = new TreeNode(); + tn2.NodeID = q.UnitWorkId; + tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线"; + //if (q.UnitWorkId == this.hdUnitWorkId.Text) + //{ + // tn2.Expanded = true; + //} + tn2.ToolTip = "施工单位:" + unitNamesUnitIds; + tn2.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize); + tn2.EnableExpandEvent = true; + tn2.EnableClickEvent = true; + + rootNode2.Nodes.Add(tn2); + if (a > 0) + { + // BindNodes(tn2); + TreeNode newNode = new TreeNode(); + newNode.Text = "加载管线..."; + newNode.NodeID = "加载管线..."; + tn2.Nodes.Add(newNode); + } + } + } + } + + #endregion 加载树 + + #region Methods + + protected void btnTreeFind_Click(object sender, EventArgs e) + { + this.InitTreeMenu(); + //this.BindGrid3(this.tvControlItem.SelectedNodeID); + } + + #endregion Methods + + #region Methods + + protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e) + { + if (e.Node.Nodes[0].NodeID == "加载管线...") + { + e.Node.Nodes.Clear(); + BindNodes(e.Node); + } + } + + #endregion Methods + + #region 点击TreeView + + /// + /// 点击TreeView + /// + /// + /// + protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e) + { + if (e.CommandName == "加载") + { + string CommandName = e.Node.ParentNode.CommandName; + e.Node.ParentNode.CommandName = (int.Parse(CommandName.Split('|')[0]) + 1) + "|" + int.Parse(CommandName.Split('|')[1]); + TreeNode treeNode = e.Node.ParentNode; + treeNode.Nodes.Remove(e.Node); + BindNodes(e.Node.ParentNode); + } + else + { + if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + { + Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID); + this.hdUnitWorkId.Text = string.Empty; + if (pipeline != null) + { + this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID; + + this.BindGrid(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text); + } + } + } + } + + #endregion 点击TreeView + + #region 数据绑定 + + private void BindGrid(string pipelineId, string unitworkid) + { + var query = from pipe in Funs.DB.HJGL_PipeLineMat + join lib in Funs.DB.HJGL_MaterialCodeLib on pipe.MaterialCode equals lib.MaterialCode into libJoin + from libItem in libJoin.DefaultIfEmpty() + join line in Funs.DB.HJGL_Pipeline on pipe.PipelineId equals line.PipelineId into lineJoin + from lineItem in lineJoin.DefaultIfEmpty() + where lineItem != null && lineItem.UnitWorkId == unitworkid && lineItem.PipeArea == "1" + && (pipe.PrefabricatedComponents == null || pipe.PrefabricatedComponents == "") + select new + { + pipe.PipeLineMatId, + libItem.MaterialCode, + libItem.MaterialName, + libItem.MaterialUnit, + libItem.MaterialSpec, + libItem.MaterialMade, + libItem.MaterialDef, + pipe.Number, + pipe.PrefabricatedComponents, + lineItem.PipelineId, + }; + + if (!string.IsNullOrEmpty(pipelineId)) + { + query = query.Where(x => x.PipelineId == pipelineId); + } + + query = query.OrderBy(x => x.PrefabricatedComponents); + + var inoutplandetail = (from x in Funs.DB.HJGL_PackagingManageDetail + //where x.InOutPlanMasterId == Id && x.PipelineId == this.tvControlItem.SelectedNodeID + where x.PipelineId == pipelineId + && (x.PipelineComponentId == null || x.PipelineComponentId == "") + select x).ToList(); + var queryList=query.ToList(); + // 优化 Linq 过滤条件 + var result = (from x in queryList + join y in inoutplandetail on x.MaterialCode equals y.MaterialCode into yy + from y in yy.DefaultIfEmpty() + where y == null + select x).ToList(); + + // 2.获取当前分页数据 + Grid1.DataSource = result; + Grid1.DataBind(); + } + + private void InitDropList() + { + /* var pipeline = (from x in Funs.DB.HJGL_Pipeline + where x.ProjectId == this.CurrUser.LoginProjectId + && x.UnitWorkId == this.UnitWorkId + select x.FlowingSection).Distinct().ToList(); + this.drpFlowingSection.DataTextField = "Value"; + this.drpFlowingSection.DataValueField = "Value"; + this.drpFlowingSection.DataSource = pipeline; + this.drpFlowingSection.DataBind(); + Funs.FineUIPleaseSelect(drpFlowingSection);*/ + } + + #endregion 数据绑定 + + #region 提交按钮 + + /// + /// 提交按钮 + /// + /// + /// + protected void btnAccept_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + + protected void btnSave_Click(object sender, EventArgs e) + { + Save(); + this.BindGrid(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text); + } + + private void Save() + { + var List_Id = Grid1.SelectedRowIDArray; + if (List_Id != null) + { + foreach (var id in List_Id) + { + var hJGL_PipeLineMat = BLL.PipelineMatService.GetPipeLineMat(id); + if (hJGL_PipeLineMat != null) + { + var model = new Model.HJGL_PackagingManageDetail() + { + Id = SQLHelper.GetNewID(), + PackagingManageId = this.PackagingManageId, + PipelineId = hJGL_PipeLineMat.PipelineId, + MaterialCode = hJGL_PipeLineMat.MaterialCode, + Number = hJGL_PipeLineMat.Number, + CreateTime = DateTime.Now, + CreateUser = this.CurrUser.PersonId, + }; + PackagingmanagedetailService.Add(model); + } + } + } + } + + #endregion 提交按钮 + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelect.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelect.aspx.designer.cs new file mode 100644 index 00000000..b6c48399 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelect.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HJGL.PreDesign +{ + + + public partial class PackagingManageSelect + { + + /// + /// 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; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// tvPipeCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox tvPipeCode; + + /// + /// hdUnitWorkId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdUnitWorkId; + + /// + /// Toolbar4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar4; + + /// + /// txtMaterialCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMaterialCode; + + /// + /// btnTreeFind 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnTreeFind; + + /// + /// tvControlItem 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree tvControlItem; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Toolbar3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnAccept 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAccept; + } +} diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelectStock.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelectStock.aspx new file mode 100644 index 00000000..e851c5f9 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelectStock.aspx @@ -0,0 +1,118 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PackagingManageSelectStock.aspx.cs" Inherits="FineUIPro.Web.HJGL.PreDesign.PackagingManageSelectStock" %> + + + + + + + + 材料库存表 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelectStock.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelectStock.aspx.cs new file mode 100644 index 00000000..42a7502b --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelectStock.aspx.cs @@ -0,0 +1,167 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.HJGL.PreDesign +{ + public partial class PackagingManageSelectStock : PageBase + { + public string Id + { + get + { + return (string)ViewState["Id"]; + } + set + { + ViewState["Id"] = value; + } + } + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Id = Request.QueryString["Id"]; + // 绑定表格 + this.BindGrid(); + } + + } + #region 绑定数据 + /// + /// 绑定数据 + /// + private void BindGrid() + { + + var inoutplanmaster = TwInOutplanmasterService.GetById(Id); + if (inoutplanmaster == null) + { + return; + } + + Model.Tw_MaterialStockOutput table = new Model.Tw_MaterialStockOutput(); + table.PipeLineMatCode = txtMatCode.Text.Trim(); + table.WarehouseCode = inoutplanmaster.WarehouseCode; + table.ProjectId = this.CurrUser.LoginProjectId; + if (inoutplanmaster.Category == (int)TwConst.Category.管段) + { + table.MaterialUnit = "米"; + + } + else if (inoutplanmaster.Category == (int)TwConst.Category.管件) + { + table.MaterialUnit = "个"; + + } + + var tb = BLL.TwMaterialstockService.GetListData(table, Grid1); + Grid1.RecordCount = TwMaterialstockService.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + Grid1.DataSource = tb; + Grid1.DataBind(); + } + #endregion + + #region 提交按钮 + /// + /// 提交按钮 + /// + /// + /// + protected void btnAccept_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + + protected void btnSave_Click(object sender, EventArgs e) + { + Save(); + BindGrid(); + } + private void Save() + { + var List_Id = Grid1.SelectedRowIDArray; + if (List_Id != null) + { + foreach (var id in List_Id) + { + var StockModel = TwMaterialstockService.GetTw_MaterialStockById(id); + var querydetail = new Model.Tw_InOutDetailOutput() + { + InOutPlanMasterId = Id, + MaterialCode = StockModel.PipeLineMatCode, + }; + var detail = TwInOutplandetailService.GetByModle(querydetail).FirstOrDefault(); + if (detail == null) + { + var tw_InOutPlanDetail = new Model.Tw_InOutPlanDetail + { + Id = Guid.NewGuid().ToString(), + InOutPlanMasterId = Id, + MaterialCode = StockModel.PipeLineMatCode, + PlanNum = 0, + }; + TwInOutplandetailService.Add(tw_InOutPlanDetail); + } + } + } + + } + #endregion + + #region GV 数据操作 + /// + /// 过滤表头 + /// + /// + /// + //protected void Grid1_FilterChange(object sender, EventArgs e) + //{ + // this.BindGrid(); + //} + + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + this.Grid1.PageIndex = e.NewPageIndex; + this.BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + this.Grid1.SortDirection = e.SortDirection; + this.Grid1.SortField = e.SortField; + this.BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue); + this.BindGrid(); + } + #endregion + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelectStock.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelectStock.aspx.designer.cs new file mode 100644 index 00000000..55f68d50 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelectStock.aspx.designer.cs @@ -0,0 +1,143 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HJGL.PreDesign +{ + + + public partial class PackagingManageSelectStock + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtMatCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMatCode; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnAccept 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAccept; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManageEdit.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManageEdit.aspx new file mode 100644 index 00000000..cdf3eee1 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManageEdit.aspx @@ -0,0 +1,73 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrainNumberManageEdit.aspx.cs" Inherits="FineUIPro.Web.HJGL.PreDesign.TrainNumberManageEdit" %> + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManageEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManageEdit.aspx.cs new file mode 100644 index 00000000..6414f189 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManageEdit.aspx.cs @@ -0,0 +1,114 @@ +using BLL; +using Org.BouncyCastle.Asn1.Ocsp; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.HJGL.PreDesign +{ + public partial class TrainNumberManageEdit + +: PageBase + { + #region + /// + /// 主键 + /// + public string Id + { + get + { + return (string)ViewState["Id"]; + } + set + { + ViewState["Id"] = value; + } + } + #endregion + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ////权限按钮方法 + this.GetButtonPower(); + this.Id = Request.Params["Id"]; + if (!string.IsNullOrEmpty(this.Id)) + { + Model.HJGL_TrainNumberManage model = BLL.TrainNumberManageService.GetModelById(this.Id); + if (model != null) + { + this.txtTrainNumber.Text = model.TrainNumber; + this.txtDriverName.Text = model.DriverName; + this.txtDriverPhone.Text = model.DriverPhone; + this.txtLicensePlateNumber.Text = model.LicensePlateNumber; + this.txtContactName.Text = model.ContactName; + this.txtContactPhone.Text = model.ContactPhone; + this.txtRemark.Text = model.Remark; + + } + } + else + { + this.txtTrainNumber.Text = TrainNumberManageService.GetNewTrainNumber(this.CurrUser.LoginProjectId); + } + } + } + + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + Model.HJGL_TrainNumberManage table = new Model.HJGL_TrainNumberManage(); + table.TrainNumber = this.txtTrainNumber.Text; + table.ProjectId = this.CurrUser.LoginProjectId; + table.State = 0; + table.DriverName = this.txtDriverName.Text; + table.DriverPhone = this.txtDriverPhone.Text; + table.LicensePlateNumber = this.txtLicensePlateNumber.Text; + table.ContactName = this.txtContactName.Text; + table.ContactPhone = this.txtContactPhone.Text; + table.Remark = this.txtRemark.Text; + if (string.IsNullOrEmpty(this.Id)) + { + table.Id = SQLHelper.GetNewID(typeof(Model.HJGL_TrainNumberManage)); + BLL.TrainNumberManageService.Add(table); + + } + else + { + table.Id = this.Id; + BLL.TrainNumberManageService.Update(table); + } + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.HJGL_TrainNumberManageMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } + } + } + #endregion + + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManageEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManageEdit.aspx.designer.cs new file mode 100644 index 00000000..e1047953 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManageEdit.aspx.designer.cs @@ -0,0 +1,143 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HJGL.PreDesign +{ + + + public partial class TrainNumberManageEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtTrainNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTrainNumber; + + /// + /// txtLicensePlateNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLicensePlateNumber; + + /// + /// txtDriverName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDriverName; + + /// + /// txtDriverPhone 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDriverPhone; + + /// + /// txtContactName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtContactName; + + /// + /// txtContactPhone 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtContactPhone; + + /// + /// txtRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRemark; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx new file mode 100644 index 00000000..71529c18 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx @@ -0,0 +1,131 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrainNumberManager.aspx.cs" Inherits="FineUIPro.Web.HJGL.PreDesign.TrainNumberManager" %> + + + + + + + + 车次管理表 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.cs new file mode 100644 index 00000000..c655411b --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.cs @@ -0,0 +1,248 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.HJGL.PreDesign +{ + public partial class TrainNumberManager : PageBase + { + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.GetButtonPower(); + this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + // 绑定表格 + this.BindGrid(); + } + } + + #region 绑定数据 + /// + /// 绑定数据 + /// + private void BindGrid() + { + Model.HJGL_TrainNumberManage table = new Model.HJGL_TrainNumberManage(); + table.ProjectId = this.CurrUser.LoginProjectId; + var tb = BLL.TrainNumberManageService.GetListByQueryModle(table, Grid1.PageIndex,Grid1.PageSize); + Grid1.RecordCount = tb.Total; + Grid1.DataSource = tb.Data; + Grid1.DataBind(); + } + #endregion + + #region GV 数据操作 + /// + /// 过滤表头 + /// + /// + /// + //protected void Grid1_FilterChange(object sender, EventArgs e) + //{ + // this.BindGrid(); + //} + + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + this.Grid1.PageIndex = e.NewPageIndex; + this.BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + this.Grid1.SortDirection = e.SortDirection; + this.Grid1.SortField = e.SortField; + this.BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue); + this.BindGrid(); + } + #endregion + + #region 数据编辑事件 + /// + /// 新增 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TrainNumberManageEdit.aspx?Id={0}", string.Empty, "增加 - "))); + } + + /// + /// 编辑按钮 + /// + /// + /// + protected void btnEdit_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string ID = Grid1.SelectedRowID; + var model = BLL.TrainNumberManageService.GetModelById(ID); + if (model != null) ///已上报时不能删除 + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TrainNumberManageEdit.aspx?Id={0}", ID, "编辑 - "))); + } + } + + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.btnEdit_Click(null, null); + } + + /// + /// 批量删除 + /// + /// + /// + protected void btnDelete_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var model = BLL.TrainNumberManageService.GetModelById(rowID); + if (model != null) + { + BLL.TrainNumberManageService.DeleteById(rowID); + } + } + + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 关闭弹出窗 + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 获取权限按钮 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.HJGL_TrainNumberManageMenuId); + if (buttonList.Count > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnMenuEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDelete.Hidden = false; + } + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + ///
+ /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("车次管理表" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + this.Grid1.PageSize = 500; + this.BindGrid(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + + /// + /// 导出方法 + /// + /// + /// + private string GetGridTableHtml(Grid grid) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + sb.AppendFormat("", column.HeaderText); + } + sb.Append(""); + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("lblNumber") as System.Web.UI.WebControls.Label).Text; + } + sb.AppendFormat("", html); + } + + sb.Append(""); + } + + sb.Append("
{0}
{0}
"); + + return sb.ToString(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.designer.cs new file mode 100644 index 00000000..4072da86 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HJGL.PreDesign +{ + + + public partial class TrainNumberManager + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanFormationEdit.aspx b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanFormationEdit.aspx index 525e4f5a..8dae963b 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanFormationEdit.aspx +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanFormationEdit.aspx @@ -37,14 +37,14 @@ - + - + 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 5a37269f..1e8a07a0 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml @@ -14,7 +14,8 @@ - + + @@ -23,7 +24,7 @@ - + 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 6b2c0854..afa11346 100644 --- a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml @@ -54,49 +54,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 123b641b..9c9e67e6 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -659,6 +659,9 @@ namespace Model partial void InsertHJGL_PackagingManage(HJGL_PackagingManage instance); partial void UpdateHJGL_PackagingManage(HJGL_PackagingManage instance); partial void DeleteHJGL_PackagingManage(HJGL_PackagingManage instance); + partial void InsertHJGL_PackagingManageDetail(HJGL_PackagingManageDetail instance); + partial void UpdateHJGL_PackagingManageDetail(HJGL_PackagingManageDetail instance); + partial void DeleteHJGL_PackagingManageDetail(HJGL_PackagingManageDetail instance); partial void InsertHJGL_PC_ItemEndCheck(HJGL_PC_ItemEndCheck instance); partial void UpdateHJGL_PC_ItemEndCheck(HJGL_PC_ItemEndCheck instance); partial void DeleteHJGL_PC_ItemEndCheck(HJGL_PC_ItemEndCheck instance); @@ -686,6 +689,9 @@ namespace Model partial void InsertHJGL_RepairRecord(HJGL_RepairRecord instance); partial void UpdateHJGL_RepairRecord(HJGL_RepairRecord instance); partial void DeleteHJGL_RepairRecord(HJGL_RepairRecord instance); + partial void InsertHJGL_TrainNumberManage(HJGL_TrainNumberManage instance); + partial void UpdateHJGL_TrainNumberManage(HJGL_TrainNumberManage instance); + partial void DeleteHJGL_TrainNumberManage(HJGL_TrainNumberManage instance); partial void InsertHJGL_WeldingDaily(HJGL_WeldingDaily instance); partial void UpdateHJGL_WeldingDaily(HJGL_WeldingDaily instance); partial void DeleteHJGL_WeldingDaily(HJGL_WeldingDaily instance); @@ -3568,6 +3574,14 @@ namespace Model } } + public System.Data.Linq.Table HJGL_PackagingManageDetail + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table HJGL_PC_ItemEndCheck { get @@ -3640,6 +3654,14 @@ namespace Model } } + public System.Data.Linq.Table HJGL_TrainNumberManage + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table HJGL_View_HardReportItem { get @@ -12122,7 +12144,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 @@ -95237,6 +95259,10 @@ namespace Model private string _TrainNumber; + private string _TrainNumberId; + + private System.Nullable _TypeInt; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -95265,6 +95291,10 @@ namespace Model partial void OnReceiveDateChanged(); partial void OnTrainNumberChanging(string value); partial void OnTrainNumberChanged(); + partial void OnTrainNumberIdChanging(string value); + partial void OnTrainNumberIdChanged(); + partial void OnTypeIntChanging(System.Nullable value); + partial void OnTypeIntChanged(); #endregion public HJGL_PackagingManage() @@ -95512,6 +95542,276 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrainNumberId", DbType="VarChar(50)")] + public string TrainNumberId + { + get + { + return this._TrainNumberId; + } + set + { + if ((this._TrainNumberId != value)) + { + this.OnTrainNumberIdChanging(value); + this.SendPropertyChanging(); + this._TrainNumberId = value; + this.SendPropertyChanged("TrainNumberId"); + this.OnTrainNumberIdChanged(); + } + } + } + + [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(); + } + } + } + + 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.HJGL_PackagingManageDetail")] + public partial class HJGL_PackagingManageDetail : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _PackagingManageId; + + private string _PipelineId; + + private string _PipelineComponentId; + + private string _MaterialCode; + + private System.Nullable _Number; + + private System.Nullable _CreateTime; + + private string _CreateUser; + + #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 OnPackagingManageIdChanging(string value); + partial void OnPackagingManageIdChanged(); + partial void OnPipelineIdChanging(string value); + partial void OnPipelineIdChanged(); + partial void OnPipelineComponentIdChanging(string value); + partial void OnPipelineComponentIdChanged(); + partial void OnMaterialCodeChanging(string value); + partial void OnMaterialCodeChanged(); + partial void OnNumberChanging(System.Nullable value); + partial void OnNumberChanged(); + partial void OnCreateTimeChanging(System.Nullable value); + partial void OnCreateTimeChanged(); + partial void OnCreateUserChanging(string value); + partial void OnCreateUserChanged(); + #endregion + + public HJGL_PackagingManageDetail() + { + 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="_PackagingManageId", DbType="NVarChar(50)")] + public string PackagingManageId + { + get + { + return this._PackagingManageId; + } + set + { + if ((this._PackagingManageId != value)) + { + this.OnPackagingManageIdChanging(value); + this.SendPropertyChanging(); + this._PackagingManageId = value; + this.SendPropertyChanged("PackagingManageId"); + this.OnPackagingManageIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineId", DbType="NVarChar(50)")] + public string PipelineId + { + get + { + return this._PipelineId; + } + set + { + if ((this._PipelineId != value)) + { + this.OnPipelineIdChanging(value); + this.SendPropertyChanging(); + this._PipelineId = value; + this.SendPropertyChanged("PipelineId"); + this.OnPipelineIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineComponentId", DbType="NVarChar(50)")] + public string PipelineComponentId + { + get + { + return this._PipelineComponentId; + } + set + { + if ((this._PipelineComponentId != value)) + { + this.OnPipelineComponentIdChanging(value); + this.SendPropertyChanging(); + this._PipelineComponentId = value; + this.SendPropertyChanged("PipelineComponentId"); + this.OnPipelineComponentIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50)")] + 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="_Number", DbType="Decimal(9,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="_CreateTime", DbType="DateTime")] + public System.Nullable CreateTime + { + get + { + return this._CreateTime; + } + set + { + if ((this._CreateTime != value)) + { + this.OnCreateTimeChanging(value); + this.SendPropertyChanging(); + this._CreateTime = value; + this.SendPropertyChanged("CreateTime"); + this.OnCreateTimeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateUser", DbType="NVarChar(50)")] + public string CreateUser + { + get + { + return this._CreateUser; + } + set + { + if ((this._CreateUser != value)) + { + this.OnCreateUserChanging(value); + this.SendPropertyChanging(); + this._CreateUser = value; + this.SendPropertyChanged("CreateUser"); + this.OnCreateUserChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -100578,6 +100878,284 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.HJGL_TrainNumberManage")] + public partial class HJGL_TrainNumberManage : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _TrainNumber; + + private string _ProjectId; + + private System.Nullable _State; + + private string _DriverName; + + private string _DriverPhone; + + private string _LicensePlateNumber; + + private string _ContactName; + + private string _ContactPhone; + + 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 OnTrainNumberChanging(string value); + partial void OnTrainNumberChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnStateChanging(System.Nullable value); + partial void OnStateChanged(); + partial void OnDriverNameChanging(string value); + partial void OnDriverNameChanged(); + partial void OnDriverPhoneChanging(string value); + partial void OnDriverPhoneChanged(); + partial void OnLicensePlateNumberChanging(string value); + partial void OnLicensePlateNumberChanged(); + partial void OnContactNameChanging(string value); + partial void OnContactNameChanged(); + partial void OnContactPhoneChanging(string value); + partial void OnContactPhoneChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + #endregion + + public HJGL_TrainNumberManage() + { + 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="_TrainNumber", DbType="NVarChar(50)")] + public string TrainNumber + { + get + { + return this._TrainNumber; + } + set + { + if ((this._TrainNumber != value)) + { + this.OnTrainNumberChanging(value); + this.SendPropertyChanging(); + this._TrainNumber = value; + this.SendPropertyChanged("TrainNumber"); + this.OnTrainNumberChanged(); + } + } + } + + [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="_State", DbType="Int")] + public System.Nullable State + { + get + { + return this._State; + } + set + { + if ((this._State != value)) + { + this.OnStateChanging(value); + this.SendPropertyChanging(); + this._State = value; + this.SendPropertyChanged("State"); + this.OnStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DriverName", DbType="NVarChar(50)")] + public string DriverName + { + get + { + return this._DriverName; + } + set + { + if ((this._DriverName != value)) + { + this.OnDriverNameChanging(value); + this.SendPropertyChanging(); + this._DriverName = value; + this.SendPropertyChanged("DriverName"); + this.OnDriverNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DriverPhone", DbType="NVarChar(50)")] + public string DriverPhone + { + get + { + return this._DriverPhone; + } + set + { + if ((this._DriverPhone != value)) + { + this.OnDriverPhoneChanging(value); + this.SendPropertyChanging(); + this._DriverPhone = value; + this.SendPropertyChanged("DriverPhone"); + this.OnDriverPhoneChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LicensePlateNumber", DbType="NVarChar(50)")] + public string LicensePlateNumber + { + get + { + return this._LicensePlateNumber; + } + set + { + if ((this._LicensePlateNumber != value)) + { + this.OnLicensePlateNumberChanging(value); + this.SendPropertyChanging(); + this._LicensePlateNumber = value; + this.SendPropertyChanged("LicensePlateNumber"); + this.OnLicensePlateNumberChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContactName", DbType="NVarChar(50)")] + public string ContactName + { + get + { + return this._ContactName; + } + set + { + if ((this._ContactName != value)) + { + this.OnContactNameChanging(value); + this.SendPropertyChanging(); + this._ContactName = value; + this.SendPropertyChanged("ContactName"); + this.OnContactNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContactPhone", DbType="NVarChar(50)")] + public string ContactPhone + { + get + { + return this._ContactPhone; + } + set + { + if ((this._ContactPhone != value)) + { + this.OnContactPhoneChanging(value); + this.SendPropertyChanging(); + this._ContactPhone = value; + this.SendPropertyChanged("ContactPhone"); + this.OnContactPhoneChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(800)")] + 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.HJGL_View_HardReportItem")] public partial class HJGL_View_HardReportItem { @@ -105543,7 +106121,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 @@ -105669,7 +106247,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 @@ -157784,7 +158362,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 @@ -188767,7 +189345,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 @@ -188887,7 +189465,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 @@ -188947,7 +189525,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 @@ -189331,7 +189909,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 @@ -189636,16 +190214,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; @@ -189674,6 +190242,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); @@ -189682,16 +190260,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); @@ -189720,6 +190288,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() @@ -189767,106 +190345,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 { @@ -190147,6 +190625,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; @@ -306130,7 +306708,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 @@ -306707,7 +307285,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 @@ -306898,7 +307476,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 @@ -312209,7 +312787,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 @@ -313681,7 +314259,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 @@ -323232,7 +323810,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 @@ -323252,7 +323830,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