2023-03-21 质量验收增加可编辑界面的资料验收
This commit is contained in:
parent
deb7e17eee
commit
50cdaae27a
|
|
@ -0,0 +1,70 @@
|
|||
|
||||
/****** Object: Table [dbo].[Check_MaterialAcceptance] Script Date: 2023/3/21 18:04:29 ******/
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
SET ANSI_PADDING ON
|
||||
GO
|
||||
|
||||
CREATE TABLE [dbo].[Check_MaterialAcceptance](
|
||||
[MaterialAcceptanceId] [nvarchar](50) NOT NULL,
|
||||
[ProjectId] [nvarchar](50) NULL,
|
||||
[PlanCode] [nvarchar](50) NULL,
|
||||
[FileName] [nvarchar](50) NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
[State] [char](1) NULL,
|
||||
[FilePath] [varchar](200) NULL,
|
||||
CONSTRAINT [PK_Check_MaterialAcceptance] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[MaterialAcceptanceId] 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
|
||||
|
||||
SET ANSI_PADDING OFF
|
||||
GO
|
||||
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_MaterialAcceptance', @level2type=N'COLUMN',@level2name=N'[MaterialAcceptanceId]'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_MaterialAcceptance', @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'Check_MaterialAcceptance', @level2type=N'COLUMN',@level2name=N'PlanCode'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'文件名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_MaterialAcceptance', @level2type=N'COLUMN',@level2name=N'FileName'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_MaterialAcceptance', @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'Check_MaterialAcceptance', @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'Check_MaterialAcceptance', @level2type=N'COLUMN',@level2name=N'State'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'材料验收表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_MaterialAcceptance'
|
||||
GO
|
||||
|
||||
delete from Sys_Menu where MenuId='8317C0F7-3A69-48AB-87E5-03E96C543B1C'
|
||||
delete from Sys_ButtonToMenu where MenuId='8317C0F7-3A69-48AB-87E5-03E96C543B1C'
|
||||
go
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('0B17549C-2749-4255-BFF4-574902E878FA','资料验收','CQMS/Check/MaterialAcceptance.aspx',20,'B8500D87-407E-458C-9915-FD54F0E81F36','Menu_CQMS',0,1,1)
|
||||
GO
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('00B413F9-1BB9-4F56-8952-D661716E9EF2','0B17549C-2749-4255-BFF4-574902E878FA','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('419D13BE-438D-450B-92AE-2737B571A4F1','0B17549C-2749-4255-BFF4-574902E878FA','修改',2)
|
||||
GO
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('88813BE-438D-450B-92AE-2737B571A4F1','0B17549C-2749-4255-BFF4-574902E878FA','删除',3)
|
||||
GO
|
||||
|
|
@ -327,13 +327,26 @@ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
|||
VALUES('5B1DCDDD-344E-4BD3-8660-E816D5EF9E1E','CC43E208-335D-4AE3-A1CE-B2D8510AE854','提交',5)
|
||||
GO
|
||||
|
||||
--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
--VALUES('8317C0F7-3A69-48AB-87E5-03E96C543B1C','资料验收','CQMS/Check/SpotDataCheck.aspx',20,'B8500D87-407E-458C-9915-FD54F0E81F36','Menu_CQMS',0,1,1)
|
||||
--GO
|
||||
--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
--VALUES('9EAC9A0F-0E2E-4650-8318-3C9BC5EFC35D','8317C0F7-3A69-48AB-87E5-03E96C543B1C','保存',1)
|
||||
--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
--VALUES('BDAFA160-FC9D-4B2C-A887-178453E945FE','8317C0F7-3A69-48AB-87E5-03E96C543B1C','提交',2)
|
||||
--GO
|
||||
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('8317C0F7-3A69-48AB-87E5-03E96C543B1C','资料验收','CQMS/Check/SpotDataCheck.aspx',20,'B8500D87-407E-458C-9915-FD54F0E81F36','Menu_CQMS',0,1,1)
|
||||
VALUES('0B17549C-2749-4255-BFF4-574902E878FA','资料验收','CQMS/Check/MaterialAcceptance.aspx',20,'B8500D87-407E-458C-9915-FD54F0E81F36','Menu_CQMS',0,1,1)
|
||||
GO
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('9EAC9A0F-0E2E-4650-8318-3C9BC5EFC35D','8317C0F7-3A69-48AB-87E5-03E96C543B1C','保存',1)
|
||||
VALUES('00B413F9-1BB9-4F56-8952-D661716E9EF2','0B17549C-2749-4255-BFF4-574902E878FA','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('BDAFA160-FC9D-4B2C-A887-178453E945FE','8317C0F7-3A69-48AB-87E5-03E96C543B1C','提交',2)
|
||||
VALUES('419D13BE-438D-450B-92AE-2737B571A4F1','0B17549C-2749-4255-BFF4-574902E878FA','修改',2)
|
||||
GO
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('88813BE-438D-450B-92AE-2737B571A4F1','0B17549C-2749-4255-BFF4-574902E878FA','删除',3)
|
||||
GO
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
|
|
|
|||
|
|
@ -266,6 +266,7 @@
|
|||
<Compile Include="CQMS\Check\CheckControlService.cs" />
|
||||
<Compile Include="CQMS\Check\CheckEquipmentApproveService.cs" />
|
||||
<Compile Include="CQMS\Check\CheckEquipmentService.cs" />
|
||||
<Compile Include="CQMS\Check\CheckMaterialacceptance.cs" />
|
||||
<Compile Include="CQMS\Check\CheckMonthService.cs" />
|
||||
<Compile Include="CQMS\Check\DesignApproveService.cs" />
|
||||
<Compile Include="CQMS\Check\DesignService.cs" />
|
||||
|
|
|
|||
|
|
@ -0,0 +1,146 @@
|
|||
using FineUIPro;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
|
||||
public static class CheckMaterialacceptanceService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
/// </summary>
|
||||
public static int count
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public static List<Model.Check_MaterialAcceptance> GetCheck_MaterialAcceptanceByModle(Model.Check_MaterialAcceptance table)
|
||||
{
|
||||
var q = from x in db.Check_MaterialAcceptance
|
||||
where
|
||||
(string.IsNullOrEmpty(table.MaterialAcceptanceId) || x.MaterialAcceptanceId.Contains(table.MaterialAcceptanceId)) &&
|
||||
(string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId)) &&
|
||||
(string.IsNullOrEmpty(table.PlanCode) || x.PlanCode.Contains(table.PlanCode)) &&
|
||||
(string.IsNullOrEmpty(table.FileName) || x.FileName.Contains(table.FileName)) &&
|
||||
(string.IsNullOrEmpty(table.CompileMan) || x.CompileMan.Contains(table.CompileMan)) &&
|
||||
(string.IsNullOrEmpty(table.State) || x.State.Contains(table.State)) &&
|
||||
(string.IsNullOrEmpty(table.FilePath) || x.FilePath.Contains(table.FilePath))
|
||||
select x
|
||||
;
|
||||
|
||||
return q.ToList();
|
||||
}
|
||||
|
||||
/// 获取分页列表
|
||||
/// </summary>
|
||||
/// <param name="PageIndex">页码</param>
|
||||
/// <param name="PageSize">每页数量</param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(Model.Check_MaterialAcceptance table, Grid Grid1)
|
||||
{
|
||||
var q = GetCheck_MaterialAcceptanceByModle(table);
|
||||
count = q.Count();
|
||||
if (count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
// q= q.Take(Grid1.PageSize * Grid1.PageIndex).Skip(Grid1.PageSize * (Grid1.PageIndex)).ToList();
|
||||
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
|
||||
return from x in q
|
||||
select new
|
||||
{
|
||||
x.MaterialAcceptanceId,
|
||||
x.ProjectId,
|
||||
x.PlanCode,
|
||||
x.FileName,
|
||||
x.CompileMan,
|
||||
x.CompileDate,
|
||||
x.State,
|
||||
x.FilePath,
|
||||
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
public static Model.Check_MaterialAcceptance GetCheck_MaterialAcceptanceById(string MaterialAcceptanceId)
|
||||
{
|
||||
return db.Check_MaterialAcceptance.FirstOrDefault(x => x.MaterialAcceptanceId == MaterialAcceptanceId);
|
||||
}
|
||||
|
||||
|
||||
public static void AddCheck_MaterialAcceptance(Model.Check_MaterialAcceptance newtable)
|
||||
{
|
||||
|
||||
Model.Check_MaterialAcceptance table = new Model.Check_MaterialAcceptance
|
||||
{
|
||||
MaterialAcceptanceId = newtable.MaterialAcceptanceId,
|
||||
ProjectId = newtable.ProjectId,
|
||||
PlanCode = newtable.PlanCode,
|
||||
FileName = newtable.FileName,
|
||||
CompileMan = newtable.CompileMan,
|
||||
CompileDate = newtable.CompileDate,
|
||||
State = newtable.State,
|
||||
FilePath = newtable.FilePath,
|
||||
};
|
||||
db.Check_MaterialAcceptance.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
public static void AddBulkCheck_MaterialAcceptance(List<Model.Check_MaterialAcceptance> newtables)
|
||||
{
|
||||
|
||||
db.Check_MaterialAcceptance.InsertAllOnSubmit(newtables);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
public static void UpdateCheck_MaterialAcceptance(Model.Check_MaterialAcceptance newtable)
|
||||
{
|
||||
|
||||
Model.Check_MaterialAcceptance table = db.Check_MaterialAcceptance.FirstOrDefault(x => x.MaterialAcceptanceId == newtable.MaterialAcceptanceId);
|
||||
if (table != null)
|
||||
{
|
||||
table.MaterialAcceptanceId = newtable.MaterialAcceptanceId;
|
||||
table.ProjectId = newtable.ProjectId;
|
||||
table.PlanCode = newtable.PlanCode;
|
||||
table.FileName = newtable.FileName;
|
||||
table.CompileMan = newtable.CompileMan;
|
||||
table.CompileDate = newtable.CompileDate;
|
||||
table.State = newtable.State;
|
||||
table.FilePath = newtable.FilePath;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
public static void DeleteCheck_MaterialAcceptanceById(string MaterialAcceptanceId)
|
||||
{
|
||||
|
||||
Model.Check_MaterialAcceptance table = db.Check_MaterialAcceptance.FirstOrDefault(x => x.MaterialAcceptanceId == MaterialAcceptanceId);
|
||||
if (table != null)
|
||||
{
|
||||
db.Check_MaterialAcceptance.DeleteOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void DeleteALLCheck_MaterialAcceptance()
|
||||
{
|
||||
if (db.Check_MaterialAcceptance != null)
|
||||
{
|
||||
db.Check_MaterialAcceptance.DeleteAllOnSubmit(db.Check_MaterialAcceptance);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -3423,6 +3423,11 @@
|
|||
/// 工序资料记录
|
||||
/// </summary>
|
||||
public const string SpotDataCheckMenuId = "8317C0F7-3A69-48AB-87E5-03E96C543B1C";
|
||||
/// <summary>
|
||||
/// 资料验收
|
||||
/// </summary>
|
||||
public const string CheckMaterialacceptanceMenuId = "0B17549C-2749-4255-BFF4-574902E878FA";
|
||||
|
||||
#endregion
|
||||
|
||||
#region 人员管理
|
||||
|
|
|
|||
|
|
@ -40,6 +40,12 @@ namespace WordEdit
|
|||
string filepath = model.FilePath;
|
||||
url = Funs.SGGLUrl + filepath;
|
||||
}
|
||||
else if (a[1]== "CQMS_Check_MaterialAcceptance")
|
||||
{
|
||||
var model = BLL.CheckMaterialacceptanceService.GetCheck_MaterialAcceptanceById(a[0]);
|
||||
string filepath = model.FilePath;
|
||||
url = Funs.SGGLUrl + filepath;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,118 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MaterialAcceptance.aspx.cs" Inherits="FineUIPro.Web.CQMS.Check.MaterialAcceptance" %>
|
||||
|
||||
<!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>
|
||||
<style type="text/css">
|
||||
.f-grid-colheader-text {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
</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" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
|
||||
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="材料验收" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="MaterialAcceptanceId" AllowCellEditing="true"
|
||||
ClicksToEdit="2" DataIDField="MaterialAcceptanceId" AllowSorting="true" SortField="CompileDate"
|
||||
SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" ForceFit="true"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" AllowFilters="true"
|
||||
OnFilterChange="Grid1_FilterChange" OnRowDataBound="Grid1_RowDataBound" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:HiddenField runat="server" ID="hdID">
|
||||
</f:HiddenField>
|
||||
<f:Button ID="btnNew" Icon="Add" EnablePostBack="true" Hidden="true"
|
||||
runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="imgBtnFile" Text="查看文件" ToolTip="查看" Icon="PageWhiteWord" runat="server"
|
||||
OnClick="imgBtnFile_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfPageIndex" Width="35px" 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="PlanCode" DataField="PlanCode"
|
||||
SortField="PlanCode" FieldType="String" HeaderText="编号" TextAlign="Left" MinWidth="140px"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="140px" ColumnID="FileName" DataField="FileName"
|
||||
SortField="FileName" FieldType="String" HeaderText="文件名称" TextAlign="Left"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="CompileManName" DataField="CompileManName"
|
||||
SortField="CompileManName" FieldType="String" HeaderText="编制人" TextAlign="Center"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="CompileDate" DataField="CompileDate" SortField="CompileDate"
|
||||
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="编制日期" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
</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>
|
||||
<f:ToolbarFill runat="server">
|
||||
</f:ToolbarFill>
|
||||
|
||||
</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="1300px" Height="660px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<Items>
|
||||
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Hidden="true" Text="修改" Icon="Pencil"
|
||||
OnClick="btnMenuModify_Click">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Hidden="true" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?"
|
||||
OnClick="btnMenuDel_Click">
|
||||
</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;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,287 @@
|
|||
using BLL;
|
||||
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.CQMS.Check
|
||||
{
|
||||
public partial class MaterialAcceptance : PageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目id
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
// 表头过滤
|
||||
//FilterDataRowItem = FilterDataRowItemImplement;
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
//权限按钮方法
|
||||
GetButtonPower();
|
||||
btnNew.OnClientClick = Window1.GetShowReference("MaterialAcceptanceEdit.aspx") + "return false;";
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected DataTable insklistData()
|
||||
{
|
||||
string strSql = @"SELECT ins.MaterialAcceptanceId,ins.PlanCode,ins.ProjectId,ins.FileName,"
|
||||
+ @" ins.CompileDate,ins.State,"
|
||||
+ @" u.PersonName as CompileManName"
|
||||
+ @" FROM Check_MaterialAcceptance ins"
|
||||
+ @" left join Person_Persons u on u.PersonId = ins.CompileMan"
|
||||
+ @" where ins.ProjectId=@ProjectId";
|
||||
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
return tb;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
|
||||
public void BindGrid()
|
||||
{
|
||||
DataTable tb = insklistData();
|
||||
|
||||
// 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();
|
||||
}
|
||||
|
||||
|
||||
#region 查询
|
||||
/// <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 Grid1_FilterChange(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <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 Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
//Grid1.SortDirection = e.SortDirection;
|
||||
//Grid1.SortField = e.SortField;
|
||||
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 Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
string str = this.hdID.Text;
|
||||
if (!string.IsNullOrEmpty(str))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MaterialAcceptanceEdit.aspx?MaterialAcceptanceId={0}", str, "查看 - ")));
|
||||
}
|
||||
this.hdID.Text = string.Empty;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Grid双击事件
|
||||
/// <summary>
|
||||
/// Grid行双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
btnMenuModify_Click(null, null);
|
||||
}
|
||||
#endregion
|
||||
#region 编辑
|
||||
/// <summary>
|
||||
/// 编辑按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuModify_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Grid1.SelectedRowID;
|
||||
var ins = BLL.CheckMaterialacceptanceService.GetCheck_MaterialAcceptanceById(id);
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MaterialAcceptanceEdit.aspx?MaterialAcceptanceId={0}", ins.MaterialAcceptanceId, "查看 - ")));
|
||||
|
||||
|
||||
}
|
||||
|
||||
#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)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Grid1.SelectedRowID;
|
||||
var ins = BLL.CheckMaterialacceptanceService.GetCheck_MaterialAcceptanceById(id);
|
||||
if (File.Exists(Funs.RootPath + ins.FilePath))
|
||||
{
|
||||
File.Delete(Funs.RootPath + ins.FilePath);
|
||||
|
||||
}
|
||||
////删除附件表
|
||||
BLL.CommonService.DeleteAttachFileById(id);
|
||||
BLL.CheckMaterialacceptanceService.DeleteCheck_MaterialAcceptanceById(id);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, ins.PlanCode, id, BLL.Const.CheckMaterialacceptanceMenuId, "删除验收资料");
|
||||
Grid1.DataBind();
|
||||
BindGrid();
|
||||
Alert.ShowInTop("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
#endregion
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
if (Request.Params["value"] == "0")
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.PersonId, BLL.Const.CheckMaterialacceptanceMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnNew.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnMenuModify.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
this.btnMenuDel.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void btnQuery_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
protected void btnRset_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
protected void imgBtnFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Grid1.SelectedRowID))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/IndexOffice.aspx?cmd={0}|CQMS_Check_MaterialAcceptance", Grid1.SelectedRowID, "查看 -")));
|
||||
PageContext.RegisterStartupScript(Window1.GetHideReference());
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Check
|
||||
{
|
||||
|
||||
|
||||
public partial class MaterialAcceptance
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// hdID 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdID;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// imgBtnFile 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button imgBtnFile;
|
||||
|
||||
/// <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>
|
||||
/// 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;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MaterialAcceptanceEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.Check.MaterialAcceptanceEdit" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>材料验收</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<script src="../../Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<style type="text/css">
|
||||
.labcenter {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" OnCustomEvent="PageManager1_CustomEvent" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:ContentPanel ID="ContentPanel2" Title="材料验收" ShowBorder="true"
|
||||
BodyPadding="10px" EnableCollapse="true" ShowHeader="true" 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="txtPlanCode" runat="server" LabelWidth="100px" Required="true" ShowRedStar="true" Label="编号" LabelAlign="Right"
|
||||
MaxLength="50">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtFileName" runat="server" LabelWidth="100px" Required="true" ShowRedStar="true" Label="文件名称" LabelAlign="Right"
|
||||
MaxLength="50">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Panel ID="Panel1" ShowHeader="false" ShowBorder="false" Layout="Column" runat="server">
|
||||
<Items>
|
||||
<f:Label runat="server" Text="附件:" CssStyle="padding-left:55px" Width="110px" CssClass="marginr" ShowLabel="false"></f:Label>
|
||||
<f:Button ID="imgBtnFile" Text="文件" ToolTip="上传及查看" Icon="TableCell" runat="server"
|
||||
OnClick="imgBtnFile_Click">
|
||||
</f:Button>
|
||||
<f:DropDownList ID="drpCompanyTemplate" runat="server" Width="300px" Hidden="true" Label="公司模板" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:Button ID="btnEditWord" Icon="PageWhiteWord" OnClick="btnEditWord_Click" runat="server" Text="编辑文档" ToolTip="编辑文档" >
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Label runat="server" ID="lbTemp">
|
||||
</f:Label>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" OnClick="btnSave_Click" runat="server" ToolTip="保存" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" OnClick="btnSubmit_Click" ToolTip="提交" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<f:HiddenField ID="hdId" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:HiddenField ID="hdAttachUrl" runat="server">
|
||||
</f:HiddenField>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" OnClose="WindowAtt_Close" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,307 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Check
|
||||
{
|
||||
public partial class MaterialAcceptanceEdit : PageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string MaterialAcceptanceId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["MaterialAcceptanceId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["MaterialAcceptanceId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 办理类型
|
||||
/// </summary>
|
||||
public string State
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["State"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["State"] = value;
|
||||
}
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
|
||||
MaterialAcceptanceId = Request.Params["MaterialAcceptanceId"];
|
||||
BLL.Base_CompanytemplateService.InitBase_CompanyTemplateDownList(drpCompanyTemplate, true);
|
||||
IsHiddendrpCompanyTemplate();
|
||||
if (!string.IsNullOrEmpty(MaterialAcceptanceId))
|
||||
{
|
||||
var MainPlan = BLL.CheckMaterialacceptanceService.GetCheck_MaterialAcceptanceById(MaterialAcceptanceId);
|
||||
hdId.Text = this.MaterialAcceptanceId;
|
||||
txtPlanCode.Text = MainPlan.PlanCode;
|
||||
txtFileName.Text = MainPlan.FileName;
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
string prefix = BLL.ProjectService.GetProjectCodeByProjectId(this.CurrUser.LoginProjectId) + "-ZLYS-";
|
||||
txtPlanCode.Text = BLL.SQLHelper.RunProcNewId("SpGetThreeNumber", "Check_MaterialAcceptance", "PlanCode", this.CurrUser.LoginProjectId, prefix);
|
||||
txtFileName.Text = "材料验收";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 时间转换
|
||||
/// </summary>
|
||||
/// <param name="date"></param>
|
||||
/// <returns></returns>
|
||||
public string ConvertDate(object date)
|
||||
{
|
||||
if (date != null)
|
||||
{
|
||||
return string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(date));
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
protected void imgBtnFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(hdId.Text))
|
||||
{
|
||||
hdId.Text = SQLHelper.GetNewID();
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=1&toKeyId={0}&path=FileUpload/CQMS/Plan&menuId={1}", hdId.Text, BLL.Const.CheckMaterialacceptanceMenuId)));
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (validate())
|
||||
{
|
||||
SaveMainPlan("save");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存
|
||||
/// </summary>
|
||||
public void SaveMainPlan(string saveType)
|
||||
{
|
||||
Model.Check_MaterialAcceptance MaterialAcceptance = new Model.Check_MaterialAcceptance();
|
||||
MaterialAcceptance.ProjectId = this.CurrUser.LoginProjectId;
|
||||
MaterialAcceptance.PlanCode = this.txtPlanCode.Text.Trim();
|
||||
MaterialAcceptance.FileName = this.txtFileName.Text.Trim();
|
||||
MaterialAcceptance.FilePath = "FileUpload/CQMS_Check_MaterialAcceptance/" + txtPlanCode.Text + ".doc";
|
||||
|
||||
if (!string.IsNullOrEmpty(MaterialAcceptanceId))
|
||||
{
|
||||
MaterialAcceptance.MaterialAcceptanceId = MaterialAcceptanceId;
|
||||
CheckMaterialacceptanceService.UpdateCheck_MaterialAcceptance(MaterialAcceptance);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrEmpty(hdId.Text))
|
||||
{
|
||||
MaterialAcceptance.MaterialAcceptanceId = SQLHelper.GetNewID();
|
||||
hdId.Text = MaterialAcceptance.MaterialAcceptanceId;
|
||||
MaterialAcceptanceId = MaterialAcceptance.MaterialAcceptanceId;
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialAcceptance.MaterialAcceptanceId = hdId.Text;
|
||||
MaterialAcceptanceId = hdId.Text;
|
||||
}
|
||||
MaterialAcceptance.CompileMan = this.CurrUser.PersonId;
|
||||
MaterialAcceptance.CompileDate = DateTime.Now;
|
||||
CheckMaterialacceptanceService.AddCheck_MaterialAcceptance(MaterialAcceptance);
|
||||
|
||||
}
|
||||
LogService.AddSys_Log(CurrUser, MaterialAcceptance.PlanCode, MaterialAcceptance.MaterialAcceptanceId, Const.CheckMaterialacceptanceMenuId, "修改总包施工质量计划");
|
||||
if (saveType == "submit")
|
||||
{
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 表格数据验证
|
||||
/// </summary>
|
||||
private bool validate()
|
||||
{
|
||||
bool res = false;
|
||||
string err = string.Empty;
|
||||
var att = BLL.AttachFileService.GetAttachFileByToKeyId(this.hdId.Text);
|
||||
if (att == null)
|
||||
{
|
||||
err += "请上传文件!";
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(err))
|
||||
{
|
||||
Alert.ShowInTop(err, MessageBoxIcon.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
res = true;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (validate())
|
||||
{
|
||||
|
||||
SaveMainPlan("submit");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private string GetStringByArray(string[] array)
|
||||
{
|
||||
string str = string.Empty;
|
||||
foreach (var item in array)
|
||||
{
|
||||
if (item != BLL.Const._Null)
|
||||
{
|
||||
str += item + ",";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(str))
|
||||
{
|
||||
str = str.Substring(0, str.LastIndexOf(","));
|
||||
}
|
||||
return str;
|
||||
}
|
||||
protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
|
||||
{
|
||||
string rootPath = Funs.RootPath;
|
||||
var model = BLL.CheckMaterialacceptanceService.GetCheck_MaterialAcceptanceById(MaterialAcceptanceId);
|
||||
string filepath = model.FilePath;
|
||||
string path = rootPath + filepath;
|
||||
DirectoryInfo pathInfo = new DirectoryInfo(path);
|
||||
string newPath = pathInfo.Parent.FullName;
|
||||
if (!Directory.Exists(newPath))
|
||||
{
|
||||
Directory.CreateDirectory(newPath);
|
||||
}
|
||||
if (drpCompanyTemplate.SelectedValue != Const._Null)
|
||||
{
|
||||
var template = BLL.Base_CompanytemplateService.GetBase_CompanyTemplateById(drpCompanyTemplate.SelectedValue);
|
||||
File.Copy(rootPath + template.FilePath, path);
|
||||
|
||||
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/IndexOffice.aspx?cmd={0}|CQMS_Check_MaterialAcceptance", MaterialAcceptanceId, "查看 -")));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetHideReference());
|
||||
}
|
||||
private void GetCompanyTemplate()
|
||||
{
|
||||
string rootPath = Funs.RootPath;
|
||||
var model = BLL.CheckMaterialacceptanceService.GetCheck_MaterialAcceptanceById(MaterialAcceptanceId);
|
||||
string filepath = model.FilePath;
|
||||
string path = rootPath + filepath;
|
||||
DirectoryInfo pathInfo = new DirectoryInfo(path);
|
||||
string newPath = pathInfo.Parent.FullName;
|
||||
if (!Directory.Exists(newPath))
|
||||
{
|
||||
Directory.CreateDirectory(newPath);
|
||||
}
|
||||
if (drpCompanyTemplate.SelectedValue != Const._Null)
|
||||
{
|
||||
var template = BLL.Base_CompanytemplateService.GetBase_CompanyTemplateById(drpCompanyTemplate.SelectedValue);
|
||||
File.Copy(rootPath + template.FilePath, path);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请选择模板", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/IndexOffice.aspx?cmd={0}|CQMS_Check_MaterialAcceptance", MaterialAcceptanceId, "查看 -")));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetHideReference());
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 是否隐藏选择模板
|
||||
/// </summary>
|
||||
protected void IsHiddendrpCompanyTemplate()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(MaterialAcceptanceId))
|
||||
{
|
||||
Model.Check_MaterialAcceptance Materialacceptance = BLL.CheckMaterialacceptanceService.GetCheck_MaterialAcceptanceById(MaterialAcceptanceId);
|
||||
if (!File.Exists(Funs.RootPath + Materialacceptance.FilePath))
|
||||
{
|
||||
|
||||
drpCompanyTemplate.Hidden = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
drpCompanyTemplate.Hidden = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
protected void btnEditWord_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (!string.IsNullOrEmpty(MaterialAcceptanceId))
|
||||
{
|
||||
Model.Check_MaterialAcceptance Materialacceptance = BLL.CheckMaterialacceptanceService.GetCheck_MaterialAcceptanceById(MaterialAcceptanceId);
|
||||
if (!File.Exists(Funs.RootPath + Materialacceptance.FilePath))
|
||||
{
|
||||
GetCompanyTemplate();
|
||||
//PageContext.RegisterStartupScript(Confirm.GetShowReference("是否使用公司模板?",
|
||||
// String.Empty,
|
||||
// MessageBoxIcon.Question,
|
||||
// PageManager1.GetCustomEventReference("Yes"), // 第一个参数 false 用来指定当前不是AJAX请求
|
||||
// PageManager1.GetCustomEventReference("No")));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/IndexOffice.aspx?cmd={0}|CQMS_Check_MaterialAcceptance", MaterialAcceptanceId, "查看 -")));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetHideReference());
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SaveMainPlan("save");
|
||||
GetCompanyTemplate();
|
||||
}
|
||||
//PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/IndexOffice.aspx?cmd={0}", filepath, "查看 -")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,188 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Check
|
||||
{
|
||||
|
||||
|
||||
public partial class MaterialAcceptanceEdit
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// ContentPanel2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel2;
|
||||
|
||||
/// <summary>
|
||||
/// Form2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form2;
|
||||
|
||||
/// <summary>
|
||||
/// txtPlanCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPlanCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtFileName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtFileName;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// imgBtnFile 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button imgBtnFile;
|
||||
|
||||
/// <summary>
|
||||
/// drpCompanyTemplate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpCompanyTemplate;
|
||||
|
||||
/// <summary>
|
||||
/// btnEditWord 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnEditWord;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// lbTemp 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbTemp;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSubmit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSubmit;
|
||||
|
||||
/// <summary>
|
||||
/// hdId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdId;
|
||||
|
||||
/// <summary>
|
||||
/// hdAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
}
|
||||
}
|
||||
|
|
@ -343,6 +343,8 @@
|
|||
<Content Include="CQMS\Check\JointCheckFile.aspx" />
|
||||
<Content Include="CQMS\Check\JointCheckStatistics.aspx" />
|
||||
<Content Include="CQMS\Check\JointCheckView.aspx" />
|
||||
<Content Include="CQMS\Check\MaterialAcceptance.aspx" />
|
||||
<Content Include="CQMS\Check\MaterialAcceptanceEdit.aspx" />
|
||||
<Content Include="CQMS\Check\ShowWBS.aspx" />
|
||||
<Content Include="CQMS\Check\SpotCheck.aspx" />
|
||||
<Content Include="CQMS\Check\SpotCheckFile.aspx" />
|
||||
|
|
@ -6398,6 +6400,20 @@
|
|||
<Compile Include="CQMS\Check\JointCheckView.aspx.designer.cs">
|
||||
<DependentUpon>JointCheckView.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Check\MaterialAcceptance.aspx.cs">
|
||||
<DependentUpon>MaterialAcceptance.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Check\MaterialAcceptance.aspx.designer.cs">
|
||||
<DependentUpon>MaterialAcceptance.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Check\MaterialAcceptanceEdit.aspx.cs">
|
||||
<DependentUpon>MaterialAcceptanceEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Check\MaterialAcceptanceEdit.aspx.designer.cs">
|
||||
<DependentUpon>MaterialAcceptanceEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Check\ShowWBS.aspx.cs">
|
||||
<DependentUpon>ShowWBS.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
<TreeNode id="1011063B-FEAC-4B89-A9D9-0F9F6BB3328E" Text="施工技术交底管理" NavigateUrl=""><TreeNode id="F0D0B2C6-51ED-4C47-95EB-C3DCB639BA5F" Text="施工技术交底" NavigateUrl="CQMS/Technical/TechnicalDisclose.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="B8500D87-407E-458C-9915-FD54F0E81F36" Text="质量验收" NavigateUrl=""><TreeNode id="CC43E208-335D-4AE3-A1CE-B2D8510AE854" Text="实体验收" NavigateUrl="CQMS/Check/SpotCheck.aspx"></TreeNode>
|
||||
<TreeNode id="0B17549C-2749-4255-BFF4-574902E878FA" Text="资料验收" NavigateUrl="CQMS/Check/MaterialAcceptance.aspx"></TreeNode>
|
||||
<TreeNode id="8317C0F7-3A69-48AB-87E5-03E96C543B1C" Text="资料验收" NavigateUrl="CQMS/Check/SpotDataCheck.aspx"></TreeNode>
|
||||
<TreeNode id="1433BE70-13C0-4AC7-BC3D-34C9471CE2A8" Text="质量验收统计" NavigateUrl="CQMS/Check/SpotCheckStatistics.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
|
|
|
|||
|
|
@ -299,6 +299,9 @@ namespace Model
|
|||
partial void InsertCheck_JointCheckDetail(Check_JointCheckDetail instance);
|
||||
partial void UpdateCheck_JointCheckDetail(Check_JointCheckDetail instance);
|
||||
partial void DeleteCheck_JointCheckDetail(Check_JointCheckDetail instance);
|
||||
partial void InsertCheck_MaterialAcceptance(Check_MaterialAcceptance instance);
|
||||
partial void UpdateCheck_MaterialAcceptance(Check_MaterialAcceptance instance);
|
||||
partial void DeleteCheck_MaterialAcceptance(Check_MaterialAcceptance instance);
|
||||
partial void InsertCheck_MonthDesign(Check_MonthDesign instance);
|
||||
partial void UpdateCheck_MonthDesign(Check_MonthDesign instance);
|
||||
partial void DeleteCheck_MonthDesign(Check_MonthDesign instance);
|
||||
|
|
@ -2254,6 +2257,14 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
public System.Data.Linq.Table<Check_MaterialAcceptance> Check_MaterialAcceptance
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.GetTable<Check_MaterialAcceptance>();
|
||||
}
|
||||
}
|
||||
|
||||
public System.Data.Linq.Table<Check_MonthDesign> Check_MonthDesign
|
||||
{
|
||||
get
|
||||
|
|
@ -19679,6 +19690,8 @@ namespace Model
|
|||
|
||||
private EntitySet<Check_JointCheck> _Check_JointCheck;
|
||||
|
||||
private EntitySet<Check_MaterialAcceptance> _Check_MaterialAcceptance;
|
||||
|
||||
private EntitySet<Check_PauseNotice> _Check_PauseNotice;
|
||||
|
||||
private EntitySet<Check_PunishNotice> _Check_PunishNotice;
|
||||
|
|
@ -20019,6 +20032,7 @@ namespace Model
|
|||
this._Check_CheckEquipment = new EntitySet<Check_CheckEquipment>(new Action<Check_CheckEquipment>(this.attach_Check_CheckEquipment), new Action<Check_CheckEquipment>(this.detach_Check_CheckEquipment));
|
||||
this._Check_IncentiveNotice = new EntitySet<Check_IncentiveNotice>(new Action<Check_IncentiveNotice>(this.attach_Check_IncentiveNotice), new Action<Check_IncentiveNotice>(this.detach_Check_IncentiveNotice));
|
||||
this._Check_JointCheck = new EntitySet<Check_JointCheck>(new Action<Check_JointCheck>(this.attach_Check_JointCheck), new Action<Check_JointCheck>(this.detach_Check_JointCheck));
|
||||
this._Check_MaterialAcceptance = new EntitySet<Check_MaterialAcceptance>(new Action<Check_MaterialAcceptance>(this.attach_Check_MaterialAcceptance), new Action<Check_MaterialAcceptance>(this.detach_Check_MaterialAcceptance));
|
||||
this._Check_PauseNotice = new EntitySet<Check_PauseNotice>(new Action<Check_PauseNotice>(this.attach_Check_PauseNotice), new Action<Check_PauseNotice>(this.detach_Check_PauseNotice));
|
||||
this._Check_PunishNotice = new EntitySet<Check_PunishNotice>(new Action<Check_PunishNotice>(this.attach_Check_PunishNotice), new Action<Check_PunishNotice>(this.detach_Check_PunishNotice));
|
||||
this._Check_RectifyNotices = new EntitySet<Check_RectifyNotices>(new Action<Check_RectifyNotices>(this.attach_Check_RectifyNotices), new Action<Check_RectifyNotices>(this.detach_Check_RectifyNotices));
|
||||
|
|
@ -21095,6 +21109,19 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_MaterialAcceptance_Base_Project", Storage="_Check_MaterialAcceptance", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")]
|
||||
public EntitySet<Check_MaterialAcceptance> Check_MaterialAcceptance
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Check_MaterialAcceptance;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._Check_MaterialAcceptance.Assign(value);
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_PauseNotice_Base_Project", Storage="_Check_PauseNotice", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")]
|
||||
public EntitySet<Check_PauseNotice> Check_PauseNotice
|
||||
{
|
||||
|
|
@ -23028,6 +23055,18 @@ namespace Model
|
|||
entity.Base_Project = null;
|
||||
}
|
||||
|
||||
private void attach_Check_MaterialAcceptance(Check_MaterialAcceptance entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
entity.Base_Project = this;
|
||||
}
|
||||
|
||||
private void detach_Check_MaterialAcceptance(Check_MaterialAcceptance entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
entity.Base_Project = null;
|
||||
}
|
||||
|
||||
private void attach_Check_PauseNotice(Check_PauseNotice entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
|
|
@ -41902,6 +41941,277 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Check_MaterialAcceptance")]
|
||||
public partial class Check_MaterialAcceptance : INotifyPropertyChanging, INotifyPropertyChanged
|
||||
{
|
||||
|
||||
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
|
||||
|
||||
private string _MaterialAcceptanceId;
|
||||
|
||||
private string _ProjectId;
|
||||
|
||||
private string _PlanCode;
|
||||
|
||||
private string _FileName;
|
||||
|
||||
private string _CompileMan;
|
||||
|
||||
private System.Nullable<System.DateTime> _CompileDate;
|
||||
|
||||
private string _State;
|
||||
|
||||
private string _FilePath;
|
||||
|
||||
private EntityRef<Base_Project> _Base_Project;
|
||||
|
||||
#region 可扩展性方法定义
|
||||
partial void OnLoaded();
|
||||
partial void OnValidate(System.Data.Linq.ChangeAction action);
|
||||
partial void OnCreated();
|
||||
partial void OnMaterialAcceptanceIdChanging(string value);
|
||||
partial void OnMaterialAcceptanceIdChanged();
|
||||
partial void OnProjectIdChanging(string value);
|
||||
partial void OnProjectIdChanged();
|
||||
partial void OnPlanCodeChanging(string value);
|
||||
partial void OnPlanCodeChanged();
|
||||
partial void OnFileNameChanging(string value);
|
||||
partial void OnFileNameChanged();
|
||||
partial void OnCompileManChanging(string value);
|
||||
partial void OnCompileManChanged();
|
||||
partial void OnCompileDateChanging(System.Nullable<System.DateTime> value);
|
||||
partial void OnCompileDateChanged();
|
||||
partial void OnStateChanging(string value);
|
||||
partial void OnStateChanged();
|
||||
partial void OnFilePathChanging(string value);
|
||||
partial void OnFilePathChanged();
|
||||
#endregion
|
||||
|
||||
public Check_MaterialAcceptance()
|
||||
{
|
||||
this._Base_Project = default(EntityRef<Base_Project>);
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialAcceptanceId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
|
||||
public string MaterialAcceptanceId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._MaterialAcceptanceId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._MaterialAcceptanceId != value))
|
||||
{
|
||||
this.OnMaterialAcceptanceIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._MaterialAcceptanceId = value;
|
||||
this.SendPropertyChanged("MaterialAcceptanceId");
|
||||
this.OnMaterialAcceptanceIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[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="_PlanCode", DbType="NVarChar(50)")]
|
||||
public string PlanCode
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._PlanCode;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._PlanCode != value))
|
||||
{
|
||||
this.OnPlanCodeChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._PlanCode = value;
|
||||
this.SendPropertyChanged("PlanCode");
|
||||
this.OnPlanCodeChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileName", DbType="NVarChar(50)")]
|
||||
public string FileName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._FileName;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._FileName != value))
|
||||
{
|
||||
this.OnFileNameChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._FileName = value;
|
||||
this.SendPropertyChanged("FileName");
|
||||
this.OnFileNameChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[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.ColumnAttribute(Storage="_State", DbType="Char(1)")]
|
||||
public string State
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._State;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._State != value))
|
||||
{
|
||||
this.OnStateChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._State = value;
|
||||
this.SendPropertyChanged("State");
|
||||
this.OnStateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FilePath", DbType="VarChar(200)")]
|
||||
public string FilePath
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._FilePath;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._FilePath != value))
|
||||
{
|
||||
this.OnFilePathChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._FilePath = value;
|
||||
this.SendPropertyChanged("FilePath");
|
||||
this.OnFilePathChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_MaterialAcceptance_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.Check_MaterialAcceptance.Remove(this);
|
||||
}
|
||||
this._Base_Project.Entity = value;
|
||||
if ((value != null))
|
||||
{
|
||||
value.Check_MaterialAcceptance.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.Check_MonthDesign")]
|
||||
public partial class Check_MonthDesign : INotifyPropertyChanging, INotifyPropertyChanged
|
||||
{
|
||||
|
|
@ -74047,7 +74357,7 @@ namespace Model
|
|||
OnCreated();
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(15) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
|
||||
public string MaterialCode
|
||||
{
|
||||
get
|
||||
|
|
@ -74151,7 +74461,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialDef", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialDef", DbType="NVarChar(3000)")]
|
||||
public string MaterialDef
|
||||
{
|
||||
get
|
||||
|
|
@ -78741,7 +79051,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(15)")]
|
||||
public string MaterialCode
|
||||
{
|
||||
get
|
||||
|
|
@ -83089,7 +83399,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(1000)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(200)")]
|
||||
public string CanWelderCode
|
||||
{
|
||||
get
|
||||
|
|
@ -122458,7 +122768,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialName", DbType="NVarChar(100)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialName", DbType="NVarChar(50)")]
|
||||
public string MaterialName
|
||||
{
|
||||
get
|
||||
|
|
@ -122478,7 +122788,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecificationAndModel", DbType="NVarChar(200)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecificationAndModel", DbType="NVarChar(50)")]
|
||||
public string SpecificationAndModel
|
||||
{
|
||||
get
|
||||
|
|
@ -122498,7 +122808,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(100)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50)")]
|
||||
public string MaterialCode
|
||||
{
|
||||
get
|
||||
|
|
@ -122518,7 +122828,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Material", DbType="NVarChar(100)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Material", DbType="NVarChar(50)")]
|
||||
public string Material
|
||||
{
|
||||
get
|
||||
|
|
@ -181663,7 +181973,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RewardAndPunishDecision", DbType="NVarChar(100)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RewardAndPunishDecision", DbType="NVarChar(200)")]
|
||||
public string RewardAndPunishDecision
|
||||
{
|
||||
get
|
||||
|
|
@ -236164,7 +236474,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(1000)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(200)")]
|
||||
public string CanWelderCode
|
||||
{
|
||||
get
|
||||
|
|
|
|||
Loading…
Reference in New Issue