Merge branch 'master' of http://47.104.102.122:3000/panhf/CNCEC_SUBQHSE_WUHUAN
This commit is contained in:
commit
f9823ff108
|
@ -121,6 +121,7 @@ namespace BLL
|
|||
newMajorPlanApproval.ExpertReviewMan = majorPlanApproval.ExpertReviewMan;
|
||||
|
||||
newMajorPlanApproval.IsReview = majorPlanApproval.IsReview;
|
||||
newMajorPlanApproval.RemarkCode = majorPlanApproval.RemarkCode;
|
||||
db.Comprehensive_MajorPlanApproval.InsertOnSubmit(newMajorPlanApproval);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
|
|
@ -102,6 +102,7 @@ namespace BLL
|
|||
newPressurePipe.CompileMan = PressurePipe.CompileMan;
|
||||
newPressurePipe.Status = PressurePipe.Status;
|
||||
newPressurePipe.ReportTime = PressurePipe.ReportTime;
|
||||
newPressurePipe.RemarkCode = PressurePipe.RemarkCode;
|
||||
db.Comprehensive_PressurePipe.InsertOnSubmit(newPressurePipe);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
|
|
@ -101,6 +101,7 @@ namespace BLL
|
|||
newQualityAccident.CompileDate = QualityAccident.CompileDate;
|
||||
newQualityAccident.UnitWorkId = QualityAccident.UnitWorkId;
|
||||
newQualityAccident.Status = QualityAccident.Status;
|
||||
newQualityAccident.RemarkCode = QualityAccident.RemarkCode;
|
||||
db.Comprehensive_QualityAccident.InsertOnSubmit(newQualityAccident);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
|
|
@ -106,6 +106,7 @@ namespace BLL
|
|||
newEquipment.CompileMan = SpecialEquipment.CompileMan;
|
||||
newEquipment.Status = SpecialEquipment.Status;
|
||||
newEquipment.PositionNum = SpecialEquipment.PositionNum;
|
||||
newEquipment.RemarkCode = SpecialEquipment.RemarkCode;
|
||||
db.Comprehensive_SpecialEquipment.InsertOnSubmit(newEquipment);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
|
|
@ -3275,6 +3275,27 @@ namespace BLL
|
|||
/// 施工组织设计及施工方案导入模板文件原始虚拟路径
|
||||
/// </summary>
|
||||
public const string GeneralPlanApprovalTemplateUrl = "File\\Excel\\DataIn\\施工组织设计及施工方案导入模板.xls";
|
||||
|
||||
/// <summary>
|
||||
/// 超过一定规模的危大施工方案导入模板文件原始虚拟路径
|
||||
/// </summary>
|
||||
public const string MajorPlanApprovalTemplateUrl = "File\\Excel\\DataIn\\超过一定规模的危大施工方案导入模板.xls";
|
||||
|
||||
/// <summary>
|
||||
/// 特种设备管理导入模板原始虚拟路径
|
||||
/// </summary>
|
||||
public const string SpecialEquipmentTemplateUrl = "File\\Excel\\DataIn\\特种设备管理导入模板.xls";
|
||||
|
||||
/// <summary>
|
||||
/// 压力管道管理导入模板原始虚拟路径
|
||||
/// </summary>
|
||||
public const string PressurePipeTemplateUrl = "File\\Excel\\DataIn\\压力管道管理导入模板.xls";
|
||||
|
||||
/// <summary>
|
||||
/// 质量事故处理记录导入模板原始虚拟路径
|
||||
/// </summary>
|
||||
public const string QualityAccidentTemplateUrl = "File\\Excel\\DataIn\\质量事故处理记录导入模板.xls";
|
||||
|
||||
#endregion
|
||||
|
||||
#region 绩效考核模板文件路径
|
||||
|
|
|
@ -570,6 +570,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
}
|
||||
}
|
||||
des.RemarkCode = pds.Rows[i][19].ToString().Trim();
|
||||
des.CompileMan = this.CurrUser.UserId;
|
||||
des.CompileDate = DateTime.Now;
|
||||
BLL.DataReceivingDocService.AddDataReceivingDoc(des);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,94 +0,0 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DataReceivingDocDataInEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.DataReceivingDocDataInEdit" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>编辑导入资料收发文登记记录</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue1" Label="日期" ShowRedStar="true" Required="true" runat="server" FocusOnPageLoad="true" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue2" Label="文件号" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue3" Label="文件名称" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue4" Label="文件类别" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue5" Label="专业" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue6" Label="发件单位" ShowRedStar="true" Required="true" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue7" Label="发件人" ShowRedStar="true" Required="true" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue8" Label="份数" ShowRedStar="true" Required="true" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue9" Label="文件处理人" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:NumberBox ID="txtValue10" Label="发出日期" runat="server" LabelWidth="120px">
|
||||
</f:NumberBox>
|
||||
<f:TextBox ID="txtValue11" Label="接收单位" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue12" Label="接收人" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue13" Label="是否需回复" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue14" Label="返回五环日期" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue15" Label="返回五环份数" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue16" Label="下发至单位" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue17" Label="下发份数" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue18" Label="下发单位接收人" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue19" Label="是否存档" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:CheckBox ID="ckAll" runat="server" Checked="true" Text="是否批量修改"></f:CheckBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea runat="server" Label="错误信息" ID="lbErrCout" Readonly="true" LabelWidth="120px"></f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
|
@ -1,347 +0,0 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
public partial class DataReceivingDocDataInEdit : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 临时表主键
|
||||
/// </summary>
|
||||
public string TempId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["TempId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["TempId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.TempId = Request.Params["TempId"];
|
||||
this.txtValue1.Focus();
|
||||
var dataInTemp = BLL.Sys_DataTempService.GetDataInTempByTempId(this.TempId);
|
||||
if (dataInTemp != null)
|
||||
{
|
||||
this.txtValue1.Text = dataInTemp.Value1;
|
||||
this.txtValue2.Text = dataInTemp.Value2;
|
||||
this.txtValue3.Text = dataInTemp.Value3;
|
||||
this.txtValue4.Text = dataInTemp.Value4;
|
||||
this.txtValue5.Text = dataInTemp.Value5;
|
||||
this.txtValue6.Text = dataInTemp.Value6;
|
||||
this.txtValue7.Text = dataInTemp.Value7;
|
||||
this.txtValue8.Text = dataInTemp.Value8;
|
||||
this.txtValue9.Text = dataInTemp.Value9;
|
||||
this.txtValue10.Text = dataInTemp.Value10;
|
||||
this.txtValue11.Text = dataInTemp.Value11;
|
||||
this.txtValue12.Text = dataInTemp.Value12;
|
||||
this.txtValue13.Text = dataInTemp.Value13;
|
||||
this.txtValue14.Text = dataInTemp.Value14;
|
||||
this.txtValue15.Text = dataInTemp.Value15;
|
||||
this.txtValue16.Text = dataInTemp.Value16;
|
||||
this.txtValue17.Text = dataInTemp.Value17;
|
||||
this.txtValue18.Text = dataInTemp.Value18;
|
||||
this.txtValue19.Text = dataInTemp.Value19;
|
||||
|
||||
this.lbErrCout.Text = dataInTemp.ToopValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存按钮
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
var dataInTemp = BLL.Sys_DataTempService.GetDataInTempByTempId(this.TempId);
|
||||
if (this.ckAll.Checked)
|
||||
{
|
||||
var allDataInTemp = from x in Funs.DB.Sys_DataInTemp where x.ProjectId == this.CurrUser.LoginProjectId && x.UserId == this.CurrUser.UserId select x;
|
||||
if (dataInTemp.Value1 != this.txtValue1.Text.Trim())
|
||||
{
|
||||
var tempValue1 = allDataInTemp.Where(x => x.Value1 == dataInTemp.Value1 || (x.Value1 == null && dataInTemp.Value1 == null));
|
||||
if (tempValue1 != null)
|
||||
{
|
||||
foreach (var item in tempValue1)
|
||||
{
|
||||
item.Value1 = this.txtValue1.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value2 != this.txtValue2.Text.Trim())
|
||||
{
|
||||
var tempValue2 = allDataInTemp.Where(x => x.Value2 == dataInTemp.Value2 || (x.Value2 == null && dataInTemp.Value2 == null));
|
||||
if (tempValue2 != null)
|
||||
{
|
||||
foreach (var item in tempValue2)
|
||||
{
|
||||
item.Value2 = this.txtValue2.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value3 != this.txtValue3.Text.Trim())
|
||||
{
|
||||
var tempValue3 = allDataInTemp.Where(x => x.Value3 == dataInTemp.Value3 || (x.Value3 == null && dataInTemp.Value3 == null));
|
||||
if (tempValue3 != null)
|
||||
{
|
||||
foreach (var item in tempValue3)
|
||||
{
|
||||
item.Value3 = this.txtValue3.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value5 != this.txtValue5.Text.Trim())
|
||||
{
|
||||
var tempValue5 = allDataInTemp.Where(x => x.Value5 == dataInTemp.Value5 || (x.Value5 == null && dataInTemp.Value5 == null));
|
||||
if (tempValue5 != null)
|
||||
{
|
||||
foreach (var item in tempValue5)
|
||||
{
|
||||
item.Value5 = this.txtValue5.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value6 != this.txtValue6.Text.Trim())
|
||||
{
|
||||
var tempValue6 = allDataInTemp.Where(x => x.Value6 == dataInTemp.Value6 || (x.Value6 == null && dataInTemp.Value6 == null));
|
||||
if (tempValue6 != null)
|
||||
{
|
||||
foreach (var item in tempValue6)
|
||||
{
|
||||
item.Value6 = this.txtValue6.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value7 != this.txtValue7.Text.Trim())
|
||||
{
|
||||
var tempValue7 = allDataInTemp.Where(x => x.Value7 == dataInTemp.Value7 || (x.Value7 == null && dataInTemp.Value7 == null));
|
||||
if (tempValue7 != null)
|
||||
{
|
||||
foreach (var item in tempValue7)
|
||||
{
|
||||
item.Value7 = this.txtValue7.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value8 != this.txtValue8.Text.Trim())
|
||||
{
|
||||
var tempValue8 = allDataInTemp.Where(x => x.Value8 == dataInTemp.Value8 || (x.Value8 == null && dataInTemp.Value8 == null));
|
||||
if (tempValue8 != null)
|
||||
{
|
||||
foreach (var item in tempValue8)
|
||||
{
|
||||
item.Value8 = this.txtValue8.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value9 != this.txtValue9.Text.Trim())
|
||||
{
|
||||
var tempValue9 = allDataInTemp.Where(x => x.Value9 == dataInTemp.Value9 || (x.Value9 == null && dataInTemp.Value9 == null));
|
||||
if (tempValue9 != null)
|
||||
{
|
||||
foreach (var item in tempValue9)
|
||||
{
|
||||
item.Value9 = this.txtValue9.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value10 != this.txtValue10.Text.Trim())
|
||||
{
|
||||
var tempValue10 = allDataInTemp.Where(x => x.Value10 == dataInTemp.Value10 || (x.Value10 == null && dataInTemp.Value10 == null));
|
||||
if (tempValue10 != null)
|
||||
{
|
||||
foreach (var item in tempValue10)
|
||||
{
|
||||
item.Value10 = this.txtValue10.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value11 != this.txtValue11.Text.Trim())
|
||||
{
|
||||
var tempValue11 = allDataInTemp.Where(x => x.Value11 == dataInTemp.Value11 || (x.Value11 == null && dataInTemp.Value11 == null));
|
||||
if (tempValue11 != null)
|
||||
{
|
||||
foreach (var item in tempValue11)
|
||||
{
|
||||
item.Value11 = this.txtValue11.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value12 != this.txtValue12.Text.Trim())
|
||||
{
|
||||
var tempValue12 = allDataInTemp.Where(x => x.Value12 == dataInTemp.Value12 || (x.Value12 == null && dataInTemp.Value12 == null));
|
||||
if (tempValue12 != null)
|
||||
{
|
||||
foreach (var item in tempValue12)
|
||||
{
|
||||
item.Value12 = this.txtValue12.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value13 != this.txtValue13.Text.Trim())
|
||||
{
|
||||
var tempValue13 = allDataInTemp.Where(x => x.Value13 == dataInTemp.Value13 || (x.Value13 == null && dataInTemp.Value13 == null));
|
||||
if (tempValue13 != null)
|
||||
{
|
||||
foreach (var item in tempValue13)
|
||||
{
|
||||
item.Value13 = this.txtValue13.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value14 != this.txtValue14.Text.Trim())
|
||||
{
|
||||
var tempValue14 = allDataInTemp.Where(x => x.Value14 == dataInTemp.Value14 || (x.Value14 == null && dataInTemp.Value14 == null));
|
||||
if (tempValue14 != null)
|
||||
{
|
||||
foreach (var item in tempValue14)
|
||||
{
|
||||
item.Value14 = this.txtValue14.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value15 != this.txtValue15.Text.Trim())
|
||||
{
|
||||
var tempValue15 = allDataInTemp.Where(x => x.Value15 == dataInTemp.Value15 || (x.Value15 == null && dataInTemp.Value15 == null));
|
||||
if (tempValue15 != null)
|
||||
{
|
||||
foreach (var item in tempValue15)
|
||||
{
|
||||
item.Value15 = this.txtValue15.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value16 != this.txtValue16.Text.Trim())
|
||||
{
|
||||
var tempValue16 = allDataInTemp.Where(x => x.Value16 == dataInTemp.Value16 || (x.Value16 == null && dataInTemp.Value16 == null));
|
||||
if (tempValue16 != null)
|
||||
{
|
||||
foreach (var item in tempValue16)
|
||||
{
|
||||
item.Value16 = this.txtValue16.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value17 != this.txtValue17.Text.Trim())
|
||||
{
|
||||
var tempValue17 = allDataInTemp.Where(x => x.Value17 == dataInTemp.Value17 || (x.Value17 == null && dataInTemp.Value17 == null));
|
||||
if (tempValue17 != null)
|
||||
{
|
||||
foreach (var item in tempValue17)
|
||||
{
|
||||
item.Value17 = this.txtValue17.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value18 != this.txtValue18.Text.Trim())
|
||||
{
|
||||
var tempValue18 = allDataInTemp.Where(x => x.Value18 == dataInTemp.Value18 || (x.Value18 == null && dataInTemp.Value18 == null));
|
||||
if (tempValue18 != null)
|
||||
{
|
||||
foreach (var item in tempValue18)
|
||||
{
|
||||
item.Value18 = this.txtValue18.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value19 != this.txtValue19.Text.Trim())
|
||||
{
|
||||
var tempValue19 = allDataInTemp.Where(x => x.Value19 == dataInTemp.Value19 || (x.Value19 == null && dataInTemp.Value19 == null));
|
||||
if (tempValue19 != null)
|
||||
{
|
||||
foreach (var item in tempValue19)
|
||||
{
|
||||
item.Value19 = this.txtValue19.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
var toopValue = allDataInTemp.Where(x => x.ToopValue == dataInTemp.ToopValue);
|
||||
if (toopValue != null)
|
||||
{
|
||||
foreach (var item in toopValue)
|
||||
{
|
||||
item.ToopValue = null;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Sys_DataInTemp newDataInTemp = new Model.Sys_DataInTemp();
|
||||
newDataInTemp.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newDataInTemp.UserId = this.CurrUser.UserId;
|
||||
newDataInTemp.Time = System.DateTime.Now;
|
||||
newDataInTemp.Type = dataInTemp.Type;
|
||||
newDataInTemp.Value1 = this.txtValue1.Text.Trim();
|
||||
newDataInTemp.Value2 = this.txtValue2.Text.Trim();
|
||||
newDataInTemp.Value3 = this.txtValue3.Text.Trim();
|
||||
newDataInTemp.Value4 = this.txtValue4.Text.Trim();
|
||||
newDataInTemp.Value5 = this.txtValue5.Text.Trim();
|
||||
newDataInTemp.Value6 = this.txtValue6.Text.Trim();
|
||||
newDataInTemp.Value7 = this.txtValue7.Text.Trim();
|
||||
newDataInTemp.Value8 = this.txtValue8.Text.Trim();
|
||||
newDataInTemp.Value9 = this.txtValue9.Text.Trim();
|
||||
newDataInTemp.Value10 = this.txtValue10.Text.Trim();
|
||||
newDataInTemp.Value11 = this.txtValue11.Text.Trim();
|
||||
newDataInTemp.Value12 = this.txtValue12.Text.Trim();
|
||||
newDataInTemp.Value13 = this.txtValue13.Text.Trim();
|
||||
newDataInTemp.Value14 = this.txtValue14.Text.Trim();
|
||||
newDataInTemp.Value15 = this.txtValue15.Text.Trim();
|
||||
newDataInTemp.Value16 = this.txtValue16.Text.Trim();
|
||||
newDataInTemp.Value17 = this.txtValue17.Text.Trim();
|
||||
newDataInTemp.Value18 = this.txtValue18.Text.Trim();
|
||||
newDataInTemp.Value19 = this.txtValue19.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(this.TempId))
|
||||
{
|
||||
newDataInTemp.TempId = this.TempId;
|
||||
newDataInTemp.ToopValue = null;
|
||||
BLL.Sys_DataTempService.UpdateDataInTemp(newDataInTemp);
|
||||
}
|
||||
}
|
||||
ShowNotify("信息修改完成!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,258 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
|
||||
|
||||
public partial class DataReceivingDocDataInEdit {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue1;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue2;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue3;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue4;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue5 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue5;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue6 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue6;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue7 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue7;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue8 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue8;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue9 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue9;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue10 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtValue10;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue11 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue11;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue12 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue12;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue13 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue13;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue14 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue14;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue15 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue15;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue16 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue16;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue17 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue17;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue18 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue18;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue19 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue19;
|
||||
|
||||
/// <summary>
|
||||
/// ckAll 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckAll;
|
||||
|
||||
/// <summary>
|
||||
/// lbErrCout 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea lbErrCout;
|
||||
}
|
||||
}
|
|
@ -452,6 +452,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
Ins.DesignChangeOrderId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignChangeOrder));
|
||||
Ins.CompileMan = this.CurrUser.UserId;
|
||||
Ins.CompileDate = DateTime.Now.Date;
|
||||
Ins.Status = BLL.Const.Comprehensive_Compile;
|
||||
BLL.DesignChangeOrderService.AddDesignChangeOrder(Ins);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -443,13 +443,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignChangeOrder));
|
||||
}
|
||||
Model.Comprehensive_DesignChangeOrder designChangeOrder = BLL.DesignChangeOrderService.GetDesignChangeOrderById(this.DesignChangeOrderId);
|
||||
if (designChangeOrder == null || ((designChangeOrder.CompileMan == CurrUser.UserId && designChangeOrder.Status == BLL.Const.Comprehensive_Compile) || (designChangeOrder.CompileMan == CurrUser.UserId && designChangeOrder.Status == BLL.Const.Comprehensive_ReCompile)))
|
||||
if (designChangeOrder.Status == BLL.Const.Comprehensive_Complete)
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/DesignChangeOrder&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DesignChangeOrderMenuId)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/DesignChangeOrder&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DesignChangeOrderMenuId)));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/DesignChangeOrder&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DesignChangeOrderMenuId)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/DesignChangeOrder&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DesignChangeOrderMenuId)));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
|
|
@ -431,6 +431,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
}
|
||||
des.JoinPersonNum = Funs.GetNewInt(pds.Rows[i][6].ToString().Trim());
|
||||
des.RemarCode = pds.Rows[i][7].ToString().Trim();
|
||||
des.CompileMan = this.CurrUser.UserId;
|
||||
des.CompileDate = DateTime.Now;
|
||||
des.Status = BLL.Const.Comprehensive_Compile;
|
||||
BLL.DesignDetailsService.AddDesignDetails(des);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
LoadAuditSelect();
|
||||
this.agree.Hidden = true;
|
||||
this.options.Hidden = true;
|
||||
|
||||
|
||||
this.btnSave.Hidden = true;
|
||||
this.btnSubmit.Hidden = true;
|
||||
this.DesignDetailsId = Request.Params["DesignDetailsId"];
|
||||
|
@ -72,7 +72,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
this.txtJoinPersonNum.Text = designDetails.JoinPersonNum.ToString();
|
||||
}
|
||||
var auditApprove = DesignDetailsApproveService.GetAuditApprove(designDetails.DesignDetailsId, BLL.Const.Comprehensive_Audit);
|
||||
if (auditApprove!=null)
|
||||
if (auditApprove != null)
|
||||
{
|
||||
drpAudit.SelectedValue = auditApprove.ApproveMan;
|
||||
|
||||
|
@ -89,7 +89,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
}//审核状态 审核人 可以显示 提交 保存按钮
|
||||
else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId)
|
||||
{
|
||||
|
||||
|
||||
//审核状态不可编辑
|
||||
Readonly();
|
||||
|
||||
|
@ -131,11 +131,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
this.txtDetailsMan.Readonly = true;
|
||||
this.drpUnitIds.Readonly = true;
|
||||
this.drpUnitWorks.Readonly = true;
|
||||
|
||||
|
||||
this.drpAudit.Readonly = true;
|
||||
|
||||
|
||||
//this.btnAttach.Enabled = false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -237,11 +237,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
designDetails.DesignDetailsId = this.DesignDetailsId;
|
||||
var model = Funs.DB.Comprehensive_DesignDetails.Where(u => u.DesignDetailsId == this.DesignDetailsId).FirstOrDefault();
|
||||
if (model != null)
|
||||
{
|
||||
{
|
||||
designDetails.Status = model.Status;
|
||||
}
|
||||
BLL.DesignDetailsService.UpdateDesignDetails(designDetails);
|
||||
}
|
||||
}
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
@ -399,7 +399,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
reApprove.ApproveDate = DateTime.Now.AddSeconds(10);
|
||||
reApprove.ApproveMan = CurrUser.UserId;
|
||||
reApprove.ApproveType = Const.Comprehensive_Complete;
|
||||
// reApprove.ApproveIdea = txtidea.Text;
|
||||
// reApprove.ApproveIdea = txtidea.Text;
|
||||
DesignDetailsApproveService.EditApprove(reApprove);
|
||||
}
|
||||
else
|
||||
|
@ -439,14 +439,14 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDetails));
|
||||
}
|
||||
Model.Comprehensive_DesignDetails designDetails = BLL.DesignDetailsService.GetDesignDetailsById(this.DesignDetailsId);
|
||||
if (designDetails == null || ((designDetails.CompileMan == CurrUser.UserId && designDetails.Status == BLL.Const.Comprehensive_Compile) || (designDetails.CompileMan == CurrUser.UserId && designDetails.Status == BLL.Const.Comprehensive_ReCompile)))
|
||||
if (designDetails.Status == BLL.Const.Comprehensive_Complete)
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/designDetails&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DesignDetailsMenuId)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/designDetails&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DesignDetailsMenuId)));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/designDetails&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DesignDetailsMenuId)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/designDetails&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DesignDetailsMenuId)));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
|
|
@ -460,6 +460,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
}
|
||||
des.ReceiveMan = pds.Rows[i][10].ToString().Trim(); //接收人
|
||||
des.Remark = pds.Rows[i][11].ToString().Trim();//备注
|
||||
des.Status = BLL.Const.Comprehensive_Compile;
|
||||
des.CompileMan = this.CurrUser.UserId;
|
||||
BLL.DesignDrawingsService.AddDesignDrawings(des);
|
||||
}
|
||||
else
|
||||
|
@ -491,6 +493,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
}
|
||||
oldViewInfo.ReceiveMan = pds.Rows[i][10].ToString().Trim(); //接收人
|
||||
oldViewInfo.Remark = pds.Rows[i][11].ToString().Trim();//备注
|
||||
oldViewInfo.CompileMan = this.CurrUser.UserId;
|
||||
oldViewInfo.Status = BLL.Const.Comprehensive_Compile;
|
||||
BLL.DesignDrawingsService.UpdateDesignDrawings(oldViewInfo);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -437,13 +437,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDrawings));
|
||||
}
|
||||
Model.Comprehensive_DesignDrawings designDrawings = BLL.DesignDrawingsService.GetDesignDrawingsById(this.DesignDrawingsId);
|
||||
if (designDrawings == null || ((designDrawings.CompileMan == CurrUser.UserId && designDrawings.Status == BLL.Const.Comprehensive_Compile) || (designDrawings.CompileMan == CurrUser.UserId && designDrawings.Status == BLL.Const.Comprehensive_ReCompile)))
|
||||
if (designDrawings.Status == BLL.Const.Comprehensive_Complete)
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/designDrawings&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DesignDrawingsMenuId)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/designDrawings&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DesignDrawingsMenuId)));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/designDrawings&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DesignDrawingsMenuId)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/designDrawings&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DesignDrawingsMenuId)));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
|
|
@ -425,6 +425,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
Ins.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionEquipment));
|
||||
Ins.CompileMan = this.CurrUser.UserId;
|
||||
Ins.CompileDate = DateTime.Now.Date;
|
||||
Ins.Status = BLL.Const.Comprehensive_Complete;
|
||||
BLL.InspectionEquipmentService.AddInspectionEquipment(Ins);
|
||||
|
||||
}
|
||||
|
@ -453,6 +454,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
oldViewInfo.RemarkCode = pds.Rows[i][12].ToString().Trim();
|
||||
oldViewInfo.CompileMan = this.CurrUser.UserId;
|
||||
oldViewInfo.CompileDate = DateTime.Now.Date;
|
||||
oldViewInfo.Status = BLL.Const.Comprehensive_Complete;
|
||||
BLL.InspectionEquipmentService.UpdateInspectionEquipment(oldViewInfo);
|
||||
//result += (i + 2).ToString() + "," + "报验编号" + "," + "该单位报验编号已存在!" + "|";
|
||||
}
|
||||
|
|
|
@ -495,14 +495,14 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
this.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionEquipment));
|
||||
}
|
||||
var oldInspectionEquipment = Funs.DB.Comprehensive_InspectionEquipment.Where(u => u.InspectionEquipmentId == this.InspectionEquipmentId).FirstOrDefault();
|
||||
|
||||
//if (oldInspectionEquipment == null || ((oldInspectionEquipment.CompileMan == CurrUser.UserId && oldInspectionEquipment.Status == BLL.Const.Comprehensive_Compile) || (oldInspectionEquipment.CompileMan == CurrUser.UserId && oldInspectionEquipment.Status == BLL.Const.Comprehensive_ReCompile)))
|
||||
//{
|
||||
if (oldInspectionEquipment.Status == BLL.Const.Comprehensive_Complete)
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/InspectionEquipment&menuId={1}", this.InspectionEquipmentId, BLL.Const.InspectionEquipmentMenuId)));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/InspectionEquipment&menuId={1}", this.InspectionEquipmentId, BLL.Const.InspectionEquipmentMenuId)));
|
||||
//}
|
||||
//else
|
||||
//{ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/InspectionEquipment&menuId={1}", this.InspectionEquipmentId, BLL.Const.InspectionEquipmentMenuId)));
|
||||
//}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -490,6 +490,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
Ins.InspectionMachineId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionMachine));
|
||||
Ins.CompileMan = this.CurrUser.UserId;
|
||||
Ins.CompileDate = DateTime.Now.Date;
|
||||
Ins.Status = BLL.Const.Comprehensive_Compile;
|
||||
BLL.InspectionMachineService.AddInspectionMachine(Ins);
|
||||
}
|
||||
else
|
||||
|
@ -540,11 +541,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
|
||||
oldViewInfo.CompileMan = this.CurrUser.UserId;
|
||||
oldViewInfo.CompileDate = DateTime.Now.Date;
|
||||
oldViewInfo.Status = BLL.Const.Comprehensive_Compile;
|
||||
BLL.InspectionMachineService.UpdateInspectionMachine(oldViewInfo);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "单位名称" + "," + "[" + row0 + "]不存在!" + "|";
|
||||
|
|
|
@ -433,14 +433,14 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionMachine));
|
||||
}
|
||||
Model.Comprehensive_InspectionMachine inspectionMachine = BLL.InspectionMachineService.GetInspectionMachineById(this.InspectionMachineId);
|
||||
//if (inspectionMachine == null || ((inspectionMachine.CompileMan == CurrUser.UserId && inspectionMachine.Status == BLL.Const.Comprehensive_Compile) || (inspectionMachine.CompileMan == CurrUser.UserId && inspectionMachine.Status == BLL.Const.Comprehensive_ReCompile)))
|
||||
//{
|
||||
if (inspectionMachine.Status == BLL.Const.Comprehensive_Complete)
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/inspectionMachone&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionMachineMenuId)));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/inspectionMachone&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionMachineMenuId)));
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/inspectionMachone&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionMachineMenuId)));
|
||||
//}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -479,6 +479,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
Ins.InspectionPersonId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson));
|
||||
Ins.CompileMan = this.CurrUser.UserId;
|
||||
Ins.CompileDate = DateTime.Now.Date;
|
||||
Ins.Status = BLL.Const.Comprehensive_Compile;
|
||||
Ins.IsTrain = true;
|
||||
BLL.InspectionPersonService.AddInspectionPerson(Ins);
|
||||
if (pds.Rows[i][4].ToString().Trim() == "焊工")
|
||||
|
@ -537,6 +538,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
|
||||
oldViewInfo.CompileMan = this.CurrUser.UserId;
|
||||
oldViewInfo.CompileDate = DateTime.Now.Date;
|
||||
oldViewInfo.Status = BLL.Const.Comprehensive_Compile;
|
||||
oldViewInfo.IsTrain = true;
|
||||
BLL.InspectionPersonService.UpdateInspectionPerson(oldViewInfo);
|
||||
if (pds.Rows[i][4].ToString().Trim() == "焊工")
|
||||
|
|
|
@ -669,14 +669,14 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson));
|
||||
}
|
||||
Model.Comprehensive_InspectionPerson inspectionPerson = BLL.InspectionPersonService.GetInspectionPersonById(this.InspectionPersonId);
|
||||
//if (inspectionPerson == null || ((inspectionPerson.CompileMan == CurrUser.UserId && inspectionPerson.Status == BLL.Const.Comprehensive_Compile) || (inspectionPerson.CompileMan == CurrUser.UserId && inspectionPerson.Status == BLL.Const.Comprehensive_ReCompile)))
|
||||
//{
|
||||
if (inspectionPerson.Status == BLL.Const.Comprehensive_Complete)
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/inspectionPerson&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionPersonMenuId)));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/inspectionPerson&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionPersonMenuId)));
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/inspectionPerson&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionPersonMenuId)));
|
||||
//}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnNew" Icon="Add" EnablePostBack="true" runat="server" OnClick="btnNew_Click" ToolTip="新增" Hidden="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
@ -105,6 +107,10 @@
|
|||
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
|
||||
Width="900px" Height="460px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window2" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="700px" Height="560px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<Items>
|
||||
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Text="修改" Icon="Pencil" OnClick="btnMenuModify_Click" Hidden="true">
|
||||
|
|
|
@ -253,8 +253,24 @@ namespace FineUIPro.Web.Comprehensive
|
|||
{
|
||||
this.btnMenuDel.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||
{
|
||||
this.btnImport.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导入
|
||||
/// <summary>
|
||||
/// 导入按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("MajorPlanApprovalDataIn.aspx", "导入 - ")));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -102,6 +102,15 @@ namespace FineUIPro.Web.Comprehensive {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
|
@ -156,6 +165,15 @@ namespace FineUIPro.Web.Comprehensive {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MajorPlanApprovalDataIn.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.MajorPlanApprovalDataIn" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>导入超过一定规模的危大施工方案</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" OnCustomEvent="PageManager1_CustomEvent" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:HiddenField ID="hdFileName" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" ToolTip="审核" ValidateForms="SimpleForm1"
|
||||
OnClick="btnAudit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnImport" Icon="ApplicationGet" runat="server" ToolTip="导入" ValidateForms="SimpleForm1"
|
||||
OnClick="btnImport_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载模板" OnClick="btnDownLoad_Click">
|
||||
</f:Button>
|
||||
<f:HiddenField ID="hdCheckResult" runat="server">
|
||||
</f:HiddenField>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:FileUpload runat="server" ID="fuAttachUrl" EmptyText="选择要导入的文件" Label="选择要导入的文件"
|
||||
LabelWidth="150px">
|
||||
</f:FileUpload>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="gvErrorInfo" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="人员报验" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" AllowCellEditing="true" ClicksToEdit="2" AllowSorting="true"
|
||||
SortDirection="DESC" EnableColumnLines="true" ForceFit="true" AllowPaging="true" IsDatabasePaging="true" PageSize="10"
|
||||
EnableRowDoubleClickEvent="true" AllowFilters="true" EnableTextSelection="True">
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblPageIndex" runat="server" Text='<%# gvErrorInfo.PageIndex * gvErrorInfo.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:BoundField DataField="Row" HeaderText="错误行号">
|
||||
</f:BoundField>
|
||||
<f:BoundField DataField="Column" HeaderText="错误列">
|
||||
</f:BoundField>
|
||||
<f:BoundField DataField="Reason" HeaderText="错误类型">
|
||||
</f:BoundField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,483 @@
|
|||
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.CQMS.Comprehensive
|
||||
{
|
||||
public partial class MajorPlanApprovalDataIn : PageBase
|
||||
{
|
||||
#region 定义变量
|
||||
/// <summary>
|
||||
/// 上传预设的虚拟路径
|
||||
/// </summary>
|
||||
private string initPath = Const.ExcelUrl;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 错误集合
|
||||
/// </summary>
|
||||
public static List<Model.ErrorInfo> errorInfos = new List<Model.ErrorInfo>();
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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 审核
|
||||
/// <summary>
|
||||
/// 审核
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAudit_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.fuAttachUrl.HasFile == false)
|
||||
{
|
||||
ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
|
||||
if (IsXls != ".xls")
|
||||
{
|
||||
ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (errorInfos != null)
|
||||
{
|
||||
errorInfos.Clear();
|
||||
}
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string initFullPath = rootPath + initPath;
|
||||
if (!Directory.Exists(initFullPath))
|
||||
{
|
||||
Directory.CreateDirectory(initFullPath);
|
||||
}
|
||||
|
||||
this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls;
|
||||
string filePath = initFullPath + this.hdFileName.Text;
|
||||
this.fuAttachUrl.PostedFile.SaveAs(filePath);
|
||||
ImportXlsToData(rootPath + initPath + this.hdFileName.Text);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
#region 读Excel提取数据
|
||||
/// <summary>
|
||||
/// 从Excel提取数据--》Dataset
|
||||
/// </summary>
|
||||
/// <param name="filename">Excel文件路径名</param>
|
||||
private void ImportXlsToData(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
string oleDBConnString = String.Empty;
|
||||
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
|
||||
oleDBConnString += "Data Source=";
|
||||
oleDBConnString += fileName;
|
||||
oleDBConnString += ";Extended Properties=Excel 8.0;";
|
||||
OleDbConnection oleDBConn = null;
|
||||
OleDbDataAdapter oleAdMaster = null;
|
||||
DataTable m_tableName = new DataTable();
|
||||
DataSet ds = new DataSet();
|
||||
|
||||
oleDBConn = new OleDbConnection(oleDBConnString);
|
||||
oleDBConn.Open();
|
||||
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
|
||||
|
||||
if (m_tableName != null && m_tableName.Rows.Count > 0)
|
||||
{
|
||||
|
||||
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
|
||||
|
||||
}
|
||||
string sqlMaster;
|
||||
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
|
||||
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
|
||||
oleAdMaster.Fill(ds, "m_tableName");
|
||||
oleAdMaster.Dispose();
|
||||
oleDBConn.Close();
|
||||
oleDBConn.Dispose();
|
||||
|
||||
AddDatasetToSQL(ds.Tables[0], 12);
|
||||
hdCheckResult.Text = "1";
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Response.Write(exc);
|
||||
//return null;
|
||||
// return dt;
|
||||
}
|
||||
finally
|
||||
{
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 将Dataset的数据导入数据库
|
||||
/// <summary>
|
||||
/// 将Dataset的数据导入数据库
|
||||
/// </summary>
|
||||
/// <param name="pds">数据集</param>
|
||||
/// <param name="Cols">数据集行数</param>
|
||||
/// <returns></returns>
|
||||
private bool AddDatasetToSQL(DataTable pds, int Cols)
|
||||
{
|
||||
string result = string.Empty;
|
||||
int ic, ir;
|
||||
ic = pds.Columns.Count;
|
||||
if (ic < Cols)
|
||||
{
|
||||
ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
|
||||
ir = pds.Rows.Count;
|
||||
if (pds != null && ir > 0)
|
||||
{
|
||||
var oldViewInfos = from x in Funs.DB.Comprehensive_MajorPlanApproval
|
||||
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;
|
||||
|
||||
var unitWorks = from x in Funs.DB.WBS_UnitWork
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.SuperUnitWork == null
|
||||
select x;
|
||||
|
||||
for (int i = 0; i < ir; i++)
|
||||
{
|
||||
string row0 = pds.Rows[i][0].ToString();
|
||||
if (string.IsNullOrEmpty(row0))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "报批单位" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
var unit = units.Where(x => x.UnitName == row0.Trim()).FirstOrDefault();
|
||||
if (unit == null)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "报批单位" + "," + "[" + row0 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row1 = pds.Rows[i][1].ToString();
|
||||
if (string.IsNullOrEmpty(row1))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "专业名称" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
var cn = cns.Where(x => x.ProfessionalName == row1.Trim()).FirstOrDefault();
|
||||
if (cn == null)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row1 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row2 = pds.Rows[i][2].ToString();
|
||||
if (!string.IsNullOrEmpty(row2))
|
||||
{
|
||||
string[] reunit = row2.Split(',');
|
||||
foreach (string unitWork in reunit)
|
||||
{
|
||||
var u = unitWorks.Where(x => x.UnitWorkName == unitWork.Trim()).FirstOrDefault();
|
||||
if (u == null)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "单位工程名称" + "," + "[" + unitWork.Trim() + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string row3 = pds.Rows[i][3].ToString();
|
||||
if (string.IsNullOrEmpty(row3))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "编号" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
|
||||
string row6= pds.Rows[i][6].ToString();
|
||||
if (!string.IsNullOrEmpty(row6))
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime d = Convert.ToDateTime(row6);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "审批日期" + "," + "[" + row6 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
string row10 = pds.Rows[i][10].ToString();
|
||||
if (row10 != "是" && row10 != "否")
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "是否通过专家评审" + "," + "[" + row10 + "]错误!" + "|";
|
||||
}
|
||||
|
||||
string row11 = pds.Rows[i][11].ToString();
|
||||
if (string.IsNullOrEmpty(row11))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
result = result.Substring(0, result.LastIndexOf("|"));
|
||||
}
|
||||
errorInfos.Clear();
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
string results = result;
|
||||
List<string> errorInfoList = results.Split('|').ToList();
|
||||
foreach (var item in errorInfoList)
|
||||
{
|
||||
string[] errors = item.Split(',');
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = errors[0];
|
||||
errorInfo.Column = errors[1];
|
||||
errorInfo.Reason = errors[2];
|
||||
errorInfos.Add(errorInfo);
|
||||
}
|
||||
if (errorInfos.Count > 0)
|
||||
{
|
||||
this.gvErrorInfo.DataSource = errorInfos;
|
||||
this.gvErrorInfo.DataBind();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 导入
|
||||
/// <summary>
|
||||
/// 导入
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(hdCheckResult.Text))
|
||||
{
|
||||
if (errorInfos.Count <= 0)
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
|
||||
hdCheckResult.Text = string.Empty;
|
||||
ShowNotify("导入成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
#region Excel提取数据
|
||||
/// <summary>
|
||||
/// 从Excel提取数据--》Dataset
|
||||
/// </summary>
|
||||
/// <param name="filename">Excel文件路径名</param>
|
||||
private void ImportXlsToData2(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
string oleDBConnString = String.Empty;
|
||||
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
|
||||
oleDBConnString += "Data Source=";
|
||||
oleDBConnString += fileName;
|
||||
oleDBConnString += ";Extended Properties=Excel 8.0;";
|
||||
OleDbConnection oleDBConn = null;
|
||||
OleDbDataAdapter oleAdMaster = null;
|
||||
DataTable m_tableName = new DataTable();
|
||||
DataSet ds = new DataSet();
|
||||
|
||||
oleDBConn = new OleDbConnection(oleDBConnString);
|
||||
oleDBConn.Open();
|
||||
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
|
||||
|
||||
if (m_tableName != null && m_tableName.Rows.Count > 0)
|
||||
{
|
||||
|
||||
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
|
||||
|
||||
}
|
||||
string sqlMaster;
|
||||
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
|
||||
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
|
||||
oleAdMaster.Fill(ds, "m_tableName");
|
||||
oleAdMaster.Dispose();
|
||||
oleDBConn.Close();
|
||||
oleDBConn.Dispose();
|
||||
|
||||
AddDatasetToSQL2(ds.Tables[0], 12);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 将Dataset的数据导入数据库
|
||||
/// <summary>
|
||||
/// 将Dataset的数据导入数据库
|
||||
/// </summary>
|
||||
/// <param name="pds">数据集</param>
|
||||
/// <param name="Cols">数据集列数</param>
|
||||
/// <returns></returns>
|
||||
private bool AddDatasetToSQL2(DataTable pds, int Cols)
|
||||
{
|
||||
int ic, ir;
|
||||
ic = pds.Columns.Count;
|
||||
if (ic < Cols)
|
||||
{
|
||||
ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
|
||||
}
|
||||
string result = string.Empty;
|
||||
ir = pds.Rows.Count;
|
||||
if (pds != null && ir > 0)
|
||||
{
|
||||
var oldViewInfos = from x in Funs.DB.Comprehensive_MajorPlanApproval
|
||||
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;
|
||||
|
||||
var unitWorks = from x in Funs.DB.WBS_UnitWork
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.SuperUnitWork == null
|
||||
select x;
|
||||
|
||||
for (int i = 0; i < ir; i++)
|
||||
{
|
||||
Model.Comprehensive_MajorPlanApproval oldViewInfo = new Model.Comprehensive_MajorPlanApproval();
|
||||
string row0 = pds.Rows[i][0].ToString().Trim();
|
||||
string row1 = pds.Rows[i][1].ToString().Trim();
|
||||
var cn = cns.Where(y => y.ProfessionalName == row1).FirstOrDefault();
|
||||
oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == pds.Rows[i][11].ToString().Trim()
|
||||
).FirstOrDefault();
|
||||
if (oldViewInfo == null)
|
||||
{
|
||||
Model.Comprehensive_MajorPlanApproval des = new Model.Comprehensive_MajorPlanApproval();
|
||||
des.MajorPlanApprovalId = SQLHelper.GetNewID(typeof(Model.Comprehensive_MajorPlanApproval));
|
||||
des.ProjectId = this.CurrUser.LoginProjectId;
|
||||
des.UnitId = units.Where(x => x.UnitName == row0.Trim()).FirstOrDefault().UnitId;
|
||||
des.CNProfessionalId = cn.CNProfessionalId;
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][2].ToString().Trim()))
|
||||
{
|
||||
des.UnitWorkId = BLL.UnitWorkService.GetUnitWorkIdsByUnitWorkNames(this.CurrUser.LoginProjectId, pds.Rows[i][2].ToString().Trim());
|
||||
}
|
||||
des.PlanCode= pds.Rows[i][3].ToString().Trim();
|
||||
des.PlanName= pds.Rows[i][4].ToString().Trim();
|
||||
des.ReviewMan = pds.Rows[i][5].ToString().Trim();
|
||||
des.ApprovalDate = Funs.GetNewDateTime(pds.Rows[i][6].ToString().Trim());
|
||||
des.AuditMan = pds.Rows[i][7].ToString().Trim();
|
||||
des.ApprovalMan = pds.Rows[i][8].ToString().Trim();
|
||||
des.ExpertReviewMan = pds.Rows[i][9].ToString().Trim();
|
||||
des.IsReview = pds.Rows[i][10].ToString().Trim() == "是" ? true : false;
|
||||
des.RemarkCode = pds.Rows[i][11].ToString().Trim();
|
||||
des.CompileMan = this.CurrUser.UserId;
|
||||
des.CompileDate = DateTime.Now;
|
||||
BLL.MajorPlanApprovalService.AddMajorPlanApproval(des);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 下载模板
|
||||
/// <summary>
|
||||
/// 下载模板按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDownLoad_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载导入模板
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
|
||||
{
|
||||
if (e.EventArgument == "Confirm_OK")
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string uploadfilepath = rootPath + Const.MajorPlanApprovalTemplateUrl;
|
||||
string filePath = Const.MajorPlanApprovalTemplateUrl;
|
||||
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
|
||||
}
|
||||
}
|
|
@ -10,7 +10,7 @@
|
|||
namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
|
||||
|
||||
public partial class TrainingRecordsDataInEdit {
|
||||
public partial class MajorPlanApprovalDataIn {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
|
@ -40,111 +40,84 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
|
|||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// hdFileName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
protected global::FineUIPro.HiddenField hdFileName;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// btnAudit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
protected global::FineUIPro.Button btnAudit;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue1 控件。
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue1;
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue2 控件。
|
||||
/// btnDownLoad 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue2;
|
||||
protected global::FineUIPro.Button btnDownLoad;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue3 控件。
|
||||
/// hdCheckResult 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue3;
|
||||
protected global::FineUIPro.HiddenField hdCheckResult;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue4 控件。
|
||||
/// fuAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue4;
|
||||
protected global::FineUIPro.FileUpload fuAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue5 控件。
|
||||
/// gvErrorInfo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue5;
|
||||
protected global::FineUIPro.Grid gvErrorInfo;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue6 控件。
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue6;
|
||||
|
||||
/// <summary>
|
||||
/// txtValue7 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtValue7;
|
||||
|
||||
/// <summary>
|
||||
/// ckAll 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckAll;
|
||||
|
||||
/// <summary>
|
||||
/// lbErrCout 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea lbErrCout;
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
}
|
||||
}
|
|
@ -16,7 +16,7 @@
|
|||
<Items>
|
||||
<f:DropDownList ID="drpUnitId" runat="server" Label="报批单位" Required="true" ShowRedStar="true" LabelWidth="130px" LabelAlign="right">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpCNProfessionalId" runat="server" Label="专业" LabelWidth="130px" LabelAlign="right"></f:DropDownList>
|
||||
<f:DropDownList ID="drpCNProfessionalId" runat="server" Label="专业" Required="true" ShowRedStar="true" LabelWidth="130px" LabelAlign="right"></f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
|
|
|
@ -496,10 +496,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
des.CompleteDate = Convert.ToDateTime(pds.Rows[i][12].ToString().Trim());
|
||||
}
|
||||
des.RemarkCode = pds.Rows[i][13].ToString().Trim();
|
||||
des.Status = BLL.Const.Comprehensive_Compile;
|
||||
des.CompileMan = this.CurrUser.UserId;
|
||||
BLL.NCRManagementService.AddNCRManagement(des);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -301,9 +301,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
}
|
||||
BLL.NCRManagementService.UpdateNCRManagement(nCRManagement);
|
||||
}
|
||||
|
||||
|
||||
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
@ -394,12 +391,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
nCRManagement.NCRManagementId = SQLHelper.GetNewID(typeof(Model.Comprehensive_NCRManagement));
|
||||
this.hdAttachUrl.Text = nCRManagement.NCRManagementId;
|
||||
}
|
||||
var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == nCRManagement.NCRManagementId);
|
||||
if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
|
||||
{
|
||||
Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == nCRManagement.NCRManagementId);
|
||||
//if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
|
||||
//{
|
||||
// Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
nCRManagement.CompileMan = this.CurrUser.UserId;
|
||||
nCRManagement.Status = BLL.Const.Comprehensive_Audit;
|
||||
BLL.NCRManagementService.AddNCRManagement(nCRManagement);
|
||||
|
@ -407,12 +404,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
else
|
||||
{
|
||||
nCRManagement.NCRManagementId = this.NCRManagementId;
|
||||
var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.NCRManagementId);
|
||||
if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
|
||||
{
|
||||
Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.NCRManagementId);
|
||||
//if (sour == null || string.IsNullOrEmpty(sour.AttachUrl))
|
||||
//{
|
||||
// Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
//BLL.NCRManagementService.UpdateNCRManagement(nCRManagement);
|
||||
var oldNCRManagement = Funs.DB.Comprehensive_NCRManagement.Where(u => u.NCRManagementId == this.NCRManagementId).FirstOrDefault();
|
||||
if (oldNCRManagement == null) //数据库没有记录 直接点提交 当前状态为 审核状态
|
||||
|
@ -532,13 +529,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_NCRManagement));
|
||||
}
|
||||
Model.Comprehensive_NCRManagement nCRManagement = BLL.NCRManagementService.GetNCRManagementById(this.NCRManagementId);
|
||||
if (nCRManagement == null || ((nCRManagement.CompileMan == CurrUser.UserId && nCRManagement.Status == BLL.Const.Comprehensive_Compile) || (nCRManagement.CompileMan == CurrUser.UserId && nCRManagement.Status == BLL.Const.Comprehensive_ReCompile)))
|
||||
if (nCRManagement.Status == BLL.Const.Comprehensive_Complete)
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/nCRManagement&menuId={1}", this.hdAttachUrl.Text, BLL.Const.NCRManagementMenuId)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/nCRManagement&menuId={1}", this.hdAttachUrl.Text, BLL.Const.NCRManagementMenuId)));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/nCRManagement&menuId={1}", this.hdAttachUrl.Text, BLL.Const.NCRManagementMenuId)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/nCRManagement&menuId={1}", this.hdAttachUrl.Text, BLL.Const.NCRManagementMenuId)));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnNew" Icon="Add" EnablePostBack="true" runat="server" OnClick="btnNew_Click" ToolTip="新增" Hidden="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
@ -61,17 +63,17 @@
|
|||
<f:RenderField ColumnID="IssuedReportNumber" DataField="IssuedReportNumber" FieldType="String" HeaderText="已初具监检报告条数" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="180px">
|
||||
</f:RenderField>
|
||||
<f:TemplateField ColumnID="Status" Width="120px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<f:TemplateField ColumnID="Status" Width="120px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="txtStatus" runat="server" Text='<%# ConvertState(Eval("Status")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="PressurePipeId" DataIFrameUrlFormatString="./PressurePipeApprove.aspx?Id={0}"/>
|
||||
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" >
|
||||
<f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt"
|
||||
Text="审批列表" ToolTip="审批列表" DataIFrameUrlFields="PressurePipeId" DataIFrameUrlFormatString="./PressurePipeApprove.aspx?Id={0}" />
|
||||
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
|
||||
Text='<%# BLL.AttachFileService.GetBtnFileUrl(Eval("PressurePipeId")) %>' ToolTip="附件查看"></asp:LinkButton>
|
||||
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
|
||||
Text='<%# BLL.AttachFileService.GetBtnFileUrl(Eval("PressurePipeId")) %>' ToolTip="附件查看"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
</Columns>
|
||||
|
@ -96,7 +98,11 @@
|
|||
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
|
||||
Width="900px" Height="320px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true"
|
||||
<f:Window ID="Window2" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="700px" Height="560px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Parent" EnableResize="false" runat="server"
|
||||
IsModal="true" Width="700px" Height="500px">
|
||||
</f:Window>
|
||||
|
|
|
@ -224,6 +224,10 @@ namespace FineUIPro.Web.Comprehensive
|
|||
{
|
||||
this.btnMenuDel.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||
{
|
||||
this.btnImport.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
@ -256,5 +260,17 @@ namespace FineUIPro.Web.Comprehensive
|
|||
|
||||
return "编制";
|
||||
}
|
||||
|
||||
#region 导入
|
||||
/// <summary>
|
||||
/// 导入按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("PressurePipeDataIn.aspx", "导入 - ")));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -7,13 +7,11 @@
|
|||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.Comprehensive
|
||||
{
|
||||
|
||||
|
||||
public partial class PressurePipe
|
||||
{
|
||||
|
||||
namespace FineUIPro.Web.Comprehensive {
|
||||
|
||||
|
||||
public partial class PressurePipe {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
|
@ -22,7 +20,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
|
@ -31,7 +29,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
|
@ -40,7 +38,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
|
@ -49,7 +47,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolSearch 控件。
|
||||
/// </summary>
|
||||
|
@ -58,7 +56,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar ToolSearch;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// sdrpUnitId 控件。
|
||||
/// </summary>
|
||||
|
@ -67,7 +65,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList sdrpUnitId;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnSearch 控件。
|
||||
/// </summary>
|
||||
|
@ -76,7 +74,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSearch;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
|
@ -85,7 +83,16 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
|
@ -94,7 +101,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtStatus 控件。
|
||||
/// </summary>
|
||||
|
@ -103,7 +110,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label txtStatus;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
|
@ -112,7 +119,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
|
@ -121,7 +128,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
|
@ -130,7 +137,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
|
@ -139,7 +146,16 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
|
@ -148,7 +164,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
|
@ -157,7 +173,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuModify 控件。
|
||||
/// </summary>
|
||||
|
@ -166,7 +182,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuModify;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDel 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PressurePipeDataIn.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.PressurePipeDataIn" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>导入压力管道管理</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" OnCustomEvent="PageManager1_CustomEvent" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:HiddenField ID="hdFileName" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" ToolTip="审核" ValidateForms="SimpleForm1"
|
||||
OnClick="btnAudit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnImport" Icon="ApplicationGet" runat="server" ToolTip="导入" ValidateForms="SimpleForm1"
|
||||
OnClick="btnImport_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载模板" OnClick="btnDownLoad_Click">
|
||||
</f:Button>
|
||||
<f:HiddenField ID="hdCheckResult" runat="server">
|
||||
</f:HiddenField>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:FileUpload runat="server" ID="fuAttachUrl" EmptyText="选择要导入的文件" Label="选择要导入的文件"
|
||||
LabelWidth="150px">
|
||||
</f:FileUpload>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="gvErrorInfo" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="人员报验" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" AllowCellEditing="true" ClicksToEdit="2" AllowSorting="true"
|
||||
SortDirection="DESC" EnableColumnLines="true" ForceFit="true" AllowPaging="true" IsDatabasePaging="true" PageSize="10"
|
||||
EnableRowDoubleClickEvent="true" AllowFilters="true" EnableTextSelection="True">
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblPageIndex" runat="server" Text='<%# gvErrorInfo.PageIndex * gvErrorInfo.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:BoundField DataField="Row" HeaderText="错误行号">
|
||||
</f:BoundField>
|
||||
<f:BoundField DataField="Column" HeaderText="错误列">
|
||||
</f:BoundField>
|
||||
<f:BoundField DataField="Reason" HeaderText="错误类型">
|
||||
</f:BoundField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,500 @@
|
|||
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.CQMS.Comprehensive
|
||||
{
|
||||
public partial class PressurePipeDataIn : PageBase
|
||||
{
|
||||
#region 定义变量
|
||||
/// <summary>
|
||||
/// 上传预设的虚拟路径
|
||||
/// </summary>
|
||||
private string initPath = Const.ExcelUrl;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 错误集合
|
||||
/// </summary>
|
||||
public static List<Model.ErrorInfo> errorInfos = new List<Model.ErrorInfo>();
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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 审核
|
||||
/// <summary>
|
||||
/// 审核
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAudit_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.fuAttachUrl.HasFile == false)
|
||||
{
|
||||
ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
|
||||
if (IsXls != ".xls")
|
||||
{
|
||||
ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (errorInfos != null)
|
||||
{
|
||||
errorInfos.Clear();
|
||||
}
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string initFullPath = rootPath + initPath;
|
||||
if (!Directory.Exists(initFullPath))
|
||||
{
|
||||
Directory.CreateDirectory(initFullPath);
|
||||
}
|
||||
|
||||
this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls;
|
||||
string filePath = initFullPath + this.hdFileName.Text;
|
||||
this.fuAttachUrl.PostedFile.SaveAs(filePath);
|
||||
ImportXlsToData(rootPath + initPath + this.hdFileName.Text);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
#region 读Excel提取数据
|
||||
/// <summary>
|
||||
/// 从Excel提取数据--》Dataset
|
||||
/// </summary>
|
||||
/// <param name="filename">Excel文件路径名</param>
|
||||
private void ImportXlsToData(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
string oleDBConnString = String.Empty;
|
||||
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
|
||||
oleDBConnString += "Data Source=";
|
||||
oleDBConnString += fileName;
|
||||
oleDBConnString += ";Extended Properties=Excel 8.0;";
|
||||
OleDbConnection oleDBConn = null;
|
||||
OleDbDataAdapter oleAdMaster = null;
|
||||
DataTable m_tableName = new DataTable();
|
||||
DataSet ds = new DataSet();
|
||||
|
||||
oleDBConn = new OleDbConnection(oleDBConnString);
|
||||
oleDBConn.Open();
|
||||
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
|
||||
|
||||
if (m_tableName != null && m_tableName.Rows.Count > 0)
|
||||
{
|
||||
|
||||
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
|
||||
|
||||
}
|
||||
string sqlMaster;
|
||||
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
|
||||
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
|
||||
oleAdMaster.Fill(ds, "m_tableName");
|
||||
oleAdMaster.Dispose();
|
||||
oleDBConn.Close();
|
||||
oleDBConn.Dispose();
|
||||
|
||||
AddDatasetToSQL(ds.Tables[0], 9);
|
||||
hdCheckResult.Text = "1";
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Response.Write(exc);
|
||||
//return null;
|
||||
// return dt;
|
||||
}
|
||||
finally
|
||||
{
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 将Dataset的数据导入数据库
|
||||
/// <summary>
|
||||
/// 将Dataset的数据导入数据库
|
||||
/// </summary>
|
||||
/// <param name="pds">数据集</param>
|
||||
/// <param name="Cols">数据集行数</param>
|
||||
/// <returns></returns>
|
||||
private bool AddDatasetToSQL(DataTable pds, int Cols)
|
||||
{
|
||||
string result = string.Empty;
|
||||
int ic, ir;
|
||||
ic = pds.Columns.Count;
|
||||
if (ic < Cols)
|
||||
{
|
||||
ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
|
||||
ir = pds.Rows.Count;
|
||||
if (pds != null && ir > 0)
|
||||
{
|
||||
var oldViewInfos = from x in Funs.DB.Comprehensive_PressurePipe
|
||||
where x.Projctid == 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;
|
||||
|
||||
for (int i = 0; i < ir; i++)
|
||||
{
|
||||
string row0 = pds.Rows[i][0].ToString();
|
||||
if (string.IsNullOrEmpty(row0))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "所属单位" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
var unit = units.Where(x => x.UnitName == row0.Trim()).FirstOrDefault();
|
||||
if (unit == null)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "所属单位" + "," + "[" + row0 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row1 = pds.Rows[i][1].ToString();
|
||||
if (!string.IsNullOrEmpty(row1))
|
||||
{
|
||||
try
|
||||
{
|
||||
int c = Convert.ToInt32(row1);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "预计压力管道条数" + "," + "[" + row1 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row2 = pds.Rows[i][2].ToString();
|
||||
if (!string.IsNullOrEmpty(row2))
|
||||
{
|
||||
try
|
||||
{
|
||||
int c = Convert.ToInt32(row2);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "实际压力管道条数" + "," + "[" + row2 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row3 = pds.Rows[i][3].ToString();
|
||||
if (!string.IsNullOrEmpty(row3))
|
||||
{
|
||||
try
|
||||
{
|
||||
int c = Convert.ToInt32(row3);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "试压包数量" + "," + "[" + row3 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row4 = pds.Rows[i][4].ToString();
|
||||
if (!string.IsNullOrEmpty(row4))
|
||||
{
|
||||
try
|
||||
{
|
||||
int c = Convert.ToInt32(row4);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "已完成试压包数量" + "," + "[" + row4 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row5 = pds.Rows[i][5].ToString();
|
||||
if (!string.IsNullOrEmpty(row5))
|
||||
{
|
||||
try
|
||||
{
|
||||
int c = Convert.ToInt32(row5);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "已完成试压压力管道条数" + "," + "[" + row5 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row6 = pds.Rows[i][6].ToString();
|
||||
if (!string.IsNullOrEmpty(row6))
|
||||
{
|
||||
try
|
||||
{
|
||||
int c = Convert.ToInt32(row6);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "已完成监检报告条数" + "," + "[" + row6 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row7 = pds.Rows[i][7].ToString();
|
||||
if (!string.IsNullOrEmpty(row7))
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime d = Convert.ToDateTime(row7);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "填报日期" + "," + "[" + row7 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row8 = pds.Rows[i][8].ToString();
|
||||
if (string.IsNullOrEmpty(row8))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
result = result.Substring(0, result.LastIndexOf("|"));
|
||||
}
|
||||
errorInfos.Clear();
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
string results = result;
|
||||
List<string> errorInfoList = results.Split('|').ToList();
|
||||
foreach (var item in errorInfoList)
|
||||
{
|
||||
string[] errors = item.Split(',');
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = errors[0];
|
||||
errorInfo.Column = errors[1];
|
||||
errorInfo.Reason = errors[2];
|
||||
errorInfos.Add(errorInfo);
|
||||
}
|
||||
if (errorInfos.Count > 0)
|
||||
{
|
||||
this.gvErrorInfo.DataSource = errorInfos;
|
||||
this.gvErrorInfo.DataBind();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 导入
|
||||
/// <summary>
|
||||
/// 导入
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(hdCheckResult.Text))
|
||||
{
|
||||
if (errorInfos.Count <= 0)
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
|
||||
hdCheckResult.Text = string.Empty;
|
||||
ShowNotify("导入成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
#region Excel提取数据
|
||||
/// <summary>
|
||||
/// 从Excel提取数据--》Dataset
|
||||
/// </summary>
|
||||
/// <param name="filename">Excel文件路径名</param>
|
||||
private void ImportXlsToData2(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
string oleDBConnString = String.Empty;
|
||||
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
|
||||
oleDBConnString += "Data Source=";
|
||||
oleDBConnString += fileName;
|
||||
oleDBConnString += ";Extended Properties=Excel 8.0;";
|
||||
OleDbConnection oleDBConn = null;
|
||||
OleDbDataAdapter oleAdMaster = null;
|
||||
DataTable m_tableName = new DataTable();
|
||||
DataSet ds = new DataSet();
|
||||
|
||||
oleDBConn = new OleDbConnection(oleDBConnString);
|
||||
oleDBConn.Open();
|
||||
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
|
||||
|
||||
if (m_tableName != null && m_tableName.Rows.Count > 0)
|
||||
{
|
||||
|
||||
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
|
||||
|
||||
}
|
||||
string sqlMaster;
|
||||
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
|
||||
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
|
||||
oleAdMaster.Fill(ds, "m_tableName");
|
||||
oleAdMaster.Dispose();
|
||||
oleDBConn.Close();
|
||||
oleDBConn.Dispose();
|
||||
|
||||
AddDatasetToSQL2(ds.Tables[0], 9);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 将Dataset的数据导入数据库
|
||||
/// <summary>
|
||||
/// 将Dataset的数据导入数据库
|
||||
/// </summary>
|
||||
/// <param name="pds">数据集</param>
|
||||
/// <param name="Cols">数据集列数</param>
|
||||
/// <returns></returns>
|
||||
private bool AddDatasetToSQL2(DataTable pds, int Cols)
|
||||
{
|
||||
int ic, ir;
|
||||
ic = pds.Columns.Count;
|
||||
if (ic < Cols)
|
||||
{
|
||||
ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
|
||||
}
|
||||
string result = string.Empty;
|
||||
ir = pds.Rows.Count;
|
||||
if (pds != null && ir > 0)
|
||||
{
|
||||
var oldViewInfos = from x in Funs.DB.Comprehensive_PressurePipe
|
||||
where x.Projctid == 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;
|
||||
|
||||
for (int i = 0; i < ir; i++)
|
||||
{
|
||||
Model.Comprehensive_PressurePipe oldViewInfo = new Model.Comprehensive_PressurePipe();
|
||||
string row0 = pds.Rows[i][0].ToString().Trim();
|
||||
oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == pds.Rows[i][8].ToString().Trim()
|
||||
).FirstOrDefault();
|
||||
if (oldViewInfo == null)
|
||||
{
|
||||
Model.Comprehensive_PressurePipe des = new Model.Comprehensive_PressurePipe();
|
||||
des.PressurePipeId = SQLHelper.GetNewID(typeof(Model.Comprehensive_PressurePipe));
|
||||
des.Projctid = this.CurrUser.LoginProjectId;
|
||||
des.UnitId = units.Where(x => x.UnitName == row0.Trim()).FirstOrDefault().UnitId;
|
||||
des.EstimateNumber = Funs.GetNewInt(pds.Rows[i][1].ToString().Trim());
|
||||
des.ActualNumber = Funs.GetNewInt(pds.Rows[i][2].ToString().Trim());
|
||||
des.PackageNumber = Funs.GetNewInt(pds.Rows[i][3].ToString().Trim());
|
||||
des.CompletePackageNumber = Funs.GetNewInt(pds.Rows[i][4].ToString().Trim());
|
||||
des.PressurePipeNumber = Funs.GetNewInt(pds.Rows[i][5].ToString().Trim());
|
||||
des.IssuedReportNumber = Funs.GetNewInt(pds.Rows[i][6].ToString().Trim());
|
||||
des.ReportTime = Funs.GetNewDateTime(pds.Rows[i][7].ToString().Trim());
|
||||
des.RemarkCode = pds.Rows[i][8].ToString().Trim();
|
||||
des.CompileMan = this.CurrUser.UserId;
|
||||
des.Status = BLL.Const.Comprehensive_Compile;
|
||||
BLL.PressurePipeService.AddPressurePipe(des);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 下载模板
|
||||
/// <summary>
|
||||
/// 下载模板按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDownLoad_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载导入模板
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
|
||||
{
|
||||
if (e.EventArgument == "Confirm_OK")
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string uploadfilepath = rootPath + Const.PressurePipeTemplateUrl;
|
||||
string filePath = Const.PressurePipeTemplateUrl;
|
||||
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
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
|
||||
|
||||
public partial class PressurePipeDataIn {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// hdFileName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdFileName;
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAudit;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// btnDownLoad 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDownLoad;
|
||||
|
||||
/// <summary>
|
||||
/// hdCheckResult 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdCheckResult;
|
||||
|
||||
/// <summary>
|
||||
/// fuAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FileUpload fuAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// gvErrorInfo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid gvErrorInfo;
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
}
|
||||
}
|
|
@ -25,6 +25,8 @@
|
|||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnNew" Icon="Add" ToolTip="新增" Hidden="true" EnablePostBack="true" runat="server" OnClick="btnNew_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
@ -95,6 +97,10 @@
|
|||
<f:Window ID="Window1" Title="质量事故处理记录" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
|
||||
Width="900px" Height="670px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window2" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="700px" Height="560px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Parent" EnableResize="false" runat="server"
|
||||
|
|
|
@ -234,6 +234,10 @@ namespace FineUIPro.Web.Comprehensive
|
|||
{
|
||||
this.btnMenuDel.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||
{
|
||||
this.btnImport.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
@ -266,5 +270,17 @@ namespace FineUIPro.Web.Comprehensive
|
|||
|
||||
return "编制";
|
||||
}
|
||||
|
||||
#region 导入
|
||||
/// <summary>
|
||||
/// 导入按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("QualityAccidentDataIn.aspx", "导入 - ")));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -7,13 +7,11 @@
|
|||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.Comprehensive
|
||||
{
|
||||
|
||||
|
||||
public partial class QualityAccident
|
||||
{
|
||||
|
||||
namespace FineUIPro.Web.Comprehensive {
|
||||
|
||||
|
||||
public partial class QualityAccident {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
|
@ -22,7 +20,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
|
@ -31,7 +29,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
|
@ -40,7 +38,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
|
@ -49,7 +47,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolSearch 控件。
|
||||
/// </summary>
|
||||
|
@ -58,7 +56,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar ToolSearch;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
|
@ -67,7 +65,16 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
|
@ -76,7 +83,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Label2 控件。
|
||||
/// </summary>
|
||||
|
@ -85,7 +92,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtStatus 控件。
|
||||
/// </summary>
|
||||
|
@ -94,7 +101,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label txtStatus;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
|
@ -103,7 +110,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
|
@ -112,7 +119,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
|
@ -121,7 +128,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
|
@ -130,7 +137,16 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
|
@ -139,7 +155,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
|
@ -148,7 +164,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuModify 控件。
|
||||
/// </summary>
|
||||
|
@ -157,7 +173,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuModify;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDel 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityAccidentDataIn.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.QualityAccidentDataIn" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>导入质量事故处理记录</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" OnCustomEvent="PageManager1_CustomEvent" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:HiddenField ID="hdFileName" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" ToolTip="审核" ValidateForms="SimpleForm1"
|
||||
OnClick="btnAudit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnImport" Icon="ApplicationGet" runat="server" ToolTip="导入" ValidateForms="SimpleForm1"
|
||||
OnClick="btnImport_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载模板" OnClick="btnDownLoad_Click">
|
||||
</f:Button>
|
||||
<f:HiddenField ID="hdCheckResult" runat="server">
|
||||
</f:HiddenField>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:FileUpload runat="server" ID="fuAttachUrl" EmptyText="选择要导入的文件" Label="选择要导入的文件"
|
||||
LabelWidth="150px">
|
||||
</f:FileUpload>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="gvErrorInfo" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="人员报验" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" AllowCellEditing="true" ClicksToEdit="2" AllowSorting="true"
|
||||
SortDirection="DESC" EnableColumnLines="true" ForceFit="true" AllowPaging="true" IsDatabasePaging="true" PageSize="10"
|
||||
EnableRowDoubleClickEvent="true" AllowFilters="true" EnableTextSelection="True">
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblPageIndex" runat="server" Text='<%# gvErrorInfo.PageIndex * gvErrorInfo.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:BoundField DataField="Row" HeaderText="错误行号">
|
||||
</f:BoundField>
|
||||
<f:BoundField DataField="Column" HeaderText="错误列">
|
||||
</f:BoundField>
|
||||
<f:BoundField DataField="Reason" HeaderText="错误类型">
|
||||
</f:BoundField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,450 @@
|
|||
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.CQMS.Comprehensive
|
||||
{
|
||||
public partial class QualityAccidentDataIn : PageBase
|
||||
{
|
||||
#region 定义变量
|
||||
/// <summary>
|
||||
/// 上传预设的虚拟路径
|
||||
/// </summary>
|
||||
private string initPath = Const.ExcelUrl;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 错误集合
|
||||
/// </summary>
|
||||
public static List<Model.ErrorInfo> errorInfos = new List<Model.ErrorInfo>();
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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 审核
|
||||
/// <summary>
|
||||
/// 审核
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAudit_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.fuAttachUrl.HasFile == false)
|
||||
{
|
||||
ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
|
||||
if (IsXls != ".xls")
|
||||
{
|
||||
ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (errorInfos != null)
|
||||
{
|
||||
errorInfos.Clear();
|
||||
}
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string initFullPath = rootPath + initPath;
|
||||
if (!Directory.Exists(initFullPath))
|
||||
{
|
||||
Directory.CreateDirectory(initFullPath);
|
||||
}
|
||||
|
||||
this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls;
|
||||
string filePath = initFullPath + this.hdFileName.Text;
|
||||
this.fuAttachUrl.PostedFile.SaveAs(filePath);
|
||||
ImportXlsToData(rootPath + initPath + this.hdFileName.Text);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
#region 读Excel提取数据
|
||||
/// <summary>
|
||||
/// 从Excel提取数据--》Dataset
|
||||
/// </summary>
|
||||
/// <param name="filename">Excel文件路径名</param>
|
||||
private void ImportXlsToData(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
string oleDBConnString = String.Empty;
|
||||
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
|
||||
oleDBConnString += "Data Source=";
|
||||
oleDBConnString += fileName;
|
||||
oleDBConnString += ";Extended Properties=Excel 8.0;";
|
||||
OleDbConnection oleDBConn = null;
|
||||
OleDbDataAdapter oleAdMaster = null;
|
||||
DataTable m_tableName = new DataTable();
|
||||
DataSet ds = new DataSet();
|
||||
|
||||
oleDBConn = new OleDbConnection(oleDBConnString);
|
||||
oleDBConn.Open();
|
||||
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
|
||||
|
||||
if (m_tableName != null && m_tableName.Rows.Count > 0)
|
||||
{
|
||||
|
||||
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
|
||||
|
||||
}
|
||||
string sqlMaster;
|
||||
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
|
||||
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
|
||||
oleAdMaster.Fill(ds, "m_tableName");
|
||||
oleAdMaster.Dispose();
|
||||
oleDBConn.Close();
|
||||
oleDBConn.Dispose();
|
||||
|
||||
AddDatasetToSQL(ds.Tables[0], 9);
|
||||
hdCheckResult.Text = "1";
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Response.Write(exc);
|
||||
//return null;
|
||||
// return dt;
|
||||
}
|
||||
finally
|
||||
{
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 将Dataset的数据导入数据库
|
||||
/// <summary>
|
||||
/// 将Dataset的数据导入数据库
|
||||
/// </summary>
|
||||
/// <param name="pds">数据集</param>
|
||||
/// <param name="Cols">数据集行数</param>
|
||||
/// <returns></returns>
|
||||
private bool AddDatasetToSQL(DataTable pds, int Cols)
|
||||
{
|
||||
string result = string.Empty;
|
||||
int ic, ir;
|
||||
ic = pds.Columns.Count;
|
||||
if (ic < Cols)
|
||||
{
|
||||
ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
|
||||
ir = pds.Rows.Count;
|
||||
if (pds != null && ir > 0)
|
||||
{
|
||||
var oldViewInfos = from x in Funs.DB.Comprehensive_QualityAccident
|
||||
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 unitWorks = from x in Funs.DB.WBS_UnitWork
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.SuperUnitWork == null
|
||||
select x;
|
||||
|
||||
for (int i = 0; i < ir; i++)
|
||||
{
|
||||
string row0 = pds.Rows[i][0].ToString();
|
||||
if (string.IsNullOrEmpty(row0))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "责任单位" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
var unit = units.Where(x => x.UnitName == row0.Trim()).FirstOrDefault();
|
||||
if (unit == null)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "责任单位" + "," + "[" + row0 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row1 = pds.Rows[i][1].ToString();
|
||||
if (!string.IsNullOrEmpty(row1))
|
||||
{
|
||||
string[] reunit = row1.Split(',');
|
||||
foreach (string unitWork in reunit)
|
||||
{
|
||||
var u = unitWorks.Where(x => x.UnitWorkName == unitWork.Trim()).FirstOrDefault();
|
||||
if (u == null)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "单位工程名称" + "," + "[" + unitWork.Trim() + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string row2 = pds.Rows[i][2].ToString();
|
||||
if (!string.IsNullOrEmpty(row2))
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime d = Convert.ToDateTime(row2);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "时间" + "," + "[" + row2 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row8 = pds.Rows[i][8].ToString();
|
||||
if (string.IsNullOrEmpty(row8))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
result = result.Substring(0, result.LastIndexOf("|"));
|
||||
}
|
||||
errorInfos.Clear();
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
string results = result;
|
||||
List<string> errorInfoList = results.Split('|').ToList();
|
||||
foreach (var item in errorInfoList)
|
||||
{
|
||||
string[] errors = item.Split(',');
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = errors[0];
|
||||
errorInfo.Column = errors[1];
|
||||
errorInfo.Reason = errors[2];
|
||||
errorInfos.Add(errorInfo);
|
||||
}
|
||||
if (errorInfos.Count > 0)
|
||||
{
|
||||
this.gvErrorInfo.DataSource = errorInfos;
|
||||
this.gvErrorInfo.DataBind();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 导入
|
||||
/// <summary>
|
||||
/// 导入
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(hdCheckResult.Text))
|
||||
{
|
||||
if (errorInfos.Count <= 0)
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
|
||||
hdCheckResult.Text = string.Empty;
|
||||
ShowNotify("导入成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
#region Excel提取数据
|
||||
/// <summary>
|
||||
/// 从Excel提取数据--》Dataset
|
||||
/// </summary>
|
||||
/// <param name="filename">Excel文件路径名</param>
|
||||
private void ImportXlsToData2(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
string oleDBConnString = String.Empty;
|
||||
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
|
||||
oleDBConnString += "Data Source=";
|
||||
oleDBConnString += fileName;
|
||||
oleDBConnString += ";Extended Properties=Excel 8.0;";
|
||||
OleDbConnection oleDBConn = null;
|
||||
OleDbDataAdapter oleAdMaster = null;
|
||||
DataTable m_tableName = new DataTable();
|
||||
DataSet ds = new DataSet();
|
||||
|
||||
oleDBConn = new OleDbConnection(oleDBConnString);
|
||||
oleDBConn.Open();
|
||||
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
|
||||
|
||||
if (m_tableName != null && m_tableName.Rows.Count > 0)
|
||||
{
|
||||
|
||||
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
|
||||
|
||||
}
|
||||
string sqlMaster;
|
||||
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
|
||||
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
|
||||
oleAdMaster.Fill(ds, "m_tableName");
|
||||
oleAdMaster.Dispose();
|
||||
oleDBConn.Close();
|
||||
oleDBConn.Dispose();
|
||||
|
||||
AddDatasetToSQL2(ds.Tables[0], 9);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 将Dataset的数据导入数据库
|
||||
/// <summary>
|
||||
/// 将Dataset的数据导入数据库
|
||||
/// </summary>
|
||||
/// <param name="pds">数据集</param>
|
||||
/// <param name="Cols">数据集列数</param>
|
||||
/// <returns></returns>
|
||||
private bool AddDatasetToSQL2(DataTable pds, int Cols)
|
||||
{
|
||||
int ic, ir;
|
||||
ic = pds.Columns.Count;
|
||||
if (ic < Cols)
|
||||
{
|
||||
ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
|
||||
}
|
||||
string result = string.Empty;
|
||||
ir = pds.Rows.Count;
|
||||
if (pds != null && ir > 0)
|
||||
{
|
||||
var oldViewInfos = from x in Funs.DB.Comprehensive_QualityAccident
|
||||
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 unitWorks = from x in Funs.DB.WBS_UnitWork
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.SuperUnitWork == null
|
||||
select x;
|
||||
|
||||
for (int i = 0; i < ir; i++)
|
||||
{
|
||||
Model.Comprehensive_QualityAccident oldViewInfo = new Model.Comprehensive_QualityAccident();
|
||||
string row0 = pds.Rows[i][0].ToString().Trim();
|
||||
oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == pds.Rows[i][8].ToString().Trim()
|
||||
).FirstOrDefault();
|
||||
if (oldViewInfo == null)
|
||||
{
|
||||
Model.Comprehensive_QualityAccident des = new Model.Comprehensive_QualityAccident();
|
||||
des.QualityAccidentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_QualityAccident));
|
||||
des.ProjectId = this.CurrUser.LoginProjectId;
|
||||
des.UnitId = units.Where(x => x.UnitName == row0.Trim()).FirstOrDefault().UnitId;
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][1].ToString().Trim()))
|
||||
{
|
||||
des.UnitWorkId = BLL.UnitWorkService.GetUnitWorkIdsByUnitWorkNames(this.CurrUser.LoginProjectId, pds.Rows[i][1].ToString().Trim());
|
||||
}
|
||||
des.Time = Funs.GetNewDateTime(pds.Rows[i][2].ToString().Trim());
|
||||
des.Place = pds.Rows[i][3].ToString().Trim();
|
||||
des.DirectEconomicLoss = pds.Rows[i][4].ToString().Trim();
|
||||
des.RemedialMeasures = pds.Rows[i][5].ToString().Trim();
|
||||
des.ResponsibilityDetermination =pds.Rows[i][6].ToString().Trim();
|
||||
des.CorrectiveActions = pds.Rows[i][7].ToString().Trim();
|
||||
des.RemarkCode = pds.Rows[i][8].ToString().Trim();
|
||||
des.CompileMan = this.CurrUser.UserId;
|
||||
des.CompileDate = DateTime.Now;
|
||||
des.Status = BLL.Const.Comprehensive_Compile;
|
||||
BLL.QualityAccidentService.AddQualityAccident(des);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 下载模板
|
||||
/// <summary>
|
||||
/// 下载模板按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDownLoad_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载导入模板
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
|
||||
{
|
||||
if (e.EventArgument == "Confirm_OK")
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string uploadfilepath = rootPath + Const.QualityAccidentTemplateUrl;
|
||||
string filePath = Const.QualityAccidentTemplateUrl;
|
||||
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
|
||||
}
|
||||
}
|
123
SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentDataIn.aspx.designer.cs
generated
Normal file
123
SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentDataIn.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,123 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
|
||||
|
||||
public partial class QualityAccidentDataIn {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// hdFileName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdFileName;
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAudit;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// btnDownLoad 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDownLoad;
|
||||
|
||||
/// <summary>
|
||||
/// hdCheckResult 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdCheckResult;
|
||||
|
||||
/// <summary>
|
||||
/// fuAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FileUpload fuAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// gvErrorInfo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid gvErrorInfo;
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title></title>
|
||||
<title>编辑质量事故处理记录</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
|
|
|
@ -403,13 +403,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_QualityAccident));
|
||||
}
|
||||
Model.Comprehensive_QualityAccident pressurePipe = BLL.QualityAccidentService.GetQualityAccidentById(this.QualityAccidentId);
|
||||
if (pressurePipe == null || ((pressurePipe.CompileMan == CurrUser.UserId && pressurePipe.Status == BLL.Const.Comprehensive_Compile) || (pressurePipe.CompileMan == CurrUser.UserId && pressurePipe.Status == BLL.Const.Comprehensive_ReCompile)))
|
||||
if (pressurePipe.Status == BLL.Const.Comprehensive_Complete)
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/pressurePipe&menuId={1}", this.hdAttachUrl.Text, BLL.Const.QualityAccidentMenuId)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/pressurePipe&menuId={1}", this.hdAttachUrl.Text, BLL.Const.QualityAccidentMenuId)));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/pressurePipe&menuId={1}", this.hdAttachUrl.Text, BLL.Const.QualityAccidentMenuId)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/pressurePipe&menuId={1}", this.hdAttachUrl.Text, BLL.Const.QualityAccidentMenuId)));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
|
|
@ -187,13 +187,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDrawings));
|
||||
}
|
||||
Model.Comprehensive_DesignDrawings designDrawings = BLL.DesignDrawingsService.GetDesignDrawingsById(this.Id);
|
||||
if (designDrawings == null || ((designDrawings.CompileMan == CurrUser.UserId && designDrawings.Status == BLL.Const.Comprehensive_Compile) || (designDrawings.CompileMan == CurrUser.UserId && designDrawings.Status == BLL.Const.Comprehensive_ReCompile)))
|
||||
if (designDrawings.Status == BLL.Const.Comprehensive_Complete)
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/designDrawings&menuId={1}", this.hdAttachUrl.Text, BLL.Const.ReviewDrawingsMenuId)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/designDrawings&menuId={1}", this.hdAttachUrl.Text, BLL.Const.ReviewDrawingsMenuId)));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/designDrawings&menuId={1}", this.hdAttachUrl.Text, BLL.Const.ReviewDrawingsMenuId)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/designDrawings&menuId={1}", this.hdAttachUrl.Text, BLL.Const.ReviewDrawingsMenuId)));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
|
|
@ -406,13 +406,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
|||
this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_SiteVisaManagement));
|
||||
}
|
||||
Model.Comprehensive_SiteVisaManagement siteVisaManagement = BLL.SiteVisaManagementService.GetSiteVisaManagementById(this.VisaId);
|
||||
if (siteVisaManagement == null || ((siteVisaManagement.CompileMan == CurrUser.UserId && siteVisaManagement.Status == BLL.Const.Comprehensive_Compile) || (siteVisaManagement.CompileMan == CurrUser.UserId && siteVisaManagement.Status == BLL.Const.Comprehensive_ReCompile)))
|
||||
if (siteVisaManagement.Status == BLL.Const.Comprehensive_Complete)
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/siteVisaManagement&menuId={1}", this.hdAttachUrl.Text, BLL.Const.SiteVisaManagementMenuId)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/siteVisaManagement&menuId={1}", this.hdAttachUrl.Text, BLL.Const.SiteVisaManagementMenuId)));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/siteVisaManagement&menuId={1}", this.hdAttachUrl.Text, BLL.Const.SiteVisaManagementMenuId)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/siteVisaManagement&menuId={1}", this.hdAttachUrl.Text, BLL.Const.SiteVisaManagementMenuId)));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnNew" Icon="Add" EnablePostBack="true" runat="server" OnClick="btnNew_Click" Hidden="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
@ -97,6 +99,10 @@
|
|||
<f:Window ID="Window1" Title="特种设备管理" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
|
||||
Width="800px" Height="320px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window2" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="700px" Height="560px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Parent" EnableResize="false" runat="server"
|
||||
|
|
|
@ -214,6 +214,10 @@ namespace FineUIPro.Web.Comprehensive
|
|||
{
|
||||
this.btnMenuDel.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||
{
|
||||
this.btnImport.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
@ -246,5 +250,17 @@ namespace FineUIPro.Web.Comprehensive
|
|||
|
||||
return "编制";
|
||||
}
|
||||
|
||||
#region 导入
|
||||
/// <summary>
|
||||
/// 导入按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("SpecialEquipmentDataIn.aspx", "导入 - ")));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -7,13 +7,11 @@
|
|||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.Comprehensive
|
||||
{
|
||||
|
||||
|
||||
public partial class SpecialEquipment
|
||||
{
|
||||
|
||||
namespace FineUIPro.Web.Comprehensive {
|
||||
|
||||
|
||||
public partial class SpecialEquipment {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
|
@ -22,7 +20,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
|
@ -31,7 +29,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
|
@ -40,7 +38,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
|
@ -49,7 +47,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolSearch 控件。
|
||||
/// </summary>
|
||||
|
@ -58,7 +56,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar ToolSearch;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// sdrpUnitId 控件。
|
||||
/// </summary>
|
||||
|
@ -67,7 +65,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList sdrpUnitId;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpEquipmentId 控件。
|
||||
/// </summary>
|
||||
|
@ -76,7 +74,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpEquipmentId;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnSearch 控件。
|
||||
/// </summary>
|
||||
|
@ -85,7 +83,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSearch;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
|
@ -94,7 +92,16 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
|
@ -103,7 +110,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtStatus 控件。
|
||||
/// </summary>
|
||||
|
@ -112,7 +119,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label txtStatus;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
|
@ -121,7 +128,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
|
@ -130,7 +137,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
|
@ -139,7 +146,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
|
@ -148,7 +155,16 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
|
@ -157,7 +173,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
|
@ -166,7 +182,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuModify 控件。
|
||||
/// </summary>
|
||||
|
@ -175,7 +191,7 @@ namespace FineUIPro.Web.Comprehensive
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuModify;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDel 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SpecialEquipmentDataIn.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.SpecialEquipmentDataIn" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>导入特种设备管理</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" OnCustomEvent="PageManager1_CustomEvent" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:HiddenField ID="hdFileName" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" ToolTip="审核" ValidateForms="SimpleForm1"
|
||||
OnClick="btnAudit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnImport" Icon="ApplicationGet" runat="server" ToolTip="导入" ValidateForms="SimpleForm1"
|
||||
OnClick="btnImport_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载模板" OnClick="btnDownLoad_Click">
|
||||
</f:Button>
|
||||
<f:HiddenField ID="hdCheckResult" runat="server">
|
||||
</f:HiddenField>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:FileUpload runat="server" ID="fuAttachUrl" EmptyText="选择要导入的文件" Label="选择要导入的文件"
|
||||
LabelWidth="150px">
|
||||
</f:FileUpload>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="gvErrorInfo" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="人员报验" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" AllowCellEditing="true" ClicksToEdit="2" AllowSorting="true"
|
||||
SortDirection="DESC" EnableColumnLines="true" ForceFit="true" AllowPaging="true" IsDatabasePaging="true" PageSize="10"
|
||||
EnableRowDoubleClickEvent="true" AllowFilters="true" EnableTextSelection="True">
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblPageIndex" runat="server" Text='<%# gvErrorInfo.PageIndex * gvErrorInfo.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:BoundField DataField="Row" HeaderText="错误行号">
|
||||
</f:BoundField>
|
||||
<f:BoundField DataField="Column" HeaderText="错误列">
|
||||
</f:BoundField>
|
||||
<f:BoundField DataField="Reason" HeaderText="错误类型">
|
||||
</f:BoundField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,497 @@
|
|||
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.CQMS.Comprehensive
|
||||
{
|
||||
public partial class SpecialEquipmentDataIn : PageBase
|
||||
{
|
||||
#region 定义变量
|
||||
/// <summary>
|
||||
/// 上传预设的虚拟路径
|
||||
/// </summary>
|
||||
private string initPath = Const.ExcelUrl;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 错误集合
|
||||
/// </summary>
|
||||
public static List<Model.ErrorInfo> errorInfos = new List<Model.ErrorInfo>();
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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 审核
|
||||
/// <summary>
|
||||
/// 审核
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAudit_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.fuAttachUrl.HasFile == false)
|
||||
{
|
||||
ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
|
||||
if (IsXls != ".xls")
|
||||
{
|
||||
ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (errorInfos != null)
|
||||
{
|
||||
errorInfos.Clear();
|
||||
}
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string initFullPath = rootPath + initPath;
|
||||
if (!Directory.Exists(initFullPath))
|
||||
{
|
||||
Directory.CreateDirectory(initFullPath);
|
||||
}
|
||||
|
||||
this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls;
|
||||
string filePath = initFullPath + this.hdFileName.Text;
|
||||
this.fuAttachUrl.PostedFile.SaveAs(filePath);
|
||||
ImportXlsToData(rootPath + initPath + this.hdFileName.Text);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
#region 读Excel提取数据
|
||||
/// <summary>
|
||||
/// 从Excel提取数据--》Dataset
|
||||
/// </summary>
|
||||
/// <param name="filename">Excel文件路径名</param>
|
||||
private void ImportXlsToData(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
string oleDBConnString = String.Empty;
|
||||
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
|
||||
oleDBConnString += "Data Source=";
|
||||
oleDBConnString += fileName;
|
||||
oleDBConnString += ";Extended Properties=Excel 8.0;";
|
||||
OleDbConnection oleDBConn = null;
|
||||
OleDbDataAdapter oleAdMaster = null;
|
||||
DataTable m_tableName = new DataTable();
|
||||
DataSet ds = new DataSet();
|
||||
|
||||
oleDBConn = new OleDbConnection(oleDBConnString);
|
||||
oleDBConn.Open();
|
||||
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
|
||||
|
||||
if (m_tableName != null && m_tableName.Rows.Count > 0)
|
||||
{
|
||||
|
||||
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
|
||||
|
||||
}
|
||||
string sqlMaster;
|
||||
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
|
||||
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
|
||||
oleAdMaster.Fill(ds, "m_tableName");
|
||||
oleAdMaster.Dispose();
|
||||
oleDBConn.Close();
|
||||
oleDBConn.Dispose();
|
||||
|
||||
AddDatasetToSQL(ds.Tables[0], 9);
|
||||
hdCheckResult.Text = "1";
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Response.Write(exc);
|
||||
//return null;
|
||||
// return dt;
|
||||
}
|
||||
finally
|
||||
{
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 将Dataset的数据导入数据库
|
||||
/// <summary>
|
||||
/// 将Dataset的数据导入数据库
|
||||
/// </summary>
|
||||
/// <param name="pds">数据集</param>
|
||||
/// <param name="Cols">数据集行数</param>
|
||||
/// <returns></returns>
|
||||
private bool AddDatasetToSQL(DataTable pds, int Cols)
|
||||
{
|
||||
string result = string.Empty;
|
||||
int ic, ir;
|
||||
ic = pds.Columns.Count;
|
||||
if (ic < Cols)
|
||||
{
|
||||
ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
|
||||
ir = pds.Rows.Count;
|
||||
if (pds != null && ir > 0)
|
||||
{
|
||||
var oldViewInfos = from x in Funs.DB.Comprehensive_SpecialEquipment
|
||||
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 specialEquipments = from x in Funs.DB.Base_SpecialEquipment
|
||||
where x.IsSpecial == true
|
||||
select x;
|
||||
|
||||
for (int i = 0; i < ir; i++)
|
||||
{
|
||||
string row0 = pds.Rows[i][0].ToString();
|
||||
if (string.IsNullOrEmpty(row0))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "所属单位" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
var unit = units.Where(x => x.UnitName == row0.Trim()).FirstOrDefault();
|
||||
if (unit == null)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "所属单位" + "," + "[" + row0 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row1 = pds.Rows[i][1].ToString();
|
||||
if (string.IsNullOrEmpty(row1))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "设备名称" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
var cn = specialEquipments.Where(x => x.SpecialEquipmentName == row1.Trim()).FirstOrDefault();
|
||||
if (cn == null)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "设备名称" + "," + "[" + row1 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row2 = pds.Rows[i][2].ToString();
|
||||
if (!string.IsNullOrEmpty(row2))
|
||||
{
|
||||
try
|
||||
{
|
||||
int c = Convert.ToInt32(row2);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "总数量" + "," + "[" + row2 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row3 = pds.Rows[i][3].ToString();
|
||||
if (!string.IsNullOrEmpty(row3))
|
||||
{
|
||||
try
|
||||
{
|
||||
int c = Convert.ToInt32(row3);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "告知数量" + "," + "[" + row3 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row4 = pds.Rows[i][4].ToString();
|
||||
if (!string.IsNullOrEmpty(row4))
|
||||
{
|
||||
try
|
||||
{
|
||||
int c = Convert.ToInt32(row4);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "提交资料数量" + "," + "[" + row4 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row5 = pds.Rows[i][5].ToString();
|
||||
if (!string.IsNullOrEmpty(row5))
|
||||
{
|
||||
try
|
||||
{
|
||||
int c = Convert.ToInt32(row5);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "监检报告数量" + "," + "[" + row5 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row7 = pds.Rows[i][7].ToString();
|
||||
if (!string.IsNullOrEmpty(row7))
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime d = Convert.ToDateTime(row7);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "填报日期" + "," + "[" + row7 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row8 = pds.Rows[i][8].ToString();
|
||||
if (string.IsNullOrEmpty(row8))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
result = result.Substring(0, result.LastIndexOf("|"));
|
||||
}
|
||||
errorInfos.Clear();
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
string results = result;
|
||||
List<string> errorInfoList = results.Split('|').ToList();
|
||||
foreach (var item in errorInfoList)
|
||||
{
|
||||
string[] errors = item.Split(',');
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = errors[0];
|
||||
errorInfo.Column = errors[1];
|
||||
errorInfo.Reason = errors[2];
|
||||
errorInfos.Add(errorInfo);
|
||||
}
|
||||
if (errorInfos.Count > 0)
|
||||
{
|
||||
this.gvErrorInfo.DataSource = errorInfos;
|
||||
this.gvErrorInfo.DataBind();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 导入
|
||||
/// <summary>
|
||||
/// 导入
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(hdCheckResult.Text))
|
||||
{
|
||||
if (errorInfos.Count <= 0)
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
|
||||
hdCheckResult.Text = string.Empty;
|
||||
ShowNotify("导入成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
#region Excel提取数据
|
||||
/// <summary>
|
||||
/// 从Excel提取数据--》Dataset
|
||||
/// </summary>
|
||||
/// <param name="filename">Excel文件路径名</param>
|
||||
private void ImportXlsToData2(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
string oleDBConnString = String.Empty;
|
||||
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
|
||||
oleDBConnString += "Data Source=";
|
||||
oleDBConnString += fileName;
|
||||
oleDBConnString += ";Extended Properties=Excel 8.0;";
|
||||
OleDbConnection oleDBConn = null;
|
||||
OleDbDataAdapter oleAdMaster = null;
|
||||
DataTable m_tableName = new DataTable();
|
||||
DataSet ds = new DataSet();
|
||||
|
||||
oleDBConn = new OleDbConnection(oleDBConnString);
|
||||
oleDBConn.Open();
|
||||
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
|
||||
|
||||
if (m_tableName != null && m_tableName.Rows.Count > 0)
|
||||
{
|
||||
|
||||
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
|
||||
|
||||
}
|
||||
string sqlMaster;
|
||||
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
|
||||
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
|
||||
oleAdMaster.Fill(ds, "m_tableName");
|
||||
oleAdMaster.Dispose();
|
||||
oleDBConn.Close();
|
||||
oleDBConn.Dispose();
|
||||
|
||||
AddDatasetToSQL2(ds.Tables[0], 9);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 将Dataset的数据导入数据库
|
||||
/// <summary>
|
||||
/// 将Dataset的数据导入数据库
|
||||
/// </summary>
|
||||
/// <param name="pds">数据集</param>
|
||||
/// <param name="Cols">数据集列数</param>
|
||||
/// <returns></returns>
|
||||
private bool AddDatasetToSQL2(DataTable pds, int Cols)
|
||||
{
|
||||
int ic, ir;
|
||||
ic = pds.Columns.Count;
|
||||
if (ic < Cols)
|
||||
{
|
||||
ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
|
||||
}
|
||||
string result = string.Empty;
|
||||
ir = pds.Rows.Count;
|
||||
if (pds != null && ir > 0)
|
||||
{
|
||||
var oldViewInfos = from x in Funs.DB.Comprehensive_SpecialEquipment
|
||||
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 specialEquipments = from x in Funs.DB.Base_SpecialEquipment
|
||||
where x.IsSpecial == true
|
||||
select x;
|
||||
|
||||
for (int i = 0; i < ir; i++)
|
||||
{
|
||||
Model.Comprehensive_SpecialEquipment oldViewInfo = new Model.Comprehensive_SpecialEquipment();
|
||||
string row0 = pds.Rows[i][0].ToString().Trim();
|
||||
string row1 = pds.Rows[i][1].ToString().Trim();
|
||||
oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == pds.Rows[i][8].ToString().Trim()
|
||||
).FirstOrDefault();
|
||||
if (oldViewInfo == null)
|
||||
{
|
||||
Model.Comprehensive_SpecialEquipment des = new Model.Comprehensive_SpecialEquipment();
|
||||
des.SpecialEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_SpecialEquipment));
|
||||
des.ProjectId = this.CurrUser.LoginProjectId;
|
||||
des.UnitId = units.Where(x => x.UnitName == row0.Trim()).FirstOrDefault().UnitId;
|
||||
des.EquipmentId = specialEquipments.Where(x => x.SpecialEquipmentName == row1.Trim()).FirstOrDefault().SpecialEquipmentId;
|
||||
des.SunNumber=Funs.GetNewInt(pds.Rows[i][2].ToString().Trim());
|
||||
des.InformNumber = Funs.GetNewInt(pds.Rows[i][3].ToString().Trim());
|
||||
des.SubmitDataNumber = Funs.GetNewInt(pds.Rows[i][4].ToString().Trim());
|
||||
des.MonitoringReportNumber = Funs.GetNewInt(pds.Rows[i][5].ToString().Trim());
|
||||
des.PositionNum = pds.Rows[i][6].ToString().Trim();
|
||||
des.ReportTime = Funs.GetNewDateTime(pds.Rows[i][7].ToString().Trim());
|
||||
des.RemarkCode = pds.Rows[i][8].ToString().Trim();
|
||||
des.CompileMan = this.CurrUser.UserId;
|
||||
des.Status = BLL.Const.Comprehensive_Compile;
|
||||
BLL.SpecialEquipmentServices.AddEquipment(des);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 下载模板
|
||||
/// <summary>
|
||||
/// 下载模板按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDownLoad_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载导入模板
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
|
||||
{
|
||||
if (e.EventArgument == "Confirm_OK")
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string uploadfilepath = rootPath + Const.SpecialEquipmentTemplateUrl;
|
||||
string filePath = Const.SpecialEquipmentTemplateUrl;
|
||||
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
|
||||
}
|
||||
}
|
123
SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentDataIn.aspx.designer.cs
generated
Normal file
123
SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentDataIn.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,123 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive {
|
||||
|
||||
|
||||
public partial class SpecialEquipmentDataIn {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// hdFileName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdFileName;
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAudit;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// btnDownLoad 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDownLoad;
|
||||
|
||||
/// <summary>
|
||||
/// hdCheckResult 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdCheckResult;
|
||||
|
||||
/// <summary>
|
||||
/// fuAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FileUpload fuAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// gvErrorInfo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid gvErrorInfo;
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
}
|
||||
}
|
|
@ -1,66 +0,0 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrainingRecordsDataInEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.TrainingRecordsDataInEdit" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>编辑培训记录导入</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue1" Label="培训内容" ShowRedStar="true" Required="true" runat="server" FocusOnPageLoad="true" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue2" Label="专业" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue3" Label="培训对象" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue4" Label="培训地点" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue5" Label="课时(小时)" ShowRedStar="true" Required="true" runat="server" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue6" Label="主讲人" ShowRedStar="true" Required="true" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue7" Label="备注" runat="server" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:CheckBox ID="ckAll" runat="server" Checked="true" Text="是否批量修改"></f:CheckBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea runat="server" Label="错误信息" ID="lbErrCout" Readonly="true" LabelWidth="120px"></f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
|
@ -1,175 +0,0 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
public partial class TrainingRecordsDataInEdit : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 临时表主键
|
||||
/// </summary>
|
||||
public string TempId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["TempId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["TempId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.TempId = Request.Params["TempId"];
|
||||
this.txtValue1.Focus();
|
||||
var dataInTemp = BLL.Sys_DataTempService.GetDataInTempByTempId(this.TempId);
|
||||
if (dataInTemp != null)
|
||||
{
|
||||
this.txtValue1.Text = dataInTemp.Value1;
|
||||
this.txtValue2.Text = dataInTemp.Value2;
|
||||
this.txtValue3.Text = dataInTemp.Value3;
|
||||
this.txtValue4.Text = dataInTemp.Value4;
|
||||
this.txtValue5.Text = dataInTemp.Value5;
|
||||
this.txtValue6.Text = dataInTemp.Value6;
|
||||
this.txtValue7.Text = dataInTemp.Value7;
|
||||
|
||||
this.lbErrCout.Text = dataInTemp.ToopValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存按钮
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
var dataInTemp = BLL.Sys_DataTempService.GetDataInTempByTempId(this.TempId);
|
||||
if (this.ckAll.Checked)
|
||||
{
|
||||
var allDataInTemp = from x in Funs.DB.Sys_DataInTemp where x.ProjectId == this.CurrUser.LoginProjectId && x.UserId == this.CurrUser.UserId select x;
|
||||
if (dataInTemp.Value1 != this.txtValue1.Text.Trim())
|
||||
{
|
||||
var tempValue1 = allDataInTemp.Where(x => x.Value1 == dataInTemp.Value1 || (x.Value1 == null && dataInTemp.Value1 == null));
|
||||
if (tempValue1 != null)
|
||||
{
|
||||
foreach (var item in tempValue1)
|
||||
{
|
||||
item.Value1 = this.txtValue1.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value2 != this.txtValue2.Text.Trim())
|
||||
{
|
||||
var tempValue2 = allDataInTemp.Where(x => x.Value2 == dataInTemp.Value2 || (x.Value2 == null && dataInTemp.Value2 == null));
|
||||
if (tempValue2 != null)
|
||||
{
|
||||
foreach (var item in tempValue2)
|
||||
{
|
||||
item.Value2 = this.txtValue2.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value3 != this.txtValue3.Text.Trim())
|
||||
{
|
||||
var tempValue3 = allDataInTemp.Where(x => x.Value3 == dataInTemp.Value3 || (x.Value3 == null && dataInTemp.Value3 == null));
|
||||
if (tempValue3 != null)
|
||||
{
|
||||
foreach (var item in tempValue3)
|
||||
{
|
||||
item.Value3 = this.txtValue3.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value5 != this.txtValue5.Text.Trim())
|
||||
{
|
||||
var tempValue5 = allDataInTemp.Where(x => x.Value5 == dataInTemp.Value5 || (x.Value5 == null && dataInTemp.Value5 == null));
|
||||
if (tempValue5 != null)
|
||||
{
|
||||
foreach (var item in tempValue5)
|
||||
{
|
||||
item.Value5 = this.txtValue5.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value6 != this.txtValue6.Text.Trim())
|
||||
{
|
||||
var tempValue6 = allDataInTemp.Where(x => x.Value6 == dataInTemp.Value6 || (x.Value6 == null && dataInTemp.Value6 == null));
|
||||
if (tempValue6 != null)
|
||||
{
|
||||
foreach (var item in tempValue6)
|
||||
{
|
||||
item.Value6 = this.txtValue6.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dataInTemp.Value7 != this.txtValue7.Text.Trim())
|
||||
{
|
||||
var tempValue7 = allDataInTemp.Where(x => x.Value7 == dataInTemp.Value7 || (x.Value7 == null && dataInTemp.Value7 == null));
|
||||
if (tempValue7 != null)
|
||||
{
|
||||
foreach (var item in tempValue7)
|
||||
{
|
||||
item.Value7 = this.txtValue7.Text.Trim();
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
var toopValue = allDataInTemp.Where(x => x.ToopValue == dataInTemp.ToopValue);
|
||||
if (toopValue != null)
|
||||
{
|
||||
foreach (var item in toopValue)
|
||||
{
|
||||
item.ToopValue = null;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Sys_DataInTemp newDataInTemp = new Model.Sys_DataInTemp();
|
||||
newDataInTemp.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newDataInTemp.UserId = this.CurrUser.UserId;
|
||||
newDataInTemp.Time = System.DateTime.Now;
|
||||
newDataInTemp.Type = dataInTemp.Type;
|
||||
newDataInTemp.Value1 = this.txtValue1.Text.Trim();
|
||||
newDataInTemp.Value2 = this.txtValue2.Text.Trim();
|
||||
newDataInTemp.Value3 = this.txtValue3.Text.Trim();
|
||||
newDataInTemp.Value4 = this.txtValue4.Text.Trim();
|
||||
newDataInTemp.Value5 = this.txtValue5.Text.Trim();
|
||||
newDataInTemp.Value6 = this.txtValue6.Text.Trim();
|
||||
newDataInTemp.Value7 = this.txtValue7.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(this.TempId))
|
||||
{
|
||||
newDataInTemp.TempId = this.TempId;
|
||||
newDataInTemp.ToopValue = null;
|
||||
BLL.Sys_DataTempService.UpdateDataInTemp(newDataInTemp);
|
||||
}
|
||||
}
|
||||
ShowNotify("信息修改完成!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,136 +0,0 @@
|
|||
|
||||
错误信息开始=====>
|
||||
错误类型:SqlException
|
||||
错误信息:过程或函数 'Sp_GJSX_getlist' 需要参数 '@ProjectId',但未提供该参数。
|
||||
错误堆栈:
|
||||
在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
|
||||
在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
|
||||
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
|
||||
在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
|
||||
在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
|
||||
在 System.Data.SqlClient.SqlDataReader.get_MetaData()
|
||||
在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
|
||||
在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
|
||||
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
|
||||
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
|
||||
在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
|
||||
在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
|
||||
在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
|
||||
在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
|
||||
在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
|
||||
在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
|
||||
在 BLL.SQLHelper.GetDataTableRunProc(String storedProcName, SqlParameter[] parameters) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\SQLHelper.cs:行号 276
|
||||
在 FineUIPro.Web.PZHGL.GJSX.GJSXList.BindGrid() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\PZHGL\GJSX\GJSXList.aspx.cs:行号 60
|
||||
在 FineUIPro.Web.PZHGL.GJSX.GJSXList.Page_Load(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\PZHGL\GJSX\GJSXList.aspx.cs:行号 35
|
||||
在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
|
||||
在 System.EventHandler.Invoke(Object sender, EventArgs e)
|
||||
在 System.Web.UI.Control.OnLoad(EventArgs e)
|
||||
在 System.Web.UI.Control.LoadRecursive()
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:04/22/2024 11:27:38
|
||||
出错文件:http://localhost:8579/PZHGL/GJSX/GJSXList.aspx
|
||||
IP地址:::1
|
||||
操作人员:JT
|
||||
|
||||
出错时间:04/22/2024 11:27:38
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:ArgumentException
|
||||
错误信息:提供的 URI 方案“http”无效,应为“https”。
|
||||
参数名: via
|
||||
错误堆栈:
|
||||
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
|
||||
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
|
||||
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
|
||||
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
|
||||
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
|
||||
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
|
||||
在 System.ServiceModel.ClientBase`1.CreateChannel()
|
||||
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
|
||||
在 System.ServiceModel.ClientBase`1.get_Channel()
|
||||
在 BLL.CNCECHSSEWebService.getSupervise_SubUnitReport() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2180
|
||||
出错时间:04/22/2024 13:27:34
|
||||
出错时间:04/22/2024 13:27:34
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:ArgumentException
|
||||
错误信息:提供的 URI 方案“http”无效,应为“https”。
|
||||
参数名: via
|
||||
错误堆栈:
|
||||
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
|
||||
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
|
||||
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
|
||||
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
|
||||
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
|
||||
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
|
||||
在 System.ServiceModel.ClientBase`1.CreateChannel()
|
||||
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
|
||||
在 System.ServiceModel.ClientBase`1.get_Channel()
|
||||
在 BLL.CNCECHSSEWebService.getCheck_CheckInfo_Table8Item() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2045
|
||||
出错时间:04/22/2024 13:27:34
|
||||
出错时间:04/22/2024 13:27:34
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:ArgumentException
|
||||
错误信息:提供的 URI 方案“http”无效,应为“https”。
|
||||
参数名: via
|
||||
错误堆栈:
|
||||
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
|
||||
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
|
||||
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
|
||||
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
|
||||
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
|
||||
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
|
||||
在 System.ServiceModel.ClientBase`1.CreateChannel()
|
||||
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
|
||||
在 System.ServiceModel.ClientBase`1.get_Channel()
|
||||
在 BLL.CNCECHSSEWebService.getCheck_CheckRectify() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1941
|
||||
出错时间:04/22/2024 13:27:34
|
||||
出错时间:04/22/2024 13:27:34
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:ArgumentException
|
||||
错误信息:提供的 URI 方案“http”无效,应为“https”。
|
||||
参数名: via
|
||||
错误堆栈:
|
||||
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
|
||||
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
|
||||
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
|
||||
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
|
||||
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
|
||||
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
|
||||
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
|
||||
在 System.ServiceModel.ClientBase`1.CreateChannel()
|
||||
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
|
||||
在 System.ServiceModel.ClientBase`1.get_Channel()
|
||||
在 BLL.CNCECHSSEWebService.getInformation_UrgeReport() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1883
|
||||
出错时间:04/22/2024 13:27:34
|
||||
出错时间:04/22/2024 13:27:34
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -427,7 +427,6 @@
|
|||
<Content Include="CQMS\Comprehensive\DataReceivingDoc.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\DataReceivingDocApprove.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\DataReceivingDocDataIn.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\DataReceivingDocDataInEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\DataReceivingDocEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\DataReceivingEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\DesignChangeOrder.aspx" />
|
||||
|
@ -461,6 +460,7 @@
|
|||
<Content Include="CQMS\Comprehensive\InspectionTestPlanDataIn.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\InspectionTestPlanEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\MajorPlanApproval.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\MajorPlanApprovalDataIn.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\MajorPlanApprovalEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\NCRManagement.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\NCRManagementApprove.aspx" />
|
||||
|
@ -469,9 +469,11 @@
|
|||
<Content Include="CQMS\Comprehensive\PersonItem.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\PressurePipe.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\PressurePipeApprove.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\PressurePipeDataIn.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\PressurePipeEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\QualityAccident.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\QualityAccidentApprove.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\QualityAccidentDataIn.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\QualityAccidentEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\ReviewDrawings.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\ReviewDrawingsDataIn.aspx" />
|
||||
|
@ -482,10 +484,10 @@
|
|||
<Content Include="CQMS\Comprehensive\SiteVisaManagementEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\SpecialEquipment.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\SpecialEquipmentApprove.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\SpecialEquipmentDataIn.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\SpecialEquipmentEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\TrainingRecords.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\TrainingRecordsDataIn.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\TrainingRecordsDataInEdit.aspx" />
|
||||
<Content Include="CQMS\Comprehensive\TrainingRecordsEdit.aspx" />
|
||||
<Content Include="CQMS\DataBase\ConstructionStandardList.aspx" />
|
||||
<Content Include="CQMS\DataBase\ConstructionStandardListEdit.aspx" />
|
||||
|
@ -7371,13 +7373,6 @@
|
|||
<Compile Include="CQMS\Comprehensive\DataReceivingDocDataIn.aspx.designer.cs">
|
||||
<DependentUpon>DataReceivingDocDataIn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\DataReceivingDocDataInEdit.aspx.cs">
|
||||
<DependentUpon>DataReceivingDocDataInEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\DataReceivingDocDataInEdit.aspx.designer.cs">
|
||||
<DependentUpon>DataReceivingDocDataInEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\DataReceivingDocEdit.aspx.cs">
|
||||
<DependentUpon>DataReceivingDocEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
@ -7609,6 +7604,13 @@
|
|||
<Compile Include="CQMS\Comprehensive\MajorPlanApproval.aspx.designer.cs">
|
||||
<DependentUpon>MajorPlanApproval.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\MajorPlanApprovalDataIn.aspx.cs">
|
||||
<DependentUpon>MajorPlanApprovalDataIn.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\MajorPlanApprovalDataIn.aspx.designer.cs">
|
||||
<DependentUpon>MajorPlanApprovalDataIn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\MajorPlanApprovalEdit.aspx.cs">
|
||||
<DependentUpon>MajorPlanApprovalEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
@ -7665,6 +7667,13 @@
|
|||
<Compile Include="CQMS\Comprehensive\PressurePipeApprove.aspx.designer.cs">
|
||||
<DependentUpon>PressurePipeApprove.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\PressurePipeDataIn.aspx.cs">
|
||||
<DependentUpon>PressurePipeDataIn.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\PressurePipeDataIn.aspx.designer.cs">
|
||||
<DependentUpon>PressurePipeDataIn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\PressurePipeEdit.aspx.cs">
|
||||
<DependentUpon>PressurePipeEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
@ -7686,6 +7695,13 @@
|
|||
<Compile Include="CQMS\Comprehensive\QualityAccidentApprove.aspx.designer.cs">
|
||||
<DependentUpon>QualityAccidentApprove.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\QualityAccidentDataIn.aspx.cs">
|
||||
<DependentUpon>QualityAccidentDataIn.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\QualityAccidentDataIn.aspx.designer.cs">
|
||||
<DependentUpon>QualityAccidentDataIn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\QualityAccidentEdit.aspx.cs">
|
||||
<DependentUpon>QualityAccidentEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
@ -7756,6 +7772,13 @@
|
|||
<Compile Include="CQMS\Comprehensive\SpecialEquipmentApprove.aspx.designer.cs">
|
||||
<DependentUpon>SpecialEquipmentApprove.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\SpecialEquipmentDataIn.aspx.cs">
|
||||
<DependentUpon>SpecialEquipmentDataIn.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\SpecialEquipmentDataIn.aspx.designer.cs">
|
||||
<DependentUpon>SpecialEquipmentDataIn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\SpecialEquipmentEdit.aspx.cs">
|
||||
<DependentUpon>SpecialEquipmentEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
@ -7777,13 +7800,6 @@
|
|||
<Compile Include="CQMS\Comprehensive\TrainingRecordsDataIn.aspx.designer.cs">
|
||||
<DependentUpon>TrainingRecordsDataIn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\TrainingRecordsDataInEdit.aspx.cs">
|
||||
<DependentUpon>TrainingRecordsDataInEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\TrainingRecordsDataInEdit.aspx.designer.cs">
|
||||
<DependentUpon>TrainingRecordsDataInEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\Comprehensive\TrainingRecordsEdit.aspx.cs">
|
||||
<DependentUpon>TrainingRecordsEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
|
Loading…
Reference in New Issue