This commit is contained in:
高飞 2024-07-24 15:08:41 +08:00
commit 18673d9654
25 changed files with 2841 additions and 258 deletions

View File

@ -0,0 +1,50 @@
update SYS_MENU set IsUsed=0 where menuid='48545C6A-9D10-47F4-810F-DAB0CFCD5BF9';
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
values('197F9A9A-480C-4CC3-B6B7-3A7D382DC3EB','LHC System List(Process)','Transfer/LHCSystemList.aspx?Type=0',8,'0','Menu_Transfer',0,1,1)
go
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
values('8400F97B-5E26-4D22-BBED-1BBE533A4235','197F9A9A-480C-4CC3-B6B7-3A7D382DC3EB','Ôö¼Ó',1)
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
values('8EB4D935-3ECD-4E4C-AABC-1DA6432C9681','197F9A9A-480C-4CC3-B6B7-3A7D382DC3EB','ÐÞ¸Ä',2)
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
values('C201BD75-5928-4C97-BEB3-219A735A7CF3','197F9A9A-480C-4CC3-B6B7-3A7D382DC3EB','ɾ³ý',3)
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
values('F3E56E50-929D-4B4C-A3F7-87DA87787A8F','197F9A9A-480C-4CC3-B6B7-3A7D382DC3EB','±£´æ',4)
go
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
values('022428DC-FC99-4916-B8AF-6A9DC885DFAF','LHC System List(Non-Process)','Transfer/LHCSystemList.aspx?Type=1',9,'0','Menu_Transfer',0,1,1)
go
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
values('489F3579-0ECA-4BC7-9BEA-E8D11B17816A','022428DC-FC99-4916-B8AF-6A9DC885DFAF','Ôö¼Ó',1)
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
values('E6311F1E-1E1D-4CE8-BACB-3C51C1E94BA3','022428DC-FC99-4916-B8AF-6A9DC885DFAF','ÐÞ¸Ä',2)
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
values('A90CE1C1-0776-4BDB-AF5D-B06D05342730','022428DC-FC99-4916-B8AF-6A9DC885DFAF','ɾ³ý',3)
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
values('5EB9D01F-35C0-4463-A847-32ED48B9E29D','022428DC-FC99-4916-B8AF-6A9DC885DFAF','±£´æ',4)
go
CREATE TABLE [dbo].[Transfer_LHCSystemList](
[Id] [nvarchar](50) NOT NULL,
[ProjectId] [nvarchar](50) NULL,
[Type] [nvarchar](50) NULL,
[SN] [int] NULL,
[Commissioningsystemcode] [nvarchar](50) NULL,
[CommissioningCodeDescription] [nvarchar](50) NULL,
[SubCommissioningsystem] [nvarchar](50) NULL,
[Turnover_Code] [nvarchar](50) NULL,
[PlanStartofTestingDate] [datetime] NULL,
[PlanFinishofTestingDate] [datetime] NULL,
[Status] [nvarchar](50) NULL,
[ActualFinishedDate] [datetime] NULL,
[Describe] [nvarchar](200) NULL,
CONSTRAINT [PK_Transfer_LHCSystemList] PRIMARY KEY CLUSTERED
(
[Id] 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

View File

@ -0,0 +1,68 @@
ALTER TABLE Transfer_PunchlistFrom ADD Num_NO BigInt NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD System_No NVARCHAR(50) NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD Sub_Sys_No NVARCHAR(50) NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD Cat NVARCHAR(50) NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD Raised_By NVARCHAR(50) NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD Date_Raised datetime NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD Disc NVARCHAR(50) NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD IsEng bit NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD IsMatI bit NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD Punch_Type NVARCHAR(50) NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD Required_Date datetime NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD PIC NVARCHAR(50) NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD PIC_WUH NVARCHAR(50) NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD Correction_Action NVARCHAR(500) NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD Actual_Date datetime NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD Cleared_By NVARCHAR(50) NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD Cleared_Date datetime NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD Confirmed_By NVARCHAR(50) NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD Confirmed_Date datetime NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD Verified_By NVARCHAR(50) NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD Verified_Date datetime NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD [Status] NVARCHAR(50) NULL
GO
ALTER TABLE Transfer_PunchlistFrom ADD Remark NVARCHAR(500) NULL
GO

View File

@ -615,12 +615,6 @@
<Compile Include="JDGL\WBS\WbsSetService.cs" />
<Compile Include="JDGL\WBS\WorkloadStatisticsService.cs" />
<Compile Include="Notice\NoticeService.cs" />
<Compile Include="obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs" />
<Compile Include="obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs" />
<Compile Include="obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs" />
<Compile Include="obj\Release\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs" />
<Compile Include="obj\Release\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs" />
<Compile Include="obj\Release\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs" />
<Compile Include="OfficeCheck\Check\CheckNoticeService.cs" />
<Compile Include="OfficeCheck\Check\CheckReportService.cs" />
<Compile Include="OfficeCheck\Check\CheckTable1Service.cs" />

View File

@ -4303,6 +4303,9 @@ namespace BLL
public const string PlumbingMenuId = "95295BF7-FB51-480D-9902-6ADA4E8427FC";
public const string HVACMenuId = "05442049-1310-45B1-9D3D-CAAE759D8F3E";
public const string PunchlistFromMenuId = "016903B1-3B86-4CF5-AFF8-FF8BE389BEE5";
public const string Transfer_LHCSystemListMenuId0 = "197F9A9A-480C-4CC3-B6B7-3A7D382DC3EB";
public const string Transfer_LHCSystemListMenuId1 = "022428DC-FC99-4916-B8AF-6A9DC885DFAF";
#endregion
#endregion

View File

@ -778,6 +778,13 @@ namespace FineUIPro.Web.AttachFile
}
#endregion
#region PunchlistFrom附件保存成功后处理事件
if (MenuId == BLL.Const.PunchlistFromMenuId)
{
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
#endregion
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
}

View File

@ -2032,6 +2032,8 @@
<Content Include="Transfer\HVACDataIn.aspx" />
<Content Include="Transfer\Instrumentation.aspx" />
<Content Include="Transfer\InstrumentationDataIn.aspx" />
<Content Include="Transfer\LHCSystemList.aspx" />
<Content Include="Transfer\LHCSystemListDataIn.aspx" />
<Content Include="Transfer\Piping.aspx" />
<Content Include="Transfer\PipingDataIn.aspx" />
<Content Include="Transfer\Plumbing.aspx" />
@ -17662,6 +17664,20 @@
<Compile Include="Transfer\InstrumentationDataIn.aspx.designer.cs">
<DependentUpon>InstrumentationDataIn.aspx</DependentUpon>
</Compile>
<Compile Include="Transfer\LHCSystemList.aspx.cs">
<DependentUpon>LHCSystemList.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Transfer\LHCSystemList.aspx.designer.cs">
<DependentUpon>LHCSystemList.aspx</DependentUpon>
</Compile>
<Compile Include="Transfer\LHCSystemListDataIn.aspx.cs">
<DependentUpon>LHCSystemListDataIn.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Transfer\LHCSystemListDataIn.aspx.designer.cs">
<DependentUpon>LHCSystemListDataIn.aspx</DependentUpon>
</Compile>
<Compile Include="Transfer\Piping.aspx.cs">
<DependentUpon>Piping.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -19056,7 +19072,7 @@
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress>false</Use64BitIISExpress>
<IISExpressSSLPort />

View File

@ -0,0 +1,145 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LHCSystemList.aspx.cs" Inherits="FineUIPro.Web.Transfer.LHCSystemList" %>
<!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>Table 1LHC System List</title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="设备材料报验" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="SN"
SortDirection="ASC" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableTextSelection="true">
<Toolbars>
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtCommissioningsystemcode"
Label="Commissioning system code" LabelWidth="220px" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtCommissioningCodeDescription" Label="Commissioning Code Description"
LabelWidth="240px" LabelAlign="Right"></f:TextBox>
<%--<f:DatePicker runat="server" Label="Test_Package_START" ID="txtStarTime" LabelAlign="Right" LabelWidth="150px"
Width="280px">
</f:DatePicker>
<f:Label ID="Label1" runat="server" Text="至">
</f:Label>
<f:DatePicker runat="server" ID="txtEndTime" LabelAlign="Right" Width="150px">
</f:DatePicker>--%>
<f:Button ID="btnSearch" Icon="SystemSearch" EnablePostBack="true" runat="server" OnClick="btnSearch_Click" ToolTip="查询">
</f:Button>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RenderField ColumnID="SN" DataField="SN" FieldType="String" HeaderText="SN" TextAlign="Center"
HeaderTextAlign="Center" MinWidth="50px">
</f:RenderField>
<f:RenderField ColumnID="Commissioningsystemcode" DataField="Commissioningsystemcode"
FieldType="String" HeaderText="Commissioning<br/> system code" TextAlign="Center"
HeaderTextAlign="Center" MinWidth="180px">
</f:RenderField>
<f:RenderField ColumnID="CommissioningCodeDescription" DataField="CommissioningCodeDescription"
FieldType="String" HeaderText="Commissioning Code<br/> Description" TextAlign="Center"
HeaderTextAlign="Center" MinWidth="180px">
</f:RenderField>
<f:RenderField ColumnID="Describe" DataField="Describe"
FieldType="String" HeaderText="试车代号描述" TextAlign="Center" Hidden="true"
HeaderTextAlign="Center" MinWidth="160px">
</f:RenderField>
<f:RenderField ColumnID="SubCommissioningsystem" DataField="SubCommissioningsystem"
FieldType="String" HeaderText="Sub-Commissioning<br/> system" TextAlign="Center"
HeaderTextAlign="Center" MinWidth="180px">
</f:RenderField>
<f:RenderField ColumnID="Turnover_Code" DataField="Turnover_Code"
FieldType="String" HeaderText="Turnover Code" TextAlign="Center"
HeaderTextAlign="Center" MinWidth="150px">
</f:RenderField>
<f:RenderField ColumnID="PlanStartofTestingDate" DataField="PlanStartofTestingDate" FieldType="Date" Renderer="Date"
RendererArgument="yyyy-MM-dd"
HeaderText="Plan Start of Testing Date" TextAlign="Center" HeaderTextAlign="Center" MinWidth="180px">
</f:RenderField>
<f:RenderField ColumnID="PlanFinishofTestingDate" DataField="PlanFinishofTestingDate" FieldType="Date" Renderer="Date"
RendererArgument="yyyy-MM-dd"
HeaderText="Plan Finish of Testing Date" TextAlign="Center" HeaderTextAlign="Center" MinWidth="180px">
</f:RenderField>
<f:RenderField ColumnID="Status" DataField="Status"
FieldType="String" HeaderText="Status" TextAlign="Center"
HeaderTextAlign="Center" MinWidth="150px">
</f:RenderField>
<f:RenderField ColumnID="ActualFinishedDate" DataField="ActualFinishedDate" FieldType="Date" Renderer="Date"
RendererArgument="yyyy-MM-dd"
HeaderText="Actual Finished Date" TextAlign="Center" HeaderTextAlign="Center" MinWidth="180px">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="100000" />
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="LHC System List" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="900px" Height="480px">
</f:Window>
<f:Window ID="Window2" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
Width="700px" Height="560px">
</f:Window>
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Parent" EnableResize="false" runat="server"
IsModal="true" Width="700px" Height="500px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<Items>
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?"
OnClick="btnMenuDel_Click" Hidden="true">
</f:MenuButton>
</Items>
</f:Menu>
</form>
<script type="text/javascript">
var menuID = '<%= Menu1.ClientID %>';
// 返回false来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
</script>
</body>
</html>

View File

@ -0,0 +1,258 @@
using BLL;
using BLL.CQMS.Comprehensive;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
namespace FineUIPro.Web.Transfer
{
public partial class LHCSystemList : PageBase
{
public string Type
{
get
{
return (string)ViewState["Type"];
}
set
{
ViewState["Type"] = value;
}
}
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Type= Request.Params["Type"];
if (Type=="1")
{
var a = Grid1;
Grid1.Columns[3].Hidden = false;
}
GetButtonPower();
BindGrid();
}
}
/// <summary>
/// 数据绑定
/// </summary>
public void BindGrid()
{
string strSql = @"select * from Transfer_LHCSystemList
where ProjectId = @ProjectId and Type=@Type";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@Type", Type));
if (!string.IsNullOrEmpty(this.txtCommissioningsystemcode.Text.Trim()))
{
strSql += " AND Commissioningsystemcode like @Commissioningsystemcode";
listStr.Add(new SqlParameter("@Commissioningsystemcode", "%" + this.txtCommissioningsystemcode.Text.Trim() + "%"));
}
//if (!string.IsNullOrEmpty(txtStarTime.Text.Trim()))
//{
// strSql += " AND TestPackageSTART >= @InspectionDateA";
// listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim())));
//}
//if (!string.IsNullOrEmpty(txtEndTime.Text.Trim()))
//{
// strSql += " AND TestPackageSTART <= @InspectionDateZ";
// listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
//}
if (!string.IsNullOrEmpty(this.txtCommissioningCodeDescription.Text.Trim()))
{
strSql += " AND CommissioningCodeDescription like @CommissioningCodeDescription";
listStr.Add(new SqlParameter("@CommissioningCodeDescription", "%" + this.txtCommissioningCodeDescription.Text.Trim() + "%"));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#endregion
#region
/// <summary>
/// 分页下拉
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void 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_PageIndexChange(object sender, GridPageEventArgs 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 btnSearch_Click(object sender, EventArgs e)
{
BindGrid();
}
#endregion
#region
/// <summary>
/// 关闭弹出窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
BindGrid();
}
#endregion
#region
/// <summary>
/// 新增按钮事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnNew_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InspectionEquipmentEdit.aspx", "编辑 - ")));
}
#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;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InspectionEquipmentEdit.aspx?InspectionEquipmentId={0}", Grid1.SelectedRowID, "编辑 - ")));
}
/// <summary>
/// Grid行双击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
this.btnMenuModify_Click(sender, e);
}
#endregion
#region
/// <summary>
/// 右键删除
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuDel_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length > 0)
{
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
var model = Funs.DB.Transfer_LHCSystemList.FirstOrDefault(x => x.Id == rowID);
if (model != null)
{
Funs.DB.Transfer_LHCSystemList.DeleteOnSubmit(model);
Funs.DB.SubmitChanges();
}
}
BindGrid();
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
}
}
#endregion
#region
/// <summary>
/// 导入按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnImport_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("LHCSystemListDataIn.aspx?Type="+Type, "导入 - ")));
}
#endregion
#region
/// <summary>
/// 获取按钮权限
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
{
if (Request.Params["value"] == "0")
{
return;
}
var menuId = "";
if (Type == "0")
{
menuId = BLL.Const.Transfer_LHCSystemListMenuId0;
}
else {
menuId= BLL.Const.Transfer_LHCSystemListMenuId1;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, menuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnDelete))
{
this.btnMenuDel.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnSave))
{
this.btnImport.Hidden = false;
}
}
}
#endregion
}
}

