diff --git a/DataBase/版本日志/SGGLDB_WH_2024-01-24.sql b/DataBase/版本日志/SGGLDB_WH_2024-01-24.sql
new file mode 100644
index 00000000..c3d9d3e5
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_WH_2024-01-24.sql
@@ -0,0 +1,40 @@
+CREATE TABLE [dbo].[TestRun_TrainContract](
+ [TrainContractId] [nvarchar](50) NOT NULL,
+ [ProjectId] [nvarchar](50) NULL,
+ [TrainContractCode] [nvarchar](50) NULL,
+ [TrainContractName] [nvarchar](50) NULL,
+ [TrainContractDate] [datetime] NULL,
+ [Remark] [nvarchar](500) NULL,
+ CONSTRAINT [PK_TestRun_TrainContract] PRIMARY KEY CLUSTERED
+(
+ [TrainContractId] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[TestRun_TrainContract] WITH CHECK ADD CONSTRAINT [FK_TestRun_TrainContract_Base_Project] FOREIGN KEY([ProjectId])
+REFERENCES [dbo].[Base_Project] ([ProjectId])
+GO
+
+ALTER TABLE [dbo].[TestRun_TrainContract] CHECK CONSTRAINT [FK_TestRun_TrainContract_Base_Project]
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_TrainContract', @level2type=N'COLUMN',@level2name=N'TrainContractId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_TrainContract', @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'TestRun_TrainContract', @level2type=N'COLUMN',@level2name=N'TrainContractCode'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͬ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_TrainContract', @level2type=N'COLUMN',@level2name=N'TrainContractName'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ǩ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_TrainContract', @level2type=N'COLUMN',@level2name=N'TrainContractDate'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TestRun_TrainContract', @level2type=N'COLUMN',@level2name=N'Remark'
+GO
+
+
diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj
index e884d9f1..1a5fbae2 100644
--- a/SGGL/BLL/BLL.csproj
+++ b/SGGL/BLL/BLL.csproj
@@ -755,6 +755,7 @@
+
diff --git a/SGGL/BLL/TestRun/PersonTrain/TrainContractService.cs b/SGGL/BLL/TestRun/PersonTrain/TrainContractService.cs
new file mode 100644
index 00000000..34b83559
--- /dev/null
+++ b/SGGL/BLL/TestRun/PersonTrain/TrainContractService.cs
@@ -0,0 +1,74 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ ///
+ /// 培训合同
+ ///
+ public class TrainContractService
+ {
+ ///
+ /// 根据主键获取合同信息
+ ///
+ ///
+ ///
+ public static Model.TestRun_TrainContract GetTrainContractById(string trainContractId)
+ {
+ return Funs.DB.TestRun_TrainContract.FirstOrDefault(e => e.TrainContractId == trainContractId);
+ }
+
+ ///
+ /// 添加合同信息
+ ///
+ ///
+ public static void AddTrainContract(Model.TestRun_TrainContract trainContract)
+ {
+ Model.TestRun_TrainContract newTrainContract = new Model.TestRun_TrainContract
+ {
+ TrainContractId = trainContract.TrainContractId,
+ ProjectId = trainContract.ProjectId,
+ TrainContractCode = trainContract.TrainContractCode,
+ TrainContractName = trainContract.TrainContractName,
+ TrainContractDate = trainContract.TrainContractDate,
+ Remark = trainContract.Remark
+ };
+ Funs.DB.TestRun_TrainContract.InsertOnSubmit(newTrainContract);
+ Funs.DB.SubmitChanges();
+ }
+
+ ///
+ /// 修改合同信息
+ ///
+ ///
+ public static void UpdateTrainContract(Model.TestRun_TrainContract trainContract)
+ {
+ Model.TestRun_TrainContract newTrainContract = Funs.DB.TestRun_TrainContract.FirstOrDefault(e => e.TrainContractId == trainContract.TrainContractId);
+ if (newTrainContract != null)
+ {
+ newTrainContract.TrainContractCode = trainContract.TrainContractCode;
+ newTrainContract.TrainContractName = trainContract.TrainContractName;
+ newTrainContract.TrainContractDate = trainContract.TrainContractDate;
+ newTrainContract.Remark = trainContract.Remark;
+ Funs.DB.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除合同信息
+ ///
+ ///
+ public static void DeleteTrainContractById(string trainContractId)
+ {
+ Model.TestRun_TrainContract newTrainContract = Funs.DB.TestRun_TrainContract.FirstOrDefault(e => e.TrainContractId == trainContractId);
+ if (newTrainContract != null)
+ {
+ Funs.DB.TestRun_TrainContract.DeleteOnSubmit(newTrainContract);
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt
index e69de29b..15df4d3a 100644
--- a/SGGL/FineUIPro.Web/ErrLog.txt
+++ b/SGGL/FineUIPro.Web/ErrLog.txt
@@ -0,0 +1,134 @@
+
+错误信息开始=====>
+错误类型:ArgumentException
+错误信息:提供的 URI 方案“http”无效,应为“https”。
+参数名: via
+错误堆栈:
+ 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
+ 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
+ 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.ChannelFactory`1.CreateChannel()
+ 在 System.ServiceModel.ClientBase`1.CreateChannel()
+ 在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
+ 在 System.ServiceModel.ClientBase`1.get_Channel()
+ 在 BLL.CNCECHSSEService.HSSEServiceClient.GetSupervise_SubUnitReportListToSUB() 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 14204
+ 在 BLL.CNCECHSSEWebService.getSupervise_SubUnitReport() 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2181
+出错时间:01/23/2024 12:21:40
+出错时间:01/23/2024 12:21:40
+
+
+错误信息开始=====>
+错误类型:ArgumentException
+错误信息:提供的 URI 方案“http”无效,应为“https”。
+参数名: via
+错误堆栈:
+ 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
+ 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
+ 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.ChannelFactory`1.CreateChannel()
+ 在 System.ServiceModel.ClientBase`1.CreateChannel()
+ 在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
+ 在 System.ServiceModel.ClientBase`1.get_Channel()
+ 在 BLL.CNCECHSSEService.HSSEServiceClient.GetCheck_CheckInfo_Table8ItemListToSUB(String unitId) 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 14228
+ 在 BLL.CNCECHSSEWebService.getCheck_CheckInfo_Table8Item() 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2046
+出错时间:01/23/2024 12:21:41
+出错时间:01/23/2024 12:21:41
+
+
+错误信息开始=====>
+错误类型:ArgumentException
+错误信息:提供的 URI 方案“http”无效,应为“https”。
+参数名: via
+错误堆栈:
+ 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
+ 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
+ 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.ChannelFactory`1.CreateChannel()
+ 在 System.ServiceModel.ClientBase`1.CreateChannel()
+ 在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
+ 在 System.ServiceModel.ClientBase`1.get_Channel()
+ 在 BLL.CNCECHSSEService.HSSEServiceClient.GetCheck_CheckRectifyListToSUB(String unitId) 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 14220
+ 在 BLL.CNCECHSSEWebService.getCheck_CheckRectify() 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1942
+出错时间:01/23/2024 12:21:41
+出错时间:01/23/2024 12:21:41
+
+
+错误信息开始=====>
+错误类型:ArgumentException
+错误信息:提供的 URI 方案“http”无效,应为“https”。
+参数名: via
+错误堆栈:
+ 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
+ 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
+ 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
+ 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
+ 在 System.ServiceModel.ChannelFactory`1.CreateChannel()
+ 在 System.ServiceModel.ClientBase`1.CreateChannel()
+ 在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
+ 在 System.ServiceModel.ClientBase`1.get_Channel()
+ 在 BLL.CNCECHSSEService.HSSEServiceClient.GetInformation_UrgeReportToSUB(String unitId) 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 14020
+ 在 BLL.CNCECHSSEWebService.getInformation_UrgeReport() 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1884
+出错时间:01/23/2024 12:21:41
+出错时间:01/23/2024 12:21:41
+
+
+错误信息开始=====>
+错误类型:HttpParseException
+错误信息:基类包括字段“txtRemark”,但其类型(FineUIPro.TextBox)与控件(FineUIPro.TextArea)的类型不兼容。
+错误堆栈:
+ 在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildFieldDeclaration(ControlBuilder builder)
+ 在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
+ 在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
+ 在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
+ 在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
+ 在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
+ 在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
+ 在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
+ 在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
+ 在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
+ 在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
+ 在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
+ 在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
+ 在 System.Web.Compilation.TemplateControlCodeDomTreeGenerator.BuildMiscClassMembers()
+ 在 System.Web.Compilation.PageCodeDomTreeGenerator.BuildMiscClassMembers()
+ 在 System.Web.Compilation.BaseCodeDomTreeGenerator.BuildSourceDataTree()
+ 在 System.Web.Compilation.BaseCodeDomTreeGenerator.GetCodeDomTree(CodeDomProvider codeDomProvider, StringResourceBuilder stringResourceBuilder, VirtualPath virtualPath)
+ 在 System.Web.Compilation.BaseTemplateBuildProvider.GenerateCode(AssemblyBuilder assemblyBuilder)
+ 在 System.Web.Compilation.AssemblyBuilder.AddBuildProvider(BuildProvider buildProvider)
+出错时间:01/24/2024 19:37:42
+出错文件:http://localhost:8579/TestRun/PersonTrain/TrainContractEdit.aspx?id=684accf8-74c8-4ba7-817f-914011ab0a03
+IP地址:::1
+
+出错时间:01/24/2024 19:37:42
+
diff --git a/SGGL/FineUIPro.Web/FileUpload/TestRun/PersonTrain/TrainContract/2024-01/638417217621619302_WBS复制粘贴说明.docx b/SGGL/FineUIPro.Web/FileUpload/TestRun/PersonTrain/TrainContract/2024-01/638417217621619302_WBS复制粘贴说明.docx
new file mode 100644
index 00000000..7a337fb6
--- /dev/null
+++ b/SGGL/FineUIPro.Web/FileUpload/TestRun/PersonTrain/TrainContract/2024-01/638417217621619302_WBS复制粘贴说明.docx
@@ -0,0 +1,3 @@
+1、复制按钮复制的是选中的节点及详细信息,例如选中土方工程右击复制,则复制的是土方工程及土方工程的详细信息,若不是在末级菜单复制,则复制的是选中节点及以下子节点并且包含详细信息,例如选中节点地基基础点击复制则复制的是地基基础及地基基础下的土方工程、地基处理等子节点并且包含每个复制节点的详细信息。
+2、粘贴按钮是将复制的内容粘贴在选中节点的下方,例如复制了地基基础,选中土建右击粘贴,则把复制地基基础及子节点粘贴在土建下方节点。
+
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index b0a68f5a..56b8c24e 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -1777,6 +1777,7 @@
+
@@ -15944,6 +15945,13 @@
TrainContract.aspx
+
+ TrainContractEdit.aspx
+ ASPXCodeBehind
+
+
+ TrainContractEdit.aspx
+
TrainPlan.aspx
ASPXCodeBehind
diff --git a/SGGL/FineUIPro.Web/TestRun/PersonTrain/TrainContract.aspx b/SGGL/FineUIPro.Web/TestRun/PersonTrain/TrainContract.aspx
index be50b83a..d4773a40 100644
--- a/SGGL/FineUIPro.Web/TestRun/PersonTrain/TrainContract.aspx
+++ b/SGGL/FineUIPro.Web/TestRun/PersonTrain/TrainContract.aspx
@@ -4,13 +4,108 @@
-
+
培训合同
+
diff --git a/SGGL/FineUIPro.Web/TestRun/PersonTrain/TrainContract.aspx.cs b/SGGL/FineUIPro.Web/TestRun/PersonTrain/TrainContract.aspx.cs
index eff8fccc..541f8200 100644
--- a/SGGL/FineUIPro.Web/TestRun/PersonTrain/TrainContract.aspx.cs
+++ b/SGGL/FineUIPro.Web/TestRun/PersonTrain/TrainContract.aspx.cs
@@ -1,17 +1,219 @@
-using System;
+using BLL;
+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.TestRun.PersonTrain
{
- public partial class TrainContract : System.Web.UI.Page
+ public partial class TrainContract : PageBase
{
+ #region 加载
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
protected void Page_Load(object sender, EventArgs e)
{
-
+ if (!IsPostBack)
+ {
+ GetButtonPower();
+ BindGrid();
+ btnNew.OnClientClick = Window1.GetShowReference("TrainContractEdit.aspx") + "return false;";
+ }
}
+ #endregion
+
+ #region 绑定数据
+ ///
+ /// 绑定数据
+ ///
+ private void BindGrid()
+ {
+ string strSql = @"SELECT TrainContract.TrainContractId,
+ TrainContract.ProjectId,
+ TrainContract.TrainContractCode,
+ TrainContract.TrainContractName,
+ TrainContract.TrainContractDate,
+ TrainContract.Remark
+ FROM TestRun_TrainContract AS TrainContract WHERE TrainContract.ProjectId=@projectId";
+ List listStr = new List();
+ listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId));
+ if (!string.IsNullOrEmpty(this.txtTrainContractCode.Text.Trim()))
+ {
+ strSql += " AND TrainContract.TrainContractCode LIKE @TrainContractCode";
+ listStr.Add(new SqlParameter("@TrainContractCode", "%" + this.txtTrainContractCode.Text.Trim() + "%"));
+ }
+ if (!string.IsNullOrEmpty(this.txtTrainContractName.Text.Trim()))
+ {
+ strSql += " AND TrainContract.TrainContractName LIKE @TrainContractName";
+ listStr.Add(new SqlParameter("@TrainContractName", "%" + this.txtTrainContractName.Text.Trim() + "%"));
+ }
+ SqlParameter[] parameter = listStr.ToArray();
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+ Grid1.RecordCount = tb.Rows.Count;
+ var table = this.GetPagedDataTable(Grid1, tb);
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+ }
+ #endregion
+
+ #region 查询
+ ///
+ /// 查询
+ ///
+ ///
+ ///
+ protected void btnSearch_Click(object sender, EventArgs e)
+ {
+ BindGrid();
+ }
+ #endregion
+
+ #region 分页
+ ///
+ /// 分页索引事件
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ BindGrid();
+ }
+
+ ///
+ /// 分页下拉框事件
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
+ BindGrid();
+ }
+
+ ///
+ /// 排序
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
+ {
+ Grid1.SortDirection = e.SortDirection;
+ Grid1.SortField = e.SortField;
+ BindGrid();
+ }
+ #endregion
+
+ #region 关闭窗体
+ ///
+ /// 关闭窗体
+ ///
+ ///
+ ///
+ protected void Window1_Close(object sender, WindowCloseEventArgs e)
+ {
+ BindGrid();
+ }
+ #endregion
+
+ #region 编辑
+ ///
+ /// 右键编辑
+ ///
+ ///
+ ///
+ protected void btnMenuModify_Click(object sender, EventArgs e)
+ {
+ EditData();
+ }
+
+ ///
+ /// Grid行双击事件
+ ///
+ ///
+ ///
+ protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
+ {
+ EditData();
+ }
+
+ ///
+ /// 编辑
+ ///
+ private void EditData()
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
+ return;
+ }
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TrainContractEdit.aspx?id={0}", Grid1.SelectedRowID, "编辑 - ")));
+ }
+ #endregion
+
+ #region 删除
+ ///
+ /// 右键删除
+ ///
+ ///
+ ///
+ protected void btnMenuDel_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length > 0)
+ {
+ foreach (int rowIndex in Grid1.SelectedRowIndexArray)
+ {
+ string rowID = Grid1.DataKeys[rowIndex][0].ToString();
+ var data = BLL.TrainContractService.GetTrainContractById(rowID);
+ if (data != null)
+ {
+ BLL.TrainContractService.DeleteTrainContractById(rowID);
+ }
+ }
+ BindGrid();
+ ShowNotify("删除数据成功!", MessageBoxIcon.Success);
+ }
+ }
+ #endregion
+
+ #region Grid行点击事件
+ protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
+ {
+ string id = Grid1.DataKeys[e.RowIndex][0].ToString();
+ if (e.CommandName == "AttachUrl")//附件
+ {
+ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/TestRun/PersonTrain/TrainContract&menuId={1}", id, BLL.Const.TrainContractMenuId)));
+ }
+ }
+ #endregion
+
+ #region 权限设置
+ ///
+ /// 权限设置
+ ///
+ private void GetButtonPower()
+ {
+ var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.TrainContractMenuId);
+ if (buttonList.Count() > 0)
+ {
+ if (buttonList.Contains(BLL.Const.BtnAdd))
+ {
+ this.btnNew.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnModify))
+ {
+ this.btnMenuModify.Hidden = false;
+ this.Grid1.EnableRowDoubleClickEvent = true;
+ }
+ if (buttonList.Contains(BLL.Const.BtnDelete))
+ {
+ this.btnMenuDel.Hidden = false;
+ }
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/TestRun/PersonTrain/TrainContract.aspx.designer.cs b/SGGL/FineUIPro.Web/TestRun/PersonTrain/TrainContract.aspx.designer.cs
index 3714a3a4..f80b95a9 100644
--- a/SGGL/FineUIPro.Web/TestRun/PersonTrain/TrainContract.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/TestRun/PersonTrain/TrainContract.aspx.designer.cs
@@ -20,5 +20,158 @@ namespace FineUIPro.Web.TestRun.PersonTrain {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
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;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// txtTrainContractCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtTrainContractCode;
+
+ ///
+ /// txtTrainContractName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtTrainContractName;
+
+ ///
+ /// btnSearch 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSearch;
+
+ ///
+ /// btnNew 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnNew;
+
+ ///
+ /// lblPageIndex 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPageIndex;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+
+ ///
+ /// WindowAtt 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window WindowAtt;
+
+ ///
+ /// Menu1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Menu Menu1;
+
+ ///
+ /// btnMenuModify 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuModify;
+
+ ///
+ /// btnMenuDel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuDel;
}
}
diff --git a/SGGL/FineUIPro.Web/TestRun/PersonTrain/TrainContractEdit.aspx b/SGGL/FineUIPro.Web/TestRun/PersonTrain/TrainContractEdit.aspx
new file mode 100644
index 00000000..49448a5f
--- /dev/null
+++ b/SGGL/FineUIPro.Web/TestRun/PersonTrain/TrainContractEdit.aspx
@@ -0,0 +1,86 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrainContractEdit.aspx.cs" Inherits="FineUIPro.Web.TestRun.PersonTrain.TrainContractEdit" %>
+
+
+
+
+
+
+ 编辑培训合同
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/TestRun/PersonTrain/TrainContractEdit.aspx.cs b/SGGL/FineUIPro.Web/TestRun/PersonTrain/TrainContractEdit.aspx.cs
new file mode 100644
index 00000000..dd56aeb5
--- /dev/null
+++ b/SGGL/FineUIPro.Web/TestRun/PersonTrain/TrainContractEdit.aspx.cs
@@ -0,0 +1,93 @@
+using BLL;
+using System;
+
+namespace FineUIPro.Web.TestRun.PersonTrain
+{
+ public partial class TrainContractEdit : PageBase
+ {
+ #region 加载
+ ///
+ /// 页面加载
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ string id = Request.Params["id"];
+ if (!string.IsNullOrEmpty(id))
+ {
+ Model.TestRun_TrainContract data = BLL.TrainContractService.GetTrainContractById(id);
+ if (data != null)
+ {
+ this.hdId.Text = id;
+ this.txtTrainContractDate.Text = data.TrainContractDate.HasValue ? string.Format("{0:yyyy-MM-dd}", data.TrainContractDate) : "";
+ this.txtTrainContractCode.Text = data.TrainContractCode;
+ this.txtTrainContractName.Text = data.TrainContractName;
+ this.txtRemark.Text = data.Remark;
+ }
+ }
+ else
+ {
+ this.txtTrainContractDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ }
+ }
+ }
+ #endregion
+
+ #region 附件上传
+ ///
+ /// 附件上传
+ ///
+ ///
+ ///
+ protected void btnAttach_Click(object sender, EventArgs e)
+ {
+ if (string.IsNullOrEmpty(this.hdId.Text)) //新增记录
+ {
+ this.hdId.Text = SQLHelper.GetNewID(typeof(Model.TestRun_TrainContract));
+ }
+ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/TestRun/PersonTrain/TrainContract&menuId={1}", this.hdId.Text, BLL.Const.TrainContractMenuId)));
+ }
+ #endregion
+
+ #region 保存
+ ///
+ /// 保存按钮
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ string id = Request.Params["id"];
+ Model.TestRun_TrainContract newData = new Model.TestRun_TrainContract();
+ newData.TrainContractCode = this.txtTrainContractCode.Text.Trim();
+ newData.TrainContractName = this.txtTrainContractName.Text.Trim();
+ newData.TrainContractDate = Funs.GetNewDateTime(this.txtTrainContractDate.Text.Trim());
+ newData.Remark = this.txtRemark.Text.Trim();
+ newData.ProjectId = this.CurrUser.LoginProjectId;
+ if (!string.IsNullOrEmpty(id))
+ {
+ newData.TrainContractId = id;
+ BLL.TrainContractService.UpdateTrainContract(newData);
+ }
+ else
+ {
+ if (!string.IsNullOrEmpty(this.hdId.Text))
+ {
+ newData.TrainContractId = this.hdId.Text.Trim();
+ }
+ else
+ {
+ newData.TrainContractId = SQLHelper.GetNewID(typeof(Model.TestRun_TrainContract));
+ this.hdId.Text = newData.TrainContractId;
+ }
+ BLL.TrainContractService.AddTrainContract(newData);
+ }
+ ShowNotify("保存成功!", MessageBoxIcon.Success);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/TestRun/PersonTrain/TrainContractEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/TestRun/PersonTrain/TrainContractEdit.aspx.designer.cs
new file mode 100644
index 00000000..b3f85c2b
--- /dev/null
+++ b/SGGL/FineUIPro.Web/TestRun/PersonTrain/TrainContractEdit.aspx.designer.cs
@@ -0,0 +1,177 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.TestRun.PersonTrain {
+
+
+ public partial class TrainContractEdit {
+
+ ///
+ /// 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;
+
+ ///
+ /// hdAttachUrl 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdAttachUrl;
+
+ ///
+ /// hdId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdId;
+
+ ///
+ /// ContentPanel2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ContentPanel ContentPanel2;
+
+ ///
+ /// Form2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form Form2;
+
+ ///
+ /// txtTrainContractCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtTrainContractCode;
+
+ ///
+ /// txtTrainContractName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtTrainContractName;
+
+ ///
+ /// txtTrainContractDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtTrainContractDate;
+
+ ///
+ /// txtRemark 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtRemark;
+
+ ///
+ /// Panel3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel3;
+
+ ///
+ /// lblAttach 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label lblAttach;
+
+ ///
+ /// btnAttach 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnAttach;
+
+ ///
+ /// WindowAtt 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window WindowAtt;
+ }
+}
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index f76fb5ca..eabdf5fa 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -2270,6 +2270,9 @@ namespace Model
partial void InsertTestRun_TermItemInspectedUser(TestRun_TermItemInspectedUser instance);
partial void UpdateTestRun_TermItemInspectedUser(TestRun_TermItemInspectedUser instance);
partial void DeleteTestRun_TermItemInspectedUser(TestRun_TermItemInspectedUser instance);
+ partial void InsertTestRun_TrainContract(TestRun_TrainContract instance);
+ partial void UpdateTestRun_TrainContract(TestRun_TrainContract instance);
+ partial void DeleteTestRun_TrainContract(TestRun_TrainContract instance);
partial void InsertTestRun_TrainRecords(TestRun_TrainRecords instance);
partial void UpdateTestRun_TrainRecords(TestRun_TrainRecords instance);
partial void DeleteTestRun_TrainRecords(TestRun_TrainRecords instance);
@@ -8504,6 +8507,14 @@ namespace Model
}
}
+ public System.Data.Linq.Table TestRun_TrainContract
+ {
+ get
+ {
+ return this.GetTable();
+ }
+ }
+
public System.Data.Linq.Table TestRun_TrainRecords
{
get
@@ -25806,6 +25817,8 @@ namespace Model
private EntitySet _TestRun_PersonTrainPlan;
+ private EntitySet _TestRun_TrainContract;
+
private EntitySet _TestRun_TrainRecords;
private EntitySet _Training_Plan;
@@ -26206,6 +26219,7 @@ namespace Model
this._Sys_User = new EntitySet(new Action(this.attach_Sys_User), new Action(this.detach_Sys_User));
this._Sys_UserRead = new EntitySet(new Action(this.attach_Sys_UserRead), new Action(this.detach_Sys_UserRead));
this._TestRun_PersonTrainPlan = new EntitySet(new Action(this.attach_TestRun_PersonTrainPlan), new Action(this.detach_TestRun_PersonTrainPlan));
+ this._TestRun_TrainContract = new EntitySet(new Action(this.attach_TestRun_TrainContract), new Action(this.detach_TestRun_TrainContract));
this._TestRun_TrainRecords = new EntitySet(new Action(this.attach_TestRun_TrainRecords), new Action(this.detach_TestRun_TrainRecords));
this._Training_Plan = new EntitySet(new Action(this.attach_Training_Plan), new Action(this.detach_Training_Plan));
this._Training_Task = new EntitySet(new Action(this.attach_Training_Task), new Action(this.detach_Training_Task));
@@ -30615,6 +30629,19 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_TestRun_TrainContract_Base_Project", Storage="_TestRun_TrainContract", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")]
+ public EntitySet TestRun_TrainContract
+ {
+ get
+ {
+ return this._TestRun_TrainContract;
+ }
+ set
+ {
+ this._TestRun_TrainContract.Assign(value);
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_TestRun_TrainRecords_Base_Project", Storage="_TestRun_TrainRecords", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")]
public EntitySet TestRun_TrainRecords
{
@@ -34135,6 +34162,18 @@ namespace Model
entity.Base_Project = null;
}
+ private void attach_TestRun_TrainContract(TestRun_TrainContract entity)
+ {
+ this.SendPropertyChanging();
+ entity.Base_Project = this;
+ }
+
+ private void detach_TestRun_TrainContract(TestRun_TrainContract entity)
+ {
+ this.SendPropertyChanging();
+ entity.Base_Project = null;
+ }
+
private void attach_TestRun_TrainRecords(TestRun_TrainRecords entity)
{
this.SendPropertyChanging();
@@ -359310,6 +359349,229 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.TestRun_TrainContract")]
+ public partial class TestRun_TrainContract : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+ private string _TrainContractId;
+
+ private string _ProjectId;
+
+ private string _TrainContractCode;
+
+ private string _TrainContractName;
+
+ private System.Nullable _TrainContractDate;
+
+ private string _Remark;
+
+ private EntityRef _Base_Project;
+
+ #region 可扩展性方法定义
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnTrainContractIdChanging(string value);
+ partial void OnTrainContractIdChanged();
+ partial void OnProjectIdChanging(string value);
+ partial void OnProjectIdChanged();
+ partial void OnTrainContractCodeChanging(string value);
+ partial void OnTrainContractCodeChanged();
+ partial void OnTrainContractNameChanging(string value);
+ partial void OnTrainContractNameChanged();
+ partial void OnTrainContractDateChanging(System.Nullable value);
+ partial void OnTrainContractDateChanged();
+ partial void OnRemarkChanging(string value);
+ partial void OnRemarkChanged();
+ #endregion
+
+ public TestRun_TrainContract()
+ {
+ this._Base_Project = default(EntityRef);
+ OnCreated();
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrainContractId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
+ public string TrainContractId
+ {
+ get
+ {
+ return this._TrainContractId;
+ }
+ set
+ {
+ if ((this._TrainContractId != value))
+ {
+ this.OnTrainContractIdChanging(value);
+ this.SendPropertyChanging();
+ this._TrainContractId = value;
+ this.SendPropertyChanged("TrainContractId");
+ this.OnTrainContractIdChanged();
+ }
+ }
+ }
+
+ [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="_TrainContractCode", DbType="NVarChar(50)")]
+ public string TrainContractCode
+ {
+ get
+ {
+ return this._TrainContractCode;
+ }
+ set
+ {
+ if ((this._TrainContractCode != value))
+ {
+ this.OnTrainContractCodeChanging(value);
+ this.SendPropertyChanging();
+ this._TrainContractCode = value;
+ this.SendPropertyChanged("TrainContractCode");
+ this.OnTrainContractCodeChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrainContractName", DbType="NVarChar(50)")]
+ public string TrainContractName
+ {
+ get
+ {
+ return this._TrainContractName;
+ }
+ set
+ {
+ if ((this._TrainContractName != value))
+ {
+ this.OnTrainContractNameChanging(value);
+ this.SendPropertyChanging();
+ this._TrainContractName = value;
+ this.SendPropertyChanged("TrainContractName");
+ this.OnTrainContractNameChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrainContractDate", DbType="DateTime")]
+ public System.Nullable TrainContractDate
+ {
+ get
+ {
+ return this._TrainContractDate;
+ }
+ set
+ {
+ if ((this._TrainContractDate != value))
+ {
+ this.OnTrainContractDateChanging(value);
+ this.SendPropertyChanging();
+ this._TrainContractDate = value;
+ this.SendPropertyChanged("TrainContractDate");
+ this.OnTrainContractDateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(500)")]
+ public string Remark
+ {
+ get
+ {
+ return this._Remark;
+ }
+ set
+ {
+ if ((this._Remark != value))
+ {
+ this.OnRemarkChanging(value);
+ this.SendPropertyChanging();
+ this._Remark = value;
+ this.SendPropertyChanged("Remark");
+ this.OnRemarkChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_TestRun_TrainContract_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.TestRun_TrainContract.Remove(this);
+ }
+ this._Base_Project.Entity = value;
+ if ((value != null))
+ {
+ value.TestRun_TrainContract.Add(this);
+ this._ProjectId = value.ProjectId;
+ }
+ else
+ {
+ this._ProjectId = default(string);
+ }
+ this.SendPropertyChanged("Base_Project");
+ }
+ }
+ }
+
+ 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.TestRun_TrainRecords")]
public partial class TestRun_TrainRecords : INotifyPropertyChanging, INotifyPropertyChanged
{