20260330 新增班组信息

This commit is contained in:
毕文静 2026-03-30 19:17:06 +08:00
parent 2560524757
commit 9af6e00b4a
15 changed files with 2230 additions and 142 deletions

View File

@ -0,0 +1,141 @@
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuModule)
values('D4E0EBE8-C13B-4E61-8765-EE7BA77BFAB1','管道试压包一览表','SYBData/PressureTestPackageList.aspx',40,'3EAFF140-E5CA-4978-B83D-D2C9F36E0D52','3')
go
insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
values('246D9514-04C2-410F-A9B9-47FB4A2FB2C9','D4E0EBE8-C13B-4E61-8765-EE7BA77BFAB1','增加',1)
insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
values('0970DAF6-0BEC-4362-871E-E2B2036CFD13','D4E0EBE8-C13B-4E61-8765-EE7BA77BFAB1','修改',2)
insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
values('0171DAC6-F8C9-4803-B934-48F824A6F332','D4E0EBE8-C13B-4E61-8765-EE7BA77BFAB1','删除',3)
insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
values('4E8F0CB9-BF6B-4041-AD7C-9D8E917D2F48','D4E0EBE8-C13B-4E61-8765-EE7BA77BFAB1','保存',4)
go
CREATE TABLE [dbo].[SYBData_PressureTestPackageList](
[PressureTestPackageListId] [nvarchar](50) NOT NULL,
[ProjectId] [nvarchar](50) NULL,
[SerialNumber] [nvarchar](50) NULL,
[PipelineCode] [nvarchar](50) NULL,
[PressureTestPackageCode] [nvarchar](50) NULL,
[Remark] [nvarchar](500) NULL,
[CompileMan] [nvarchar](50) NULL,
[CompileDate] [datetime] NULL,
CONSTRAINT [PK_SYBData_PressureTestPackageList] PRIMARY KEY CLUSTERED
(
[PressureTestPackageListId] 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].[SYBData_PressureTestPackageList] WITH CHECK ADD CONSTRAINT [FK_SYBData_PressureTestPackageList_Base_Project] FOREIGN KEY([ProjectId])
REFERENCES [dbo].[Base_Project] ([ProjectId])
GO
ALTER TABLE [dbo].[SYBData_PressureTestPackageList] CHECK CONSTRAINT [FK_SYBData_PressureTestPackageList_Base_Project]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYBData_PressureTestPackageList', @level2type=N'COLUMN',@level2name=N'PressureTestPackageListId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYBData_PressureTestPackageList', @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'SYBData_PressureTestPackageList', @level2type=N'COLUMN',@level2name=N'SerialNumber'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管道编号/单线号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYBData_PressureTestPackageList', @level2type=N'COLUMN',@level2name=N'PipelineCode'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'试压包编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYBData_PressureTestPackageList', @level2type=N'COLUMN',@level2name=N'PressureTestPackageCode'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYBData_PressureTestPackageList', @level2type=N'COLUMN',@level2name=N'Remark'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYBData_PressureTestPackageList', @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'SYBData_PressureTestPackageList', @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'SYBData_PressureTestPackageList'
GO
CREATE PROCEDURE [dbo].[SYB_TestPackagePipeList]
(
@projectId nvarchar(50),
@iso_no nvarchar(50)=null
)
/***************管道试压包一览表*********************/
AS
create table #SIS(
Number1 INT,
PipelineCode1 nvarchar(50),
TestPackageNo1 nvarchar(50),
Number2 INT,
PipelineCode2 nvarchar(50),
TestPackageNo2 nvarchar(50)
)
BEGIN
DECLARE My_Cursor CURSOR
FOR SELECT ROW_NUMBER() OVER(ORDER BY pp.PipelineCode,pp.PressureTestPackageCode) AS Number,
pp.PipelineCode,pp.PressureTestPackageCode
FROM dbo.SYBData_PressureTestPackageList pp
--LEFT JOIN dbo.Pipeline_Pipeline pipe ON pipe.PipelineId = pp.PipelineId
--LEFT JOIN dbo.PTP_TestPackage pages ON pages.PTP_ID = pp.PTP_ID
WHERE pp.ProjectId=@projectId
and (pp.PipelineCode like @iso_no or @iso_no is null)
ORDER BY pp.PipelineCode,pp.PressureTestPackageCode
OPEN My_Cursor; --
DECLARE @Number int,@PipelineCode nvarchar(50),@TestPackageNo nvarchar(50)
FETCH NEXT FROM My_Cursor into @Number,@PipelineCode,@TestPackageNo; --
WHILE @@FETCH_STATUS = 0
BEGIN
IF(@Number%2=1)
BEGIN
INSERT into #SIS values(@Number,@PipelineCode,@TestPackageNo,null,null,null)
END
ELSE
BEGIN
UPDATE #SIS SET Number2=@Number,PipelineCode2=@PipelineCode,TestPackageNo2=@TestPackageNo
WHERE Number1=@Number-1
END
FETCH NEXT FROM My_Cursor into @Number,@PipelineCode,@TestPackageNo; --
END
CLOSE My_Cursor; --
DEALLOCATE My_Cursor; --
END
SELECT * from #SIS
DROP TABLE #SIS
GO
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuModule)
values('ECFED5F8-59ED-4CF8-9FF4-893E095CBDF8','管道焊接工作记录','JGZL/PipeWeldingWorkRecord.aspx',80,'3EAFF140-E5CA-4978-B83D-D2C9F36E0D52','3')
go
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuModule)
values('720F843F-3FDD-4072-9724-B320BDB9B6E0','管道系统压力实验条件确认记录','JGZL/PressureTestOfPipelineSystemConfirmationRecord.aspx',90,'3EAFF140-E5CA-4978-B83D-D2C9F36E0D52','3')
go
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuModule)
values('91F25D94-7A6E-422E-A5C8-7485A3D8B155','管道系统压力实验记录','JGZL/PressureTestOfPipelineSystemRecord.aspx',100,'3EAFF140-E5CA-4978-B83D-D2C9F36E0D52','3')
go
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuModule)
values('784D8370-C0E0-4C81-AC85-AA72BAB6188B','班组设置','WeldMat/BaseInfo/TeamGrouop.aspx',40,'5BEECA92-7901-4D2B-843F-2053A085B9F3','7')
go
insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
values('954F82BE-D41F-4D82-8E05-DA853A3769D2','784D8370-C0E0-4C81-AC85-AA72BAB6188B','增加',1)
insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
values('6AD64688-2927-4F9A-94B4-E5D38691C03E','784D8370-C0E0-4C81-AC85-AA72BAB6188B','修改',2)
insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
values('69CACA4F-21A8-4C5D-8D1A-29845CF73563','784D8370-C0E0-4C81-AC85-AA72BAB6188B','删除',3)
insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
values('AF575CDF-5300-4FED-91F1-59AA7731C9DF','784D8370-C0E0-4C81-AC85-AA72BAB6188B','保存',4)
go
alter table Base_TeamGroup add IsUsed bit
go

View File

@ -301,6 +301,7 @@
<Compile Include="Common\UploadFileService.cs" />
<Compile Include="SYBData\ApplicationFormService.cs" />
<Compile Include="SYBData\CoverService.cs" />
<Compile Include="SYBData\PressureTestPackageListService.cs" />
<Compile Include="SYBData\SYBData_FileDirectoryService.cs" />
<Compile Include="WeldMat\BaseInfo\SpecificationsService.cs" />
<Compile Include="WeldMat\BaseInfo\StoremanInfoService.cs" />

View File