View File

@ -0,0 +1,161 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Transfer
{
public partial class LHCSystemList
{
/// <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>
/// ToolSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar ToolSearch;
/// <summary>
/// txtCommissioningsystemcode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCommissioningsystemcode;
/// <summary>
/// txtCommissioningCodeDescription 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCommissioningCodeDescription;
/// <summary>
/// btnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// btnImport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnImport;
/// <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>
/// Window2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
/// <summary>
/// WindowAtt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
/// <summary>
/// Menu1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuDel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDel;
}
}

View File

@ -0,0 +1,68 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LHCSystemListDataIn.aspx.cs" Inherits="FineUIPro.Web.Transfer.LHCSystemListDataIn" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" OnCustomEvent="PageManager1_CustomEvent" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" ToolbarAlign="Right" runat="server">
<Items>
<f:HiddenField ID="hdFileName" runat="server">
</f:HiddenField>
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" ToolTip="审核" ValidateForms="SimpleForm1" Text="审核"
OnClick="btnAudit_Click">
</f:Button>
<f:Button ID="btnImport" Icon="ApplicationGet" runat="server" ToolTip="导入" ValidateForms="SimpleForm1" Text="导入"
OnClick="btnImport_Click">
</f:Button>
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载模板" OnClick="btnDownLoad_Click" Text="下载模板">
</f:Button>
<f:HiddenField ID="hdCheckResult" runat="server">
</f:HiddenField>
</Items>
</f:Toolbar>
</Toolbars>
<Rows>
<f:FormRow>
<Items>
<f:FileUpload runat="server" ID="fuAttachUrl" EmptyText="选择要导入的文件" Label="选择要导入的文件"
LabelWidth="150px">
</f:FileUpload>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Grid ID="gvErrorInfo" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="检查列表" EnableCollapse="true"
runat="server" BoxFlex="1" AllowCellEditing="true" ClicksToEdit="2" AllowSorting="true"
SortDirection="DESC" EnableColumnLines="true" ForceFit="true" AllowPaging="true" IsDatabasePaging="true" PageSize="10"
EnableRowDoubleClickEvent="true" AllowFilters="true" EnableTextSelection="True">
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lblPageIndex" runat="server" Text='<%# gvErrorInfo.PageIndex * gvErrorInfo.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:BoundField DataField="Row" HeaderText="错误行号">
</f:BoundField>
<f:BoundField DataField="Column" HeaderText="错误列">
</f:BoundField>
<f:BoundField DataField="Reason" HeaderText="错误类型">
</f:BoundField>
</Columns>
</f:Grid>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</form>
</body>
</html>

