20240124 培训合同

This commit is contained in:
毕文静 2024-01-24 19:41:02 +08:00
parent 698d687ebf
commit b1a95a2a14
13 changed files with 1334 additions and 9 deletions

View File

@ -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

View File

@ -755,6 +755,7 @@
<Compile Include="TestRun\PersonTrain\PersonTrainPlanService.cs" />
<Compile Include="TestRun\PersonTrain\TrainContactService.cs" />
<Compile Include="TestRun\PersonTrain\TrainContentService.cs" />
<Compile Include="TestRun\PersonTrain\TrainContractService.cs" />
<Compile Include="TestRun\PersonTrain\TrainRecordsService.cs" />
<Compile Include="TestRun\ProduceProperty\AnalySampService.cs" />
<Compile Include="TestRun\ProduceProperty\PropertyRunOthersCheckService.cs" />

View File

@ -0,0 +1,74 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
/// <summary>
/// 培训合同
/// </summary>
public class TrainContractService
{
/// <summary>
/// 根据主键获取合同信息
/// </summary>
/// <param name="trainContractId"></param>
/// <returns></returns>
public static Model.TestRun_TrainContract GetTrainContractById(string trainContractId)
{
return Funs.DB.TestRun_TrainContract.FirstOrDefault(e => e.TrainContractId == trainContractId);
}
/// <summary>
/// 添加合同信息
/// </summary>
/// <param name="trainContract"></param>
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();
}
/// <summary>
/// 修改合同信息
/// </summary>
/// <param name="trainContract"></param>
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();
}
}
/// <summary>
/// 根据主键删除合同信息
/// </summary>
/// <param name="trainContractId"></param>
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();
}
}
}
}

View File

@ -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

View File

@ -0,0 +1,3 @@
1、复制按钮复制的是选中的节点及详细信息例如选中土方工程右击复制则复制的是土方工程及土方工程的详细信息若不是在末级菜单复制则复制的是选中节点及以下子节点并且包含详细信息例如选中节点地基基础点击复制则复制的是地基基础及地基基础下的土方工程、地基处理等子节点并且包含每个复制节点的详细信息。
2、粘贴按钮是将复制的内容粘贴在选中节点的下方例如复制了地基基础选中土建右击粘贴则把复制地基基础及子节点粘贴在土建下方节点。

View File

@ -1777,6 +1777,7 @@
<Content Include="TestRun\PersonTrain\TrainContent.aspx" />
<Content Include="TestRun\PersonTrain\TrainContentEdit.aspx" />
<Content Include="TestRun\PersonTrain\TrainContract.aspx" />
<Content Include="TestRun\PersonTrain\TrainContractEdit.aspx" />
<Content Include="TestRun\PersonTrain\TrainPlanEdit.aspx" />
<Content Include="TestRun\PersonTrain\TrainRecords.aspx" />
<Content Include="TestRun\PersonTrain\TrainRecordsEdit.aspx" />
@ -15944,6 +15945,13 @@
<Compile Include="TestRun\PersonTrain\TrainContract.aspx.designer.cs">
<DependentUpon>TrainContract.aspx</DependentUpon>
</Compile>
<Compile Include="TestRun\PersonTrain\TrainContractEdit.aspx.cs">
<DependentUpon>TrainContractEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="TestRun\PersonTrain\TrainContractEdit.aspx.designer.cs">
<DependentUpon>TrainContractEdit.aspx</DependentUpon>
</Compile>
<Compile Include="TestRun\PersonTrain\TrainPlan.aspx.cs">
<DependentUpon>TrainPlan.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

View File