@ -11,118 +11,28 @@ namespace BLL
{
public class Base_TeamGroupService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 记录数
/// 根据主键获取班组信息
/// </summary>
public static int count
{
get;
set;
}
/// <summary>
/// 定义变量
/// </summary>
public static IQueryable<Model.Base_TeamGroup> qq = from x in db.Base_TeamGroup orderby x.TeamGroupCode select x;
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="searchItem"></param>
/// <param name="searchValue"></param>
/// <param name="startRowIndex"></param>
/// <param name="maximumRows"></param>
/// <returns></returns>
public static IEnumerable getListData(string projectId, string teamGroupCode, string teamGroupName, string unitId, int startRowIndex, int maximumRows)
{
IQueryable<Model.Base_TeamGroup> q = qq;
if (!string.IsNullOrEmpty(teamGroupCode))
{
q = q.Where(e => e.TeamGroupCode.Contains(teamGroupCode));
}
if (!string.IsNullOrEmpty(teamGroupName))
{
q = q.Where(e => e.TeamGroupName.Contains(teamGroupName));
}
if (unitId != "0")
{
q = q.Where(e => e.UnitId == unitId);
}
if (projectId != "0")
{
q = q.Where(e => e.ProjectId == projectId);
}
count = q.Count();
if (count == 0)
{
return new object[] { "" };
}
return from x in q.Skip(startRowIndex).Take(maximumRows)
select new
{
x.TeamGroupId,
x.TeamGroupCode,
x.TeamGroupName,
UnitName = (from y in db.Base_Unit where y.UnitId == x.UnitId select y.UnitName).First(),
ProjectName = (from y in db.Base_Project where y.ProjectId == x.ProjectId select y.ProjectName).First(),
Area = (from y in db.Project_WorkArea where y.WorkAreaId == x.Area select y.WorkAreaCode).First(),
x.Remark
};
}
/// <summary>
/// 获取列表数
/// </summary>
/// <param name="teamGroupCode"></param>
/// <param name="teamGroupName"></param>
/// <param name="unitId"></param>
/// <returns></returns>
public static int GetListCount(string projectId, string teamGroupCode, string teamGroupName, string unitId)
{
return count;
}
/// <summary>
/// 根据
/// </summary>
/// <param name="groupId"></param>
/// <param name="teamGroupId"></param>
/// <returns></returns>
public static Model.Base_TeamGroup GetTeamGroupByTeamGroupId(string teamGroupId)
{
return Funs.DB.Base_TeamGroup.FirstOrDefault(e => e.TeamGroupId == teamGroupId);
}
/// <summary>
/// 根据班组名称获取班组信息
/// </summary>
/// <param name="teamGroupName"></param>
/// <returns></returns>
public static Model.Base_TeamGroup GetTeamGroupByTeamGroupName(string projectId, string teamGroupName)
{
return Funs.DB.Base_TeamGroup.FirstOrDefault(e =>e.ProjectId==projectId && e.TeamGroupName == teamGroupName);
}
/// <summary>
/// 添加班组信息
/// </summary>
/// <param name="?"></param>
/// <param name="teamGroup"></param>
public static void AddTeamGroup(Model.Base_TeamGroup teamGroup)
{
Model.SGGLDB db = Funs.DB;
string newKeyID = SQLHelper.GetNewID(typeof(Model.Base_TeamGroup));
Model.Base_TeamGroup newTeamGroup = new Model.Base_TeamGroup();
newTeamGroup.TeamGroupId = newKeyID;
SGGLDB db = Funs.DB;
Model.Base_TeamGroup newTeamGroup = new Base_TeamGroup();
newTeamGroup.TeamGroupId = teamGroup.TeamGroupId;
newTeamGroup.TeamGroupCode = teamGroup.TeamGroupCode;
newTeamGroup.TeamGroupName = teamGroup.TeamGroupName;
newTeamGroup.UnitId = teamGroup.UnitId;
newTeamGroup.ProjectId = teamGroup.ProjectId;
newTeamGroup.Remark = teamGroup.Remark;
newTeamGroup.Area = teamGroup.Area;
newTeamGroup.IsUsed = teamGroup.IsUsed;
db.Base_TeamGroup.InsertOnSubmit(newTeamGroup);
db.SubmitChanges();
}
@ -133,27 +43,42 @@ namespace BLL
/// <param name="teamGroup"></param>
public static void UpdateTeamGroup(Model.Base_TeamGroup teamGroup)
{
Model.SGGLDB db = Funs.DB;
Model.Base_TeamGroup newTeamGroup = db.Base_TeamGroup.First(e => e.TeamGroupId == teamGroup.TeamGroupId);
newTeamGroup.TeamGroupCode = teamGroup.TeamGroupCode;
newTeamGroup.TeamGroupName = teamGroup.TeamGroupName;
newTeamGroup.UnitId = teamGroup.UnitId;
newTeamGroup.ProjectId = teamGroup.ProjectId;
newTeamGroup.Remark = teamGroup.Remark;
newTeamGroup.Area = teamGroup.Area;
db.SubmitChanges();
SGGLDB db = Funs.DB;
Model.Base_TeamGroup newTeamGroup = db.Base_TeamGroup.FirstOrDefault(e => e.TeamGroupId == teamGroup.TeamGroupId);
if (newTeamGroup != null)
{
newTeamGroup.TeamGroupCode = teamGroup.TeamGroupCode;
newTeamGroup.TeamGroupName = teamGroup.TeamGroupName;
newTeamGroup.IsUsed = teamGroup.IsUsed;
db.SubmitChanges();
}
}
/// <summary>
/// 是否存在班组编号
/// 根据主键删除班组信息
/// </summary>
/// <param name="teamGroupCode"></param>
/// <returns>true-存在false-不存在</returns>
public static bool IsExistTeamGroupCode(string projectId, string teamGroupCode)
/// <param name="teamGroupId"></param>
public static void DeleteTeamGroupById(string teamGroupId)
{
var q = from x in Funs.DB.Base_TeamGroup where x.ProjectId == projectId && x.TeamGroupCode == teamGroupCode select x;
if (q.Count() > 0)
SGGLDB db = Funs.DB;
Model.Base_TeamGroup teamGroup = db.Base_TeamGroup.FirstOrDefault(e => e.TeamGroupId == teamGroupId);
if (teamGroup != null)
{
db.Base_TeamGroup.DeleteOnSubmit(teamGroup);
db.SubmitChanges();
}
}
/// <summary>
/// 判断是否存在
/// </summary>
/// <param name="teamGroupName"></param>
/// <param name="id"></param>
/// <returns></returns>
public static bool IsExitTeamGroupName(string teamGroupName, string id)
{
var q = Funs.DB.Base_TeamGroup.FirstOrDefault(x => x.TeamGroupName == teamGroupName && x.TeamGroupId != id);
if (q != null)
{
return true;
}
@ -162,33 +87,6 @@ namespace BLL
return false;
}
}
/// <summary>
/// 删除班组信息
/// </summary>
/// <param name="teamGroupId"></param>
public static void DeleteTeamGroup(string teamGroupId)
{
Model.SGGLDB db = Funs.DB;
Model.Base_TeamGroup teamGroup = db.Base_TeamGroup.First(e => e.TeamGroupId == teamGroupId);
db.Base_TeamGroup.DeleteOnSubmit(teamGroup);
db.SubmitChanges();
}
/// <summary>
/// 根据单位Id和项目ID查询班组信息
/// </summary>
/// <param name="projectId">项目Id</param>
/// <param name="unitId">单位Id</param>
/// <returns>班组信息</returns>
public static List<Model.Base_TeamGroup> GetTeamGroupByUnit(string projectId, string unitId)
{
return (from x in Funs.DB.Base_TeamGroup
where x.ProjectId==projectId && x.UnitId==unitId
orderby x.TeamGroupCode
select x).ToList();
}
/// <summary>
/// 根据单位Id和项目ID查询班组信息
/// </summary>
@ -198,6 +96,7 @@ namespace BLL
public static List<Model.Base_TeamGroup> GetTeamGroupByUnit()
{
return (from x in Funs.DB.Base_TeamGroup
where x.IsUsed == true
orderby x.TeamGroupCode
select x).ToList();
}

View File