View File

@ -0,0 +1,570 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.Transfer
{
public partial class LHCSystemListDataIn : PageBase
{
#region
/// <summary>
/// 上传预设的虚拟路径
/// </summary>
private string initPath = Const.ExcelUrl;
/// <summary>
/// 错误集合
/// </summary>
public static List<Model.ErrorInfo> errorInfos = new List<Model.ErrorInfo>();
public string Type
{
get
{
return (string)ViewState["Type"];
}
set
{
ViewState["Type"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Type = Request.Params["Type"];
this.hdCheckResult.Text = string.Empty;
this.hdFileName.Text = string.Empty;
if (errorInfos != null)
{
errorInfos.Clear();
}
}
}
#endregion
#region
/// <summary>
/// 审核
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAudit_Click(object sender, EventArgs e)
{
try
{
if (this.fuAttachUrl.HasFile == false)
{
ShowNotify("请您选择Excel文件", MessageBoxIcon.Warning);
return;
}
string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
if (IsXls != ".xls")
{
ShowNotify("只可以选择Excel文件", MessageBoxIcon.Warning);
return;
}
if (errorInfos != null)
{
errorInfos.Clear();
}
string rootPath = Server.MapPath("~/");
string initFullPath = rootPath + initPath;
if (!Directory.Exists(initFullPath))
{
Directory.CreateDirectory(initFullPath);
}
this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls;
string filePath = initFullPath + this.hdFileName.Text;
this.fuAttachUrl.PostedFile.SaveAs(filePath);
ImportXlsToData(rootPath + initPath + this.hdFileName.Text);
}
catch (Exception ex)
{
ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning);
}
}
#region Excel提取数据
/// <summary>
/// 从Excel提取数据--》Dataset
/// </summary>
/// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData(string fileName)
{
try
{
string oleDBConnString = String.Empty;
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
oleDBConnString += "Data Source=";
oleDBConnString += fileName;
oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable();
DataSet ds = new DataSet();
oleDBConn = new OleDbConnection(oleDBConnString);
oleDBConn.Open();
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
if (m_tableName != null && m_tableName.Rows.Count > 0)
{
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
}
string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose();
oleDBConn.Close();
oleDBConn.Dispose();
if (Type == "0")
{
AddDatasetToSQL(ds.Tables[0], 8);
}
else
{
AddDatasetToSQL(ds.Tables[0], 9);
}
hdCheckResult.Text = "1";
}
catch (Exception exc)
{
Response.Write(exc);
//return null;
// return dt;
}
finally
{
}
}
#endregion
#region Dataset的数据导入数据库
/// <summary>
/// 将Dataset的数据导入数据库
/// </summary>
/// <param name="pds">数据集</param>
/// <param name="Cols">数据集行数</param>
/// <returns></returns>
private bool AddDatasetToSQL(DataTable pds, int Cols)
{
string result = string.Empty;
int ic, ir;
ic = pds.Columns.Count;
if (ic < Cols)
{
ShowNotify("导入Excel格式错误Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
return false;
}
ir = pds.Rows.Count;
if (pds != null && ir > 0)
{
for (int i = 1; i < ir; i++)
{
if (Type == "0")
{
string row4 = pds.Rows[i][4].ToString();
if (!string.IsNullOrEmpty(row4))
{
try
{
DateTime date = Convert.ToDateTime(row4.Trim());
}
catch (Exception)
{
result += (i + 3).ToString() + "," + "Plan Start of Testing Date" + "," + "[" + row4 + "]错误!不是日期格式!" + "|";
}
}
string row5 = pds.Rows[i][5].ToString();
if (!string.IsNullOrEmpty(row4))
{
try
{
DateTime date = Convert.ToDateTime(row5.Trim());
}
catch (Exception)
{
result += (i + 3).ToString() + "," + "Plan Finish of Testing Date" + "," + "[" + row5 + "]错误!不是日期格式!" + "|";
}
}
string row8 = pds.Rows[i][7].ToString();
if (!string.IsNullOrEmpty(row4))
{
try
{
DateTime date = Convert.ToDateTime(row8.Trim());
}
catch (Exception)
{
result += (i + 3).ToString() + "," + "Actual Finished Date" + "," + "[" + row8 + "]错误!不是日期格式!" + "|";
}
}
}
else {
string row4 = pds.Rows[i][5].ToString();
if (!string.IsNullOrEmpty(row4))
{
try
{
DateTime date = Convert.ToDateTime(row4.Trim());
}
catch (Exception)
{
result += (i + 3).ToString() + "," + "Plan Start of Testing Date" + "," + "[" + row4 + "]错误!不是日期格式!" + "|";
}
}
string row5 = pds.Rows[i][6].ToString();
if (!string.IsNullOrEmpty(row4))
{
try
{
DateTime date = Convert.ToDateTime(row5.Trim());
}
catch (Exception)
{
result += (i + 3).ToString() + "," + "Plan Finish of Testing Date" + "," + "[" + row5 + "]错误!不是日期格式!" + "|";
}
}
string row8 = pds.Rows[i][8].ToString();
if (!string.IsNullOrEmpty(row4))
{
try
{
DateTime date = Convert.ToDateTime(row8.Trim());
}
catch (Exception)
{
result += (i + 3).ToString() + "," + "Actual Finished Date" + "," + "[" + row8 + "]错误!不是日期格式!" + "|";
}
}
}
}
if (!string.IsNullOrEmpty(result))
{
result = result.Substring(0, result.LastIndexOf("|"));
}
errorInfos.Clear();
if (!string.IsNullOrEmpty(result))
{
string results = result;
List<string> errorInfoList = results.Split('|').ToList();
foreach (var item in errorInfoList)
{
string[] errors = item.Split(',');
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
errorInfo.Row = errors[0];
errorInfo.Column = errors[1];
errorInfo.Reason = errors[2];
errorInfos.Add(errorInfo);
}
if (errorInfos.Count > 0)
{
this.gvErrorInfo.DataSource = errorInfos;
this.gvErrorInfo.DataBind();
}
}
else
{
ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);
}
}
else
{
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
}
return true;
}
#endregion
#endregion
#region
/// <summary>
/// 下载模板按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnDownLoad_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel")));
}
/// <summary>
/// 下载导入模板
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
{
if (e.EventArgument == "Confirm_OK")
{
string rootPath = Server.MapPath("~/");
string mbmc = "";
if (Type == "0")
{
mbmc = "ProcessSystemList导入模板.xls";
}
else
{
mbmc = "NonProcessSystemList导入模板.xls";
}
string uploadfilepath = rootPath + "File\\Excel\\DataIn\\" + mbmc;
string filePath = "File\\Excel\\DataIn\\" + mbmc;
string fileName = Path.GetFileName(filePath);
FileInfo info = new FileInfo(uploadfilepath);
long fileSize = info.Length;
Response.ClearContent();
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
Response.ContentType = "excel/plain";
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.AddHeader("Content-Length", fileSize.ToString().Trim());
Response.TransmitFile(uploadfilepath, 0, fileSize);
Response.End();
}
}
#endregion
#region
/// <summary>
/// 导入
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnImport_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(hdCheckResult.Text))
{
if (errorInfos.Count <= 0)
{
string rootPath = Server.MapPath("~/");
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
hdCheckResult.Text = string.Empty;
ShowNotify("导入成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else
{
ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning);
}
}
else
{
ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning);
}
}
#region Excel提取数据
/// <summary>
/// 从Excel提取数据--》Dataset
/// </summary>
/// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData2(string fileName)
{
try
{
string oleDBConnString = String.Empty;
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
oleDBConnString += "Data Source=";
oleDBConnString += fileName;
oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable();
DataSet ds = new DataSet();
oleDBConn = new OleDbConnection(oleDBConnString);
oleDBConn.Open();
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
if (m_tableName != null && m_tableName.Rows.Count > 0)
{
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
}
string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose();
oleDBConn.Close();
oleDBConn.Dispose();
if (Type == "0")
{
AddDatasetToSQL2(ds.Tables[0], 8);
}
else
{
AddDatasetToSQL2(ds.Tables[0], 9);
}
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region Dataset的数据导入数据库
/// <summary>
/// 将Dataset的数据导入数据库
/// </summary>
/// <param name="pds">数据集</param>
/// <param name="Cols">数据集列数</param>
/// <returns></returns>
private bool AddDatasetToSQL2(DataTable pds, int Cols)
{
int ic, ir;
ic = pds.Columns.Count;
if (ic < Cols)
{
ShowNotify("导入Excel格式错误Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
}
string result = string.Empty;
ir = pds.Rows.Count;
int Sn = 0;
if (pds != null && ir > 0)
{
var list = new List<Model.Transfer_LHCSystemList>();
for (int i = 0; i < ir; i++)
{
////查询第一列,没查到的情况下作导入处理
//var modelOnly = Funs.DB.Transfer_LHCSystemList.FirstOrDefault(x => x.SN == Convert.ToInt32(pds.Rows[i][0].ToString().Trim())
//&& x.ProjectId == CurrUser.LoginProjectId && x.Type==Type);
//if (modelOnly == null)
//{
Model.Transfer_LHCSystemList model = new Model.Transfer_LHCSystemList();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.Type = Type;
//根据项目id查询sn
var snModel = Funs.DB.Transfer_LHCSystemList.Where(x => x.ProjectId == CurrUser.LoginProjectId
&& x.Type == Type).OrderByDescending(x => x.SN).FirstOrDefault();
if (snModel == null && Sn!=1001)
{
Sn = 1001;
model.SN = Sn;
}
else
{
if (snModel != null && Sn == 0)
{
Sn = Convert.ToInt32(snModel.SN + 1);
model.SN = Sn;
}
else {
Sn += 1;
model.SN = Sn;
}
}
model.Commissioningsystemcode= pds.Rows[i][0].ToString().Trim();
model.CommissioningCodeDescription = pds.Rows[i][1].ToString().Trim();
if (Type == "0")
{
model.SubCommissioningsystem = pds.Rows[i][2].ToString().Trim();
model.Turnover_Code= pds.Rows[i][3].ToString().Trim();
DateTime t1, t2,t3;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
model.PlanStartofTestingDate = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
model.PlanFinishofTestingDate = t2;
model.Status= pds.Rows[i][6].ToString().Trim();
if (DateTime.TryParse(pds.Rows[i][7].ToString(), out t3) && !string.IsNullOrEmpty(pds.Rows[i][7].ToString()))
model.ActualFinishedDate = t3;
}
else {
model.Describe = pds.Rows[i][2].ToString().Trim();
model.SubCommissioningsystem = pds.Rows[i][3].ToString().Trim();
model.Turnover_Code = pds.Rows[i][4].ToString().Trim();
DateTime t1, t2, t3;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
model.PlanStartofTestingDate = t1;
if (DateTime.TryParse(pds.Rows[i][6].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
model.PlanFinishofTestingDate = t2;
model.Status = pds.Rows[i][7].ToString().Trim();
if (DateTime.TryParse(pds.Rows[i][8].ToString(), out t3) && !string.IsNullOrEmpty(pds.Rows[i][7].ToString()))
model.ActualFinishedDate = t3;
}
list.Add(model);
//}
//else
//{
// //修改
// modelOnly.PIPINGLINENUMBER = pds.Rows[i][0].ToString().Trim();
// modelOnly.SYSTEM = pds.Rows[i][1].ToString().Trim();
// modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
// modelOnly.TestPackage = pds.Rows[i][3].ToString().Trim();
// DateTime t1, t2;
// if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
// modelOnly.TestPackageSTART = t1;
// if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
// modelOnly.TestPackageFINISH = t2;
// //更改前不是finished更改后是finished的才修改实际完成时间
// if (modelOnly.FINALStatus.ToLower() != "finished" && pds.Rows[i][6].ToString().Trim() == "finished")
// {
// modelOnly.CompleteTime = DateTime.Now;
// }
// modelOnly.FINALStatus = pds.Rows[i][6].ToString().Trim();
// //if (modelOnly.FINALStatus.ToLower() == "finished")
// //{
// // modelOnly.CompleteTime = DateTime.Now;
// //}
// modelOnly.PreTestFINISHED = pds.Rows[i][7].ToString().Trim();
// modelOnly.FinalTestFINISHED = pds.Rows[i][8].ToString().Trim();
// Funs.DB.SubmitChanges();
//}
}
if (list.Count > 0)
{
Funs.DB.Transfer_LHCSystemList.InsertAllOnSubmit(list);
Funs.DB.SubmitChanges();
}
}
else
{
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
}
return true;
}
#endregion
#endregion
}
}

View File

@ -0,0 +1,125 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Transfer
{
public partial class LHCSystemListDataIn
{
/// <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>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// hdFileName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdFileName;
/// <summary>
/// btnAudit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAudit;
/// <summary>
/// btnImport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnImport;
/// <summary>
/// btnDownLoad 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDownLoad;
/// <summary>
/// hdCheckResult 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdCheckResult;
/// <summary>
/// fuAttachUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload fuAttachUrl;
/// <summary>
/// gvErrorInfo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid gvErrorInfo;
/// <summary>
/// lblPageIndex 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblPageIndex;
}
}

View File

@ -4,33 +4,33 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" />
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true"
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" OnSort="Grid1_Sort"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" EnableTextSelection="true">
EnableRowDoubleClickEvent="true" EnableTextSelection="true">
<Toolbars>
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtPunch_No" Label="Punch_No" LabelWidth="80px" LabelAlign="Right" Width="150px"></f:TextBox>
<f:TextBox runat="server" ID="txtSYSTEM" Label="SYSTEM" LabelWidth="80px" LabelAlign="Right" Width="150px"></f:TextBox>
<f:TextBox runat="server" ID="txtSUBSYSTEM" Label="SUBSYSTEM" LabelWidth="100px" LabelAlign="Right" Width="170px"></f:TextBox>
<f:DatePicker runat="server" Label="PUNCH_ITEM_FINISH_DATE" ID="txtStarTime" LabelAlign="Right" LabelWidth="200px"
Width="320px">
<f:TextBox runat="server" ID="txtNum_NO" Label="No." LabelWidth="80px" LabelAlign="Right" Width="150px"></f:TextBox>
<f:TextBox runat="server" ID="txtSystem_No" Label="System No" LabelWidth="100px" LabelAlign="Right" Width="150px"></f:TextBox>
<f:TextBox runat="server" ID="txtSub_Sys_No" Label="Sub Sys No" LabelWidth="100px" LabelAlign="Right" Width="170px"></f:TextBox>
<f:DatePicker runat="server" Label="Date Raised" ID="txtStartDate_Raised" LabelAlign="Right" LabelWidth="200px"
Width="320px">
</f:DatePicker>
<f:Label ID="Label1" runat="server" Text="至">
</f:Label>
<f:DatePicker runat="server" ID="txtEndTime" LabelAlign="Right" Width="150px">
<f:DatePicker runat="server" ID="txtEndDate_Raised" LabelAlign="Right" Width="150px">
</f:DatePicker>
<f:Button ID="btnSearch" Icon="SystemSearch" EnablePostBack="true" runat="server" OnClick="btnSearch_Click" ToolTip="查询">
@ -38,60 +38,57 @@
<f:ToolbarFill runat="server"></f:ToolbarFill>
<%-- <f:Button ID="btnNew" Icon="Add" EnablePostBack="true" runat="server" OnClick="btnNew_Click" ToolTip="新增" Hidden="true">
<%-- <f:Button ID="btnNew" Icon="Add" EnablePostBack="true" runat="server" OnClick="btnNew_Click" ToolTip="新增" Hidden="true">
</f:Button>--%>
<%--<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" ToolTip="附件上传" runat="server" OnClick="btnAttach_Click">
</f:Button>--%>
<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" ToolTip="附件上传" runat="server" OnClick="btnAttach_Click">
</f:Button>
<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true">
</f:Button>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtTestPackage" Label="Test Package" LabelWidth="105px" LabelAlign="Right" Width="300px"></f:TextBox>
<f:TextBox runat="server" ID="txtDiscipline" Label="Discipline" LabelWidth="80px" LabelAlign="Right" Width="150px"></f:TextBox>
<f:TextBox runat="server" ID="txtIdentified" Label="Identified during/by" LabelWidth="150px" LabelAlign="Right" Width="300px"></f:TextBox>
<f:TextBox runat="server" ID="txtCategory" Label="Select Punch List Category" LabelWidth="220px" LabelAlign="Right" Width="300px"></f:TextBox>
<f:DatePicker runat="server" Label="Required Date" ID="txtStartRequired_Date" LabelAlign="Right" LabelWidth="130px"
Width="320px">
</f:DatePicker>
<f:Label ID="Label2" runat="server" Text="至">
</f:Label>
<f:DatePicker runat="server" ID="txtEndRequired_Date" LabelAlign="Right" Width="150px">
</f:DatePicker>
<f:DatePicker runat="server" Label="Actual_Date" ID="txtStartActual_Date" LabelAlign="Right" LabelWidth="130px"
Width="320px">
</f:DatePicker>
<f:Label ID="Label3" runat="server" Text="至">
</f:Label>
<f:DatePicker runat="server" ID="txtEndActual_Date" LabelAlign="Right" Width="150px">
</f:DatePicker>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:GroupField HeaderText="PUNCH LIST FORM" TextAlign="Center">
<%--<f:GroupField HeaderText="PUNCH LIST FORM" TextAlign="Center">
<Columns>
<f:BoundField Width="80px" TextAlign="Center" ColumnID="Item_No" DataField="Item_No" HeaderText="Item No." />
<f:BoundField Width="90px" TextAlign="Center" ColumnID="Punch_No" DataField="Punch_No" HeaderText="Punch No" />
<f:BoundField Width="80px" TextAlign="Center" ColumnID="SystemName" DataField="SystemName" HeaderText="SYSTEM" />
<f:BoundField Width="108px" ColumnID="Subsystem" DataField="Subsystem" HeaderText="SUBSYSTEM" TextAlign="Center"/>
<f:BoundField Width="140px" ColumnID="Test_Package" DataField="Test_Package" HeaderText="Test Package" TextAlign="Center"/>
<f:BoundField Width="85px" ColumnID="Discipline" DataField="Discipline" HeaderText="Discipline" TextAlign="Center"/>
<f:BoundField Width="250px" ColumnID="DESCRIPTION" DataField="DESCRIPTION" HeaderText="PUNCH LIST ITEM DESCRIPTION" TextAlign="Center"/>
<f:BoundField Width="250px" ColumnID="DESCRIPTION" DataField="DESCRIPTION" HeaderText="PUNCH LIST ITEM DESCRIPTION" TextAlign="Center"/>
<f:BoundField Width="145px" ColumnID="Identified" DataField="Identified" HeaderText="Identified during/by" TextAlign="Center"/>
<f:BoundField Width="110px" ColumnID="Category" DataField="Category" HeaderText="Select Punch<br/>List Category" TextAlign="Center"/>
<f:RenderField Width="110px" ColumnID="PUNCH_ITEM_FINISH_DATE" DataField="PUNCH_ITEM_FINISH_DATE"
HeaderText="PUNCH ITEM<br/>FINISH DATE" TextAlign="Center"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"/>
<f:BoundField Width="100px" ColumnID="Action_By" DataField="Action_By" HeaderText="Action By" TextAlign="Center"/>
<f:BoundField Width="100px" ColumnID="Required_By" DataField="Required_By" HeaderText="Required By" TextAlign="Center"/>
<f:BoundField Width="110px" ColumnID="PUNCH_ITEM_STATUS" DataField="PUNCH_ITEM_STATUS" HeaderText="PUNCH ITEM<br/>STATUS" TextAlign="Center"/>
<f:BoundField Width="110px" ColumnID="PUNCH_ITEM_STATUS" DataField="PUNCH_ITEM_STATUS" HeaderText="PUNCH ITEM<br/>STATUS" TextAlign="Center"/>
<f:BoundField Width="150px" ColumnID="Comments" DataField="Comments" HeaderText="Comments" TextAlign="Center"/>
</Columns>
</f:GroupField>
<%--<f:GroupField HeaderText="SYSTEM AND TEST PACKAGE SELECTION" TextAlign="Center" MinWidth="450">
</f:GroupField>--%>
<%--<f:GroupField HeaderText="SYSTEM AND TEST PACKAGE SELECTION" TextAlign="Center" MinWidth="450">
<Columns>
<f:BoundField Width="150px" ColumnID="SystemName" DataField="SystemName" HeaderText="SYSTEM" TextAlign="Center"/>
<f:BoundField Width="150px" ColumnID="Subsystem" DataField="Subsystem" HeaderText="Subsystem" TextAlign="Center"/>
@ -110,6 +107,84 @@
<f:BoundField MinWidth="200px" ColumnID="FINAL_Status" DataField="FINAL_Status" HeaderText="FINAL Status" TextAlign="Center"/>--%>
<f:BoundField Width="100px" TextAlign="Center" ColumnID="Num_NO" DataField="Num_NO" HeaderText="No." />
<f:BoundField Width="150px" TextAlign="Center" ColumnID="System_No" DataField="System_No" HeaderText="System No." />
<f:BoundField Width="150px" TextAlign="Center" ColumnID="Sub_Sys_No" DataField="Sub_Sys_No" HeaderText="Sub-sys. No." />
<f:BoundField Width="150px" TextAlign="Center" ColumnID="DESCRIPTION" DataField="DESCRIPTION" HeaderText="Description" />
<f:TemplateField ColumnID="ImagePhotoes" Width="120px" HeaderText="Photoes" HeaderTextAlign="Center"
TextAlign="Left">
<ItemTemplate>
<asp:Label ID="lbPhotoesImageUrl" runat="server" Text='<%# ConvertImageUrlByImage(Eval("Id")+"_A") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<%--<f:BoundField Width="150px" TextAlign="Center" ColumnID="Photoes" DataField="Photoes" HeaderText="Photoes" />--%>
<f:BoundField Width="100px" TextAlign="Center" ColumnID="Cat" DataField="Cat" HeaderText="Cat." />
<f:BoundField Width="100px" TextAlign="Center" ColumnID="Raised_By" DataField="Raised_By" HeaderText="Raised By" />
<f:RenderField Width="100px" TextAlign="Center" ColumnID="Date_Raised" DataField="Date_Raised" HeaderText="Date Raised" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" />
<f:BoundField Width="100px" TextAlign="Center" ColumnID="Disc" DataField="Disc" HeaderText="Disc." />
<f:BoundField Width="100px" TextAlign="Center" ColumnID="IsEng" DataField="IsEngStr" HeaderText="Eng(Y/N)" />
<f:BoundField Width="100px" TextAlign="Center" ColumnID="IsMatI" DataField="IsMatIStr" HeaderText="Matl(Y/N)" />
<f:BoundField Width="100px" TextAlign="Center" ColumnID="Punch_Type" DataField="Punch_Type" HeaderText="Punch Type" />
<f:RenderField Width="150px" TextAlign="Center" ColumnID="Required_Date" DataField="Required_Date" HeaderText="Required Date" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" />
<f:BoundField Width="100px" TextAlign="Center" ColumnID="Action_By" DataField="Action_By" HeaderText="Action By" />
<f:BoundField Width="100px" TextAlign="Center" ColumnID="PIC" DataField="PIC" HeaderText="PIC" />
<f:BoundField Width="100px" TextAlign="Center" ColumnID="PIC_WUH" DataField="PIC_WUH" HeaderText="PIC-WUH" />
<f:BoundField Width="150px" TextAlign="Center" ColumnID="Correction_Action" DataField="Correction_Action" HeaderText="Correction Action" />
<f:TemplateField ColumnID="ImageCorrected_Photos" Width="150px" HeaderText="Corrected Photos" HeaderTextAlign="Center"
TextAlign="Left">
<ItemTemplate>
<asp:Label ID="labCorrected_Photos" runat="server" Text='<%# ConvertImageUrlByImage(Eval("Id")+"_B") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<%--<f:BoundField Width="150px" TextAlign="Center" ColumnID="Corrected_Photos" DataField="Corrected_Photos" HeaderText="Corrected Photos" />--%>
<f:RenderField Width="150px" TextAlign="Center" ColumnID="Actual_Date" DataField="Actual_Date" HeaderText="Actual Date" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" />
<f:GroupField HeaderText="Cleared(PIC" TextAlign="Center" MinWidth="200px">
<Columns>
<f:RenderField Width="100px" ColumnID="Cleared_By" DataField="Cleared_By" HeaderText="By" TextAlign="Center" />
<f:RenderField Width="100px" ColumnID="Cleared_Date" DataField="Cleared_Date" HeaderText="Date" TextAlign="Center"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" />
</Columns>
</f:GroupField>
<f:GroupField HeaderText="Confirmed(WUH)" TextAlign="Center" MinWidth="200px">
<Columns>
<f:RenderField Width="100px" ColumnID="Confirmed_By" DataField="Confirmed_By" HeaderText="By" TextAlign="Center" />
<f:RenderField Width="100px" ColumnID="Confirmed_Date" DataField="Confirmed_Date" HeaderText="Date" TextAlign="Center"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" />
</Columns>
</f:GroupField>
<f:GroupField HeaderText="Verified(BASF)" TextAlign="Center" MinWidth="200px">
<Columns>
<f:RenderField Width="100px" ColumnID="Verified_By" DataField="Verified_By" HeaderText="By" TextAlign="Center" />
<f:RenderField Width="100px" ColumnID="Verified_Date" DataField="Verified_Date" HeaderText="Date" TextAlign="Center"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" />
</Columns>
</f:GroupField>
<f:BoundField Width="80px" TextAlign="Center" ColumnID="Status" DataField="Status" HeaderText="Status" />
<f:BoundField Width="80px" TextAlign="Center" ColumnID="Remark" DataField="Remark" HeaderText="Remark" />
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
@ -143,6 +218,10 @@
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?"
OnClick="btnMenuDel_Click" Hidden="true">
</f:MenuButton>
<f:MenuButton ID="btnMenuAttachA" runat="server" Icon="FolderUp" Text="Photoes附件" OnClick="btnMenuAttachA_Click" Hidden="true">
</f:MenuButton>
<f:MenuButton ID="btnMenuAttachB" runat="server" Icon="FolderUp" Text="Corrected_Photos附件" OnClick="btnMenuAttachB_Click" Hidden="true">
</f:MenuButton>
</Items>
</f:Menu>
</form>
@ -156,4 +235,4 @@
}
</script>
</body>
</html>
</html>

View File

@ -30,57 +30,60 @@ namespace FineUIPro.Web.Transfer
/// </summary>
public void BindGrid()
{
string strSql = @"select*from Transfer_PunchlistFrom
string strSql = @"select *
,(CASE isnull(IsEng,0) WHEN 1 THEN 'Y' ELSE 'N' END) IsEngStr
,(CASE isnull(IsMatI,0) WHEN 1 THEN 'Y' ELSE 'N' END) IsMatIStr
from Transfer_PunchlistFrom
where ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
if (!string.IsNullOrEmpty(this.txtPunch_No.Text.Trim()))
if (!string.IsNullOrEmpty(this.txtNum_NO.Text.Trim()))
{
strSql += " AND Punch_No like @Punch_No";
listStr.Add(new SqlParameter("@Punch_No", "%" + this.txtPunch_No.Text.Trim() + "%"));
strSql += " AND Num_NO like @Num_NO";
listStr.Add(new SqlParameter("@Num_NO", "%" + this.txtNum_NO.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.txtSYSTEM.Text.Trim()))
if (!string.IsNullOrEmpty(this.txtSystem_No.Text.Trim()))
{
strSql += " AND SystemName like @SystemName";
listStr.Add(new SqlParameter("@SystemName", "%" + this.txtSYSTEM.Text.Trim() + "%"));
strSql += " AND System_No like @System_No";
listStr.Add(new SqlParameter("@System_No", "%" + this.txtSystem_No.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.txtSUBSYSTEM.Text.Trim()))
if (!string.IsNullOrEmpty(this.txtSub_Sys_No.Text.Trim()))
{
strSql += " AND Subsystem like @Subsystem";
listStr.Add(new SqlParameter("@Subsystem", "%" + this.txtSUBSYSTEM.Text.Trim() + "%"));
strSql += " AND Sub_Sys_No like @Sub_Sys_No";
listStr.Add(new SqlParameter("@Sub_Sys_No", "%" + this.txtSub_Sys_No.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtStarTime.Text.Trim()))
if (!string.IsNullOrEmpty(txtStartDate_Raised.Text.Trim()))
{
strSql += " AND PUNCH_ITEM_FINISH_DATE >= @InspectionDateA";
listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim())));
strSql += " AND Date_Raised >= @StartDate_Raised";
listStr.Add(new SqlParameter("@StartDate_Raised", Funs.GetNewDateTime(txtStartDate_Raised.Text.Trim())));
}
if (!string.IsNullOrEmpty(txtEndTime.Text.Trim()))
if (!string.IsNullOrEmpty(txtEndDate_Raised.Text.Trim()))
{
strSql += " AND PUNCH_ITEM_FINISH_DATE <= @InspectionDateZ";
listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
strSql += " AND Date_Raised <= @EndDate_Raised";
listStr.Add(new SqlParameter("@EndDate_Raised", Funs.GetNewDateTime(txtEndDate_Raised.Text.Trim())));
}
if (!string.IsNullOrEmpty(this.txtTestPackage.Text.Trim()))
if (!string.IsNullOrEmpty(txtStartRequired_Date.Text.Trim()))
{
strSql += " AND Test_Package like @Test_Package";
listStr.Add(new SqlParameter("@Test_Package", "%" + this.txtTestPackage.Text.Trim() + "%"));
strSql += " AND Required_Date >= @Required_Date";
listStr.Add(new SqlParameter("@Required_Date", Funs.GetNewDateTime(txtStartRequired_Date.Text.Trim())));
}
if (!string.IsNullOrEmpty(this.txtDiscipline.Text.Trim()))
if (!string.IsNullOrEmpty(txtEndRequired_Date.Text.Trim()))
{
strSql += " AND Discipline like @Discipline";
listStr.Add(new SqlParameter("@Discipline", "%" + this.txtDiscipline.Text.Trim() + "%"));
strSql += " AND Required_Date <= @Required_Date";
listStr.Add(new SqlParameter("@Required_Date", Funs.GetNewDateTime(txtEndRequired_Date.Text.Trim())));
}
if (!string.IsNullOrEmpty(this.txtIdentified.Text.Trim()))
if (!string.IsNullOrEmpty(txtStartActual_Date.Text.Trim()))
{
strSql += " AND Identified like @Identified";
listStr.Add(new SqlParameter("@Identified", "%" + this.txtIdentified.Text.Trim() + "%"));
strSql += " AND Actual_Date >= @Actual_Date";
listStr.Add(new SqlParameter("@Actual_Date", Funs.GetNewDateTime(txtStartActual_Date.Text.Trim())));
}
if (!string.IsNullOrEmpty(this.txtCategory.Text.Trim()))
if (!string.IsNullOrEmpty(txtEndActual_Date.Text.Trim()))
{
strSql += " AND Category like @Category";
listStr.Add(new SqlParameter("@Category", "%" + this.txtCategory.Text.Trim() + "%"));
strSql += " AND Actual_Date <= @Actual_Date";
listStr.Add(new SqlParameter("@Actual_Date", Funs.GetNewDateTime(txtEndActual_Date.Text.Trim())));
}
strSql += " order by Punch_No ";
strSql += " order by Num_No ";
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
@ -175,6 +178,56 @@ namespace FineUIPro.Web.Transfer
}
#endregion
#region Photoes附件
/// <summary>
/// 右键附件上传功能
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuAttachA_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length > 0)
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader.aspx?type=0&toKeyId={0}_A&path=FileUpload/Transfer/PunchlistFrom&menuId={1}", Grid1.SelectedRowID, BLL.Const.PunchlistFromMenuId)));
}
}
#endregion
#region Corrected_Photos附件
/// <summary>
/// 右键附件上传功能
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuAttachB_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length > 0)
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader.aspx?type=0&toKeyId={0}_B&path=FileUpload/Transfer/PunchlistFrom&menuId={1}", Grid1.SelectedRowID, BLL.Const.PunchlistFromMenuId)));
}
}
#endregion
/// <summary>
/// 获取附件(放于Img中)
/// </summary>
/// <param name="Id_type"></param>
/// <returns></returns>
protected string ConvertImageUrlByImage(object Id_type)
{
string url = string.Empty;
if (Id_type != null)
{
var registration = BLL.AttachFileService.GetAttachFile(Id_type.ToString(), BLL.Const.PunchlistFromMenuId);
if (registration != null)
{
url = BLL.UploadAttachmentService.ShowImage("../../", registration.AttachUrl);
}
}
return url;
}
#region
/// <summary>
/// 导入按钮
@ -205,11 +258,15 @@ namespace FineUIPro.Web.Transfer
if (buttonList.Contains(BLL.Const.BtnAdd))
{
//this.btnNew.Hidden = false;
btnMenuAttachA.Hidden=false;
btnMenuAttachB.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnModify))
{
//this.btnMenuModify.Hidden = false;
this.Grid1.EnableRowDoubleClickEvent = true;
btnMenuAttachA.Hidden = false;
btnMenuAttachB.Hidden = false;
}
else
{

View File

@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Transfer {
public partial class PunchlistFrom {
namespace FineUIPro.Web.Transfer
{
public partial class PunchlistFrom
{
/// <summary>
/// form1 控件。
/// </summary>
@ -20,7 +22,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@ -29,7 +31,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@ -38,7 +40,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
@ -47,7 +49,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// ToolSearch 控件。
/// </summary>
@ -56,43 +58,43 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar ToolSearch;
/// <summary>
/// txtPunch_No 控件。
/// txtNum_NO 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPunch_No;
protected global::FineUIPro.TextBox txtNum_NO;
/// <summary>
/// txtSYSTEM 控件。
/// txtSystem_No 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSYSTEM;
protected global::FineUIPro.TextBox txtSystem_No;
/// <summary>
/// txtSUBSYSTEM 控件。
/// txtSub_Sys_No 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSUBSYSTEM;
protected global::FineUIPro.TextBox txtSub_Sys_No;
/// <summary>
/// txtStarTime 控件。
/// txtStartDate_Raised 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtStarTime;
protected global::FineUIPro.DatePicker txtStartDate_Raised;
/// <summary>
/// Label1 控件。
/// </summary>
@ -101,16 +103,16 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label1;
/// <summary>
/// txtEndTime 控件。
/// txtEndDate_Raised 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEndTime;
protected global::FineUIPro.DatePicker txtEndDate_Raised;
/// <summary>
/// btnSearch 控件。
/// </summary>
@ -119,16 +121,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// btnAttach 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttach;
/// <summary>
/// btnImport 控件。
/// </summary>
@ -137,7 +130,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnImport;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@ -146,43 +139,79 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtTestPackage 控件。
/// txtStartRequired_Date 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTestPackage;
protected global::FineUIPro.DatePicker txtStartRequired_Date;
/// <summary>
/// txtDiscipline 控件。
/// Label2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtDiscipline;
protected global::FineUIPro.Label Label2;
/// <summary>
/// txtIdentified 控件。
/// txtEndRequired_Date 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtIdentified;
protected global::FineUIPro.DatePicker txtEndRequired_Date;
/// <summary>
/// txtCategory 控件。
/// txtStartActual_Date 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCategory;
protected global::FineUIPro.DatePicker txtStartActual_Date;
/// <summary>
/// Label3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label3;
/// <summary>
/// txtEndActual_Date 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEndActual_Date;
/// <summary>
/// lbPhotoesImageUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbPhotoesImageUrl;
/// <summary>
/// labCorrected_Photos 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label labCorrected_Photos;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@ -191,7 +220,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@ -200,7 +229,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// WindowAtt 控件。
/// </summary>
@ -209,7 +238,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
/// <summary>
/// Window2 控件。
/// </summary>
@ -218,7 +247,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
/// <summary>
/// Menu1 控件。
/// </summary>
@ -227,7 +256,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuDel 控件。
/// </summary>
@ -236,5 +265,23 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDel;
/// <summary>
/// btnMenuAttachA 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuAttachA;
/// <summary>
/// btnMenuAttachB 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuAttachB;
}
}

View File

@ -130,7 +130,7 @@ namespace FineUIPro.Web.Transfer
oleDBConn.Close();
oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 14);
AddDatasetToSQL(ds.Tables[0], 24);
hdCheckResult.Text = "1";
}
catch (Exception exc)
@ -168,18 +168,99 @@ namespace FineUIPro.Web.Transfer
{
for (int i = 1; i < ir; i++)
{
string row4 = pds.Rows[i][9].ToString();
if (!string.IsNullOrEmpty(row4))
string allRowData = string.Empty;
for (int j = 0; j < 24; j++)
{
allRowData += pds.Rows[i][j].ToString();
}
if (string.IsNullOrWhiteSpace(allRowData))
continue;
string row3 = pds.Rows[i][3].ToString();
if (row3 != "" && row3 != "A" && row3 != "B" && row3 != "C" && row3 != "D")
{
result += (i + 2).ToString() + "," + " Cat. " + "," + "[" + row3 + "]错误不是ABCD" + "|";
}
string row5 = pds.Rows[i][5].ToString();
if (!string.IsNullOrEmpty(row5))
{
try
{
DateTime date = Convert.ToDateTime(row4.Trim());
DateTime date = Convert.ToDateTime(row5.Trim());
}
catch (Exception)
{
result += (i + 2).ToString() + "," + "PUNCH ITEM FINISH DATE" + "," + "[" + row4 + "]错误!不是日期格式!" + "|";
result += (i + 2).ToString() + "," + " Date Raised " + "," + "[" + row5 + "]错误!不是日期格式!" + "|";
}
}
string row10 = pds.Rows[i][10].ToString();
if (!string.IsNullOrEmpty(row10))
{
try
{
DateTime date = Convert.ToDateTime(row10.Trim());
}
catch (Exception)
{
result += (i + 2).ToString() + "," + " Required Date " + "," + "[" + row10 + "]错误!不是日期格式!" + "|";
}
}
string row15 = pds.Rows[i][15].ToString();
if (!string.IsNullOrEmpty(row15))
{
try
{
DateTime date = Convert.ToDateTime(row15.Trim());
}
catch (Exception)
{
result += (i + 2).ToString() + "," + " Actual Date " + "," + "[" + row15 + "]错误!不是日期格式!" + "|";
}
}
string row17 = pds.Rows[i][17].ToString();
if (!string.IsNullOrEmpty(row17))
{
try
{
DateTime date = Convert.ToDateTime(row17.Trim());
}
catch (Exception)
{
result += (i + 2).ToString() + "," + " Cleared(PIC Date " + "," + "[" + row17 + "]错误!不是日期格式!" + "|";
}
}
string row19 = pds.Rows[i][19].ToString();
if (!string.IsNullOrEmpty(row19))
{
try
{
DateTime date = Convert.ToDateTime(row19.Trim());
}
catch (Exception)
{
result += (i + 2).ToString() + "," + " Confirmed(WUH) Date " + "," + "[" + row19 + "]错误!不是日期格式!" + "|";
}
}
string row21 = pds.Rows[i][21].ToString();
if (!string.IsNullOrEmpty(row21))
{
try
{
DateTime date = Convert.ToDateTime(row21.Trim());
}
catch (Exception)
{
result += (i + 2).ToString() + "," + " Verified(BASF) Date " + "," + "[" + row21 + "]错误!不是日期格式!" + "|";
}
}
}
if (!string.IsNullOrEmpty(result))
{
@ -286,7 +367,7 @@ namespace FineUIPro.Web.Transfer
oleDBConn.Close();
oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 14);
AddDatasetToSQL2(ds.Tables[0], 24);
}
catch (Exception ex)
{
@ -312,6 +393,7 @@ namespace FineUIPro.Web.Transfer
}
string result = string.Empty;
ir = pds.Rows.Count;
long? maxNumNO = -1;
if (pds != null && ir > 0)
{
List<Model.Transfer_PunchlistFrom> list = new List<Model.Transfer_PunchlistFrom>();
@ -320,57 +402,66 @@ namespace FineUIPro.Web.Transfer
if (!string.IsNullOrEmpty(pds.Rows[i][1].ToString().Trim()))
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_PunchlistFrom.FirstOrDefault(x => x.Punch_No == pds.Rows[i][1].ToString().Trim()
&& x.ProjectId == CurrUser.LoginProjectId);
if (modelOnly == null)
{
Model.Transfer_PunchlistFrom model = new Model.Transfer_PunchlistFrom();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.Item_No = pds.Rows[i][0].ToString().Trim();
model.Punch_No = pds.Rows[i][1].ToString().Trim();
model.SystemName = pds.Rows[i][2].ToString().Trim();
model.Subsystem = pds.Rows[i][3].ToString().Trim();
model.Test_Package = pds.Rows[i][4].ToString().Trim();
model.Discipline = pds.Rows[i][5].ToString().Trim();
model.DESCRIPTION = pds.Rows[i][6].ToString().Trim();
model.Identified = pds.Rows[i][7].ToString().Trim();
model.Category = pds.Rows[i][8].ToString().Trim();
DateTime t1;
if (DateTime.TryParse(pds.Rows[i][9].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][9].ToString()))
model.PUNCH_ITEM_FINISH_DATE = t1;
model.Action_By = pds.Rows[i][10].ToString().Trim();
model.Required_By = pds.Rows[i][11].ToString().Trim();
model.PUNCH_ITEM_STATUS = pds.Rows[i][12].ToString().Trim();
model.Comments = pds.Rows[i][13].ToString().Trim();
list.Add(model);
if (maxNumNO == -1) {
maxNumNO = Funs.DB.Transfer_PunchlistFrom.Where(x => x.ProjectId == CurrUser.LoginProjectId).Max(p => p.Num_NO);
if (maxNumNO == null)
maxNumNO = 1001;
}
Model.Transfer_PunchlistFrom model = new Model.Transfer_PunchlistFrom();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.Num_NO = maxNumNO;
model.System_No = pds.Rows[i][0].ToString().Trim();
model.Sub_Sys_No = pds.Rows[i][1].ToString().Trim();
model.DESCRIPTION = pds.Rows[i][2].ToString().Trim();
model.Cat = pds.Rows[i][3].ToString().Trim();
model.Raised_By = pds.Rows[i][4].ToString().Trim();
DateTime t5;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t5) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
model.Date_Raised = t5;
model.Disc = pds.Rows[i][6].ToString().Trim();
if (pds.Rows[i][7].ToString().Trim().Contains("Y"))
model.IsEng = true;
else
{
//修改
modelOnly.Item_No = pds.Rows[i][0].ToString().Trim();
modelOnly.Punch_No = pds.Rows[i][1].ToString().Trim();
modelOnly.SystemName = pds.Rows[i][2].ToString().Trim();
modelOnly.Subsystem = pds.Rows[i][3].ToString().Trim();
modelOnly.Test_Package = pds.Rows[i][4].ToString().Trim();
modelOnly.Discipline = pds.Rows[i][5].ToString().Trim();
modelOnly.DESCRIPTION = pds.Rows[i][6].ToString().Trim();
modelOnly.Identified = pds.Rows[i][7].ToString().Trim();
modelOnly.Category = pds.Rows[i][8].ToString().Trim();
DateTime t1;
if (DateTime.TryParse(pds.Rows[i][9].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][9].ToString()))
modelOnly.PUNCH_ITEM_FINISH_DATE = t1;
modelOnly.Action_By = pds.Rows[i][10].ToString().Trim();
modelOnly.Required_By = pds.Rows[i][11].ToString().Trim();
modelOnly.PUNCH_ITEM_STATUS = pds.Rows[i][12].ToString().Trim();
modelOnly.Comments = pds.Rows[i][13].ToString().Trim();
Funs.DB.SubmitChanges();
}
model.IsEng = false;
if (pds.Rows[i][8].ToString().Trim().Contains("Y"))
model.IsMatI = true;
else
model.IsMatI = false;
model.Punch_Type = pds.Rows[i][9].ToString().Trim();
DateTime t10;
if (DateTime.TryParse(pds.Rows[i][10].ToString(), out t10) && !string.IsNullOrEmpty(pds.Rows[i][10].ToString()))
model.Required_Date = t10;
model.Action_By = pds.Rows[i][11].ToString().Trim();
model.PIC = pds.Rows[i][12].ToString().Trim();
model.PIC_WUH = pds.Rows[i][13].ToString().Trim();
model.Correction_Action = pds.Rows[i][14].ToString().Trim();
DateTime t15;
if (DateTime.TryParse(pds.Rows[i][15].ToString(), out t15) && !string.IsNullOrEmpty(pds.Rows[i][15].ToString()))
model.PUNCH_ITEM_FINISH_DATE = t15;
model.Cleared_By = pds.Rows[i][16].ToString().Trim();
DateTime t17;
if (DateTime.TryParse(pds.Rows[i][17].ToString(), out t17) && !string.IsNullOrEmpty(pds.Rows[i][17].ToString()))
model.Cleared_Date = t17;
model.Confirmed_By = pds.Rows[i][18].ToString().Trim();
DateTime t19;
if (DateTime.TryParse(pds.Rows[i][19].ToString(), out t19) && !string.IsNullOrEmpty(pds.Rows[i][19].ToString()))
model.Confirmed_Date = t19;
model.Verified_By = pds.Rows[i][20].ToString().Trim();
DateTime t21;
if (DateTime.TryParse(pds.Rows[i][21].ToString(), out t21) && !string.IsNullOrEmpty(pds.Rows[i][21].ToString()))
model.Verified_Date = t21;
model.Status = pds.Rows[i][22].ToString().Trim();
model.Remark = pds.Rows[i][23].ToString().Trim();
list.Add(model);
maxNumNO++;
}
}
if (list.Count > 0)

View File

@ -77,7 +77,7 @@
<add verb="GET" path="res.axd" type="FineUIPro.ResourceHandler, FineUIPro" validate="false"/>
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
<compilation debug="false" targetFramework="4.6.1"/>
<compilation debug="true" targetFramework="4.6.1"/>
<httpRuntime requestValidationMode="2.0" maxRequestLength="2147483647" executionTimeout="36000"/>
<authentication mode="Forms">
<forms loginUrl="Login.aspx" name="PUBLISHERCOOKIE" protection="All" timeout="1440" path="/"/>

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<IISExpressSSLPort />