From e65e820da19e17a8763ad83d804cf11198448ac6 Mon Sep 17 00:00:00 2001 From: panhf <754998852@qq.com> Date: Fri, 26 Jan 2024 11:30:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=A7=BB=E4=BA=A4Instrumentation=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 + .../Excel/DataIn/Instrumentation导入模板.xls | Bin 0 -> 21504 bytes SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 16 + SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user | 2 +- .../Transfer/Instrumentation.aspx | 117 +++++ .../Transfer/Instrumentation.aspx.cs | 199 +++++++++ .../Transfer/Instrumentation.aspx.designer.cs | 161 +++++++ .../Transfer/InstrumentationDataIn.aspx | 68 +++ .../Transfer/InstrumentationDataIn.aspx.cs | 408 ++++++++++++++++++ .../InstrumentationDataIn.aspx.designer.cs | 125 ++++++ 10 files changed, 1097 insertions(+), 1 deletion(-) create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataIn/Instrumentation导入模板.xls create mode 100644 SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx create mode 100644 SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx create mode 100644 SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.designer.cs diff --git a/.gitignore b/.gitignore index 53ee8024..27a0fc70 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,5 @@ /SGGL/BLL/obj /SGGL/FineUIPro.Web/obj /SGGL/Model/obj +/SGGL/FineUIPro.Web/web.config +/SGGL/FineUIPro.Web/ErrLog.txt \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/Instrumentation导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/Instrumentation导入模板.xls new file mode 100644 index 0000000000000000000000000000000000000000..1949844b17ee473d85ac2f7803888106145855c2 GIT binary patch literal 21504 zcmeHP2~-rv)~+4~7!+hcKmmneQ4o+-5Jg!zLB$Q%5Zo7B z5;ZP~#(l*FjS`7*OTaBEaZMCg=D)X_W_o(2C+K_UKPT_Jnp0g}x9_Hic*g(Hx=$#AXniL$riw1<@K} z3y3Wt+Ca30D1&GR(H^1$MD!z!t>N66lm7>q^B<>bA2J?(>ChM9WE`ZaWHMO3;lTnt zhHbP6#AFgY5^|J2lCDg`9FOL=G|-K{PPKw;FghB9{!n`=8AFECdW>O+A8|A#B8sga z(}swmhQ6T;XE=$4mS;lCyO3dU9M%v34v!hsPeC5XPebcR@zIQ#zzVZbR$G@myJlXCQ%5tfxy37+ugmmO~Le82nX4M0Sdg z!I6;L5aUS-w2w+5NuZkS|0jgfIt-&whofNN&TvM-Y=U{{b2v7ok2`3NgY>a8Jrfb~ zb-$Yq{=k7(r_V&eG~Yb>Xip!Tz>y-~(=yj-iWkgXH-TS57Gh_TSzy(<1N-)7>5A-s zmu^MlE3yxw>JW9Q5a{nw(8tNd3uZ{Hy{;CuQbspJS~p5fH!}fxBMogyg4X#FS_dAE z2xe^cHo6J$iv{S|3eEV01Zu!X{veI|zz7wf8wk*S1@I*T{3ZhYQUQ8X0lI+zo$pIF zVpkaLO$lXB?kViyg69U&fq0St!cgK#TMpGm>X#Nmtd%g!!0?gJ1|KQP_5kB(5+qXlNH7 zPQ7)SIJ8ye0b}2sQ1Ng>&+Vl)&`a@fBc@7^2W#7iJAh|eX%&mqc&9aAm{nSH ztxPFXcR186(11^v`*$M7WjU^s1m^|RdXEL-n7%q)?BTL9j1>WEi5-bar!9_@h zbPDn`{Vy!Rpq-Ahy(WGkIwES~|8J&K^g^P}&LYO11iYWN!)sOh6Bv@3=>`JyHUe}P zjdWc0u=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TTeBswRKJ{)uC_~?-6063QLKY4J3;7o-6hIzc% z!dU@t=y1CQckXb0#wnY-+>a_cs zC(w36L`TK)?hqm5M8g65^D~GzXC*8)DlSwMyIV^aFNgNKz1iLcXu3SwW}qb?9U|JqA0mXDU^w6$-5ny%-LVj*5aS`T z0qf9(JEZZj?8E<{VzzQV?*FL#q3_T=*uY|IOY#14Gb;NZ3T)k&{)Zqx3g(|&KYt9c z-NLSa*%X}%eGCH*1msJ{4EWkKIG``(Ld5%sD|LCK;h4e=f_{)<8IHG}FhY96IKd5x z1n@lE#t4NJM_B@J%Ao`U%JcPe1ey + + @@ -16298,6 +16300,20 @@ TestRunRecordUploadList.aspx + + Instrumentation.aspx + ASPXCodeBehind + + + Instrumentation.aspx + + + InstrumentationDataIn.aspx + ASPXCodeBehind + + + InstrumentationDataIn.aspx + ProjectSetup.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user index c78536b4..5c318055 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/Instrumentation.aspx b/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx new file mode 100644 index 00000000..e0286ad0 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx @@ -0,0 +1,117 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Instrumentation.aspx.cs" Inherits="FineUIPro.Web.Transfer.Instrumentation" %> + + + + + + + Instrumentation + + +
+ + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx.cs b/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx.cs new file mode 100644 index 00000000..f03ed819 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx.cs @@ -0,0 +1,199 @@ +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 Instrumentation : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BindGrid(); + } + } + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"select*from Transfer_Instrumentation + where ProjectId = @ProjectId"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + + if (!string.IsNullOrEmpty(this.txtINSTRUMENTATION.Text.Trim())) + { + strSql += " AND INSTRUMENTATION like @INSTRUMENTATION"; + listStr.Add(new SqlParameter("@INSTRUMENTATION", "%" + this.txtINSTRUMENTATION.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(txtStarTime.Text.Trim())) + { + strSql += " AND Test_Package_START >= @InspectionDateA"; + listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim()))); + } + if (!string.IsNullOrEmpty(txtEndTime.Text.Trim())) + { + strSql += " AND Test_Package_START <= @InspectionDateZ"; + listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.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 btnMenuDel_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + Model.Transfer_Instrumentation model = Funs.DB.Transfer_Instrumentation.FirstOrDefault(x=>x.Id==rowID); + if (model != null) + { + Funs.DB.Transfer_Instrumentation.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("InstrumentationDataIn.aspx", "导入 - "))); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.InstrumentationMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + //this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + //this.btnMenuModify.Hidden = false; + this.Grid1.EnableRowDoubleClickEvent = true; + } + else + { + this.Grid1.EnableRowDoubleClickEvent = false; + } + 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/Instrumentation.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx.designer.cs new file mode 100644 index 00000000..e7fd10a4 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class Instrumentation + { + + /// + /// 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; + + /// + /// txtINSTRUMENTATION 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtINSTRUMENTATION; + + /// + /// txtStarTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStarTime; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx b/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx new file mode 100644 index 00000000..6149195d --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx @@ -0,0 +1,68 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InstrumentationDataIn.aspx.cs" Inherits="FineUIPro.Web.Transfer.InstrumentationDataIn" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.cs new file mode 100644 index 00000000..b91d78c9 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.cs @@ -0,0 +1,408 @@ +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 InstrumentationDataIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + 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(); + + AddDatasetToSQL(ds.Tables[0], 7); + 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) + { + var oldViewInfos = from x in Funs.DB.Comprehensive_InspectionEquipment + where x.ProjectId == this.CurrUser.LoginProjectId + select x; + + var units = from x in Funs.DB.Base_Unit + join y in Funs.DB.Project_ProjectUnit on x.UnitId equals y.UnitId + where y.ProjectId == this.CurrUser.LoginProjectId + select x; + + var cns = from x in Funs.DB.Base_CNProfessional select x; + + for (int i = 0; i < ir; i++) + { + string row4 = pds.Rows[i][4].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row4.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "Test Package START" + "," + "[" + row4 + "]错误!不是日期格式!" + "|"; + } + } + string row5 = pds.Rows[i][5].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row5.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "Test Package FINISH" + "," + "[" + row5 + "]错误!不是日期格式!" + "|"; + } + } + } + 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 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(); + + AddDatasetToSQL2(ds.Tables[0], 7); + } + 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; + if (pds != null && ir > 0) + { + List list = new List(); + for (int i = 0; i < ir; i++) + { + + Model.Transfer_Instrumentation model = new Model.Transfer_Instrumentation(); + model.Id = Guid.NewGuid().ToString(); + model.ProjectId = CurrUser.LoginProjectId; + model.INSTRUMENTATION= pds.Rows[i][0].ToString().Trim(); + model.SystemName= pds.Rows[i][1].ToString().Trim(); + model.Subsystem= pds.Rows[i][2].ToString().Trim(); + model.Test_Package = 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())) + model.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + model.Test_Package_FINISH = t2; + + model.FINAL_Status= pds.Rows[i][6].ToString().Trim(); + list.Add(model); + } + if (list.Count > 0) + { + Funs.DB.Transfer_Instrumentation.InsertAllOnSubmit(list); + Funs.DB.SubmitChanges(); + } + } + 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 uploadfilepath = rootPath + "File\\Excel\\DataIn\\Instrumentation导入模板.xls"; + string filePath = "File\\Excel\\DataIn\\Instrumentation导入模板.xls"; + 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 + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.designer.cs new file mode 100644 index 00000000..a4806eab --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.designer.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class InstrumentationDataIn + { + + /// + /// 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; + } +} From 629fc1ef749975349dd778e89c80a65136b25a54 Mon Sep 17 00:00:00 2001 From: panhf <754998852@qq.com> Date: Fri, 26 Jan 2024 15:17:07 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=A7=BB=E4=BA=A4=E7=AE=A1=E7=90=865-8?= =?UTF-8?q?=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../版本日志/SGGLDB_WH_2024-01-26-phf.sql | 78 ++++ .../Excel/DataIn/CivilStructure导入模板.xls | Bin 0 -> 22016 bytes .../File/Excel/DataIn/Electrical导入模板.xls | Bin 0 -> 22016 bytes .../Excel/DataIn/Firefighting导入模板.xls | Bin 0 -> 22016 bytes .../Excel/DataIn/Instrumentation导入模板.xls | Bin 21504 -> 22016 bytes SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 48 ++ .../Transfer/CivilStructure.aspx | 117 +++++ .../Transfer/CivilStructure.aspx.cs | 199 +++++++++ .../Transfer/CivilStructure.aspx.designer.cs | 161 +++++++ .../Transfer/CivilStructureDataIn.aspx | 68 +++ .../Transfer/CivilStructureDataIn.aspx.cs | 417 ++++++++++++++++++ .../CivilStructureDataIn.aspx.designer.cs | 125 ++++++ SGGL/FineUIPro.Web/Transfer/Electrical.aspx | 117 +++++ .../FineUIPro.Web/Transfer/Electrical.aspx.cs | 199 +++++++++ .../Transfer/Electrical.aspx.designer.cs | 161 +++++++ .../Transfer/ElectricalDataIn.aspx | 68 +++ .../Transfer/ElectricalDataIn.aspx.cs | 416 +++++++++++++++++ .../ElectricalDataIn.aspx.designer.cs | 125 ++++++ SGGL/FineUIPro.Web/Transfer/Firefighting.aspx | 117 +++++ .../Transfer/Firefighting.aspx.cs | 199 +++++++++ .../Transfer/Firefighting.aspx.designer.cs | 161 +++++++ .../Transfer/FirefightingDataIn.aspx | 68 +++ .../Transfer/FirefightingDataIn.aspx.cs | 416 +++++++++++++++++ .../FirefightingDataIn.aspx.designer.cs | 125 ++++++ .../Transfer/InstrumentationDataIn.aspx.cs | 62 +-- SGGL/FineUIPro.Web/common/Menu_HSSE.xml | 4 +- SGGL/FineUIPro.Web/common/Menu_TestRun.xml | 4 +- SGGL/FineUIPro.Web/common/Menu_Transfer.xml | 2 +- SGGL/WebAPI/WebAPI.csproj.user | 2 +- 29 files changed, 3425 insertions(+), 34 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_WH_2024-01-26-phf.sql create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataIn/CivilStructure导入模板.xls create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataIn/Electrical导入模板.xls create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataIn/Firefighting导入模板.xls create mode 100644 SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx create mode 100644 SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx create mode 100644 SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/Electrical.aspx create mode 100644 SGGL/FineUIPro.Web/Transfer/Electrical.aspx.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/Electrical.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx create mode 100644 SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/Firefighting.aspx create mode 100644 SGGL/FineUIPro.Web/Transfer/Firefighting.aspx.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/Firefighting.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx create mode 100644 SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx.designer.cs diff --git a/DataBase/版本日志/SGGLDB_WH_2024-01-26-phf.sql b/DataBase/版本日志/SGGLDB_WH_2024-01-26-phf.sql new file mode 100644 index 00000000..62f666bc --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2024-01-26-phf.sql @@ -0,0 +1,78 @@ +CREATE TABLE [dbo].[Transfer_PunchlistFrom]( + [Id] [nvarchar](50) NOT NULL, + [Item_No] [nvarchar](50) NULL, + [Punch_No] [nvarchar](50) NULL, + [SystemName] [nvarchar](50) NULL, + [Subsystem] [nvarchar](50) NULL, + [Test_Package] [nvarchar](50) NULL, + [Discipline] [nvarchar](50) NULL, + [DESCRIPTION] [nvarchar](50) NULL, + [Identified] [nvarchar](50) NULL, + [Category] [nvarchar](50) NULL, + [PUNCH_ITEM_FINISH_DATE] [datetime] NULL, + [Action_By] [nvarchar](50) NULL, + [Required_By] [nvarchar](50) NULL, + [PUNCH_ITEM_STATUS] [nvarchar](50) NULL, + [Comments] [nvarchar](50) NULL, + CONSTRAINT [PK_Transfer_PunchlistFrom] 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 + + +CREATE TABLE [dbo].[Transfer_HVAC]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [HVAC] [nvarchar](50) NULL, + [SystemName] [nvarchar](50) NULL, + [Subsystem] [nvarchar](50) NULL, + [Test_Package] [nvarchar](50) NULL, + [Test_Package_START] [datetime] NULL, + [Test_Package_FINISH] [datetime] NULL, + [FINAL_Status] [nvarchar](50) NULL, + CONSTRAINT [PK_Transfer_HVAC] 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 + +CREATE TABLE [dbo].[Transfer_Plumbing]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [Plumbing] [nvarchar](50) NULL, + [SystemName] [nvarchar](50) NULL, + [Subsystem] [nvarchar](50) NULL, + [Test_Package] [nvarchar](50) NULL, + [Test_Package_START] [datetime] NULL, + [Test_Package_FINISH] [datetime] NULL, + [FINAL_Status] [nvarchar](50) NULL, + CONSTRAINT [PK_Transfer_Plumbing] 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 + +CREATE TABLE [dbo].[Transfer_Telecom]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [Telecom] [nvarchar](50) NULL, + [SystemName] [nvarchar](50) NULL, + [Subsystem] [nvarchar](50) NULL, + [Test_Package] [nvarchar](50) NULL, + [Test_Package_START] [datetime] NULL, + [Test_Package_FINISH] [datetime] NULL, + [FINAL_Status] [nvarchar](50) NULL, + CONSTRAINT [PK_Transfer_Telecom] 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 \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/CivilStructure导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/CivilStructure导入模板.xls new file mode 100644 index 0000000000000000000000000000000000000000..bcabcaaea6c51c16041a46d0c8a585223b12cd74 GIT binary patch literal 22016 zcmeHP2V7J~x1YN#uqa3oP>Qe=1qG?1*r=i+h@hzP6FZBj*gz2rfhdXv8`co)T@y8y zL}Ra5&?phR3D{zZHBqeWJLlfLyLa#2yFuUkeZQCQz1iQ~xpU^6|C~86?Z^N)4yXwLhsPS~ry!5xr>6CzcoAbJuwFMZmJEmA0NVD^ z&AuEu2v>n_wRL9FBGA<2IUOKYeUV&qRcL z+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L/FineUIPro.Web/File/Excel/DataIn/Electrical导入模板.xls new file mode 100644 index 0000000000000000000000000000000000000000..24c5688b12f7ae613af82dda4e268905f42a6778 GIT binary patch literal 22016 zcmeHP2Ut``*Pgp9uqa3oP(WcR3JTH@Y*bMYL{QN9iJe7MR1^yq0#OtTHmo7odx;uL zqOn&jXq1TE1Z=UymPE0#|2g+^ckkZ4cY}W4^FM$7=bL@z&Yd&oymRKvnVCDc?8TqV zD^`7HTS<5!nCOver4cdU&?z{_NCz`Qn!pL>tCdP6LnH)F{~P{67WfFdxzAU1;7 z7@|Ey2Z(Zrju4$7Izx1Uh`xl;70#P+^8X-{{-adwN=CqMH1tIz84l?vG9Ij6`(OFK{bVJE;<^79#H!zGL#IU^%%+!KjCOWBotde zrnM184R^F>I3r0Sv^)!1-k$V_WB=L!aCj`CehTt9erj7kiWf0v0_$}nW5_W0^`~tg z4ZV;`+XN}2$zV7ijshaVt)~4rc57Qdj^&CPJR=#5Vgr4$-{idE(Oilcz~HYW60$>j z6pn=4ftXA(pnX&ZNdwj7|2rX^)}cRzIvfE5w}UeZW)sXqpTn^}ecVoS9H5Ww=$VL+ zt=(@q2LT7JPG3kuX};O?(TP6RgCj+Lpk;2*6d#zoZUMiH%)`zk)4-~;dUfl<(v>;? zF5Q;KSLPf*)gkIrVbI@$p^wvv56qBKs8>eBN-Ln$h|x_z7Bv?~W=d)OwPcxA8`H>? zR;w*V=ye3Flm;5MWc26ZNMJ3{ww{LwKiWYUN1PrkfRC*X5!8o}01>*82t7aqzox%< z?Zq`wyS=E7nFzhU2)(AqRrvN&cbG5g6UvF)S31Fx=>gH1c#}4Sp(K+Q9ICxE0G9HG zLhQXrSE3*(q_>D*Agup3+Jc@?mso8~nY}a&+}K`RRCmoR$Y9c(_!6owk=H2L9M073 zMS2^eS*qD~Ar2?7juS1#$cEDA_R=13q0x+~OspEDi&cPSV$kEEi&~4fgK4giu9}sJ z^Dz~NfUB!f*meyf?l85`M$~KMQ=rF>?~pI zNx=JQ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a/SGGL/FineUIPro.Web/File/Excel/DataIn/Firefighting导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/Firefighting导入模板.xls new file mode 100644 index 0000000000000000000000000000000000000000..7163bb6a76a3e5e5838a2977662634760b6b699f GIT binary patch literal 22016 zcmeHP2Urxzwyquq7!)K3D4;L|1qF$sn24exh@hzJ6*GgVU_ucC3#%vwOqf~BS$EYn zth(li0bOOq>@Jwru*O}*$h>p9r)PS4x@Xb%zWcqs->vzotLxM`f1NsYs=BMIdoKQL zS-$EA`wGGf!Nh=6DNTqGhfcvcMmks!(g02{U!_zk86qKY`rq&mvcM_L9~bH0I?p# z`Vbuq^dF^a7cv}vqoFS%$uLMqk#S)4>IYl! z7`DL@5R=RBNXQZTNZK(8bG*28R9b_$8&pHc=AffN=mE8lB16dlT92U&@iUHAL_)Fk zV_F?i)Np@WhBJ~RK+7|sZc%&Ca_*tGKQqVuRm@3 zDCmV`+9pUDO$NjHFcc689;)`^*sX5;IF`#*cqTF!#YTo?zu9@?qd62Yg27)wBxJkv zC>#m712K_|fc8-%ND8PX|M!G&T8I7=>Tm=M+y>4lm`yMbeGbRk^l=-_aezLyp=TmO zzUzL=H3&HH>hzT)l;)d7A6@8UEjUtS4=r~&*{f@3mafeH z-_q@Ad}a0lR2`xr6$br182UJs_`wV*g?eQ~th5|TO&Hw-WKnZ*WTuqXUq_Z{wJD8E z>9pEfgkD3yN-3aWGe&b4j4u@Irx7NM(pT#fH2^@RDNHlbX|eWeRrGQA+W5?|7aFqA~nghO?d2EwJh zt`K`K(uF8U66q}>*c`6^cDjPzP?uP3OqruJ4BXgJTvUI}EXZKenD`T_FOjPhYz$|b z_9DF%(Js|)yAX#9SjUByVq`<5 z9i=V6Gwp>%G(I9G+zPzYfiKJ|EnF*8%G4bRHOuvh>(hV>WJ9)tyHjbz2L_W5+&Ybe z7Kg&c6>o(Jd9B1-WI{sap>nv4$&pS$o~HkWB^dP6Va^uh7o#Jh5dMEMouZc_DmzOU zdlK+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@(kkEQ-Y}yyd%@9ntF<5}#3WGv%G*=h^_`;B&HZ%PEtP|)EZDS>Y^&FOPXIN~e=Zn5cQ zX{P~kA$@6jW18+sA1Be29N=L?19-EC5IOY?lpLj>wA(;_GR>V!9~-K)pOM34e^TTz~qSp=XK`Vs`{fC3C`GfJ_rp9 zlejsN0ga+*&9!KlF$OCl8}fak`;(ARn!w~J@C;-)M3+fmt_uhKm@+AN9bzzLhA?0w zVenuXO0=V|_)Lz1L5n@cl$XuxYK=CIx< zS|=t)!Ssz&50jHX4*P=189)xNjR)adDeQ%4B9FQs8cjmG+z&NW@fgA2LR(%1%urC@ z18N>Xf+beuN7@-ep)3g^hMBMsoXPQmBtWeX{%l}EH<ad;e}e2D=CV-wD~5gS<#ukL_^KXe^Tjo^2P3J{dRhS~v03_#_$Pzz96 zC5EEa5R>r4&>;uO>OiEi=mY3NE8mux12hHyJ^Nw{V9#TZqetLi!P`jmJsb{bdUSo9 zaPdEx(7Cav(Pc4@gC1`Y@c|A#3&iOcr$j9KZ}?|e057DJ5iu{6lwp_Ceg46GnB>}< z(kq?tABDg{j;KCV`FE$N4?Q(iCj}mke#?JH8CBrWX$s^m(ANc0ww#uSa^ z@yq`s(~tC5sYlS2>GrWHOBYMU_&9Xhuh@L0InFI63=2_{}T=6 zk-rDr4R&)N4}>Ewfc@b)kRL=}It`>L M^uPzc|BvB+0RDQJ1ONa4 literal 0 HcmV?d00001 diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/Instrumentation导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/Instrumentation导入模板.xls index 1949844b17ee473d85ac2f7803888106145855c2..e9d02061b81b706a5205558a818166f1bf0b024a 100644 GIT binary patch delta 1937 zcmc&#Uuc_E6hG(7_vO#pF8`J$S+?bCX}V6aO>r=UcKzBkO`E1k*6M@!GXJa&9a_PH zW6Wgu;LDJjf~UeSJ;q#OG4_!^xy&R~aq%~(cv3<11AOP-ip|9iX6TOZI%o^Jc3=U23!@Le?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Structure.aspx + ASPXCodeBehind + + + CivilStructure.aspx + + + CivilStructureDataIn.aspx + ASPXCodeBehind + + + CivilStructureDataIn.aspx + + + Electrical.aspx + ASPXCodeBehind + + + Electrical.aspx + + + ElectricalDataIn.aspx + ASPXCodeBehind + + + ElectricalDataIn.aspx + + + Firefighting.aspx + ASPXCodeBehind + + + Firefighting.aspx + + + FirefightingDataIn.aspx + ASPXCodeBehind + + + FirefightingDataIn.aspx + Instrumentation.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx b/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx new file mode 100644 index 00000000..58aa3589 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx @@ -0,0 +1,117 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CivilStructure.aspx.cs" Inherits="FineUIPro.Web.Transfer.CivilStructure" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx.cs b/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx.cs new file mode 100644 index 00000000..e0eb76d4 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx.cs @@ -0,0 +1,199 @@ +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 CivilStructure : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BindGrid(); + } + } + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"select*from Transfer_Civil_Structure + where ProjectId = @ProjectId"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + + if (!string.IsNullOrEmpty(this.txtCivil_Structure.Text.Trim())) + { + strSql += " AND Civil_Structure like @Civil_Structure"; + listStr.Add(new SqlParameter("@Civil_Structure", "%" + this.txtCivil_Structure.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(txtStarTime.Text.Trim())) + { + strSql += " AND Test_Package_START >= @InspectionDateA"; + listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim()))); + } + if (!string.IsNullOrEmpty(txtEndTime.Text.Trim())) + { + strSql += " AND Test_Package_START <= @InspectionDateZ"; + listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.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 btnMenuDel_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + Model.Transfer_Civil_Structure model = Funs.DB.Transfer_Civil_Structure.FirstOrDefault(x => x.Id == rowID); + if (model != null) + { + Funs.DB.Transfer_Civil_Structure.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("CivilStructureDataIn.aspx", "导入 - "))); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CivilStructureMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + //this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + //this.btnMenuModify.Hidden = false; + this.Grid1.EnableRowDoubleClickEvent = true; + } + else + { + this.Grid1.EnableRowDoubleClickEvent = false; + } + 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/CivilStructure.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx.designer.cs new file mode 100644 index 00000000..783a843e --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class CivilStructure + { + + /// + /// 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; + + /// + /// txtCivil_Structure 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCivil_Structure; + + /// + /// txtStarTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStarTime; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx b/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx new file mode 100644 index 00000000..5752054d --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx @@ -0,0 +1,68 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CivilStructureDataIn.aspx.cs" Inherits="FineUIPro.Web.Transfer.CivilStructureDataIn" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx.cs new file mode 100644 index 00000000..e8d6a8ab --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx.cs @@ -0,0 +1,417 @@ +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 CivilStructureDataIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + 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(); + + AddDatasetToSQL(ds.Tables[0], 7); + 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 = 0; i < ir; i++) + { + string row4 = pds.Rows[i][4].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row4.Trim()); + } + catch (Exception) + { + result += (i + 3).ToString() + "," + "Test Package START" + "," + "[" + 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() + "," + "Test Package FINISH" + "," + "[" + row5 + "]错误!不是日期格式!" + "|"; + } + } + } + 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 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(); + + AddDatasetToSQL2(ds.Tables[0], 7); + } + 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; + if (pds != null && ir > 0) + { + List list = new List(); + for (int i = 1; i < ir; i++) + { + //查询第一列,没查到的情况下作导入处理 + var modelOnly = Funs.DB.Transfer_Civil_Structure.FirstOrDefault(x => x.Civil_Structure == pds.Rows[i][0].ToString().Trim() + && x.ProjectId == CurrUser.LoginProjectId); + if (modelOnly==null) + { + Model.Transfer_Civil_Structure model = new Model.Transfer_Civil_Structure(); + model.Id = Guid.NewGuid().ToString(); + model.ProjectId = CurrUser.LoginProjectId; + model.Civil_Structure = pds.Rows[i][0].ToString().Trim(); + model.SystemName = pds.Rows[i][1].ToString().Trim(); + model.Subsystem = pds.Rows[i][2].ToString().Trim(); + model.Test_Package = 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())) + model.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + model.Test_Package_FINISH = t2; + + model.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + list.Add(model); + } + else + { + //修改 + modelOnly.Civil_Structure = pds.Rows[i][0].ToString().Trim(); + modelOnly.SystemName = pds.Rows[i][1].ToString().Trim(); + modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim(); + modelOnly.Test_Package = 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.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + modelOnly.Test_Package_FINISH = t2; + modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + Funs.DB.SubmitChanges(); + } + } + if (list.Count > 0) + { + Funs.DB.Transfer_Civil_Structure.InsertAllOnSubmit(list); + Funs.DB.SubmitChanges(); + } + } + 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 uploadfilepath = rootPath + "File\\Excel\\DataIn\\CivilStructure导入模板.xls"; + string filePath = "File\\Excel\\DataIn\\CivilStructure导入模板.xls"; + 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 + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx.designer.cs new file mode 100644 index 00000000..072f07bb --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx.designer.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class CivilStructureDataIn + { + + /// + /// 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/Transfer/Electrical.aspx b/SGGL/FineUIPro.Web/Transfer/Electrical.aspx new file mode 100644 index 00000000..0fd67055 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Electrical.aspx @@ -0,0 +1,117 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Electrical.aspx.cs" Inherits="FineUIPro.Web.Transfer.Electrical" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/Electrical.aspx.cs b/SGGL/FineUIPro.Web/Transfer/Electrical.aspx.cs new file mode 100644 index 00000000..f36e3328 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Electrical.aspx.cs @@ -0,0 +1,199 @@ +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 Electrical : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BindGrid(); + } + } + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"select*from Transfer_Electrical + where ProjectId = @ProjectId"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + + if (!string.IsNullOrEmpty(this.txtELECTRICAL.Text.Trim())) + { + strSql += " AND ELECTRICAL like @ELECTRICAL"; + listStr.Add(new SqlParameter("@ELECTRICAL", "%" + this.txtELECTRICAL.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(txtStarTime.Text.Trim())) + { + strSql += " AND Test_Package_START >= @InspectionDateA"; + listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim()))); + } + if (!string.IsNullOrEmpty(txtEndTime.Text.Trim())) + { + strSql += " AND Test_Package_START <= @InspectionDateZ"; + listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.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 btnMenuDel_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + Model.Transfer_Electrical model = Funs.DB.Transfer_Electrical.FirstOrDefault(x => x.Id == rowID); + if (model != null) + { + Funs.DB.Transfer_Electrical.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("ElectricalDataIn.aspx", "导入 - "))); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ElectricalMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + //this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + //this.btnMenuModify.Hidden = false; + this.Grid1.EnableRowDoubleClickEvent = true; + } + else + { + this.Grid1.EnableRowDoubleClickEvent = false; + } + 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/Electrical.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/Electrical.aspx.designer.cs new file mode 100644 index 00000000..07ce47f3 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Electrical.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class Electrical + { + + /// + /// 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; + + /// + /// txtELECTRICAL 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtELECTRICAL; + + /// + /// txtStarTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStarTime; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx b/SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx new file mode 100644 index 00000000..97a20417 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx @@ -0,0 +1,68 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ElectricalDataIn.aspx.cs" Inherits="FineUIPro.Web.Transfer.ElectricalDataIn" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx.cs new file mode 100644 index 00000000..039faf05 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx.cs @@ -0,0 +1,416 @@ +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 ElectricalDataIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + 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(); + + AddDatasetToSQL(ds.Tables[0], 7); + 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 = 0; i < ir; i++) + { + string row4 = pds.Rows[i][4].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row4.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "Test Package START" + "," + "[" + row4 + "]错误!不是日期格式!" + "|"; + } + } + string row5 = pds.Rows[i][5].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row5.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "Test Package FINISH" + "," + "[" + row5 + "]错误!不是日期格式!" + "|"; + } + } + } + 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 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(); + + AddDatasetToSQL2(ds.Tables[0], 7); + } + 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; + if (pds != null && ir > 0) + { + List list = new List(); + for (int i = 1; i < ir; i++) + { + //查询第一列,没查到的情况下作导入处理 + var modelOnly = Funs.DB.Transfer_Electrical.FirstOrDefault(x => x.ELECTRICAL == pds.Rows[i][0].ToString().Trim() + && x.ProjectId == CurrUser.LoginProjectId); + if (modelOnly == null) + { + Model.Transfer_Electrical model = new Model.Transfer_Electrical(); + model.Id = Guid.NewGuid().ToString(); + model.ProjectId = CurrUser.LoginProjectId; + model.ELECTRICAL = pds.Rows[i][0].ToString().Trim(); + model.SystemName = pds.Rows[i][1].ToString().Trim(); + model.Subsystem = pds.Rows[i][2].ToString().Trim(); + model.Test_Package = 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())) + model.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + model.Test_Package_FINISH = t2; + + model.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + list.Add(model); + } + else + { + //修改 + modelOnly.ELECTRICAL = pds.Rows[i][0].ToString().Trim(); + modelOnly.SystemName = pds.Rows[i][1].ToString().Trim(); + modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim(); + modelOnly.Test_Package = 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.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + modelOnly.Test_Package_FINISH = t2; + modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + Funs.DB.SubmitChanges(); + } + } + if (list.Count > 0) + { + Funs.DB.Transfer_Electrical.InsertAllOnSubmit(list); + Funs.DB.SubmitChanges(); + } + } + 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 uploadfilepath = rootPath + "File\\Excel\\DataIn\\Electrical导入模板.xls"; + string filePath = "File\\Excel\\DataIn\\Electrical导入模板.xls"; + 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 + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx.designer.cs new file mode 100644 index 00000000..fa61b540 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx.designer.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class ElectricalDataIn + { + + /// + /// 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/Transfer/Firefighting.aspx b/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx new file mode 100644 index 00000000..86011803 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx @@ -0,0 +1,117 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Firefighting.aspx.cs" Inherits="FineUIPro.Web.Transfer.Firefighting" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx.cs b/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx.cs new file mode 100644 index 00000000..1791c87c --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx.cs @@ -0,0 +1,199 @@ +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 Firefighting : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BindGrid(); + } + } + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"select*from Transfer_Firefighting + where ProjectId = @ProjectId"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + + if (!string.IsNullOrEmpty(this.txtFirefighting.Text.Trim())) + { + strSql += " AND Firefighting like @Firefighting"; + listStr.Add(new SqlParameter("@Firefighting", "%" + this.txtFirefighting.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(txtStarTime.Text.Trim())) + { + strSql += " AND Test_Package_START >= @InspectionDateA"; + listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim()))); + } + if (!string.IsNullOrEmpty(txtEndTime.Text.Trim())) + { + strSql += " AND Test_Package_START <= @InspectionDateZ"; + listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.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 btnMenuDel_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + Model.Transfer_Firefighting model = Funs.DB.Transfer_Firefighting.FirstOrDefault(x => x.Id == rowID); + if (model != null) + { + Funs.DB.Transfer_Firefighting.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("FirefightingDataIn.aspx", "导入 - "))); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.FirefightingMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + //this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + //this.btnMenuModify.Hidden = false; + this.Grid1.EnableRowDoubleClickEvent = true; + } + else + { + this.Grid1.EnableRowDoubleClickEvent = false; + } + 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/Firefighting.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx.designer.cs new file mode 100644 index 00000000..f8080d74 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class Firefighting + { + + /// + /// 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; + + /// + /// txtFirefighting 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFirefighting; + + /// + /// txtStarTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStarTime; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx b/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx new file mode 100644 index 00000000..07e72eb6 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx @@ -0,0 +1,68 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FirefightingDataIn.aspx.cs" Inherits="FineUIPro.Web.Transfer.FirefightingDataIn" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx.cs new file mode 100644 index 00000000..ca87cd81 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx.cs @@ -0,0 +1,416 @@ +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 FirefightingDataIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + 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(); + + AddDatasetToSQL(ds.Tables[0], 7); + 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 = 0; i < ir; i++) + { + string row4 = pds.Rows[i][4].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row4.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "Test Package START" + "," + "[" + row4 + "]错误!不是日期格式!" + "|"; + } + } + string row5 = pds.Rows[i][5].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row5.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "Test Package FINISH" + "," + "[" + row5 + "]错误!不是日期格式!" + "|"; + } + } + } + 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 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(); + + AddDatasetToSQL2(ds.Tables[0], 7); + } + 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; + if (pds != null && ir > 0) + { + List list = new List(); + for (int i = 1; i < ir; i++) + { + //查询第一列,没查到的情况下作导入处理 + var modelOnly = Funs.DB.Transfer_Firefighting.FirstOrDefault(x => x.Firefighting == pds.Rows[i][0].ToString().Trim() && x.ProjectId == CurrUser.LoginProjectId); + if (modelOnly == null) + { + Model.Transfer_Firefighting model = new Model.Transfer_Firefighting(); + model.Id = Guid.NewGuid().ToString(); + model.ProjectId = CurrUser.LoginProjectId; + model.Firefighting = pds.Rows[i][0].ToString().Trim(); + model.SystemName = pds.Rows[i][1].ToString().Trim(); + model.Subsystem = pds.Rows[i][2].ToString().Trim(); + model.Test_Package = 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())) + model.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + model.Test_Package_FINISH = t2; + + model.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + list.Add(model); + } + else + { + //修改 + modelOnly.Firefighting = pds.Rows[i][0].ToString().Trim(); + modelOnly.SystemName = pds.Rows[i][1].ToString().Trim(); + modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim(); + modelOnly.Test_Package = 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.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + modelOnly.Test_Package_FINISH = t2; + modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + Funs.DB.SubmitChanges(); + } + } + if (list.Count > 0) + { + Funs.DB.Transfer_Firefighting.InsertAllOnSubmit(list); + Funs.DB.SubmitChanges(); + } + } + 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 uploadfilepath = rootPath + "File\\Excel\\DataIn\\Firefighting导入模板.xls"; + string filePath = "File\\Excel\\DataIn\\Firefighting导入模板.xls"; + 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 + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx.designer.cs new file mode 100644 index 00000000..910ec5ec --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx.designer.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class FirefightingDataIn + { + + /// + /// 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/Transfer/InstrumentationDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.cs index b91d78c9..c4c6f558 100644 --- a/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.cs @@ -162,17 +162,6 @@ namespace FineUIPro.Web.Transfer ir = pds.Rows.Count; if (pds != null && ir > 0) { - var oldViewInfos = from x in Funs.DB.Comprehensive_InspectionEquipment - where x.ProjectId == this.CurrUser.LoginProjectId - select x; - - var units = from x in Funs.DB.Base_Unit - join y in Funs.DB.Project_ProjectUnit on x.UnitId equals y.UnitId - where y.ProjectId == this.CurrUser.LoginProjectId - select x; - - var cns = from x in Funs.DB.Base_CNProfessional select x; - for (int i = 0; i < ir; i++) { string row4 = pds.Rows[i][4].ToString(); @@ -334,24 +323,43 @@ namespace FineUIPro.Web.Transfer if (pds != null && ir > 0) { List list = new List(); - for (int i = 0; i < ir; i++) + for (int i = 1; i < ir; i++) { - - Model.Transfer_Instrumentation model = new Model.Transfer_Instrumentation(); - model.Id = Guid.NewGuid().ToString(); - model.ProjectId = CurrUser.LoginProjectId; - model.INSTRUMENTATION= pds.Rows[i][0].ToString().Trim(); - model.SystemName= pds.Rows[i][1].ToString().Trim(); - model.Subsystem= pds.Rows[i][2].ToString().Trim(); - model.Test_Package = 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())) - model.Test_Package_START = t1; - if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) - model.Test_Package_FINISH = t2; + //查询第一列,没查到的情况下作导入处理 + var modelOnly = Funs.DB.Transfer_Instrumentation.FirstOrDefault(x => x.INSTRUMENTATION == pds.Rows[i][0].ToString().Trim() + && x.ProjectId==CurrUser.LoginProjectId); + if (modelOnly == null) + { + Model.Transfer_Instrumentation model = new Model.Transfer_Instrumentation(); + model.Id = Guid.NewGuid().ToString(); + model.ProjectId = CurrUser.LoginProjectId; + model.INSTRUMENTATION = pds.Rows[i][0].ToString().Trim(); + model.SystemName = pds.Rows[i][1].ToString().Trim(); + model.Subsystem = pds.Rows[i][2].ToString().Trim(); + model.Test_Package = 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())) + model.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + model.Test_Package_FINISH = t2; - model.FINAL_Status= pds.Rows[i][6].ToString().Trim(); - list.Add(model); + model.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + list.Add(model); + } + else { + //修改 + modelOnly.INSTRUMENTATION = pds.Rows[i][0].ToString().Trim(); + modelOnly.SystemName = pds.Rows[i][1].ToString().Trim(); + modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim(); + modelOnly.Test_Package = 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.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + modelOnly.Test_Package_FINISH = t2; + modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + Funs.DB.SubmitChanges(); + } } if (list.Count > 0) { diff --git a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml index 1544f676..f3c15865 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml @@ -20,7 +20,7 @@ - + @@ -153,7 +153,7 @@ - + diff --git a/SGGL/FineUIPro.Web/common/Menu_TestRun.xml b/SGGL/FineUIPro.Web/common/Menu_TestRun.xml index 08203a41..a8df02b8 100644 --- a/SGGL/FineUIPro.Web/common/Menu_TestRun.xml +++ b/SGGL/FineUIPro.Web/common/Menu_TestRun.xml @@ -44,6 +44,7 @@ + @@ -60,16 +61,13 @@ - - - diff --git a/SGGL/FineUIPro.Web/common/Menu_Transfer.xml b/SGGL/FineUIPro.Web/common/Menu_Transfer.xml index 80c38b9a..c006fd7f 100644 --- a/SGGL/FineUIPro.Web/common/Menu_Transfer.xml +++ b/SGGL/FineUIPro.Web/common/Menu_Transfer.xml @@ -12,5 +12,5 @@ - + \ No newline at end of file diff --git a/SGGL/WebAPI/WebAPI.csproj.user b/SGGL/WebAPI/WebAPI.csproj.user index 4edb5e0f..6bc24ada 100644 --- a/SGGL/WebAPI/WebAPI.csproj.user +++ b/SGGL/WebAPI/WebAPI.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true