@ -4,13 +4,108 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>培训合同</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="培训合同" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="TrainContractId" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="TrainContractId" AllowSorting="true" SortField="TrainContractDate"
SortDirection="DESC" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="true" OnRowCommand="Grid1_RowCommand">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox ID="txtTrainContractCode" runat="server" Label="合同号" LabelAlign="Right">
</f:TextBox>
<f:TextBox ID="txtTrainContractName" runat="server" Label="合同名称" LabelAlign="Right">
</f:TextBox>
<f:Button ID="btnSearch" Icon="SystemSearch"
EnablePostBack="true" runat="server" OnClick="btnSearch_Click" ToolTip="搜索">
</f:Button>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnNew" Icon="Add" ToolTip="新增" EnablePostBack="false" runat="server" Hidden="true">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField ColumnID="TrainContractCode" DataField="TrainContractCode" FieldType="String" HeaderText="合同号" TextAlign="Center"
HeaderTextAlign="Center" Width="250px">
</f:RenderField>
<f:RenderField ColumnID="TrainContractName" DataField="TrainContractName" FieldType="String" HeaderText="合同名称"
HeaderTextAlign="Center" Width="350px">
</f:RenderField>
<f:RenderField ColumnID="TrainContractDate" DataField="TrainContractDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="签订日期"
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
<f:RenderField ColumnID="Remark" DataField="Remark" FieldType="String" HeaderText="备注"
HeaderTextAlign="Center" Width="100px" ExpandUnusedSpace="true">
</f:RenderField>
<f:LinkButtonField HeaderText="附件" ConfirmTarget="Top" Width="90" CommandName="AttachUrl" ColumnID="AttachUrl"
TextAlign="Center" ToolTip="附件查看" Icon="Find" />
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="100000" />
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="培训合同" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="800px" Height="420px">
</f:Window>
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="500px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<Items>
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Text="修改" Icon="Pencil" OnClick="btnMenuModify_Click" Hidden="true">
</f:MenuButton>
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?"
OnClick="btnMenuDel_Click" Hidden="true">
</f:MenuButton>
</Items>
</f:Menu>
</form>
<script type="text/javascript">
var menuID = '<%= Menu1.ClientID %>';
// 返回false来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
</script>
</body>
</html>

View File

@ -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
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GetButtonPower();
BindGrid();
btnNew.OnClientClick = Window1.GetShowReference("TrainContractEdit.aspx") + "return false;";
}
}
#endregion
#region
/// <summary>
/// 绑定数据
/// </summary>
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<SqlParameter> listStr = new List<SqlParameter>();
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
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSearch_Click(object sender, EventArgs e)
{
BindGrid();
}
#endregion
#region
/// <summary>
/// 分页索引事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
/// <summary>
/// 分页下拉框事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
{
Grid1.SortDirection = e.SortDirection;
Grid1.SortField = e.SortField;
BindGrid();
}
#endregion
#region
/// <summary>
/// 关闭窗体
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
BindGrid();
}
#endregion
#region
/// <summary>
/// 右键编辑
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuModify_Click(object sender, EventArgs e)
{
EditData();
}
/// <summary>
/// Grid行双击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
EditData();
}
/// <summary>
/// 编辑
/// </summary>
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
/// <summary>
/// 右键删除
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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
/// <summary>
/// 权限设置
/// </summary>
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
}
}

View File

@ -20,5 +20,158 @@ namespace FineUIPro.Web.TestRun.PersonTrain {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtTrainContractCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTrainContractCode;
/// <summary>
/// txtTrainContractName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTrainContractName;
/// <summary>
/// btnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// btnNew 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// lblPageIndex 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblPageIndex;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// WindowAtt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
/// <summary>
/// Menu1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuModify 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuModify;
/// <summary>
/// btnMenuDel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDel;
}
}

View File

@ -0,0 +1,86 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrainContractEdit.aspx.cs" Inherits="FineUIPro.Web.TestRun.PersonTrain.TrainContractEdit" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑培训合同</title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnSave" OnClick="btnSave_Click" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1">
</f:Button>
<f:HiddenField ID="hdAttachUrl" runat="server">
</f:HiddenField>
<f:HiddenField ID="hdId" runat="server"></f:HiddenField>
</Items>
</f:Toolbar>
</Toolbars>
<Rows>
<f:FormRow>
<Items>
<f:ContentPanel ID="ContentPanel2" ShowBorder="true"
BodyPadding="10px" EnableCollapse="true" ShowHeader="false" AutoScroll="true"
runat="server">
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtTrainContractCode" runat="server" Label="合同号" LabelAlign="Right" LabelWidth="100px" MaxLength="50" Required="true" ShowRedStar="true">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtTrainContractName" runat="server" Label="合同名称" LabelAlign="Right" LabelWidth="100px" MaxLength="50" Required="true" ShowRedStar="true">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DatePicker ID="txtTrainContractDate" runat="server" Label="签订日期" LabelAlign="Right" LabelWidth="100px"></f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtRemark" runat="server" Label="备注" LabelAlign="Right" LabelWidth="100px" MaxLength="500">
</f:TextArea>
</Items>
</f:FormRow>
<f:FormRow runat="server">
<Items>
<f:Panel ID="Panel3" Width="300px" ShowHeader="false" ShowBorder="false" Layout="Column" CssClass="" runat="server">
<Items>
<f:Label ID="lblAttach" runat="server" Label="附件"
LabelWidth="100px">
</f:Label>
<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" Text="附件" runat="server" OnClick="btnAttach_Click">
</f:Button>
</Items>
</f:Panel>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</f:ContentPanel>
</Items>
</f:FormRow>
</Rows>
</f:Form>
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="500px">
</f:Window>
</form>
</body>
</html>