@ -1641,6 +1641,11 @@ namespace BLL
/// 供应商信息
/// </summary>
public const string CLGL_SupplierMenuId = "6B118D39-8B13-423C-A063-4C474E66FB90";
/// <summary>
/// 班组设置
/// </summary>
public const string CLGL_TeamGroupMenuId = "784D8370-C0E0-4C81-AC85-AA72BAB6188B";
#endregion
#region
@ -1932,6 +1937,11 @@ namespace BLL
/// 工艺管道试压包报审/报验申请表
/// </summary>
public const string SYBData_ApplicationFormMenuId = "71F70139-5281-480D-9787-7065BDA8A290";
/// <summary>
/// 管道试压包一览表
/// </summary>
public const string SYBData_PressureTestPackageListMenuId = "D4E0EBE8-C13B-4E61-8765-EE7BA77BFAB1";
#endregion
#region ID

View File

@ -0,0 +1,60 @@
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
/// <summary>
/// 管道试压包一览表
/// </summary>
public class PressureTestPackageListService
{
/// <summary>
/// 根据项目Id获取一览表信息
/// </summary>
/// <param name="projectId"></param>
/// <returns></returns>
public static List<Model.SYBData_PressureTestPackageList> GetListsByProjectId(string projectId)
{
return (from x in Funs.DB.SYBData_PressureTestPackageList where x.ProjectId == projectId select x).ToList();
}
/// <summary>
/// 添加试压包一览表
/// </summary>
/// <param name="list"></param>
public static void AddLists(Model.SYBData_PressureTestPackageList list)
{
SGGLDB db = Funs.DB;
Model.SYBData_PressureTestPackageList newLists = new SYBData_PressureTestPackageList();
newLists.PressureTestPackageListId = list.PressureTestPackageListId;
newLists.ProjectId = list.ProjectId;
newLists.SerialNumber = list.SerialNumber;
newLists.PipelineCode = list.PipelineCode;
newLists.PressureTestPackageCode = list.PressureTestPackageCode;
newLists.Remark = list.Remark;
newLists.CompileMan = list.CompileMan;
newLists.CompileDate = list.CompileDate;
db.SYBData_PressureTestPackageList.InsertOnSubmit(newLists);
db.SubmitChanges();
}
/// <summary>
/// 根据项目Id删除一览表信息
/// </summary>
/// <param name="projectId"></param>
public static void DeleteListsByProjectId(string projectId)
{
SGGLDB db = Funs.DB;
var list = (from x in db.SYBData_PressureTestPackageList where x.ProjectId == projectId select x).ToList();
if (list.Count > 0)
{
db.SYBData_PressureTestPackageList.DeleteAllOnSubmit(list);
db.SubmitChanges();
}
}
}
}

View File

@ -0,0 +1,156 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="03/30/2026 10:09:23" ReportInfo.Modified="03/30/2026 10:43:34" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing;
using System.Data;
using FastReport;
using FastReport.Data;
using FastReport.Dialog;
using FastReport.Barcode;
using FastReport.Table;
using FastReport.Utils;
namespace FastReport
{
public class ReportScript
{
private void Table3_ManualBuild(object sender, EventArgs e)
{
DataSourceBase rowData = Report.GetDataSource(&quot;Data&quot;);
// init the data source
rowData.Init();
// print the first table row - it is a header
// now enumerate the data source and print the table body
while (rowData.HasMoreRows)
{
// print the table body
Table3.PrintRow(0);
Table3.PrintColumns();
// go next data source row
rowData.Next();
}
}
}
}
</ScriptText>
<Dictionary>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqtRsOalcXxDhVt62rPEPNYjaATUoMqziRYvJtgNsyJKYAG7kXKvNAMI/qBkgJNPccFsWrhiII6oyX1HS+uwN7YigxVjqUq3vIet2zpPnmWhwvYEvWOOCZZGx6EC4BfGfWX8aPj6bmoF52Z0fnUA9g71duxa/gvChTW/nzu9qsYVuvlVHliMnnu6jEIF9n+/QFSjuGSGbPWisAyz0xpshfHw==">
<TableDataSource Name="Data" DataType="System.Int32" PropName="Attach_Image" Enabled="true" TableName="Data">
<Column Name="Number1" DataType="System.String" PropName="attach_image_id"/>
<Column Name="PipelineCode1" DataType="System.String" PropName="image_series"/>
<Column Name="TestPackageNo1" DataType="System.String" PropName="file_name"/>
<Column Name="Number2" DataType="System.String" PropName="file_size"/>
<Column Name="PipelineCode2" DataType="System.String" PropName="file_type"/>
<Column Name="TestPackageNo2" DataType="System.String" PropName="created_date"/>
</TableDataSource>
</MsSqlDataConnection>
<Parameter Name="ProjectName" DataType="System.String"/>
</Dictionary>
<ReportPage Name="Page1" RawPaperSize="9" LeftMargin="22" TopMargin="13.3" RightMargin="17" BottomMargin="16.5" Guides="0,646.38,180.81,408.87,407.61,502.11,522.27,51.03,196.56,332.64,383.67,529.2,215.46,430.92">
<PageHeaderBand Name="PageHeader1" Width="646.38" Height="132.3" Guides="0,103.96,9.45,28.35,70.88,33.08,66.16,18.9,103.95,132.3">
<TableObject Name="Table1" Width="646.38" Height="103.96">
<TableColumn Name="Column1" Width="180.81"/>
<TableColumn Name="Column2" Width="228.06"/>
<TableColumn Name="Column3" Width="237.51"/>
<TableRow Name="Row1" Height="70.88">
<TableCell Name="Cell1" Border.Lines="All" Text="SH/T 3503—J414" HorzAlign="Center" VertAlign="Center" Font="黑体, 10.5pt" RowSpan="2"/>
<TableCell Name="Cell2" Border.Lines="All" Text="管道试压包一览表" HorzAlign="Center" VertAlign="Center" Font="思源宋体 CN, 16pt, style=Bold" RowSpan="2">
<TextObject Name="Text1" Left="226.8" Top="9.45" Width="94.5" Height="18.9" Text="工程名称:" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableCell>
<TableCell Name="Cell3" Border.Lines="Left, Right, Top" Text=" [ProjectName]" Padding="8, 10, 2, 1" Font="楷体, 10.5pt"/>
</TableRow>
<TableRow Name="Row2" Height="33.08">
<TableCell Name="Cell6" Border.Lines="All"/>
<TableCell Name="Cell7" Border.Lines="All"/>
<TableCell Name="Cell8" Border.Lines="Left, Right, Bottom" Text=" 管道安装工程" Font="楷体, 10.5pt">
<TextObject Name="Text2" Width="113.4" Height="18.9" Text="单位工程名称:" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableCell>
</TableRow>
</TableObject>
<TableObject Name="Table2" Top="103.95" Width="646.38" Height="28.35">
<TableColumn Name="Column4" Width="51.03"/>
<TableColumn Name="Column5" Width="145.53"/>
<TableColumn Name="Column6" Width="136.08"/>
<TableColumn Name="Column7" Width="51.03"/>
<TableColumn Name="Column8" Width="145.53"/>
<TableColumn Name="Column9" Width="117.18"/>
<TableRow Name="Row3" Height="28.35">
<TableCell Name="Cell9" Border.Lines="All" Text="序号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell10" Border.Lines="All" Text="管道编号/单线号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell11" Border.Lines="All" Text="试压包编号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell12" Border.Lines="All" Text="序号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell13" Border.Lines="All" Text="管道编号/单线号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell14" Border.Lines="All" Text="试压包编号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableRow>
</TableObject>
</PageHeaderBand>
<DataBand Name="Data1" Top="136.3" Width="646.38" Height="37.8" Guides="0,37.8">
<TableObject Name="Table3" Width="646.38" Height="37.8" ManualBuildEvent="Table3_ManualBuild">
<TableColumn Name="Column10" Width="51.03"/>
<TableColumn Name="Column11" Width="145.53"/>
<TableColumn Name="Column12" Width="136.08"/>
<TableColumn Name="Column13" Width="51.03"/>
<TableColumn Name="Column14" Width="145.53"/>
<TableColumn Name="Column15" Width="117.18"/>
<TableRow Name="Row4" Height="37.8">
<TableCell Name="Cell15" Border.Lines="All" Text="[Data.Number1]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
<TableCell Name="Cell16" Border.Lines="All" Text="[Data.PipelineCode1]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
<TableCell Name="Cell17" Border.Lines="All" Text="[Data.TestPackageNo1]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
<TableCell Name="Cell18" Border.Lines="All" Text="[Data.Number2]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
<TableCell Name="Cell19" Border.Lines="All" Text="[Data.PipelineCode2]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
<TableCell Name="Cell20" Border.Lines="All" Text="[Data.TestPackageNo2]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
</TableRow>
</TableObject>
</DataBand>
<ColumnFooterBand Name="ColumnFooter1" Top="219.9" Width="646.38">
<ChildBand Name="Child1" Top="178.1" Width="646.38" Height="37.8" Guides="0,37.8" FillUnusedSpace="true">
<TableObject Name="Table4" Width="646.38" Height="37.8">
<TableColumn Name="Column16" Width="51.03"/>
<TableColumn Name="Column17" Width="145.53"/>
<TableColumn Name="Column18" Width="136.08"/>
<TableColumn Name="Column19" Width="51.03"/>
<TableColumn Name="Column20" Width="145.53"/>
<TableColumn Name="Column21" Width="117.18"/>
<TableRow Name="Row5" Height="37.8">
<TableCell Name="Cell21" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell22" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell23" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell24" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell25" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell26" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableRow>
</TableObject>
</ChildBand>
</ColumnFooterBand>
<PageFooterBand Name="PageFooter1" Top="223.9" Width="646.38" Height="158.63" Guides="0,158.63,57.83,127.13">
<TableObject Name="Table5" Width="646.38" Height="158.63">
<TableColumn Name="Column22" Width="215.46"/>
<TableColumn Name="Column23" Width="215.46"/>
<TableColumn Name="Column24" Width="215.46"/>
<TableRow Name="Row6" Height="57.83">
<TableCell Name="Cell27" Border.Lines="All" Text="备注:" Font="宋体, 10.5pt" ColSpan="3"/>
<TableCell Name="Cell28" Font="宋体, 10.5pt"/>
<TableCell Name="Cell29" Font="宋体, 10.5pt"/>
</TableRow>
<TableRow Name="Row7" Height="69.3">
<TableCell Name="Cell32" Border.Lines="Left, Right, Top" Text="专业工程师:" Padding="2, 10, 2, 1" Font="宋体, 10.5pt"/>
<TableCell Name="Cell33" Border.Lines="Left, Right, Top" Text="质量检查员:" Padding="2, 10, 2, 1" Font="宋体, 10.5pt"/>
<TableCell Name="Cell34" Border.Lines="Left, Right, Top" Text="填表人:" Padding="2, 10, 2, 1" Font="宋体, 10.5pt"/>
</TableRow>
<TableRow Name="Row8" Height="31.5">
<TableCell Name="Cell37" Border.Lines="Left, Right, Bottom" Text="日期: 年 月 日" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell38" Border.Lines="Left, Right, Bottom" Text="日期: 年 月 日" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell39" Border.Lines="Left, Right, Bottom" Text="日期: 年 月 日" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableRow>
</TableObject>
</PageFooterBand>
</ReportPage>
</Report>

