From 88ec31b36f05788b21552d2beb11ee97dfe92f22 Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Tue, 16 Dec 2025 15:30:35 +0800 Subject: [PATCH] =?UTF-8?q?20251216=20=E5=B7=A5=E7=A8=8B=E8=81=94=E7=BB=9C?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../版本日志/HJGLDB_DS_2025-12-16_bwj.sql | 107 ++++ HJGL_DS/BLL/BLL.csproj | 1 + HJGL_DS/BLL/Common/Const.cs | 5 + HJGL_DS/BLL/JGZL/ContactService.cs | 96 +++ .../File/Fastreport/JGZL/工程交工验收证书.frx | 8 +- .../File/Fastreport/JGZL/工程联络单.frx | 185 ++++++ .../File/Fastreport/JGZL/施工图核查记录.frx | 118 ++++ HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj | 16 + HJGL_DS/FineUIPro.Web/JGZL/Contact.aspx | 118 ++++ HJGL_DS/FineUIPro.Web/JGZL/Contact.aspx.cs | 391 ++++++++++++ .../JGZL/Contact.aspx.designer.cs | 206 ++++++ HJGL_DS/FineUIPro.Web/JGZL/ContactEdit.aspx | 76 +++ .../FineUIPro.Web/JGZL/ContactEdit.aspx.cs | 158 +++++ .../JGZL/ContactEdit.aspx.designer.cs | 188 ++++++ HJGL_DS/FineUIPro.Web/Web.config | 2 +- HJGL_DS/Model/Model.cs | 595 ++++++++++++++++++ 16 files changed, 2265 insertions(+), 5 deletions(-) create mode 100644 DataBase/版本日志/HJGLDB_DS_2025-12-16_bwj.sql create mode 100644 HJGL_DS/BLL/JGZL/ContactService.cs create mode 100644 HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程联络单.frx create mode 100644 HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/施工图核查记录.frx create mode 100644 HJGL_DS/FineUIPro.Web/JGZL/Contact.aspx create mode 100644 HJGL_DS/FineUIPro.Web/JGZL/Contact.aspx.cs create mode 100644 HJGL_DS/FineUIPro.Web/JGZL/Contact.aspx.designer.cs create mode 100644 HJGL_DS/FineUIPro.Web/JGZL/ContactEdit.aspx create mode 100644 HJGL_DS/FineUIPro.Web/JGZL/ContactEdit.aspx.cs create mode 100644 HJGL_DS/FineUIPro.Web/JGZL/ContactEdit.aspx.designer.cs diff --git a/DataBase/版本日志/HJGLDB_DS_2025-12-16_bwj.sql b/DataBase/版本日志/HJGLDB_DS_2025-12-16_bwj.sql new file mode 100644 index 0000000..42262af --- /dev/null +++ b/DataBase/版本日志/HJGLDB_DS_2025-12-16_bwj.sql @@ -0,0 +1,107 @@ +insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuModule) +values('05725865-4CC9-43A0-A525-F2730019F61C','絥','JGZL/Contact.aspx',40,'2A84FA58-8B20-48ED-A621-3EC98CF4AD28','3') +go +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('C28453C3-96BF-4DE6-8BF0-54127F2E4632','05725865-4CC9-43A0-A525-F2730019F61C','',1) +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('CB83CCED-E5B6-4A8D-8B59-A5F3E2409610','05725865-4CC9-43A0-A525-F2730019F61C','޸',2) +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('A35F10E9-043A-4A35-BBEB-A41D4D9B8154','05725865-4CC9-43A0-A525-F2730019F61C','ɾ',3) +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('57A4B606-8DB1-49B5-9436-74EA0FB60107','05725865-4CC9-43A0-A525-F2730019F61C','',4) +go + +CREATE TABLE [dbo].[JGZL_Contact]( + [ContactId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [ContractNumber] [nvarchar](50) NULL, + [DeliveryUnit] [nvarchar](50) NULL, + [SubjectMatter] [nvarchar](1000) NULL, + [Contents] [nvarchar](2000) NULL, + [Handler] [nvarchar](50) NULL, + [HandDate] [datetime] NULL, + [Reviewer] [nvarchar](50) NULL, + [ReviewDate] [datetime] NULL, + [HandlingOpinion] [nvarchar](1000) NULL, + [OpinionHandler] [nvarchar](50) NULL, + [OpinionHandDate] [datetime] NULL, + [OpinionsReviewer] [nvarchar](50) NULL, + [OpinionsDate] [datetime] NULL, + [CompileMan] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + CONSTRAINT [PK_JGZL_Contact] PRIMARY KEY CLUSTERED +( + [ContactId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] +) ON [PRIMARY] +GO + +ALTER TABLE [dbo].[JGZL_Contact] WITH CHECK ADD CONSTRAINT [FK_JGZL_Contact_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[JGZL_Contact] CHECK CONSTRAINT [FK_JGZL_Contact_Base_Project] +GO + +ALTER TABLE [dbo].[JGZL_Contact] WITH CHECK ADD CONSTRAINT [FK_JGZL_Contact_Sys_User] FOREIGN KEY([CompileMan]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[JGZL_Contact] CHECK CONSTRAINT [FK_JGZL_Contact_Sys_User] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_Contact', @level2type=N'COLUMN',@level2name=N'ContactId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_Contact', @level2type=N'COLUMN',@level2name=N'ProjectId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'絥' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_Contact', @level2type=N'COLUMN',@level2name=N'ContractNumber' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʹﵥλ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_Contact', @level2type=N'COLUMN',@level2name=N'DeliveryUnit' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_Contact', @level2type=N'COLUMN',@level2name=N'SubjectMatter' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_Contact', @level2type=N'COLUMN',@level2name=N'Contents' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_Contact', @level2type=N'COLUMN',@level2name=N'Handler' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_Contact', @level2type=N'COLUMN',@level2name=N'HandDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_Contact', @level2type=N'COLUMN',@level2name=N'Reviewer' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_Contact', @level2type=N'COLUMN',@level2name=N'ReviewDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'յλ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_Contact', @level2type=N'COLUMN',@level2name=N'HandlingOpinion' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_Contact', @level2type=N'COLUMN',@level2name=N'OpinionHandler' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_Contact', @level2type=N'COLUMN',@level2name=N'OpinionHandDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_Contact', @level2type=N'COLUMN',@level2name=N'OpinionsReviewer' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_Contact', @level2type=N'COLUMN',@level2name=N'OpinionsDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_Contact', @level2type=N'COLUMN',@level2name=N'CompileMan' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_Contact', @level2type=N'COLUMN',@level2name=N'CompileDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'絥' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_Contact' +GO + + diff --git a/HJGL_DS/BLL/BLL.csproj b/HJGL_DS/BLL/BLL.csproj index f27c43c..a2d7843 100644 --- a/HJGL_DS/BLL/BLL.csproj +++ b/HJGL_DS/BLL/BLL.csproj @@ -247,6 +247,7 @@ + diff --git a/HJGL_DS/BLL/Common/Const.cs b/HJGL_DS/BLL/Common/Const.cs index 80e4b1e..723c035 100644 --- a/HJGL_DS/BLL/Common/Const.cs +++ b/HJGL_DS/BLL/Common/Const.cs @@ -1769,6 +1769,11 @@ namespace BLL /// 工程交工验收证书 /// public const string JGZL_AcceptanceCertificateMenuId = "13172551-E58A-4F87-A090-3B8476FAA517"; + + /// + /// 工程联络单 + /// + public const string JGZL_ContactMenuId = "05725865-4CC9-43A0-A525-F2730019F61C"; #endregion #region 报表对应ID diff --git a/HJGL_DS/BLL/JGZL/ContactService.cs b/HJGL_DS/BLL/JGZL/ContactService.cs new file mode 100644 index 0000000..ab051f7 --- /dev/null +++ b/HJGL_DS/BLL/JGZL/ContactService.cs @@ -0,0 +1,96 @@ +using Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 工程联络单 + /// + public class ContactService + { + /// + /// 根据主键获取工程联络单 + /// + /// + /// + public static Model.JGZL_Contact GetContactById(string contactId) + { + return Funs.DB.JGZL_Contact.FirstOrDefault(e => e.ContactId == contactId); + } + + /// + /// 添加工程联络单 + /// + /// + public static void AddContact(Model.JGZL_Contact contact) + { + SGGLDB db = Funs.DB; + Model.JGZL_Contact newContact = new Model.JGZL_Contact(); + newContact.ContactId = contact.ContactId; + newContact.ProjectId = contact.ProjectId; + newContact.ContractNumber = contact.ContractNumber; + newContact.DeliveryUnit = contact.DeliveryUnit; + newContact.SubjectMatter = contact.SubjectMatter; + newContact.Contents = contact.Contents; + newContact.Handler = contact.Handler; + newContact.HandDate = contact.HandDate; + newContact.Reviewer = contact.Reviewer; + newContact.ReviewDate = contact.ReviewDate; + newContact.HandlingOpinion = contact.HandlingOpinion; + newContact.OpinionHandler = contact.OpinionHandler; + newContact.OpinionHandDate = contact.OpinionHandDate; + newContact.OpinionsReviewer = contact.OpinionsReviewer; + newContact.OpinionsDate = contact.OpinionsDate; + newContact.CompileMan = contact.CompileMan; + newContact.CompileDate = contact.CompileDate; + db.JGZL_Contact.InsertOnSubmit(newContact); + db.SubmitChanges(); + } + + /// + /// 修改工程联络单 + /// + /// + public static void UpdateContact(Model.JGZL_Contact contact) + { + SGGLDB db = Funs.DB; + Model.JGZL_Contact newContact = db.JGZL_Contact.FirstOrDefault(e => e.ContactId == contact.ContactId); + if (newContact != null) + { + newContact.ContractNumber = contact.ContractNumber; + newContact.DeliveryUnit = contact.DeliveryUnit; + newContact.SubjectMatter = contact.SubjectMatter; + newContact.Contents = contact.Contents; + newContact.Handler = contact.Handler; + newContact.HandDate = contact.HandDate; + newContact.Reviewer = contact.Reviewer; + newContact.ReviewDate = contact.ReviewDate; + newContact.HandlingOpinion = contact.HandlingOpinion; + newContact.OpinionHandler = contact.OpinionHandler; + newContact.OpinionHandDate = contact.OpinionHandDate; + newContact.OpinionsReviewer = contact.OpinionsReviewer; + newContact.OpinionsDate = contact.OpinionsDate; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除工程联络单 + /// + /// + public static void DeleteContactById(string contactId) + { + SGGLDB db = Funs.DB; + var contact = db.JGZL_Contact.FirstOrDefault(e => e.ContactId == contactId); + if (contact != null) + { + db.JGZL_Contact.DeleteOnSubmit(contact); + db.SubmitChanges(); + } + } + } +} diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程交工验收证书.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程交工验收证书.frx index 4992977..5437910 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程交工验收证书.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程交工验收证书.frx @@ -1,5 +1,5 @@  - + @@ -54,7 +54,7 @@ - + @@ -68,7 +68,7 @@ - + @@ -89,7 +89,7 @@ - + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程联络单.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程联络单.frx new file mode 100644 index 0000000..c933556 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工程联络单.frx @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/施工图核查记录.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/施工图核查记录.frx new file mode 100644 index 0000000..0c6a6ce --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/施工图核查记录.frx @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj index 858cb46..1bfdae6 100644 --- a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj +++ b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj @@ -1245,6 +1245,8 @@ + + @@ -6554,6 +6556,20 @@ CommencementReportEdit.aspx + + Contact.aspx + ASPXCodeBehind + + + Contact.aspx + + + ContactEdit.aspx + ASPXCodeBehind + + + ContactEdit.aspx + HandoverCertificate.aspx ASPXCodeBehind diff --git a/HJGL_DS/FineUIPro.Web/JGZL/Contact.aspx b/HJGL_DS/FineUIPro.Web/JGZL/Contact.aspx new file mode 100644 index 0000000..b759cd9 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/Contact.aspx @@ -0,0 +1,118 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Contact.aspx.cs" Inherits="FineUIPro.Web.JGZL.Contact" %> + + + + + + + 工程联络单 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/Contact.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/Contact.aspx.cs new file mode 100644 index 0000000..b115839 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/Contact.aspx.cs @@ -0,0 +1,391 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data.SqlClient; +using System.Data; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.IO; + +namespace FineUIPro.Web.JGZL +{ + public partial class Contact : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + + this.drpProjectId.DataTextField = "ProjectCode"; + this.drpProjectId.DataValueField = "ProjectId"; + this.drpProjectId.DataSource = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1"); + this.drpProjectId.DataBind(); + Funs.FineUIPleaseSelect(this.drpProjectId); + + this.InitTreeMenu();//加载树 + } + } + #endregion + + #region 加载树项目 + /// + /// 加载树 + /// + private void InitTreeMenu() + { + this.tvControlItem.Nodes.Clear(); + TreeNode rootNode = new TreeNode(); + rootNode.Text = "项目"; + rootNode.ToolTip = "项目"; + rootNode.NodeID = "0"; + rootNode.Expanded = true; + this.tvControlItem.Nodes.Add(rootNode); + + List projects = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1"); + if (this.drpProjectId.SelectedValue != BLL.Const._Null) + { + projects = projects.Where(e => e.ProjectId == this.drpProjectId.SelectedValue).ToList(); + } + foreach (var item in projects) + { + TreeNode rootProjectNode = new TreeNode();//定义根节点 + rootProjectNode.Text = item.ProjectCode; + rootProjectNode.NodeID = item.ProjectId; + rootProjectNode.EnableClickEvent = true; + rootProjectNode.Expanded = true; + rootProjectNode.ToolTip = item.ProjectName; + rootProjectNode.CommandName = "项目名称"; + rootNode.Nodes.Add(rootProjectNode); + } + } + #endregion + + #region 点击TreeView + /// + /// 点击TreeView + /// + /// + /// + protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e) + { + if (this.tvControlItem.SelectedNodeID != "0") + { + this.BindGrid(); + } + } + #endregion + + #region 数据绑定 + /// + /// 数据绑定 + /// + private void BindGrid() + { + //string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1"); + string strSql = @"SELECT * from JGZL_Contact where 1=1"; + List listStr = new List(); + if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + { + strSql += " AND ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID)); + } + //else + //{ + // strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 "; + // listStr.Add(new SqlParameter("@ProjectId", projectIds)); + //} + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + // 2.获取当前分页数据 + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 分页排序 + #region 页索引改变事件 + /// + /// 页索引改变事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + #endregion + + #region 排序 + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + #endregion + + #region 分页选择下拉改变事件 + /// + /// 分页选择下拉改变事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + #endregion + #endregion + + #region 查询 + /// + ///查询 + /// + /// + /// + protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) + { + this.InitTreeMenu(); + } + + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 打印 + /// + /// 打印 + /// + /// + /// + protected void btnPrint_Click(object sender, EventArgs e) + { + string projectId = this.tvControlItem.SelectedNodeID; + + if (projectId != null) + { + if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) + { + string initTemplatePath = ""; + string rootPath = Server.MapPath("~/"); + BLL.Common.FastReportService.ResetData(); + + var report = BLL.ContactService.GetContactById(this.Grid1.SelectedRowID); + if (report != null) + { + Dictionary keyValuePairs = new Dictionary(); + keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName); + keyValuePairs.Add("ContractNumber", report.ContractNumber); + keyValuePairs.Add("DeliveryUnit", report.DeliveryUnit); + keyValuePairs.Add("SubjectMatter", report.SubjectMatter); + keyValuePairs.Add("Contents", report.Contents); + keyValuePairs.Add("Handler", report.Handler); + keyValuePairs.Add("HandDate", report.HandDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.HandDate) : ""); + keyValuePairs.Add("Reviewer", report.Reviewer); + keyValuePairs.Add("ReviewDate", report.ReviewDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.ReviewDate) : ""); + keyValuePairs.Add("HandlingOpinion", report.HandlingOpinion); + keyValuePairs.Add("OpinionHandler", report.OpinionHandler); + keyValuePairs.Add("OpinionHandDate", report.OpinionHandDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.OpinionHandDate) : ""); + keyValuePairs.Add("OpinionsReviewer", report.OpinionsReviewer); + keyValuePairs.Add("OpinionsDate", report.OpinionsDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.OpinionsDate) : ""); + BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); + } + initTemplatePath = "File\\Fastreport\\JGZL\\工程联络单.frx"; + if (File.Exists(rootPath + initTemplatePath)) + { + PageContext.RegisterStartupScript(WindowPrint.GetShowReference(String.Format("../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); + } + } + else + { + Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + return; + } + } + else + { + Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + return; + } + } + #endregion + + #region 维护 + /// + /// 增加 + /// + /// + /// + protected void btnAdd_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ContactEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - "))); + } + else + { + Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + return; + } + } + + /// + /// 双击编辑 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_ContactMenuId, BLL.Const.BtnModify)) + { + if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + { + if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ContactEdit.aspx?contactId={0}", this.Grid1.SelectedRowID, "编辑 - "))); + } + else + { + Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + return; + } + } + else + { + Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + return; + } + } + else + { + ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + } + } + + /// + /// 右键编辑 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_ContactMenuId, BLL.Const.BtnModify)) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ContactEdit.aspx?contactId={0}", Grid1.SelectedRowID, "维护 - "))); + } + else + { + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + } + } + + /// + /// 右键删除 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_ContactMenuId, Const.BtnDelete)) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + return; + } + + bool isShow = true; + if (Grid1.SelectedRowIndexArray.Length > 1) + { + isShow = false; + } + bool isDelete = false; + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + if (judgementDelete(rowID, isShow)) + { + isDelete = true; + BLL.ContactService.DeleteContactById(rowID); + BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除工程联络单"); + } + } + if (isDelete) + { + ShowNotify("删除成功!", MessageBoxIcon.Success); + } + this.BindGrid(); + } + else + { + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + } + } + + #region 判断是否可删除 + /// + /// 判断是否可以删除 + /// + /// + private bool judgementDelete(string id, bool isShow) + { + string content = string.Empty; + + if (string.IsNullOrEmpty(content)) + { + return true; + } + else + { + if (isShow) + { + Alert.ShowInTop(content, MessageBoxIcon.Error); + } + return false; + } + } + #endregion + #endregion + + #region 关闭弹出窗口及刷新页面 + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + this.InitTreeMenu();//加载树 + this.BindGrid(); + } + #endregion + } +} \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/JGZL/Contact.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/Contact.aspx.designer.cs new file mode 100644 index 0000000..1f4db0c --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/Contact.aspx.designer.cs @@ -0,0 +1,206 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JGZL +{ + + + public partial class Contact + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpProjectId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProjectId; + + /// + /// tvControlItem 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree tvControlItem; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnAdd 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAdd; + + /// + /// btnPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPrint; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// WindowPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowPrint; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/HJGL_DS/FineUIPro.Web/JGZL/ContactEdit.aspx b/HJGL_DS/FineUIPro.Web/JGZL/ContactEdit.aspx new file mode 100644 index 0000000..3a2338e --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/ContactEdit.aspx @@ -0,0 +1,76 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ContactEdit.aspx.cs" Inherits="FineUIPro.Web.JGZL.ContactEdit" %> + + + + + + + 编辑工程联络单 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/ContactEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/ContactEdit.aspx.cs new file mode 100644 index 0000000..3be7df8 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/ContactEdit.aspx.cs @@ -0,0 +1,158 @@ +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.JGZL +{ + public partial class ContactEdit : PageBase + { + #region 定义项 + /// + /// 主键 + /// + private string ContactId + { + get + { + return (string)ViewState["ContactId"]; + } + set + { + ViewState["ContactId"] = value; + } + } + + /// + /// 项目Id + /// + private string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ProjectId = Request.Params["projectId"]; + this.ContactId = Request.Params["contactId"]; + if (!string.IsNullOrEmpty(this.ContactId)) + { + var report = BLL.ContactService.GetContactById(this.ContactId); + if (report != null) + { + this.txtContractNumber.Text = report.ContractNumber; + this.txtDeliveryUnit.Text = report.DeliveryUnit; + this.txtSubjectMatter.Text = report.SubjectMatter; + this.txtContents.Text = report.Contents; + this.txtHandler.Text = report.Handler; + this.txtHandDate.Text = report.HandDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.HandDate) : ""; + this.txtReviewer.Text = report.Reviewer; + this.txtReviewDate.Text = report.ReviewDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.ReviewDate) : ""; + this.txtHandlingOpinion.Text = report.HandlingOpinion; + this.txtOpinionHandler.Text = report.OpinionHandler; + this.txtOpinionHandDate.Text = report.OpinionHandDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.OpinionHandDate) : ""; + this.txtOpinionsReviewer.Text = report.OpinionsReviewer; + this.txtOpinionsDate.Text = report.OpinionsDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.OpinionsDate) : ""; + } + } + else + { + //string steNames = string.Empty; + //List steelLists = new List(); + //var isoInfos = (from x in Funs.DB.HJGL_PW_IsoInfo where x.ProjectId == this.ProjectId select x).ToList(); + //foreach (var item in isoInfos) + //{ + // if (!string.IsNullOrEmpty(item.STE_ID)) + // { + // steelLists.Add(item.STE_ID); + // } + //} + //foreach (var item in steelLists.Distinct()) + //{ + // var ste = BLL.HJGL_MaterialService.GetSteelBySteID(item); + // if (ste != null) + // { + // steNames += ste.STE_Code + "、"; + // } + //} + //if (!string.IsNullOrEmpty(steNames)) + //{ + // steNames = steNames.Substring(0, steNames.LastIndexOf('、')); + //} + //double SumSize = Convert.ToDouble((from x in Funs.DB.HJGL_PW_JointInfo where x.ProjectId == this.ProjectId select x.JOT_Size).Sum()); + this.txtContractNumber.Text = BLL.Base_ProjectService.GetProjectCode(this.ProjectId); + this.txtSubjectMatter.Text = BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId).ProjectName + ",以下问题请设计单位审核:"; + } + } + } + #endregion + + #region 提交按钮 + /// + /// 提交按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_ContactMenuId, Const.BtnSave)) + { + Model.JGZL_Contact newReport = new Model.JGZL_Contact(); + newReport.ContractNumber = this.txtContractNumber.Text.Trim(); + newReport.DeliveryUnit = this.txtDeliveryUnit.Text.Trim(); + newReport.SubjectMatter = this.txtSubjectMatter.Text.Trim(); + newReport.Contents = this.txtContents.Text.Trim(); + newReport.Handler = this.txtHandler.Text.Trim(); + newReport.HandDate = Funs.GetNewDateTime(this.txtHandDate.Text); + newReport.Reviewer = this.txtReviewer.Text.Trim(); + newReport.ReviewDate = Funs.GetNewDateTime(this.txtReviewDate.Text); + newReport.HandlingOpinion = this.txtHandlingOpinion.Text; + newReport.OpinionHandler = this.txtOpinionHandler.Text; + newReport.OpinionHandDate =Funs.GetNewDateTime(this.txtOpinionHandDate.Text); + newReport.OpinionsReviewer = this.txtOpinionsReviewer.Text; + newReport.OpinionsDate = Funs.GetNewDateTime(this.txtOpinionsDate.Text); + if (!string.IsNullOrEmpty(this.ContactId)) + { + newReport.ContactId = this.ContactId; + BLL.ContactService.UpdateContact(newReport); + } + else + { + newReport.ProjectId = this.ProjectId; + newReport.CompileMan = this.CurrUser.UserId; + newReport.CompileDate = DateTime.Now; + newReport.ContactId = SQLHelper.GetNewID(typeof(Model.JGZL_Contact)); + this.ContactId = newReport.ContactId; + BLL.ContactService.AddContact(newReport); + } + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + return; + } + } + #endregion + } +} \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/JGZL/ContactEdit.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/ContactEdit.aspx.designer.cs new file mode 100644 index 0000000..db5b138 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/ContactEdit.aspx.designer.cs @@ -0,0 +1,188 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JGZL +{ + + + public partial class ContactEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// txtContractNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtContractNumber; + + /// + /// txtDeliveryUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDeliveryUnit; + + /// + /// txtSubjectMatter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtSubjectMatter; + + /// + /// txtContents 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtContents; + + /// + /// txtHandler 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtHandler; + + /// + /// txtHandDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtHandDate; + + /// + /// txtReviewer 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtReviewer; + + /// + /// txtReviewDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtReviewDate; + + /// + /// txtHandlingOpinion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtHandlingOpinion; + + /// + /// txtOpinionHandler 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtOpinionHandler; + + /// + /// txtOpinionHandDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtOpinionHandDate; + + /// + /// txtOpinionsReviewer 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtOpinionsReviewer; + + /// + /// txtOpinionsDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtOpinionsDate; + } +} diff --git a/HJGL_DS/FineUIPro.Web/Web.config b/HJGL_DS/FineUIPro.Web/Web.config index 79594b6..e233efb 100644 --- a/HJGL_DS/FineUIPro.Web/Web.config +++ b/HJGL_DS/FineUIPro.Web/Web.config @@ -67,7 +67,7 @@ - + diff --git a/HJGL_DS/Model/Model.cs b/HJGL_DS/Model/Model.cs index 4de670b..ff34b7b 100644 --- a/HJGL_DS/Model/Model.cs +++ b/HJGL_DS/Model/Model.cs @@ -377,6 +377,9 @@ namespace Model partial void InsertJGZL_CommencementReport(JGZL_CommencementReport instance); partial void UpdateJGZL_CommencementReport(JGZL_CommencementReport instance); partial void DeleteJGZL_CommencementReport(JGZL_CommencementReport instance); + partial void InsertJGZL_Contact(JGZL_Contact instance); + partial void UpdateJGZL_Contact(JGZL_Contact instance); + partial void DeleteJGZL_Contact(JGZL_Contact instance); partial void InsertJGZL_HandoverCertificate(JGZL_HandoverCertificate instance); partial void UpdateJGZL_HandoverCertificate(JGZL_HandoverCertificate instance); partial void DeleteJGZL_HandoverCertificate(JGZL_HandoverCertificate instance); @@ -1752,6 +1755,14 @@ namespace Model } } + public System.Data.Linq.Table JGZL_Contact + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table JGZL_HandoverCertificate { get @@ -4345,6 +4356,8 @@ namespace Model private EntitySet _JGZL_CommencementReport; + private EntitySet _JGZL_Contact; + private EntitySet _JGZL_HandoverCertificate; private EntitySet _Project_Installation; @@ -4473,6 +4486,7 @@ namespace Model this._HJGL_WeldingProcedure_WeldHotProcessCard = new EntitySet(new Action(this.attach_HJGL_WeldingProcedure_WeldHotProcessCard), new Action(this.detach_HJGL_WeldingProcedure_WeldHotProcessCard)); this._JGZL_AcceptanceCertificate = new EntitySet(new Action(this.attach_JGZL_AcceptanceCertificate), new Action(this.detach_JGZL_AcceptanceCertificate)); this._JGZL_CommencementReport = new EntitySet(new Action(this.attach_JGZL_CommencementReport), new Action(this.detach_JGZL_CommencementReport)); + this._JGZL_Contact = new EntitySet(new Action(this.attach_JGZL_Contact), new Action(this.detach_JGZL_Contact)); this._JGZL_HandoverCertificate = new EntitySet(new Action(this.attach_JGZL_HandoverCertificate), new Action(this.detach_JGZL_HandoverCertificate)); this._Project_Installation = new EntitySet(new Action(this.attach_Project_Installation), new Action(this.detach_Project_Installation)); this._Project_RoleButtonPower = new EntitySet(new Action(this.attach_Project_RoleButtonPower), new Action(this.detach_Project_RoleButtonPower)); @@ -5567,6 +5581,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_Contact_Base_Project", Storage="_JGZL_Contact", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet JGZL_Contact + { + get + { + return this._JGZL_Contact; + } + set + { + this._JGZL_Contact.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_HandoverCertificate_Base_Project", Storage="_JGZL_HandoverCertificate", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet JGZL_HandoverCertificate { @@ -6262,6 +6289,18 @@ namespace Model entity.Base_Project = null; } + private void attach_JGZL_Contact(JGZL_Contact entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_JGZL_Contact(JGZL_Contact entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_JGZL_HandoverCertificate(JGZL_HandoverCertificate entity) { this.SendPropertyChanging(); @@ -80054,6 +80093,534 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.JGZL_Contact")] + public partial class JGZL_Contact : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ContactId; + + private string _ProjectId; + + private string _ContractNumber; + + private string _DeliveryUnit; + + private string _SubjectMatter; + + private string _Contents; + + private string _Handler; + + private System.Nullable _HandDate; + + private string _Reviewer; + + private System.Nullable _ReviewDate; + + private string _HandlingOpinion; + + private string _OpinionHandler; + + private System.Nullable _OpinionHandDate; + + private string _OpinionsReviewer; + + private System.Nullable _OpinionsDate; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Base_Project; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnContactIdChanging(string value); + partial void OnContactIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnContractNumberChanging(string value); + partial void OnContractNumberChanged(); + partial void OnDeliveryUnitChanging(string value); + partial void OnDeliveryUnitChanged(); + partial void OnSubjectMatterChanging(string value); + partial void OnSubjectMatterChanged(); + partial void OnContentsChanging(string value); + partial void OnContentsChanged(); + partial void OnHandlerChanging(string value); + partial void OnHandlerChanged(); + partial void OnHandDateChanging(System.Nullable value); + partial void OnHandDateChanged(); + partial void OnReviewerChanging(string value); + partial void OnReviewerChanged(); + partial void OnReviewDateChanging(System.Nullable value); + partial void OnReviewDateChanged(); + partial void OnHandlingOpinionChanging(string value); + partial void OnHandlingOpinionChanged(); + partial void OnOpinionHandlerChanging(string value); + partial void OnOpinionHandlerChanged(); + partial void OnOpinionHandDateChanging(System.Nullable value); + partial void OnOpinionHandDateChanged(); + partial void OnOpinionsReviewerChanging(string value); + partial void OnOpinionsReviewerChanged(); + partial void OnOpinionsDateChanging(System.Nullable value); + partial void OnOpinionsDateChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public JGZL_Contact() + { + this._Base_Project = default(EntityRef); + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContactId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ContactId + { + get + { + return this._ContactId; + } + set + { + if ((this._ContactId != value)) + { + this.OnContactIdChanging(value); + this.SendPropertyChanging(); + this._ContactId = value; + this.SendPropertyChanged("ContactId"); + this.OnContactIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNumber", DbType="NVarChar(50)")] + public string ContractNumber + { + get + { + return this._ContractNumber; + } + set + { + if ((this._ContractNumber != value)) + { + this.OnContractNumberChanging(value); + this.SendPropertyChanging(); + this._ContractNumber = value; + this.SendPropertyChanged("ContractNumber"); + this.OnContractNumberChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DeliveryUnit", DbType="NVarChar(50)")] + public string DeliveryUnit + { + get + { + return this._DeliveryUnit; + } + set + { + if ((this._DeliveryUnit != value)) + { + this.OnDeliveryUnitChanging(value); + this.SendPropertyChanging(); + this._DeliveryUnit = value; + this.SendPropertyChanged("DeliveryUnit"); + this.OnDeliveryUnitChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubjectMatter", DbType="NVarChar(1000)")] + public string SubjectMatter + { + get + { + return this._SubjectMatter; + } + set + { + if ((this._SubjectMatter != value)) + { + this.OnSubjectMatterChanging(value); + this.SendPropertyChanging(); + this._SubjectMatter = value; + this.SendPropertyChanged("SubjectMatter"); + this.OnSubjectMatterChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Contents", DbType="NVarChar(2000)")] + public string Contents + { + get + { + return this._Contents; + } + set + { + if ((this._Contents != value)) + { + this.OnContentsChanging(value); + this.SendPropertyChanging(); + this._Contents = value; + this.SendPropertyChanged("Contents"); + this.OnContentsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Handler", DbType="NVarChar(50)")] + public string Handler + { + get + { + return this._Handler; + } + set + { + if ((this._Handler != value)) + { + this.OnHandlerChanging(value); + this.SendPropertyChanging(); + this._Handler = value; + this.SendPropertyChanged("Handler"); + this.OnHandlerChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandDate", DbType="DateTime")] + public System.Nullable HandDate + { + get + { + return this._HandDate; + } + set + { + if ((this._HandDate != value)) + { + this.OnHandDateChanging(value); + this.SendPropertyChanging(); + this._HandDate = value; + this.SendPropertyChanged("HandDate"); + this.OnHandDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Reviewer", DbType="NVarChar(50)")] + public string Reviewer + { + get + { + return this._Reviewer; + } + set + { + if ((this._Reviewer != value)) + { + this.OnReviewerChanging(value); + this.SendPropertyChanging(); + this._Reviewer = value; + this.SendPropertyChanged("Reviewer"); + this.OnReviewerChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReviewDate", DbType="DateTime")] + public System.Nullable ReviewDate + { + get + { + return this._ReviewDate; + } + set + { + if ((this._ReviewDate != value)) + { + this.OnReviewDateChanging(value); + this.SendPropertyChanging(); + this._ReviewDate = value; + this.SendPropertyChanged("ReviewDate"); + this.OnReviewDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandlingOpinion", DbType="NVarChar(1000)")] + public string HandlingOpinion + { + get + { + return this._HandlingOpinion; + } + set + { + if ((this._HandlingOpinion != value)) + { + this.OnHandlingOpinionChanging(value); + this.SendPropertyChanging(); + this._HandlingOpinion = value; + this.SendPropertyChanged("HandlingOpinion"); + this.OnHandlingOpinionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OpinionHandler", DbType="NVarChar(50)")] + public string OpinionHandler + { + get + { + return this._OpinionHandler; + } + set + { + if ((this._OpinionHandler != value)) + { + this.OnOpinionHandlerChanging(value); + this.SendPropertyChanging(); + this._OpinionHandler = value; + this.SendPropertyChanged("OpinionHandler"); + this.OnOpinionHandlerChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OpinionHandDate", DbType="DateTime")] + public System.Nullable OpinionHandDate + { + get + { + return this._OpinionHandDate; + } + set + { + if ((this._OpinionHandDate != value)) + { + this.OnOpinionHandDateChanging(value); + this.SendPropertyChanging(); + this._OpinionHandDate = value; + this.SendPropertyChanged("OpinionHandDate"); + this.OnOpinionHandDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OpinionsReviewer", DbType="NVarChar(50)")] + public string OpinionsReviewer + { + get + { + return this._OpinionsReviewer; + } + set + { + if ((this._OpinionsReviewer != value)) + { + this.OnOpinionsReviewerChanging(value); + this.SendPropertyChanging(); + this._OpinionsReviewer = value; + this.SendPropertyChanged("OpinionsReviewer"); + this.OnOpinionsReviewerChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OpinionsDate", DbType="DateTime")] + public System.Nullable OpinionsDate + { + get + { + return this._OpinionsDate; + } + set + { + if ((this._OpinionsDate != value)) + { + this.OnOpinionsDateChanging(value); + this.SendPropertyChanging(); + this._OpinionsDate = value; + this.SendPropertyChanged("OpinionsDate"); + this.OnOpinionsDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + if (this._Sys_User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_Contact_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.JGZL_Contact.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.JGZL_Contact.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_Contact_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] + public Sys_User Sys_User + { + get + { + return this._Sys_User.Entity; + } + set + { + Sys_User previousValue = this._Sys_User.Entity; + if (((previousValue != value) + || (this._Sys_User.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Sys_User.Entity = null; + previousValue.JGZL_Contact.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.JGZL_Contact.Add(this); + this._CompileMan = value.UserId; + } + else + { + this._CompileMan = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + 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.JGZL_HandoverCertificate")] public partial class JGZL_HandoverCertificate : INotifyPropertyChanging, INotifyPropertyChanged { @@ -101867,6 +102434,8 @@ namespace Model private EntitySet _JGZL_CommencementReport; + private EntitySet _JGZL_Contact; + private EntitySet _JGZL_HandoverCertificate; private EntitySet _Project_User; @@ -101952,6 +102521,7 @@ namespace Model this._HJGL_WeldingProcedure_WeldHotProcessCard = new EntitySet(new Action(this.attach_HJGL_WeldingProcedure_WeldHotProcessCard), new Action(this.detach_HJGL_WeldingProcedure_WeldHotProcessCard)); this._JGZL_AcceptanceCertificate = new EntitySet(new Action(this.attach_JGZL_AcceptanceCertificate), new Action(this.detach_JGZL_AcceptanceCertificate)); this._JGZL_CommencementReport = new EntitySet(new Action(this.attach_JGZL_CommencementReport), new Action(this.detach_JGZL_CommencementReport)); + this._JGZL_Contact = new EntitySet(new Action(this.attach_JGZL_Contact), new Action(this.detach_JGZL_Contact)); this._JGZL_HandoverCertificate = new EntitySet(new Action(this.attach_JGZL_HandoverCertificate), new Action(this.detach_JGZL_HandoverCertificate)); this._Project_User = new EntitySet(new Action(this.attach_Project_User), new Action(this.detach_Project_User)); this._Project_UserButtonPower = new EntitySet(new Action(this.attach_Project_UserButtonPower), new Action(this.detach_Project_UserButtonPower)); @@ -102617,6 +103187,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_Contact_Sys_User", Storage="_JGZL_Contact", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet JGZL_Contact + { + get + { + return this._JGZL_Contact; + } + set + { + this._JGZL_Contact.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_HandoverCertificate_Sys_User", Storage="_JGZL_HandoverCertificate", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] public EntitySet JGZL_HandoverCertificate { @@ -103021,6 +103604,18 @@ namespace Model entity.Sys_User = null; } + private void attach_JGZL_Contact(JGZL_Contact entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_JGZL_Contact(JGZL_Contact entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + private void attach_JGZL_HandoverCertificate(JGZL_HandoverCertificate entity) { this.SendPropertyChanging();