View File

@ -0,0 +1,93 @@
using BLL;
using System;
namespace FineUIPro.Web.TestRun.PersonTrain
{
public partial class TrainContractEdit : PageBase
{
#region
/// <summary>
/// 页面加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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
/// <summary>
/// 附件上传
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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
/// <summary>
/// 保存按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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
}
}

View File

@ -0,0 +1,177 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.TestRun.PersonTrain {
public partial class TrainContractEdit {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// hdAttachUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdAttachUrl;
/// <summary>
/// hdId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdId;
/// <summary>
/// ContentPanel2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel2;
/// <summary>
/// Form2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form Form2;
/// <summary>
/// txtTrainContractCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTrainContractCode;
/// <summary>
/// txtTrainContractName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTrainContractName;
/// <summary>
/// txtTrainContractDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtTrainContractDate;
/// <summary>
/// txtRemark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtRemark;
/// <summary>
/// Panel3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel3;
/// <summary>
/// lblAttach 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lblAttach;
/// <summary>
/// btnAttach 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttach;
/// <summary>
/// WindowAtt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
}
}

View File

@ -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> TestRun_TrainContract
{
get
{
return this.GetTable<TestRun_TrainContract>();
}
}
public System.Data.Linq.Table<TestRun_TrainRecords> TestRun_TrainRecords
{
get
@ -25806,6 +25817,8 @@ namespace Model
private EntitySet<TestRun_PersonTrainPlan> _TestRun_PersonTrainPlan;
private EntitySet<TestRun_TrainContract> _TestRun_TrainContract;
private EntitySet<TestRun_TrainRecords> _TestRun_TrainRecords;
private EntitySet<Training_Plan> _Training_Plan;
@ -26206,6 +26219,7 @@ namespace Model
this._Sys_User = new EntitySet<Sys_User>(new Action<Sys_User>(this.attach_Sys_User), new Action<Sys_User>(this.detach_Sys_User));
this._Sys_UserRead = new EntitySet<Sys_UserRead>(new Action<Sys_UserRead>(this.attach_Sys_UserRead), new Action<Sys_UserRead>(this.detach_Sys_UserRead));
this._TestRun_PersonTrainPlan = new EntitySet<TestRun_PersonTrainPlan>(new Action<TestRun_PersonTrainPlan>(this.attach_TestRun_PersonTrainPlan), new Action<TestRun_PersonTrainPlan>(this.detach_TestRun_PersonTrainPlan));
this._TestRun_TrainContract = new EntitySet<TestRun_TrainContract>(new Action<TestRun_TrainContract>(this.attach_TestRun_TrainContract), new Action<TestRun_TrainContract>(this.detach_TestRun_TrainContract));
this._TestRun_TrainRecords = new EntitySet<TestRun_TrainRecords>(new Action<TestRun_TrainRecords>(this.attach_TestRun_TrainRecords), new Action<TestRun_TrainRecords>(this.detach_TestRun_TrainRecords));
this._Training_Plan = new EntitySet<Training_Plan>(new Action<Training_Plan>(this.attach_Training_Plan), new Action<Training_Plan>(this.detach_Training_Plan));
this._Training_Task = new EntitySet<Training_Task>(new Action<Training_Task>(this.attach_Training_Task), new Action<Training_Task>(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> 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> 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<System.DateTime> _TrainContractDate;
private string _Remark;
private EntityRef<Base_Project> _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<System.DateTime> value);
partial void OnTrainContractDateChanged();
partial void OnRemarkChanging(string value);
partial void OnRemarkChanged();
#endregion
public TestRun_TrainContract()
{
this._Base_Project = default(EntityRef<Base_Project>);
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<System.DateTime> 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
{