diff --git a/DataBase/版本日志/SGGLDB_WH_2024-7-23-phf.sql b/DataBase/版本日志/SGGLDB_WH_2024-7-23-phf.sql new file mode 100644 index 00000000..530ac66d --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2024-7-23-phf.sql @@ -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 + + diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 8127544e..1a2af24d 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -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 diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/NonProcessSystemList导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/NonProcessSystemList导入模板.xls new file mode 100644 index 00000000..9777cbda Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/NonProcessSystemList导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/Piping导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/Piping导入模板.xls index 26f8263c..3297ee8a 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/Piping导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/Piping导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/ProcessSystemList导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/ProcessSystemList导入模板.xls new file mode 100644 index 00000000..35340a31 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/ProcessSystemList导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index d42f28ba..7591adf4 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -2032,6 +2032,8 @@ + + @@ -17662,6 +17664,20 @@ InstrumentationDataIn.aspx + + LHCSystemList.aspx + ASPXCodeBehind + + + LHCSystemList.aspx + + + LHCSystemListDataIn.aspx + ASPXCodeBehind + + + LHCSystemListDataIn.aspx + Piping.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user index cb873201..63722353 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true false diff --git a/SGGL/FineUIPro.Web/Transfer/LHCSystemList.aspx b/SGGL/FineUIPro.Web/Transfer/LHCSystemList.aspx new file mode 100644 index 00000000..798f356c --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/LHCSystemList.aspx @@ -0,0 +1,145 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LHCSystemList.aspx.cs" Inherits="FineUIPro.Web.Transfer.LHCSystemList" %> + + + + + + + Table 1:LHC System List + + +
+ + + + + + + + + + + + <%-- + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/LHCSystemList.aspx.cs b/SGGL/FineUIPro.Web/Transfer/LHCSystemList.aspx.cs new file mode 100644 index 00000000..ac2f6da7 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/LHCSystemList.aspx.cs @@ -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 加载 + /// + /// 加载页面 + /// + /// + /// + 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(); + } + } + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"select * from Transfer_LHCSystemList + where ProjectId = @ProjectId and Type=@Type"; + List listStr = new List(); + 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 分页、排序 + /// + /// 分页下拉 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 分页索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 增加 + /// + /// 新增按钮事件 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InspectionEquipmentEdit.aspx", "编辑 - "))); + } + #endregion + + #region 编辑 + /// + /// 右键编辑 + /// + /// + /// + 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, "编辑 - "))); + } + + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.btnMenuModify_Click(sender, e); + } + #endregion + + #region 删除 + /// + /// 右键删除 + /// + /// + /// + protected void btnMenuDel_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var 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 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("LHCSystemListDataIn.aspx?Type="+Type, "导入 - "))); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + 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 + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/LHCSystemList.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/LHCSystemList.aspx.designer.cs new file mode 100644 index 00000000..2bb0bef2 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/LHCSystemList.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class LHCSystemList + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// ToolSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar ToolSearch; + + /// + /// txtCommissioningsystemcode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCommissioningsystemcode; + + /// + /// txtCommissioningCodeDescription 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCommissioningCodeDescription; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/LHCSystemListDataIn.aspx b/SGGL/FineUIPro.Web/Transfer/LHCSystemListDataIn.aspx new file mode 100644 index 00000000..ce5e1050 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/LHCSystemListDataIn.aspx @@ -0,0 +1,68 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LHCSystemListDataIn.aspx.cs" Inherits="FineUIPro.Web.Transfer.LHCSystemListDataIn" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/LHCSystemListDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/LHCSystemListDataIn.aspx.cs new file mode 100644 index 00000000..955eea30 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/LHCSystemListDataIn.aspx.cs @@ -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 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + + public string Type + { + get + { + return (string)ViewState["Type"]; + } + set + { + ViewState["Type"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + 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 审核 + /// + /// 审核 + /// + /// + /// + 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提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + 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的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + 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 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 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + 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"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + 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 导入 + /// + /// 导入 + /// + /// + /// + 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提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + 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的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + 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(); + 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 + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/LHCSystemListDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/LHCSystemListDataIn.aspx.designer.cs new file mode 100644 index 00000000..f76982a4 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/LHCSystemListDataIn.aspx.designer.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class LHCSystemListDataIn + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// gvErrorInfo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvErrorInfo; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + } +} diff --git a/SGGL/FineUIPro.Web/Web.config b/SGGL/FineUIPro.Web/Web.config index 963148f2..f50b26d3 100644 --- a/SGGL/FineUIPro.Web/Web.config +++ b/SGGL/FineUIPro.Web/Web.config @@ -77,7 +77,7 @@ - + diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index c864dcf1..d31b36ac 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -2516,6 +2516,9 @@ namespace Model partial void InsertTransfer_Instrumentation(Transfer_Instrumentation instance); partial void UpdateTransfer_Instrumentation(Transfer_Instrumentation instance); partial void DeleteTransfer_Instrumentation(Transfer_Instrumentation instance); + partial void InsertTransfer_LHCSystemList(Transfer_LHCSystemList instance); + partial void UpdateTransfer_LHCSystemList(Transfer_LHCSystemList instance); + partial void DeleteTransfer_LHCSystemList(Transfer_LHCSystemList instance); partial void InsertTransfer_Piping(Transfer_Piping instance); partial void UpdateTransfer_Piping(Transfer_Piping instance); partial void DeleteTransfer_Piping(Transfer_Piping instance); @@ -9370,6 +9373,14 @@ namespace Model } } + public System.Data.Linq.Table Transfer_LHCSystemList + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Transfer_Piping { get @@ -62016,8 +62027,6 @@ namespace Model private EntityRef _Base_Project; - private EntityRef _Technique_CheckItemSet; - #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -62069,7 +62078,6 @@ namespace Model public Check_CheckSpecial() { this._Base_Project = default(EntityRef); - this._Technique_CheckItemSet = default(EntityRef); OnCreated(); } @@ -62388,10 +62396,6 @@ namespace Model { if ((this._CheckItemSetId != value)) { - if (this._Technique_CheckItemSet.HasLoadedOrAssignedValue) - { - throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); - } this.OnCheckItemSetIdChanging(value); this.SendPropertyChanging(); this._CheckItemSetId = value; @@ -62535,40 +62539,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckSpecial_Technique_CheckItemSet", Storage="_Technique_CheckItemSet", ThisKey="CheckItemSetId", OtherKey="CheckItemSetId", IsForeignKey=true)] - public Technique_CheckItemSet Technique_CheckItemSet - { - get - { - return this._Technique_CheckItemSet.Entity; - } - set - { - Technique_CheckItemSet previousValue = this._Technique_CheckItemSet.Entity; - if (((previousValue != value) - || (this._Technique_CheckItemSet.HasLoadedOrAssignedValue == false))) - { - this.SendPropertyChanging(); - if ((previousValue != null)) - { - this._Technique_CheckItemSet.Entity = null; - previousValue.Check_CheckSpecial.Remove(this); - } - this._Technique_CheckItemSet.Entity = value; - if ((value != null)) - { - value.Check_CheckSpecial.Add(this); - this._CheckItemSetId = value.CheckItemSetId; - } - else - { - this._CheckItemSetId = default(string); - } - this.SendPropertyChanged("Technique_CheckItemSet"); - } - } - } - public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -370529,8 +370499,6 @@ namespace Model private System.Nullable _IsBuiltIn; - private EntitySet _Check_CheckSpecial; - private EntitySet _Technique_CheckItemDetail; #region 可扩展性方法定义 @@ -370557,7 +370525,6 @@ namespace Model public Technique_CheckItemSet() { - this._Check_CheckSpecial = new EntitySet(new Action(this.attach_Check_CheckSpecial), new Action(this.detach_Check_CheckSpecial)); this._Technique_CheckItemDetail = new EntitySet(new Action(this.attach_Technique_CheckItemDetail), new Action(this.detach_Technique_CheckItemDetail)); OnCreated(); } @@ -370722,19 +370689,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckSpecial_Technique_CheckItemSet", Storage="_Check_CheckSpecial", ThisKey="CheckItemSetId", OtherKey="CheckItemSetId", DeleteRule="NO ACTION")] - public EntitySet Check_CheckSpecial - { - get - { - return this._Check_CheckSpecial; - } - set - { - this._Check_CheckSpecial.Assign(value); - } - } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Technique_CheckItemDetail_Technique_CheckItemSet", Storage="_Technique_CheckItemDetail", ThisKey="CheckItemSetId", OtherKey="CheckItemSetId", DeleteRule="NO ACTION")] public EntitySet Technique_CheckItemDetail { @@ -370768,18 +370722,6 @@ namespace Model } } - private void attach_Check_CheckSpecial(Check_CheckSpecial entity) - { - this.SendPropertyChanging(); - entity.Technique_CheckItemSet = this; - } - - private void detach_Check_CheckSpecial(Check_CheckSpecial entity) - { - this.SendPropertyChanging(); - entity.Technique_CheckItemSet = null; - } - private void attach_Technique_CheckItemDetail(Technique_CheckItemDetail entity) { this.SendPropertyChanging(); @@ -392159,6 +392101,356 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Transfer_LHCSystemList")] + public partial class Transfer_LHCSystemList : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _ProjectId; + + private string _Type; + + private System.Nullable _SN; + + private string _Commissioningsystemcode; + + private string _CommissioningCodeDescription; + + private string _SubCommissioningsystem; + + private string _Turnover_Code; + + private System.Nullable _PlanStartofTestingDate; + + private System.Nullable _PlanFinishofTestingDate; + + private string _Status; + + private System.Nullable _ActualFinishedDate; + + private string _Describe; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnTypeChanging(string value); + partial void OnTypeChanged(); + partial void OnSNChanging(System.Nullable value); + partial void OnSNChanged(); + partial void OnCommissioningsystemcodeChanging(string value); + partial void OnCommissioningsystemcodeChanged(); + partial void OnCommissioningCodeDescriptionChanging(string value); + partial void OnCommissioningCodeDescriptionChanged(); + partial void OnSubCommissioningsystemChanging(string value); + partial void OnSubCommissioningsystemChanged(); + partial void OnTurnover_CodeChanging(string value); + partial void OnTurnover_CodeChanged(); + partial void OnPlanStartofTestingDateChanging(System.Nullable value); + partial void OnPlanStartofTestingDateChanged(); + partial void OnPlanFinishofTestingDateChanging(System.Nullable value); + partial void OnPlanFinishofTestingDateChanged(); + partial void OnStatusChanging(string value); + partial void OnStatusChanged(); + partial void OnActualFinishedDateChanging(System.Nullable value); + partial void OnActualFinishedDateChanged(); + partial void OnDescribeChanging(string value); + partial void OnDescribeChanged(); + #endregion + + public Transfer_LHCSystemList() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Type", DbType="NVarChar(50)")] + public string Type + { + get + { + return this._Type; + } + set + { + if ((this._Type != value)) + { + this.OnTypeChanging(value); + this.SendPropertyChanging(); + this._Type = value; + this.SendPropertyChanged("Type"); + this.OnTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SN", DbType="Int")] + public System.Nullable SN + { + get + { + return this._SN; + } + set + { + if ((this._SN != value)) + { + this.OnSNChanging(value); + this.SendPropertyChanging(); + this._SN = value; + this.SendPropertyChanged("SN"); + this.OnSNChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Commissioningsystemcode", DbType="NVarChar(50)")] + public string Commissioningsystemcode + { + get + { + return this._Commissioningsystemcode; + } + set + { + if ((this._Commissioningsystemcode != value)) + { + this.OnCommissioningsystemcodeChanging(value); + this.SendPropertyChanging(); + this._Commissioningsystemcode = value; + this.SendPropertyChanged("Commissioningsystemcode"); + this.OnCommissioningsystemcodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CommissioningCodeDescription", DbType="NVarChar(50)")] + public string CommissioningCodeDescription + { + get + { + return this._CommissioningCodeDescription; + } + set + { + if ((this._CommissioningCodeDescription != value)) + { + this.OnCommissioningCodeDescriptionChanging(value); + this.SendPropertyChanging(); + this._CommissioningCodeDescription = value; + this.SendPropertyChanged("CommissioningCodeDescription"); + this.OnCommissioningCodeDescriptionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubCommissioningsystem", DbType="NVarChar(50)")] + public string SubCommissioningsystem + { + get + { + return this._SubCommissioningsystem; + } + set + { + if ((this._SubCommissioningsystem != value)) + { + this.OnSubCommissioningsystemChanging(value); + this.SendPropertyChanging(); + this._SubCommissioningsystem = value; + this.SendPropertyChanged("SubCommissioningsystem"); + this.OnSubCommissioningsystemChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Turnover_Code", DbType="NVarChar(50)")] + public string Turnover_Code + { + get + { + return this._Turnover_Code; + } + set + { + if ((this._Turnover_Code != value)) + { + this.OnTurnover_CodeChanging(value); + this.SendPropertyChanging(); + this._Turnover_Code = value; + this.SendPropertyChanged("Turnover_Code"); + this.OnTurnover_CodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanStartofTestingDate", DbType="DateTime")] + public System.Nullable PlanStartofTestingDate + { + get + { + return this._PlanStartofTestingDate; + } + set + { + if ((this._PlanStartofTestingDate != value)) + { + this.OnPlanStartofTestingDateChanging(value); + this.SendPropertyChanging(); + this._PlanStartofTestingDate = value; + this.SendPropertyChanged("PlanStartofTestingDate"); + this.OnPlanStartofTestingDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanFinishofTestingDate", DbType="DateTime")] + public System.Nullable PlanFinishofTestingDate + { + get + { + return this._PlanFinishofTestingDate; + } + set + { + if ((this._PlanFinishofTestingDate != value)) + { + this.OnPlanFinishofTestingDateChanging(value); + this.SendPropertyChanging(); + this._PlanFinishofTestingDate = value; + this.SendPropertyChanged("PlanFinishofTestingDate"); + this.OnPlanFinishofTestingDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="NVarChar(50)")] + public string Status + { + get + { + return this._Status; + } + set + { + if ((this._Status != value)) + { + this.OnStatusChanging(value); + this.SendPropertyChanging(); + this._Status = value; + this.SendPropertyChanged("Status"); + this.OnStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ActualFinishedDate", DbType="DateTime")] + public System.Nullable ActualFinishedDate + { + get + { + return this._ActualFinishedDate; + } + set + { + if ((this._ActualFinishedDate != value)) + { + this.OnActualFinishedDateChanging(value); + this.SendPropertyChanging(); + this._ActualFinishedDate = value; + this.SendPropertyChanged("ActualFinishedDate"); + this.OnActualFinishedDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Describe", DbType="NVarChar(200)")] + public string Describe + { + get + { + return this._Describe; + } + set + { + if ((this._Describe != value)) + { + this.OnDescribeChanging(value); + this.SendPropertyChanging(); + this._Describe = value; + this.SendPropertyChanged("Describe"); + this.OnDescribeChanged(); + } + } + } + + 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.Transfer_Piping")] public partial class Transfer_Piping : INotifyPropertyChanging, INotifyPropertyChanged { @@ -393199,6 +393491,50 @@ namespace Model private string _Comments; + private string _System_No; + + private string _Cat; + + private string _Raised_By; + + private System.Nullable _Date_Raised; + + private string _Disc; + + private System.Nullable _IsEng; + + private System.Nullable _IsMatI; + + private string _Punch_Type; + + private System.Nullable _Required_Date; + + private string _PIC; + + private string _PIC_WUH; + + private string _Correction_Action; + + private System.Nullable _Actual_Date; + + private string _Cleared_By; + + private System.Nullable _Cleared_Date; + + private string _Confirmed_By; + + private System.Nullable _Confirmed_Date; + + private string _Verified_By; + + private System.Nullable _Verified_Date; + + private string _Status; + + private string _Remark; + + private string _Sub_Sys_No; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -393235,6 +393571,50 @@ namespace Model partial void OnPUNCH_ITEM_STATUSChanged(); partial void OnCommentsChanging(string value); partial void OnCommentsChanged(); + partial void OnSystem_NoChanging(string value); + partial void OnSystem_NoChanged(); + partial void OnCatChanging(string value); + partial void OnCatChanged(); + partial void OnRaised_ByChanging(string value); + partial void OnRaised_ByChanged(); + partial void OnDate_RaisedChanging(System.Nullable value); + partial void OnDate_RaisedChanged(); + partial void OnDiscChanging(string value); + partial void OnDiscChanged(); + partial void OnIsEngChanging(System.Nullable value); + partial void OnIsEngChanged(); + partial void OnIsMatIChanging(System.Nullable value); + partial void OnIsMatIChanged(); + partial void OnPunch_TypeChanging(string value); + partial void OnPunch_TypeChanged(); + partial void OnRequired_DateChanging(System.Nullable value); + partial void OnRequired_DateChanged(); + partial void OnPICChanging(string value); + partial void OnPICChanged(); + partial void OnPIC_WUHChanging(string value); + partial void OnPIC_WUHChanged(); + partial void OnCorrection_ActionChanging(string value); + partial void OnCorrection_ActionChanged(); + partial void OnActual_DateChanging(System.Nullable value); + partial void OnActual_DateChanged(); + partial void OnCleared_ByChanging(string value); + partial void OnCleared_ByChanged(); + partial void OnCleared_DateChanging(System.Nullable value); + partial void OnCleared_DateChanged(); + partial void OnConfirmed_ByChanging(string value); + partial void OnConfirmed_ByChanged(); + partial void OnConfirmed_DateChanging(System.Nullable value); + partial void OnConfirmed_DateChanged(); + partial void OnVerified_ByChanging(string value); + partial void OnVerified_ByChanged(); + partial void OnVerified_DateChanging(System.Nullable value); + partial void OnVerified_DateChanged(); + partial void OnStatusChanging(string value); + partial void OnStatusChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + partial void OnSub_Sys_NoChanging(string value); + partial void OnSub_Sys_NoChanged(); #endregion public Transfer_PunchlistFrom() @@ -393562,6 +393942,446 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_System_No", DbType="NVarChar(50)")] + public string System_No + { + get + { + return this._System_No; + } + set + { + if ((this._System_No != value)) + { + this.OnSystem_NoChanging(value); + this.SendPropertyChanging(); + this._System_No = value; + this.SendPropertyChanged("System_No"); + this.OnSystem_NoChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Cat", DbType="NVarChar(50)")] + public string Cat + { + get + { + return this._Cat; + } + set + { + if ((this._Cat != value)) + { + this.OnCatChanging(value); + this.SendPropertyChanging(); + this._Cat = value; + this.SendPropertyChanged("Cat"); + this.OnCatChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Raised_By", DbType="NVarChar(50)")] + public string Raised_By + { + get + { + return this._Raised_By; + } + set + { + if ((this._Raised_By != value)) + { + this.OnRaised_ByChanging(value); + this.SendPropertyChanging(); + this._Raised_By = value; + this.SendPropertyChanged("Raised_By"); + this.OnRaised_ByChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Date_Raised", DbType="DateTime")] + public System.Nullable Date_Raised + { + get + { + return this._Date_Raised; + } + set + { + if ((this._Date_Raised != value)) + { + this.OnDate_RaisedChanging(value); + this.SendPropertyChanging(); + this._Date_Raised = value; + this.SendPropertyChanged("Date_Raised"); + this.OnDate_RaisedChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Disc", DbType="NVarChar(50)")] + public string Disc + { + get + { + return this._Disc; + } + set + { + if ((this._Disc != value)) + { + this.OnDiscChanging(value); + this.SendPropertyChanging(); + this._Disc = value; + this.SendPropertyChanged("Disc"); + this.OnDiscChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsEng", DbType="Bit")] + public System.Nullable IsEng + { + get + { + return this._IsEng; + } + set + { + if ((this._IsEng != value)) + { + this.OnIsEngChanging(value); + this.SendPropertyChanging(); + this._IsEng = value; + this.SendPropertyChanged("IsEng"); + this.OnIsEngChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsMatI", DbType="Bit")] + public System.Nullable IsMatI + { + get + { + return this._IsMatI; + } + set + { + if ((this._IsMatI != value)) + { + this.OnIsMatIChanging(value); + this.SendPropertyChanging(); + this._IsMatI = value; + this.SendPropertyChanged("IsMatI"); + this.OnIsMatIChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Punch_Type", DbType="NVarChar(50)")] + public string Punch_Type + { + get + { + return this._Punch_Type; + } + set + { + if ((this._Punch_Type != value)) + { + this.OnPunch_TypeChanging(value); + this.SendPropertyChanging(); + this._Punch_Type = value; + this.SendPropertyChanged("Punch_Type"); + this.OnPunch_TypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Required_Date", DbType="DateTime")] + public System.Nullable Required_Date + { + get + { + return this._Required_Date; + } + set + { + if ((this._Required_Date != value)) + { + this.OnRequired_DateChanging(value); + this.SendPropertyChanging(); + this._Required_Date = value; + this.SendPropertyChanged("Required_Date"); + this.OnRequired_DateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PIC", DbType="NVarChar(50)")] + public string PIC + { + get + { + return this._PIC; + } + set + { + if ((this._PIC != value)) + { + this.OnPICChanging(value); + this.SendPropertyChanging(); + this._PIC = value; + this.SendPropertyChanged("PIC"); + this.OnPICChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PIC_WUH", DbType="NVarChar(50)")] + public string PIC_WUH + { + get + { + return this._PIC_WUH; + } + set + { + if ((this._PIC_WUH != value)) + { + this.OnPIC_WUHChanging(value); + this.SendPropertyChanging(); + this._PIC_WUH = value; + this.SendPropertyChanged("PIC_WUH"); + this.OnPIC_WUHChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Correction_Action", DbType="NVarChar(50)")] + public string Correction_Action + { + get + { + return this._Correction_Action; + } + set + { + if ((this._Correction_Action != value)) + { + this.OnCorrection_ActionChanging(value); + this.SendPropertyChanging(); + this._Correction_Action = value; + this.SendPropertyChanged("Correction_Action"); + this.OnCorrection_ActionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Actual_Date", DbType="DateTime")] + public System.Nullable Actual_Date + { + get + { + return this._Actual_Date; + } + set + { + if ((this._Actual_Date != value)) + { + this.OnActual_DateChanging(value); + this.SendPropertyChanging(); + this._Actual_Date = value; + this.SendPropertyChanged("Actual_Date"); + this.OnActual_DateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Cleared_By", DbType="NVarChar(50)")] + public string Cleared_By + { + get + { + return this._Cleared_By; + } + set + { + if ((this._Cleared_By != value)) + { + this.OnCleared_ByChanging(value); + this.SendPropertyChanging(); + this._Cleared_By = value; + this.SendPropertyChanged("Cleared_By"); + this.OnCleared_ByChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Cleared_Date", DbType="DateTime")] + public System.Nullable Cleared_Date + { + get + { + return this._Cleared_Date; + } + set + { + if ((this._Cleared_Date != value)) + { + this.OnCleared_DateChanging(value); + this.SendPropertyChanging(); + this._Cleared_Date = value; + this.SendPropertyChanged("Cleared_Date"); + this.OnCleared_DateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Confirmed_By", DbType="NVarChar(50)")] + public string Confirmed_By + { + get + { + return this._Confirmed_By; + } + set + { + if ((this._Confirmed_By != value)) + { + this.OnConfirmed_ByChanging(value); + this.SendPropertyChanging(); + this._Confirmed_By = value; + this.SendPropertyChanged("Confirmed_By"); + this.OnConfirmed_ByChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Confirmed_Date", DbType="DateTime")] + public System.Nullable Confirmed_Date + { + get + { + return this._Confirmed_Date; + } + set + { + if ((this._Confirmed_Date != value)) + { + this.OnConfirmed_DateChanging(value); + this.SendPropertyChanging(); + this._Confirmed_Date = value; + this.SendPropertyChanged("Confirmed_Date"); + this.OnConfirmed_DateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Verified_By", DbType="NVarChar(50)")] + public string Verified_By + { + get + { + return this._Verified_By; + } + set + { + if ((this._Verified_By != value)) + { + this.OnVerified_ByChanging(value); + this.SendPropertyChanging(); + this._Verified_By = value; + this.SendPropertyChanged("Verified_By"); + this.OnVerified_ByChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Verified_Date", DbType="DateTime")] + public System.Nullable Verified_Date + { + get + { + return this._Verified_Date; + } + set + { + if ((this._Verified_Date != value)) + { + this.OnVerified_DateChanging(value); + this.SendPropertyChanging(); + this._Verified_Date = value; + this.SendPropertyChanged("Verified_Date"); + this.OnVerified_DateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="NVarChar(50)")] + public string Status + { + get + { + return this._Status; + } + set + { + if ((this._Status != value)) + { + this.OnStatusChanging(value); + this.SendPropertyChanging(); + this._Status = value; + this.SendPropertyChanged("Status"); + this.OnStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(500)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Sub_Sys_No", DbType="NVarChar(50)")] + public string Sub_Sys_No + { + get + { + return this._Sub_Sys_No; + } + set + { + if ((this._Sub_Sys_No != value)) + { + this.OnSub_Sys_NoChanging(value); + this.SendPropertyChanging(); + this._Sub_Sys_No = value; + this.SendPropertyChanged("Sub_Sys_No"); + this.OnSub_Sys_NoChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; diff --git a/SGGL/WebAPI/WebAPI.csproj.user b/SGGL/WebAPI/WebAPI.csproj.user index bd497c6b..5fe155da 100644 --- a/SGGL/WebAPI/WebAPI.csproj.user +++ b/SGGL/WebAPI/WebAPI.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true