View File

@ -1362,6 +1362,7 @@
<Content Include="Styles\sunny\images\ui-icons_ffe180_256x240.png" />
<Content Include="Styles\sunny\jquery-ui-1.9.2.custom.css" />
<Content Include="Styles\sunny\jquery-ui-1.9.2.custom.min.css" />
<Content Include="SYBData\PressureTestPackageList.aspx" />
<Content Include="SYBData\SYBDataList.aspx" />
<Content Include="WebService1.asmx" />
<Content Include="Welder\FilmInfoQuery.aspx" />
@ -1380,6 +1381,7 @@
<Content Include="WeldMat\BaseInfo\Specifications.aspx" />
<Content Include="WeldMat\BaseInfo\StoremanInfo.aspx" />
<Content Include="WeldMat\BaseInfo\Supplier.aspx" />
<Content Include="WeldMat\BaseInfo\TeamGrouop.aspx" />
<Content Include="WeldMat\BaseInfo\UnitStore.aspx" />
<Content Include="WeldMat\BaseInfo\WeldInfo.aspx" />
<Content Include="WeldMat\BaseInfo\WeldInfoIn.aspx" />
@ -7244,6 +7246,13 @@
<Compile Include="RLSB\WelderTrain.aspx.designer.cs">
<DependentUpon>WelderTrain.aspx</DependentUpon>
</Compile>
<Compile Include="SYBData\PressureTestPackageList.aspx.cs">
<DependentUpon>PressureTestPackageList.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="SYBData\PressureTestPackageList.aspx.designer.cs">
<DependentUpon>PressureTestPackageList.aspx</DependentUpon>
</Compile>
<Compile Include="SYBData\SYBDataList.aspx.cs">
<DependentUpon>SYBDataList.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -7367,6 +7376,13 @@
<Compile Include="WeldMat\BaseInfo\Supplier.aspx.designer.cs">
<DependentUpon>Supplier.aspx</DependentUpon>
</Compile>
<Compile Include="WeldMat\BaseInfo\TeamGrouop.aspx.cs">
<DependentUpon>TeamGrouop.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WeldMat\BaseInfo\TeamGrouop.aspx.designer.cs">
<DependentUpon>TeamGrouop.aspx</DependentUpon>
</Compile>
<Compile Include="WeldMat\BaseInfo\UnitStore.aspx.cs">
<DependentUpon>UnitStore.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

View File

@ -0,0 +1,102 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PressureTestPackageList.aspx.cs" Inherits="FineUIPro.Web.SYBData.PressureTestPackageList" %>
<!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="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="220px" Title="管道试压包一览表" ShowBorder="true" Layout="VBox"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpProjectId" runat="server" Label="项目" LabelAlign="Right" AutoPostBack="true" EnableEdit="true"
OnSelectedIndexChanged="drpProjectId_SelectedIndexChanged" LabelWidth="50px">
</f:DropDownList>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Tree ID="tvControlItem" ShowHeader="false" Title="管道试压包一览表节点树" OnNodeCommand="tvControlItem_NodeCommand"
runat="server" ShowBorder="false" EnableCollapse="true" EnableSingleClickExpand="true"
AutoLeafIdentification="true" EnableSingleExpand="true" EnableTextSelection="true">
</f:Tree>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="管道试压包一览表"
TitleToolTip="管道试压包一览表" AutoScroll="true">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:DropDownList ID="drpIsoId" runat="server" Label="管道编号/单线号" LabelAlign="Right" EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpIsoId_SelectedIndexChanged" AutoSelectFirstItem="false" LabelWidth="120px"></f:DropDownList>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnAdd" runat="server" Icon="Add" Text="增加" OnClick="btnAdd_Click"></f:Button>
<f:Button ID="btnSave" Text="保存" ToolTip="保存" Icon="SystemSave" runat="server" OnClick="btnSave_Click"></f:Button>
<f:Button ID="btnPrint" Text="打印" Icon="Printer" runat="server" OnClick="btnPrint_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="管道试压包一览表" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="PressureTestPackageListId" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="PressureTestPackageListId" AllowSorting="true"
SortField="CompileDate" SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true"
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableTextSelection="True" AutoScroll="true" OnPreDataBound="Grid1_PreDataBound">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
TextAlign="Center" />
<f:RenderField HeaderText="管道编号/单线号" ColumnID="PipelineCode" DataField="PipelineCode" SortField="PipelineCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="380px">
<Editor>
<f:TextBox ID="txtPipelineCode" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="试压包编号" ColumnID="PressureTestPackageCode" DataField="PressureTestPackageCode" SortField="PressureTestPackageCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="320px">
<Editor>
<f:TextBox ID="txtPressureTestPackageCode" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:LinkButtonField ColumnID="Delete3" Width="60px" EnablePostBack="false" Icon="Delete"
HeaderTextAlign="Center" HeaderText="删除" />
<f:RenderField HeaderText="主键" ColumnID="PressureTestPackageListId" DataField="PressureTestPackageListId" SortField="PressureTestPackageListId"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="140px" Hidden="true">
</f:RenderField>
</Columns>
<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:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="WindowPrint" Title="打印管道试压包一览表" Hidden="true" EnableIFrame="true" EnableMaximize="false"
Target="Top" EnableResize="true" runat="server" IsModal="true" Width="1024px"
Height="600px">
</f:Window>
</form>
</body>
</html>

View File

@ -0,0 +1,463 @@
using BLL;
using Newtonsoft.Json.Linq;
using NPOI.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.SYBData
{
public partial class PressureTestPackageList : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
private string PressureTestPackageListId
{
get { return (string)ViewState["PressureTestPackageListId"]; }
set { ViewState["PressureTestPackageListId"] = value; }
}
/// <summary>
/// 项目Id
/// </summary>
private string ProjectId
{
get { return (string)ViewState["ProjectId"]; }
set { ViewState["ProjectId"] = value; }
}
/// <summary>
/// 定义集合
/// </summary>
private static List<Model.SYBData_PressureTestPackageList> items = new List<Model.SYBData_PressureTestPackageList>();
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
this.InitTreeMenu();//加载树
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
this.ProjectId = this.tvControlItem.SelectedNodeID;
//管线
this.drpIsoId.DataTextField = "ISO_IsoNo";
this.drpIsoId.DataValueField = "ISO_IsoNo";
this.drpIsoId.DataSource = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.ProjectId);
this.drpIsoId.DataBind();
PageInfo();
}
}
private void PageInfo()
{
items.Clear();
if (!string.IsNullOrEmpty(this.ProjectId))
{
var reportLists = BLL.PressureTestPackageListService.GetListsByProjectId(this.ProjectId);
if (reportLists.Count > 0)
{
var isoLists = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.ProjectId);
foreach (var item in isoLists)
{
var iso = (from x in Funs.DB.SYBData_PressureTestPackageList where x.ProjectId == this.ProjectId && x.PipelineCode == item.ISO_IsoNo select x).FirstOrDefault();
if (iso == null)
{
Model.SYBData_PressureTestPackageList newReport = new Model.SYBData_PressureTestPackageList();
newReport.PressureTestPackageListId = SQLHelper.GetNewID();
newReport.ProjectId = this.ProjectId;
newReport.PipelineCode = item.ISO_IsoNo;
newReport.PressureTestPackageCode = "";
reportLists.Add(newReport);
}
}
if (!string.IsNullOrEmpty(this.drpIsoId.SelectedValue) && this.drpIsoId.SelectedValue != BLL.Const._Null)
{
reportLists = reportLists.Where(x => x.PipelineCode.Contains(this.drpIsoId.SelectedValue)).ToList();
}
this.Grid1.DataSource = reportLists;
this.Grid1.DataBind();
}
else
{
var isoLists = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.ProjectId);
foreach (var iso in isoLists)
{
Model.SYBData_PressureTestPackageList newReport = new Model.SYBData_PressureTestPackageList();
newReport.PressureTestPackageListId = SQLHelper.GetNewID();
newReport.ProjectId = this.ProjectId;
newReport.PipelineCode = iso.ISO_IsoNo;
newReport.PressureTestPackageCode = "";
items.Add(newReport);
}
if (!string.IsNullOrEmpty(this.drpIsoId.SelectedValue) && this.drpIsoId.SelectedValue != BLL.Const._Null)
{
items = items.Where(x => x.PipelineCode.Contains(this.drpIsoId.SelectedValue)).ToList();
}
this.Grid1.DataSource = items;
this.Grid1.DataBind();
}
}
}
#endregion
#region
/// <summary>
/// 加载树
/// </summary>
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<Model.Base_Project> projects = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1");
// 默认显示选中的项目
string selectedProjectId = this.drpProjectId.SelectedValue;
if (!string.IsNullOrEmpty(selectedProjectId) && selectedProjectId != BLL.Const._Null)
{
projects = projects.Where(e => e.ProjectId == selectedProjectId).ToList();
// 如果项目存在,则选中该节点
if (projects.Any())
{
this.tvControlItem.SelectedNodeID = selectedProjectId;
}
}
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
/// <summary>
/// 点击TreeView
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
if (this.tvControlItem.SelectedNodeID != "0")
{
this.ProjectId = this.tvControlItem.SelectedNodeID;
this.BindGrid();
}
}
#endregion
#region
/// <summary>
/// 数据绑定
/// </summary>
private void BindGrid()
{
string strSql = @"SELECT * FROM SYBData_PressureTestPackageList where ProjectId=@projectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@projectId", this.ProjectId));
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
#region
/// <summary>
/// 页索引改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
#endregion
#region
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, GridSortEventArgs e)
{
BindGrid();
}
#endregion
#region
/// <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();
}
#endregion
#endregion
#region
///<summary>
///查询
///</summary>
///<param name="sender"></param>
///<param name="e"></param>
protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e)
{
this.ProjectId = this.drpProjectId.SelectedValue;
this.InitTreeMenu();
this.tvControlItem.SelectedNodeID = this.ProjectId;
BindGrid();
}
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void TextBox_TextChanged(object sender, EventArgs e)
{
this.BindGrid();
}
#endregion
#region
/// <summary>
/// 打印
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnPrint_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.ProjectId))
{
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
BLL.Common.FastReportService.ResetData();
List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
listStr.Add(new SqlParameter("@projectId", this.tvControlItem.SelectedNodeID));
}
if (!string.IsNullOrEmpty(this.drpIsoId.SelectedValue) && this.drpIsoId.SelectedValue != BLL.Const._Null)
{
listStr.Add(new SqlParameter("@iso_no", "%" + this.drpIsoId.SelectedValue + "%"));
}
else
{
listStr.Add(new SqlParameter("@iso_no", null));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunProc("SYB_TestPackagePipeList", parameter);
DataTable dt = new DataTable();
dt.TableName = "Data";
dt.Columns.Add("Number1");
dt.Columns.Add("PipelineCode1");
dt.Columns.Add("TestPackageNo1");
dt.Columns.Add("Number2");
dt.Columns.Add("PipelineCode2");
dt.Columns.Add("TestPackageNo2");
DataRow[] rows = tb.DefaultView.ToTable().Select();
foreach (var row in rows)
{
var newRow = dt.NewRow();
newRow["Number1"] = row["Number1"].ToString();
newRow["PipelineCode1"] = row["PipelineCode1"].ToString();
newRow["TestPackageNo1"] = row["TestPackageNo1"].ToString();
newRow["Number2"] = row["Number2"].ToString();
newRow["PipelineCode2"] = row["PipelineCode2"].ToString();
newRow["TestPackageNo2"] = row["TestPackageNo2"].ToString();
dt.Rows.Add(newRow);
}
BLL.Common.FastReportService.AddFastreportTable(dt);
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId).ProjectName);
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
initTemplatePath = "File\\Fastreport\\SYBData\\管道试压包一览表.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;
}
}
#endregion
#region
/// <summary>
/// 增加
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAdd_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
JArray teamGroupData = Grid1.GetMergedData();
List<JObject> list = new List<JObject>();
foreach (JObject teamGroupRow in teamGroupData)
{
JObject values = teamGroupRow.Value<JObject>("values");
list.Add(values);
}
JObject defaultObj = new JObject
{
{ "PressureTestPackageListId", Guid.NewGuid() },
{ "PipelineCode", "" },
{ "PressureTestPackageCode", "" },
{
"Delete3",
String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>",
GetDeleteScriptGrid1(), IconHelper.GetResolvedIconUrl(Icon.Delete))
}
};
list.Add(defaultObj);
Grid1.DataSource = list;
Grid1.DataBind();
}
else
{
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
return;
}
}
protected void Grid1_PreDataBound(object sender, EventArgs e)
{
// 设置LinkButtonField的点击客户端事件
LinkButtonField deleteField = Grid1.FindColumn("Delete3") as LinkButtonField;
deleteField.OnClientClick = GetDeleteScriptGrid1();
}
/// <summary>
/// 删除提示
/// </summary>
/// <returns></returns>
private string GetDeleteScriptGrid1()
{
return Confirm.GetShowReference("删除选中行?", String.Empty, MessageBoxIcon.Question,
Grid1.GetDeleteSelectedRowsReference(), String.Empty);
}
#endregion
#region
/// <summary>
/// 提交按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.SYBData_PressureTestPackageListMenuId, Const.BtnSave))
{
items.Clear();
BLL.PressureTestPackageListService.DeleteListsByProjectId(this.ProjectId);
JArray teamGroupData = Grid1.GetMergedData();
int i = 0;
foreach (JObject teamGroupRow in teamGroupData)
{
JObject values = teamGroupRow.Value<JObject>("values");
int rowIndex = teamGroupRow.Value<int>("index");
Model.SYBData_PressureTestPackageList newDetail = new Model.SYBData_PressureTestPackageList
{
PressureTestPackageListId = values.Value<string>("PressureTestPackageListId"),
ProjectId = this.ProjectId,
SerialNumber = (i + 1).ToString(),
PipelineCode = values.Value<string>("PipelineCode"),
PressureTestPackageCode = values.Value<string>("PressureTestPackageCode"),
CompileMan = this.CurrUser.UserId,
CompileDate = DateTime.Now
};
items.Add(newDetail);
i++;
}
try
{
if (items.Count > 0)
{
Funs.DB.SYBData_PressureTestPackageList.InsertAllOnSubmit(items);
}
Funs.DB.SubmitChanges();
}
catch (Exception)
{
return;
}
ShowNotify("保存成功!", MessageBoxIcon.Success);
//PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
#endregion
protected void drpIsoId_SelectedIndexChanged(object sender, EventArgs e)
{
PageInfo();
}
}
}

View File

@ -0,0 +1,206 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.SYBData
{
public partial class PressureTestPackageList
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </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>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// drpProjectId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpProjectId;
/// <summary>
/// tvControlItem 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree tvControlItem;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// drpIsoId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpIsoId;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnAdd 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAdd;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnPrint 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnPrint;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// txtPipelineCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPipelineCode;
/// <summary>
/// txtPressureTestPackageCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPressureTestPackageCode;
/// <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>
/// WindowPrint 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowPrint;
}
}

View File

@ -0,0 +1,157 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TeamGrouop.aspx.cs" Inherits="FineUIPro.Web.WeldMat.BaseInfo.TeamGrouop" %>
<!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>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" Title="班组"
ShowHeader="false" Layout="HBox">
<Items>
<f:Grid ID="Grid1" Title="班组" ShowHeader="false" EnableCollapse="true" PageSize="15"
ShowBorder="true" AllowPaging="true" IsDatabasePaging="true" runat="server" Width="760px"
EnableColumnLines="true" SortField="TeamGroupCode" SortDirection="ASC"
OnSort="Grid1_Sort" DataKeyNames="TeamGroupId" DataIDField="TeamGroupId"
OnPageIndexChange="Grid1_PageIndexChange"
AllowSorting="true" EnableRowClickEvent="true" OnRowClick="Grid1_RowClick">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
<Items>
<f:TextBox ID="txtTeamGropNameS" runat="server" Label="班组名称" Width="400px" EmptyText="输入查询条件" LabelAlign="Right" AutoPostBack="true" OnTextChanged="TextBox_TextChanged"></f:TextBox>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center"
TextAlign="Center" />
<f:RenderField Width="150px" ColumnID="TeamGroupCode" DataField="TeamGroupCode"
FieldType="String" HeaderText="编号" HeaderTextAlign="Center" TextAlign="Left"
SortField="TeamGroupCode">
</f:RenderField>
<f:RenderField Width="300px" ColumnID="TeamGroupName" DataField="TeamGroupName"
FieldType="String" HeaderText="班组名称" HeaderTextAlign="Center" TextAlign="Left"
SortField="TeamGroupName" ExpandUnusedSpace="true">
</f:RenderField>
<f:CheckBoxField Width="120px" RenderAsStaticField="true" TextAlign="Center" DataField="IsUsed" HeaderText="是否在用" />
</Columns>
<Listeners>
<f:Listener Event="rowselect" Handler="onGridRowSelect" />
<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="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
</f:DropDownList>
</PageItems>
</f:Grid>
<f:SimpleForm ID="SimpleForm1" runat="server" ShowBorder="true" ShowHeader="false"
LabelWidth="100px" BodyPadding="5px" Width="310px">
<Items>
<f:HiddenField ID="hfFormID" runat="server">
</f:HiddenField>
<f:TextBox ID="txtTeamGroupCode" Label="编号" ShowRedStar="true" Required="true" runat="server"
LabelAlign="right" MaxLength="50">
</f:TextBox>
<f:TextBox ID="txtTeamGroupName" Label="班组名称" ShowRedStar="true" Required="true" runat="server"
LabelAlign="right" MaxLength="50">
</f:TextBox>
<f:CheckBox runat="server" ID="cbIsUsed" Label="是否在用" LabelAlign="right"></f:CheckBox>
</Items>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server">
<Items>
<f:Button ID="btnNew" Text="" Icon="Add" ToolTip="新增" EnablePostBack="false" runat="server">
<Listeners>
<f:Listener Event="click" Handler="onNewButtonClick" />
</Listeners>
</f:Button>
<f:Button ID="btnDelete" Text="" Enabled="false" ToolTip="删除" Icon="Delete" ConfirmText="确定删除当前数据?"
OnClick="btnDelete_Click" runat="server">
</f:Button>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="提交数据(新增)" ValidateForms="SimpleForm1"
OnClick="btnSave_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:SimpleForm>
</Items>
</f:Panel>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
runat="server" Text="编辑" Icon="TableEdit">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除" Icon="Delete">
</f:MenuButton>
</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');
}
var gridClientID = '<%= Grid1.ClientID %>';
var btnDeleteClientID = '<%= btnDelete.ClientID %>';
var btnSaveClientID = '<%= btnSave.ClientID %>';
var formClientID = '<%= SimpleForm1.ClientID %>';
var hfFormIDClientID = '<%= hfFormID.ClientID %>';
var txtTeamGroupCodeClientID = '<%= txtTeamGroupCode.ClientID %>';
var txtTeamGroupNameClientID = '<%= txtTeamGroupName.ClientID %>';
var cbIsUsedClientID = '<%= cbIsUsed.ClientID %>';
function onGridRowSelect(event, rowId) {
var grid = F(gridClientID);
// 启用删除按钮
F(btnDeleteClientID).enable();
// 当前行数据
var rowValue = grid.getRowValue(rowId);
// 使用当前行数据填充表单字段
F(hfFormIDClientID).setValue(rowId);
F(txtTeamGroupCodeClientID).setValue(rowValue['TeamGroupCode']);
F(txtTeamGroupNameClientID).setValue(rowValue['TeamGroupName']);
F(cbIsUsedClientID).setValue(rowValue['IsUsed']);
// 更新提交按钮文本
F(btnSaveClientID).setText('提交数据(编辑)');
}
function onNewButtonClick() {
// 重置表单字段
F(formClientID).reset();
// 清空表格选中行
F(gridClientID).clearSelections();
// 禁用删除按钮
F(btnDeleteClientID).disable();
// 更新提交按钮文本
F(btnSaveClientID).setText('提交数据(新增)');
}
</script>
</body>
</html>

View File

@ -0,0 +1,328 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
namespace FineUIPro.Web.WeldMat.BaseInfo
{
public partial class TeamGrouop : PageBase
{
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
BindGrid();
}
}
#endregion
#region
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
string strSql = @"SELECT t.TeamGroupId,t.TeamGroupCode,t.TeamGroupName,t.IsUsed
FROM dbo.Base_TeamGroup t
WHERE 1=1";
List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.txtTeamGropNameS.Text.Trim()))
{
strSql += " AND t.TeamGroupName like @teamGroupName";
listStr.Add(new SqlParameter("@teamGroupName", "%" + this.txtTeamGropNameS.Text.Trim() + "%"));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// 2.获取当前分页数据
//var table = this.GetPagedDataTable(Grid1, tb1);
Grid1.RecordCount = tb.Rows.Count;
tb = GetFilteredTable(Grid1.FilteredData, tb);
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 Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
Grid1.PageIndex = e.NewPageIndex;
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_FilterChange(object sender, EventArgs e)
{
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 btnDelete_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.CLGL_TeamGroupMenuId, Const.BtnDelete))
{
if (judgementDelete(hfFormID.Text, true))
{
BLL.Base_TeamGroupService.DeleteTeamGroupById(hfFormID.Text);
BLL.Sys_LogService.AddLog(BLL.Const.System_7, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除班组");
// 重新绑定表格,并模拟点击[新增按钮]
BindGrid();
PageContext.RegisterStartupScript("onNewButtonClick();");
}
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
/// <summary>
/// 右键删除事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuDelete_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.CLGL_TeamGroupMenuId, Const.BtnDelete))
{
this.DeleteData();
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
/// <summary>
/// 删除方法
/// </summary>
private void DeleteData()
{
if (Grid1.SelectedRowIndexArray.Length > 0)
{
bool isShow = true;
if (Grid1.SelectedRowIndexArray.Length > 1)
{
isShow = false;
}
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
if (judgementDelete(rowID, isShow))
{
BLL.Base_TeamGroupService.DeleteTeamGroupById(rowID);
BLL.Sys_LogService.AddLog(BLL.Const.System_7, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除班组");
ShowNotify("删除完成!", MessageBoxIcon.Success);
}
}
BindGrid();
PageContext.RegisterStartupScript("onNewButtonClick();");
}
}
#endregion
#region
/// <summary>
/// 右键编辑事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuEdit_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.CLGL_TeamGroupMenuId, Const.BtnModify))
{
this.EditData();
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
/// <summary>
/// 编辑数据方法
/// </summary>
private void EditData()
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
this.txtTeamGroupCode.Text = string.Empty;
this.txtTeamGroupName.Text = string.Empty;
this.cbIsUsed.Checked = false;
string Id = Grid1.SelectedRowID;
var teamGroup = BLL.Base_TeamGroupService.GetTeamGroupByTeamGroupId(Id);
if (teamGroup != null)
{
this.txtTeamGroupCode.Text = teamGroup.TeamGroupCode;
this.txtTeamGroupName.Text = teamGroup.TeamGroupName;
if (teamGroup.IsUsed == true)
{
this.cbIsUsed.Checked = true;
}
hfFormID.Text = Id;
this.btnDelete.Enabled = true;
}
}
#endregion
#region
/// <summary>
/// 提交按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.CLGL_TeamGroupMenuId, Const.BtnSave))
{
string strRowID = hfFormID.Text;
if (BLL.Base_TeamGroupService.IsExitTeamGroupName(this.txtTeamGroupName.Text.Trim(),strRowID))
{
Alert.ShowInTop("此班组名称已存在!", MessageBoxIcon.Warning);
return;
}
Model.Base_TeamGroup teamGroup = new Model.Base_TeamGroup();
teamGroup.TeamGroupCode = this.txtTeamGroupCode.Text.Trim();
teamGroup.TeamGroupName = this.txtTeamGroupName.Text.Trim();
teamGroup.IsUsed = this.cbIsUsed.Checked;
if (string.IsNullOrEmpty(strRowID))
{
strRowID = SQLHelper.GetNewID(typeof(Model.Base_TeamGroup));
teamGroup.TeamGroupId = strRowID;
BLL.Base_TeamGroupService.AddTeamGroup(teamGroup);
BLL.Sys_LogService.AddLog(BLL.Const.System_7, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "添加班组");
}
else
{
teamGroup.TeamGroupId = strRowID;
BLL.Base_TeamGroupService.UpdateTeamGroup(teamGroup);
BLL.Sys_LogService.AddLog(BLL.Const.System_7, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "修改班组");
}
// 重新绑定表格,并点击当前编辑或者新增的行
BindGrid();
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript("onNewButtonClick();");
//PageContext.RegisterStartupScript(String.Format("F('{0}').selectRow('{1}');", Grid1.ClientID, UnitQualitySort.UnitQualitySortId));
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
#endregion
#region
/// <summary>
/// 判断是否可以删除
/// </summary>
/// <returns></returns>
private bool judgementDelete(string id, bool isShow)
{
string content = string.Empty;
//if (BLL.WeldInfoService.GetWeldInfoByWeldTypeId(id) > 0)
//{
// content = "焊材信息设置中已经使用了该焊材类型,不能删除!";
//}
if (string.IsNullOrEmpty(content))
{
return true;
}
else
{
if (isShow)
{
Alert.ShowInTop(content, MessageBoxIcon.Error);
}
return false;
}
}
#endregion
#region
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void TextBox_TextChanged(object sender, EventArgs e)
{
this.BindGrid();
}
#endregion
#region Grid行点击事件
/// <summary>
/// Grid行点击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
{
this.EditData();
}
#endregion
}
}

View File

@ -0,0 +1,215 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.WeldMat.BaseInfo
{
public partial class TeamGrouop
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </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>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// txtTeamGropNameS 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTeamGropNameS;
/// <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>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.SimpleForm SimpleForm1;
/// <summary>
/// hfFormID 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hfFormID;
/// <summary>
/// txtTeamGroupCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTeamGroupCode;
/// <summary>
/// txtTeamGroupName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTeamGroupName;
/// <summary>
/// cbIsUsed 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox cbIsUsed;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnNew 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// btnDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDelete;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// Menu1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDelete;
}
}

View File

@ -244,7 +244,7 @@ namespace FineUIPro.Web.common.ProjectSet
foreach (int i in Grid2.GetDeletedList())
{
string rowID = Grid2.DataKeys[i][0].ToString();
BLL.Base_TeamGroupService.DeleteTeamGroup(rowID);
BLL.Base_TeamGroupService.DeleteTeamGroupById(rowID);
}
}

View File

@ -605,6 +605,9 @@ namespace Model
partial void InsertSYBData_FileDirectory(SYBData_FileDirectory instance);
partial void UpdateSYBData_FileDirectory(SYBData_FileDirectory instance);
partial void DeleteSYBData_FileDirectory(SYBData_FileDirectory instance);
partial void InsertSYBData_PressureTestPackageList(SYBData_PressureTestPackageList instance);
partial void UpdateSYBData_PressureTestPackageList(SYBData_PressureTestPackageList instance);
partial void DeleteSYBData_PressureTestPackageList(SYBData_PressureTestPackageList instance);
partial void InsertSys_ButtonPower(Sys_ButtonPower instance);
partial void UpdateSys_ButtonPower(Sys_ButtonPower instance);
partial void DeleteSys_ButtonPower(Sys_ButtonPower instance);
@ -2547,6 +2550,14 @@ namespace Model
}
}
public System.Data.Linq.Table<SYBData_PressureTestPackageList> SYBData_PressureTestPackageList
{
get
{
return this.GetTable<SYBData_PressureTestPackageList>();
}
}
public System.Data.Linq.Table<Sys_ButtonPower> Sys_ButtonPower
{
get
@ -4890,6 +4901,8 @@ namespace Model
private EntitySet<SYBData_FileDirectory> _SYBData_FileDirectory;
private EntitySet<SYBData_PressureTestPackageList> _SYBData_PressureTestPackageList;
private EntitySet<Weld_ProjectPlan> _Weld_ProjectPlan;
private EntitySet<Weld_RecycleMat> _Weld_RecycleMat;
@ -5039,6 +5052,7 @@ namespace Model
this._SYBData_ApplicationForm = new EntitySet<SYBData_ApplicationForm>(new Action<SYBData_ApplicationForm>(this.attach_SYBData_ApplicationForm), new Action<SYBData_ApplicationForm>(this.detach_SYBData_ApplicationForm));
this._SYBData_Cover = new EntitySet<SYBData_Cover>(new Action<SYBData_Cover>(this.attach_SYBData_Cover), new Action<SYBData_Cover>(this.detach_SYBData_Cover));
this._SYBData_FileDirectory = new EntitySet<SYBData_FileDirectory>(new Action<SYBData_FileDirectory>(this.attach_SYBData_FileDirectory), new Action<SYBData_FileDirectory>(this.detach_SYBData_FileDirectory));
this._SYBData_PressureTestPackageList = new EntitySet<SYBData_PressureTestPackageList>(new Action<SYBData_PressureTestPackageList>(this.attach_SYBData_PressureTestPackageList), new Action<SYBData_PressureTestPackageList>(this.detach_SYBData_PressureTestPackageList));
this._Weld_ProjectPlan = new EntitySet<Weld_ProjectPlan>(new Action<Weld_ProjectPlan>(this.attach_Weld_ProjectPlan), new Action<Weld_ProjectPlan>(this.detach_Weld_ProjectPlan));
this._Weld_RecycleMat = new EntitySet<Weld_RecycleMat>(new Action<Weld_RecycleMat>(this.attach_Weld_RecycleMat), new Action<Weld_RecycleMat>(this.detach_Weld_RecycleMat));
this._Weld_RecycleMatTop = new EntitySet<Weld_RecycleMatTop>(new Action<Weld_RecycleMatTop>(this.attach_Weld_RecycleMatTop), new Action<Weld_RecycleMatTop>(this.detach_Weld_RecycleMatTop));
@ -6681,6 +6695,19 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SYBData_PressureTestPackageList_Base_Project", Storage="_SYBData_PressureTestPackageList", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")]
public EntitySet<SYBData_PressureTestPackageList> SYBData_PressureTestPackageList
{
get
{
return this._SYBData_PressureTestPackageList;
}
set
{
this._SYBData_PressureTestPackageList.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_ProjectPlan_Base_Project", Storage="_Weld_ProjectPlan", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")]
public EntitySet<Weld_ProjectPlan> Weld_ProjectPlan
{
@ -7749,6 +7776,18 @@ namespace Model
entity.Base_Project = null;
}
private void attach_SYBData_PressureTestPackageList(SYBData_PressureTestPackageList entity)
{
this.SendPropertyChanging();
entity.Base_Project = this;
}
private void detach_SYBData_PressureTestPackageList(SYBData_PressureTestPackageList entity)
{
this.SendPropertyChanging();
entity.Base_Project = null;
}
private void attach_Weld_ProjectPlan(Weld_ProjectPlan entity)
{
this.SendPropertyChanging();
@ -7818,6 +7857,8 @@ namespace Model
private string _Area;
private System.Nullable<bool> _IsUsed;
private EntityRef<Base_Project> _Base_Project;
#region
@ -7838,6 +7879,8 @@ namespace Model
partial void OnRemarkChanged();
partial void OnAreaChanging(string value);
partial void OnAreaChanged();
partial void OnIsUsedChanging(System.Nullable<bool> value);
partial void OnIsUsedChanged();
#endregion
public Base_TeamGroup()
@ -7990,6 +8033,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsUsed", DbType="Bit")]
public System.Nullable<bool> IsUsed
{
get
{
return this._IsUsed;
}
set
{
if ((this._IsUsed != value))
{
this.OnIsUsedChanging(value);
this.SendPropertyChanging();
this._IsUsed = value;
this.SendPropertyChanged("IsUsed");
this.OnIsUsedChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_TeamGroup_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
public Base_Project Base_Project
{
@ -87144,7 +87207,7 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CertificateId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CertificateId", DbType="NVarChar(50)")]
public string CertificateId
{
get
@ -117702,6 +117765,277 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.SYBData_PressureTestPackageList")]
public partial class SYBData_PressureTestPackageList : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private string _PressureTestPackageListId;
private string _ProjectId;
private string _SerialNumber;
private string _PipelineCode;
private string _PressureTestPackageCode;
private string _Remark;
private string _CompileMan;
private System.Nullable<System.DateTime> _CompileDate;
private EntityRef<Base_Project> _Base_Project;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnPressureTestPackageListIdChanging(string value);
partial void OnPressureTestPackageListIdChanged();
partial void OnProjectIdChanging(string value);
partial void OnProjectIdChanged();
partial void OnSerialNumberChanging(string value);
partial void OnSerialNumberChanged();
partial void OnPipelineCodeChanging(string value);
partial void OnPipelineCodeChanged();
partial void OnPressureTestPackageCodeChanging(string value);
partial void OnPressureTestPackageCodeChanged();
partial void OnRemarkChanging(string value);
partial void OnRemarkChanged();
partial void OnCompileManChanging(string value);
partial void OnCompileManChanged();
partial void OnCompileDateChanging(System.Nullable<System.DateTime> value);
partial void OnCompileDateChanged();
#endregion
public SYBData_PressureTestPackageList()
{
this._Base_Project = default(EntityRef<Base_Project>);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PressureTestPackageListId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
public string PressureTestPackageListId
{
get
{
return this._PressureTestPackageListId;
}
set
{
if ((this._PressureTestPackageListId != value))
{
this.OnPressureTestPackageListIdChanging(value);
this.SendPropertyChanging();
this._PressureTestPackageListId = value;
this.SendPropertyChanged("PressureTestPackageListId");
this.OnPressureTestPackageListIdChanged();
}
}
}
[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="_SerialNumber", DbType="NVarChar(50)")]
public string SerialNumber
{
get
{
return this._SerialNumber;
}
set
{
if ((this._SerialNumber != value))
{
this.OnSerialNumberChanging(value);
this.SendPropertyChanging();
this._SerialNumber = value;
this.SendPropertyChanged("SerialNumber");
this.OnSerialNumberChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineCode", DbType="NVarChar(50)")]
public string PipelineCode
{
get
{
return this._PipelineCode;
}
set
{
if ((this._PipelineCode != value))
{
this.OnPipelineCodeChanging(value);
this.SendPropertyChanging();
this._PipelineCode = value;
this.SendPropertyChanged("PipelineCode");
this.OnPipelineCodeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PressureTestPackageCode", DbType="NVarChar(50)")]
public string PressureTestPackageCode
{
get
{
return this._PressureTestPackageCode;
}
set
{
if ((this._PressureTestPackageCode != value))
{
this.OnPressureTestPackageCodeChanging(value);
this.SendPropertyChanging();
this._PressureTestPackageCode = value;
this.SendPropertyChanged("PressureTestPackageCode");
this.OnPressureTestPackageCodeChanged();
}
}
}
[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.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")]
public string CompileMan
{
get
{
return this._CompileMan;
}
set
{
if ((this._CompileMan != value))
{
this.OnCompileManChanging(value);
this.SendPropertyChanging();
this._CompileMan = value;
this.SendPropertyChanged("CompileMan");
this.OnCompileManChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")]
public System.Nullable<System.DateTime> 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_SYBData_PressureTestPackageList_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.SYBData_PressureTestPackageList.Remove(this);
}
this._Base_Project.Entity = value;
if ((value != null))
{
value.SYBData_PressureTestPackageList.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.Sys_ButtonPower")]
public partial class Sys_ButtonPower : INotifyPropertyChanging, INotifyPropertyChanged
{