1
This commit is contained in:
@@ -30,22 +30,18 @@
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="txtSearch" Label="查询" EmptyText="编号/检查对象/检查组/评价结果"
|
||||
Width="300px" AutoPostBack="true" OnTextChanged="txtSearch_TextChanged">
|
||||
Width="300px" AutoPostBack="true" OnTextChanged="txtSearch_TextChanged" LabelWidth="50px" LabelAlign="right">
|
||||
</f:TextBox>
|
||||
|
||||
<f:DropDownList ID="drpCheckMainType" runat="server" AutoPostBack="true"
|
||||
<f:DropDownList ID="drpCheckMainType" runat="server" AutoPostBack="true" LabelWidth="100px" LabelAlign="right"
|
||||
OnSelectedIndexChanged="drpCheckMainType_SelectedIndexChanged" Label="检查大类" Width="200px" Readonly="true">
|
||||
<f:ListItem Value="0" Text="安全" />
|
||||
<f:ListItem Value="1" Text="质量" />
|
||||
</f:DropDownList>
|
||||
|
||||
<f:DropDownList runat="server" ID="drpCheckType" EnableSimulateTree="True"
|
||||
<f:DropDownList runat="server" ID="drpCheckType" EnableSimulateTree="True" LabelWidth="100px" LabelAlign="right"
|
||||
Label="检查类别" AutoPostBack="true" Width="260px" AutoSelectFirstItem="true"
|
||||
OnSelectedIndexChanged="txtSearch_TextChanged">
|
||||
</f:DropDownList>
|
||||
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
|
||||
<f:Button ID="btnNew" Icon="Add" EnablePostBack="false" runat="server" Text="新增" Hidden="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnEdit" Icon="Pencil" runat="server" OnClick="btnEdit_Click" Text="编辑" Hidden="true">
|
||||
@@ -68,8 +64,8 @@
|
||||
</asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="120px" ColumnID="UnitHazardRegisterCode" DataField="UnitHazardRegisterCode"
|
||||
SortField="UnitHazardRegisterCode" FieldType="String" HeaderText="编号" TextAlign="Left"
|
||||
<f:RenderField Width="100px" ColumnID="UnitHazardRegisterCode" DataField="UnitHazardRegisterCode"
|
||||
SortField="UnitHazardRegisterCode" FieldType="String" HeaderText="编号" TextAlign="Center"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="CheckDate" DataField="CheckDate" SortField="CheckDate"
|
||||
@@ -80,19 +76,22 @@
|
||||
FieldType="String" HeaderText="检查大类" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="CheckTypeName" DataField="CheckTypeName"
|
||||
SortField="CheckTypeName" FieldType="String" HeaderText="检查类别" TextAlign="Left"
|
||||
SortField="CheckTypeName" FieldType="String" HeaderText="检查类别" TextAlign="Center"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="200px" ColumnID="InspectionUnitName" DataField="InspectionUnitName"
|
||||
FieldType="String" HeaderText="检查单位" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="200px" ColumnID="CheckObjectText" DataField="CheckObjectText"
|
||||
FieldType="String" HeaderText="检查对象" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="CheckUnitName" DataField="CheckUnitName"
|
||||
FieldType="String" HeaderText="检查单位" TextAlign="Left" HeaderTextAlign="Center">
|
||||
<f:RenderField Width="200px" ColumnID="CheckUnitName" DataField="CheckUnitName"
|
||||
FieldType="String" HeaderText="受检单位" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="CheckTeam" DataField="CheckTeam" SortField="CheckTeam"
|
||||
<f:RenderField Width="200px" ColumnID="CheckTeam" DataField="CheckTeam" SortField="CheckTeam"
|
||||
FieldType="String" HeaderText="检查组/人" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="200px" ColumnID="StatesName" DataField="StatesName"
|
||||
<f:RenderField Width="120px" ColumnID="StatesName" DataField="StatesName"
|
||||
FieldType="String" HeaderText="状态" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
@@ -115,7 +114,7 @@
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="编辑企业级检查" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" IsModal="true" OnClose="Window1_Close"
|
||||
Width="1000px" Height="660px">
|
||||
Width="1280px" Height="760px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
|
||||
@@ -34,7 +34,8 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
CheckMainType = drpCheckMainType.SelectedValue,
|
||||
SearchText = this.txtSearch.Text.Trim(),
|
||||
CheckType = this.drpCheckType.SelectedValue,
|
||||
ProjectId = this.CurrUser.LoginProjectId
|
||||
ProjectId = this.CurrUser.LoginProjectId,
|
||||
CheckUnitId = this.CurrUser.UnitId
|
||||
};
|
||||
|
||||
int totalCount;
|
||||
@@ -112,7 +113,7 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
if (UnitHazardRegisterService.CanDeleteRegister(rowID) || (this.CurrUser.PersonId == Const.hfnbdId || this.CurrUser.PersonId == Const.sysglyId))
|
||||
if (UnitHazardRegisterService.CanDeleteRegister(rowID) || (this.CurrUser.PersonId ==Const.hfnbdId || this.CurrUser.PersonId == Const.sysglyId))
|
||||
{
|
||||
BLL.UnitHazardRegisterItemService.DeleteItemsByRegisterId(rowID);
|
||||
BLL.UnitHazardRegisterService.DeleteUnitHazardRegisterById(rowID);
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
<%@ Page Language="C#" CodeBehind="UnitHazardRegisterDetailIn.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Supervise.UnitHazardRegisterDetailIn" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>导入明细</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</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:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" ToolTip="审核" ValidateForms="SimpleForm1" Text="审核"
|
||||
OnClick="btnAudit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnImport" Icon="ApplicationGet" runat="server" ToolTip="导入" ValidateForms="SimpleForm1" Text="导入"
|
||||
OnClick="btnImport_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载模板" Text="下载模板" OnClick="btnDownLoad_Click">
|
||||
</f:Button>
|
||||
</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="40px" 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="错误行号" Width="50px">
|
||||
</f:BoundField>
|
||||
<f:BoundField DataField="Column" HeaderText="错误列" Width="100px">
|
||||
</f:BoundField>
|
||||
<f:BoundField DataField="Reason" HeaderText="错误类型" MinWidth="220px">
|
||||
</f:BoundField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:HiddenField ID="hdFileName" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:HiddenField ID="hdCheckResult" runat="server">
|
||||
</f:HiddenField>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="lblBottom" runat="server" Text="说明:1 导入模板为.xls后缀的EXCEL文件,有背景色列为必填项。2 数据导入完成,成功后自动返回,如果有不成功数据页面弹出提示框,列表显示导入成功数据。">
|
||||
</f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,450 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.BaseInfo;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web.Services.Description;
|
||||
|
||||
namespace FineUIPro.Web.ZHGL.Supervise
|
||||
{
|
||||
public partial class UnitHazardRegisterDetailIn : PageBase
|
||||
{
|
||||
#region 定义变量
|
||||
|
||||
/// <summary>
|
||||
/// 上传预设的虚拟路径
|
||||
/// </summary>
|
||||
private string initPath = Const.ExcelUrl;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 错误集合
|
||||
/// </summary>
|
||||
public static List<Model.ErrorInfo> errorInfos = new List<Model.ErrorInfo>();
|
||||
|
||||
/// <summary>
|
||||
/// 检查id
|
||||
/// </summary>
|
||||
public string UnitHazardRegisterId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["UnitHazardRegisterId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["UnitHazardRegisterId"] = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 类型
|
||||
/// </summary>
|
||||
public string Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Type"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Type"] = value;
|
||||
}
|
||||
}
|
||||
public static int Cols = 4;//列数
|
||||
|
||||
public static Dictionary<string, string> imgDic = new Dictionary<string, string>();
|
||||
|
||||
public static List<string> validLevelStrings = new List<string> { "一般", "较大", "重大" };
|
||||
public static List<string> validRegisterTypesStrings = new List<string>();
|
||||
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.Type = Request.Params["Type"];
|
||||
this.UnitHazardRegisterId = Request.Params["UnitHazardRegisterId"];
|
||||
|
||||
this.hdFileName.Text = string.Empty;
|
||||
if (errorInfos != null)
|
||||
{
|
||||
errorInfos.Clear();
|
||||
}
|
||||
if (this.Type == "0")
|
||||
{//安全类型
|
||||
validRegisterTypesStrings = (from x in Funs.DB.HSSE_Hazard_HazardRegisterTypes where x.HazardRegisterType == "1" orderby x.TypeCode select x.RegisterTypesName).ToList();
|
||||
}
|
||||
else
|
||||
{ //质量类型
|
||||
validRegisterTypesStrings = (from x in Funs.DB.Base_QualityQuestionType orderby x.SortIndex select x.QualityQuestionType).ToList();
|
||||
}
|
||||
//if (this.CurrUser.UserId == Const.AdminId)
|
||||
//{
|
||||
// this.btnFastImport.Hidden = false;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
#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.UnitHazardRegisterDetailTemplateUrl;
|
||||
string filePath = Const.UnitHazardRegisterDetailTemplateUrl;
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
FileInfo info = new FileInfo(uploadfilepath);
|
||||
long fileSize = info.Length;
|
||||
Response.ClearContent();
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
Response.ContentType = "excel/plain";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.AddHeader("Content-Length", fileSize.ToString().Trim());
|
||||
Response.TransmitFile(uploadfilepath, 0, fileSize);
|
||||
Response.End();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 审核
|
||||
/// <summary>
|
||||
/// 审核
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void 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" && IsXls != ".xlsx")
|
||||
{
|
||||
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);
|
||||
AuditExcelAndShowResult(filePath);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 审核Excel并展示校验结果
|
||||
/// </summary>
|
||||
private void AuditExcelAndShowResult(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
string msg = string.Empty;
|
||||
var dt = BLL.NPOIHelper.ExcelToDataSet(fileName, out msg, true);
|
||||
if (dt != null)
|
||||
{
|
||||
//string rootPath = Server.MapPath("~/");
|
||||
//var localPath = ConfigurationManager.AppSettings["localRoot"];
|
||||
//imgDic = NPOIHelper.ExtractDispimgImagesFromXml(rootPath + initPath + this.hdFileName.Text, localPath + "FileUpload/CheckSpecial");
|
||||
ValidateExcelData(dt.Tables[0], false);
|
||||
hdCheckResult.Text = "1";
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
BLL.ErrLogInfo.WriteLog("", exc);
|
||||
Response.Write(exc);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 校验Excel数据(仅校验)
|
||||
/// </summary>
|
||||
/// <param name="pds"></param>
|
||||
/// <param name="import">true:导入;false:审核</param>
|
||||
/// <returns></returns>
|
||||
private bool ValidateExcelData(DataTable pds, bool import)
|
||||
{
|
||||
int ic = pds.Columns.Count;
|
||||
if (ic < Cols)
|
||||
{
|
||||
ShowNotify($"导入Excel格式错误!Excel只有{ic}列", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
int ir = pds.Rows.Count;
|
||||
if (pds == null || ir <= 0)
|
||||
{
|
||||
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
var errors = new List<ErrorInfo>();
|
||||
for (int i = 0; i < ir; i++)
|
||||
{
|
||||
var (error, _) = ValidateRowAndBuildEntity(pds.Rows[i], (i + 2).ToString(), import);
|
||||
if (error.Any()) { errors.AddRange(error); }
|
||||
}
|
||||
errorInfos.Clear();
|
||||
errorInfos.AddRange(errors);
|
||||
this.gvErrorInfo.DataSource = errorInfos;
|
||||
this.gvErrorInfo.DataBind();
|
||||
if (errors.Count > 0)
|
||||
{
|
||||
ShowNotify("存在校验错误,请查看错误列表并修正后再次导入。", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 校验单行并生成实体(字段顺序与新模板一致)
|
||||
/// </summary>
|
||||
private (List<ErrorInfo> lstError, Model.Supervise_UnitHazardRegisterItem entity) ValidateRowAndBuildEntity(DataRow row, string displayRow, bool import)
|
||||
{
|
||||
List<ErrorInfo> lstError = new List<ErrorInfo>();
|
||||
// 新模板字段顺序
|
||||
string row0 = row[0]?.ToString().Trim(); // 问题描述
|
||||
string row1 = row[1]?.ToString().Trim(); // 问题类型
|
||||
string row2 = row[2]?.ToString().Trim(); // 风险级别
|
||||
string row3 = row[3]?.ToString().Trim(); // 整改要求
|
||||
//string row4 = row[4]?.ToString().Trim(); // 问题图片地址
|
||||
|
||||
string data0 = string.Empty;
|
||||
string data1 = string.Empty;
|
||||
string data2 = string.Empty;
|
||||
string data3 = string.Empty;
|
||||
string data4 = string.Empty;
|
||||
|
||||
// 校验并转换
|
||||
if (!string.IsNullOrEmpty(row0))
|
||||
{
|
||||
data0 = row0;
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "问题描述", Reason = "不能为空" });
|
||||
}
|
||||
if (!string.IsNullOrEmpty(row1))
|
||||
{
|
||||
if (validRegisterTypesStrings.Any(x => x == row1))
|
||||
{
|
||||
data1 = row1;
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "问题类型", Reason = $"{(this.Type == "0" ? "安全" : "质量")}问题类型不存在[{row1}]" });
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "问题类型", Reason = "不能为空" });
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(row2))
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "风险级别", Reason = "不能为空" });
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(row2))
|
||||
{
|
||||
if (validLevelStrings.Any(x => x == row2))
|
||||
{
|
||||
data2 = row2;
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "风险级别", Reason = $"风险级别[{row2}]不存在" });
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(row3))
|
||||
{
|
||||
data3 = row3;
|
||||
}
|
||||
//if (import)
|
||||
//{图片待处理
|
||||
// try
|
||||
// {
|
||||
// urls = urls.Substring(urls.IndexOf('"') + 1, urls.LastIndexOf('"') - urls.IndexOf('"') - 1);
|
||||
// var sss = imgDic.ContainsKey(urls) ? imgDic[urls].Replace(Funs.RootPath, "") : "";
|
||||
// }
|
||||
// catch (Exception e) { }
|
||||
//}
|
||||
|
||||
if (lstError.Any())
|
||||
{
|
||||
return (lstError, null);
|
||||
}
|
||||
|
||||
// 其余字段可根据实际业务映射到实体
|
||||
var entity = new Model.Supervise_UnitHazardRegisterItem
|
||||
{
|
||||
UnitHazardRegisterItemId = SQLHelper.GetNewID(),
|
||||
UnitHazardRegisterId = this.UnitHazardRegisterId,
|
||||
ProblemDescription = data0,
|
||||
ProblemType = data1,
|
||||
RiskLevel = data2,
|
||||
RectifyRequirement = data3,
|
||||
CompleteStatus = 0,
|
||||
//CompletedDate = DateTime.Now,
|
||||
////SortIndex = 1,
|
||||
//RectificationMeasures = null,
|
||||
//IsUpdate = null
|
||||
};
|
||||
return (lstError, entity);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 导入
|
||||
|
||||
/// <summary>
|
||||
/// 导入
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (hdCheckResult.Text == "1")
|
||||
{
|
||||
if (errorInfos.Count <= 0)
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
var localPath = ConfigurationManager.AppSettings["localRoot"];
|
||||
//imgDic = NPOIHelper.ExtractDispimgImagesFromXml(rootPath + initPath + this.hdFileName.Text, localPath + "FileUpload/CheckSpecial");
|
||||
ImportExcelToDatabase(rootPath + initPath + this.hdFileName.Text, true);
|
||||
|
||||
hdCheckResult.Text = string.Empty;
|
||||
ShowNotify("导入成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 导入Excel到数据库
|
||||
/// </summary>
|
||||
private void ImportExcelToDatabase(string fileName, bool import)
|
||||
{
|
||||
try
|
||||
{
|
||||
string msg = string.Empty;
|
||||
var dt = BLL.NPOIHelper.ExcelToDataSet(fileName, out msg, true);
|
||||
BLL.ErrLogInfo.WriteLog(msg);
|
||||
SaveExcelDataToDatabase(fileName, dt.Tables[0], import);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog("", ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 校验并保存数据到数据库
|
||||
/// </summary>
|
||||
private bool SaveExcelDataToDatabase(string fileName, DataTable pds, bool import)
|
||||
{
|
||||
int ic = pds.Columns.Count;
|
||||
if (ic < Cols)
|
||||
{
|
||||
ShowNotify($"导入Excel格式错误!Excel只有{ic}列", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
int ir = pds.Rows.Count;
|
||||
if (pds == null || ir <= 0)
|
||||
{
|
||||
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
var errors = new List<ErrorInfo>();
|
||||
var toInsert = new List<Model.Supervise_UnitHazardRegisterItem>();
|
||||
|
||||
for (int i = 0; i < ir; i++)
|
||||
{
|
||||
var (error, entity) = ValidateRowAndBuildEntity(pds.Rows[i], (i + 2).ToString(), import);
|
||||
if (error.Any())
|
||||
errors.AddRange(error);
|
||||
else
|
||||
toInsert.Add(entity);
|
||||
}
|
||||
if (errors.Count > 0)
|
||||
{
|
||||
errorInfos.Clear();
|
||||
errorInfos.AddRange(errors);
|
||||
this.gvErrorInfo.DataSource = errorInfos;
|
||||
this.gvErrorInfo.DataBind();
|
||||
ShowNotify("存在校验错误,请先审核并修正后再导入。", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
try
|
||||
{
|
||||
if (toInsert.Any())
|
||||
{
|
||||
Funs.DB.Supervise_UnitHazardRegisterItem.InsertAllOnSubmit(toInsert);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
ShowNotify($"成功导入 {toInsert.Count} 条记录。", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog("导入 Hazard_HazardRegister_Unit 失败", ex);
|
||||
ShowNotify("导入失败:" + ex.Message, MessageBoxIcon.Error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion // 导入
|
||||
}
|
||||
}
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.ZHGL.Supervise
|
||||
{
|
||||
|
||||
|
||||
public partial class UnitHazardRegisterDetailIn
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <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>
|
||||
/// 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;
|
||||
|
||||
/// <summary>
|
||||
/// hdFileName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdFileName;
|
||||
|
||||
/// <summary>
|
||||
/// hdCheckResult 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdCheckResult;
|
||||
|
||||
/// <summary>
|
||||
/// lblBottom 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lblBottom;
|
||||
}
|
||||
}
|
||||
@@ -44,25 +44,27 @@
|
||||
Label="检查类别" AutoSelectFirstItem="true" Required="true" ShowRedStar="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="ddlCheckUnitId" runat="server" EmptyText="请选择检查单位" OnSelectedIndexChanged="ddlCheckUnitId_SelectedIndexChanged"
|
||||
<f:DropDownList ID="ddlInspectionUnit" runat="server" EmptyText="请选择检查单位" OnSelectedIndexChanged="ddlInspectionUnit_SelectedIndexChanged"
|
||||
Label="检查单位" ShowRedStar="true" Required="true" AutoSelectFirstItem="true" AutoPostBack="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="ddlProjectId" runat="server" EmptyText="请选择项目" EnableEdit="true"
|
||||
Label="检查对象" ShowRedStar="true" AutoPostBack="true" OnSelectedIndexChanged="ddlProjectId_SelectedIndexChanged" Required="true">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="ddlInsResponsibleUserId" runat="server" EmptyText="请选择受检责任人" ShowRedStar="true">
|
||||
<f:DropDownList ID="ddlCheckUnitId" runat="server" EmptyText="请选择受检单位" OnSelectedIndexChanged="ddlCheckUnitId_SelectedIndexChanged"
|
||||
Label="受检单位" ShowRedStar="true" Required="true" AutoSelectFirstItem="true" AutoPostBack="true">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="ddlProjectId" runat="server" EmptyText="请选择受检项目" EnableEdit="true" Label="检查项目" AutoPostBack="true" OnSelectedIndexChanged="ddlProjectId_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="ddlInsResponsibleUserId" runat="server" Label="受检责任人" EmptyText="请选择受检责任人" ShowRedStar="true">
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtCheckTeam" runat="server" Label="检查组/人" MaxLength="200" Width="400px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
@@ -81,6 +83,9 @@
|
||||
<f:Button ID="btnAdd" Icon="Add" runat="server" Text="新增问题" ValidateForms="SimpleForm1"
|
||||
OnClick="btnAdd_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnImport" ToolTip="导入" Text="导入" Icon="ApplicationGet" runat="server"
|
||||
OnClick="btnImport_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
@@ -161,6 +166,10 @@
|
||||
Target="Self" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="600px" Height="400px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window2" Title="导入" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window2_Close" IsModal="true"
|
||||
CloseAction="HidePostBack" Width="720px" Height="560px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="上传附件" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" OnClose="WindowAtt_Close" IsModal="true" Width="750px" Height="500px">
|
||||
</f:Window>
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.BaseInfo;
|
||||
using FineUIPro.Web.SysManage;
|
||||
using Microsoft.Win32;
|
||||
using Model;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||
|
||||
namespace FineUIPro.Web.ZHGL.Supervise
|
||||
{
|
||||
@@ -42,13 +40,14 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
|
||||
InitDropList();
|
||||
|
||||
var unitModel = UnitService.GetUnitByUnitId(this.CurrUser.UnitId);
|
||||
var thisUnitId = BLL.Const.UnitId_SEDIN;
|
||||
|
||||
this.UnitHazardRegisterId = Request.Params["UnitHazardRegisterId"];
|
||||
var register = BLL.UnitHazardRegisterService.GetUnitHazardRegisterById(this.UnitHazardRegisterId);
|
||||
|
||||
if (register != null)
|
||||
{
|
||||
// 编辑模式 - 加载数据
|
||||
{// 编辑模式 - 加载数据
|
||||
this.txtUnitHazardRegisterCode.Text = register.UnitHazardRegisterCode;
|
||||
if (register.CheckDate != null)
|
||||
{
|
||||
@@ -58,11 +57,23 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(register.CheckType))
|
||||
{
|
||||
BLL.SuperviseCheckTypeService.InitCheckTypeDropDownListByMainType(
|
||||
this.drpCheckType, register.CheckMainType, false);
|
||||
BLL.SuperviseCheckTypeService.InitCheckTypeDropDownListByMainType(this.drpCheckType, register.CheckMainType, false);
|
||||
this.drpCheckType.SelectedValue = register.CheckType;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(register.CheckUnitId))
|
||||
{
|
||||
this.ddlCheckUnitId.SelectedValue = register.CheckUnitId;
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(register.InspectionUnit))
|
||||
{
|
||||
this.ddlInspectionUnit.SelectedValue = register.InspectionUnit;
|
||||
if (register.InspectionUnit != thisUnitId)
|
||||
{
|
||||
this.ddlCheckUnitId.Readonly = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(register.ProjectId))
|
||||
{
|
||||
this.ddlProjectId.SelectedValue = register.ProjectId;
|
||||
@@ -73,71 +84,93 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
this.ddlInsResponsibleUserId.SelectedValue = register.InsResponsibleUserId;
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(register.CheckUnitId))
|
||||
else
|
||||
{
|
||||
this.ddlCheckUnitId.SelectedValue = register.CheckUnitId;
|
||||
Person_PersonsService.InitIsOfficeUserUnitIdDropDownList(this.ddlInsResponsibleUserId, this.ddlCheckUnitId.SelectedValue, true);
|
||||
if (!string.IsNullOrWhiteSpace(register.InsResponsibleUserId))
|
||||
{
|
||||
this.ddlInsResponsibleUserId.SelectedValue = register.InsResponsibleUserId;
|
||||
}
|
||||
}
|
||||
|
||||
this.txtCheckTeam.Text = register.CheckTeam;
|
||||
|
||||
// 加载明细
|
||||
items = BLL.UnitHazardRegisterItemService.GetItemsByRegisterId(this.UnitHazardRegisterId)
|
||||
.Select(x => new View_UnitHazardRegisterItem
|
||||
{
|
||||
UnitHazardRegisterItemId = x.UnitHazardRegisterItemId,
|
||||
ProblemDescription = x.ProblemDescription,
|
||||
ProblemType = x.ProblemType,
|
||||
RiskLevel = x.RiskLevel,
|
||||
RectifyRequirement = x.RectifyRequirement,
|
||||
CompleteStatus = x.CompleteStatus,
|
||||
CompletedDate = x.CompletedDate
|
||||
}).ToList();
|
||||
BindDetailGrid();
|
||||
|
||||
if (register.States> (int)UnitHazardRegisterService.StateInt.待提交)
|
||||
if (register.States > (int)UnitHazardRegisterService.StateInt.待提交)
|
||||
{
|
||||
btnImport.Hidden = true;
|
||||
btnAdd.Hidden = true;
|
||||
btnSave.Hidden = true;
|
||||
btnSubmit.Hidden = true;
|
||||
btnSubmit.Hidden = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 新增模式
|
||||
var unitModel = UnitService.GetUnitByUnitId(this.CurrUser.UnitId);
|
||||
{// 新增模式
|
||||
if (unitModel?.IsBranch == true)
|
||||
{
|
||||
this.ddlInspectionUnit.SelectedValue = this.CurrUser.UnitId;
|
||||
this.ddlCheckUnitId.SelectedValue = this.CurrUser.UnitId;
|
||||
}
|
||||
else
|
||||
{
|
||||
var thisUnit = BLL.CommonService.GetIsThisUnit();
|
||||
this.ddlCheckUnitId.SelectedValue = thisUnit.UnitId;
|
||||
this.ddlCheckUnitId.SelectedValue = thisUnitId;
|
||||
}
|
||||
BLL.Person_PersonsService.InitUserDropDownList(this.ddlInsResponsibleUserId, null, true, this.ddlCheckUnitId.SelectedValue);
|
||||
BLL.Person_PersonsService.InitIsOfficeUserUnitIdDropDownList(this.ddlInsResponsibleUserId, this.ddlCheckUnitId.SelectedValue, true);
|
||||
BLL.ProjectService.InitProjectDropDownList(this.ddlProjectId, this.ddlCheckUnitId.SelectedValue, true);//检查项目
|
||||
this.txtCheckTeam.Text = BLL.UnitService.GetUnitNameByUnitId(this.CurrUser.UnitId) + " " + this.CurrUser.PersonName;
|
||||
this.dpkCheckDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
|
||||
// 自动生成编号
|
||||
int newCount= UnitHazardRegisterService.GetCount(type)+1;
|
||||
this.txtUnitHazardRegisterCode.Text = newCount.ToString().PadLeft(5,'0');
|
||||
int newCount = UnitHazardRegisterService.GetCount(type) + 1;
|
||||
this.txtUnitHazardRegisterCode.Text = newCount.ToString().PadLeft(5, '0');
|
||||
}
|
||||
if (unitModel?.IsBranch == true)
|
||||
{
|
||||
this.ddlInspectionUnit.Readonly = true;
|
||||
this.ddlCheckUnitId.Readonly = true;
|
||||
}
|
||||
|
||||
Grid1.DataSource = items;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindDetailGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.UnitHazardRegisterId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
// 加载明细
|
||||
items = BLL.UnitHazardRegisterItemService.GetItemsByRegisterId(this.UnitHazardRegisterId)
|
||||
.Select(x => new View_UnitHazardRegisterItem
|
||||
{
|
||||
UnitHazardRegisterItemId = x.UnitHazardRegisterItemId,
|
||||
ProblemDescription = x.ProblemDescription,
|
||||
ProblemType = x.ProblemType,
|
||||
RiskLevel = x.RiskLevel,
|
||||
RectifyRequirement = x.RectifyRequirement,
|
||||
CompleteStatus = x.CompleteStatus,
|
||||
CompletedDate = x.CompletedDate
|
||||
}).ToList();
|
||||
Grid1.DataSource = items;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
|
||||
protected void InitDropList()
|
||||
{
|
||||
drpCheckMainType.SelectedValue = type;
|
||||
// 初始化下拉框
|
||||
BLL.UnitService.InitBranchUnitDropDownList(this.ddlCheckUnitId, false);
|
||||
BLL.ProjectService.InitProjectDropDownList(this.ddlProjectId, ddlCheckUnitId.SelectedValue, true);
|
||||
BLL.Person_PersonsService.InitUserDropDownList(this.ddlInsResponsibleUserId, this.ddlProjectId.SelectedValue, true, null);
|
||||
BLL.SuperviseCheckTypeService.InitCheckTypeDropDownListByMainType(
|
||||
this.drpCheckType, type, false);
|
||||
|
||||
if (type=="0")
|
||||
BLL.UnitService.InitBranchUnitDropDownList(this.ddlInspectionUnit, false);//检查单位
|
||||
BLL.UnitService.InitBranchUnitDropDownList(this.ddlCheckUnitId, false);//受检单位
|
||||
BLL.ProjectService.InitProjectDropDownList(this.ddlProjectId, ddlCheckUnitId.SelectedValue, true);//检查项目
|
||||
//BLL.UserService.InitUserDropDownList(this.ddlInsResponsibleUserId, this.ddlProjectId.SelectedValue, true, null);
|
||||
BLL.SuperviseCheckTypeService.InitCheckTypeDropDownListByMainType(this.drpCheckType, type, false);
|
||||
if (type == "0")
|
||||
{
|
||||
this.drpProblemType.DataTextField = "RegisterTypesName";
|
||||
this.drpProblemType.DataValueField = "RegisterTypesName";
|
||||
@@ -148,9 +181,6 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
{
|
||||
QualityQuestionTypeService.InitQualityQuestionType(drpProblemType, false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
protected void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -187,20 +217,25 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
Alert.ShowInTop("请选择检查类别!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.ddlProjectId.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择检查对象!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.ddlCheckUnitId.SelectedValue == BLL.Const._Null)
|
||||
if (this.ddlInspectionUnit.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择检查单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.ddlCheckUnitId.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择受检单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//if (this.ddlProjectId.SelectedValue == BLL.Const._Null)
|
||||
//{
|
||||
// Alert.ShowInTop("请选择检查对象!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
SaveNew();
|
||||
SaveItem();
|
||||
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
@@ -215,56 +250,96 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
Alert.ShowInTop("请选择检查类别!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.ddlProjectId.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择检查对象!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.ddlCheckUnitId.SelectedValue == BLL.Const._Null)
|
||||
if (this.ddlInspectionUnit.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择检查单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.ddlCheckUnitId.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择受检单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//if (this.ddlProjectId.SelectedValue == BLL.Const._Null)
|
||||
//{
|
||||
// Alert.ShowInTop("请选择检查对象!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
SaveNew(Const.BtnSubmit);
|
||||
SaveItem();
|
||||
|
||||
ShowNotify("提交成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
/// <summary>
|
||||
/// 检查单位下拉触发事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlInspectionUnit_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.ddlProjectId.Items.Clear();
|
||||
this.ddlInsResponsibleUserId.Items.Clear();
|
||||
var inspectionUnit = this.ddlInspectionUnit.SelectedValue;
|
||||
this.ddlCheckUnitId.SelectedValue = inspectionUnit;
|
||||
BLL.ProjectService.InitProjectDropDownList(this.ddlProjectId, this.ddlCheckUnitId.SelectedValue, true);
|
||||
Person_PersonsService.InitIsOfficeUserUnitIdDropDownList(this.ddlInsResponsibleUserId, this.ddlCheckUnitId.SelectedValue, true);
|
||||
if (inspectionUnit == CommonService.GetIsThisUnit().UnitId)
|
||||
{
|
||||
this.ddlCheckUnitId.Readonly = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ddlCheckUnitId.Readonly = true;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 受检单位下拉触发事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlCheckUnitId_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.ddlProjectId.Items.Clear();
|
||||
this.ddlInsResponsibleUserId.Items.Clear();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.ddlProjectId,ddlCheckUnitId.SelectedValue, true);
|
||||
|
||||
}
|
||||
protected void ddlProjectId_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.ddlInsResponsibleUserId.Items.Clear();
|
||||
//BLL.UnitService.InitUnitNameByProjectIdUnitTypeDropDownList(this.ddlUnitId, this.ddlProjectId.SelectedValue, Const.ProjectUnitType_1, true);
|
||||
BLL.Person_PersonsService.InitUserDropDownList(this.ddlInsResponsibleUserId, this.ddlProjectId.SelectedValue, true, null);
|
||||
|
||||
}
|
||||
|
||||
protected void drpCheckMainType_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
BLL.SuperviseCheckTypeService.InitCheckTypeDropDownListByMainType(
|
||||
this.drpCheckType, this.drpCheckMainType.SelectedValue, false);
|
||||
BLL.ProjectService.InitProjectDropDownList(this.ddlProjectId, this.ddlCheckUnitId.SelectedValue, true);
|
||||
Person_PersonsService.InitIsOfficeUserUnitIdDropDownList(this.ddlInsResponsibleUserId, this.ddlCheckUnitId.SelectedValue, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// 受检项目下拉触发事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlProjectId_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.ddlInsResponsibleUserId.Items.Clear();
|
||||
//BLL.UnitService.InitUnitNameByProjectIdUnitTypeDropDownList(this.ddlUnitId, this.ddlProjectId.SelectedValue, Const.ProjectUnitType_1, true);
|
||||
BLL.Person_PersonsService.InitUserDropDownList(this.ddlInsResponsibleUserId, this.ddlProjectId.SelectedValue, true, null);
|
||||
}
|
||||
/// <summary>
|
||||
/// 检查大类下拉触发事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpCheckMainType_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
BLL.SuperviseCheckTypeService.InitCheckTypeDropDownListByMainType(this.drpCheckType, this.drpCheckMainType.SelectedValue, false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///设置LinkButtonField的点击客户端事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PreDataBound(object sender, EventArgs e)
|
||||
{
|
||||
{
|
||||
// 设置LinkButtonField的点击客户端事件
|
||||
LinkButtonField deleteField = Grid1.FindColumn("Delete") as LinkButtonField;
|
||||
deleteField.OnClientClick = GetDeleteScript();
|
||||
var register = BLL.UnitHazardRegisterService.GetUnitHazardRegisterById(this.UnitHazardRegisterId);
|
||||
|
||||
if (register!=null&& register.States > (int)UnitHazardRegisterService.StateInt.待提交)
|
||||
if (register != null && register.States > (int)UnitHazardRegisterService.StateInt.待提交)
|
||||
{
|
||||
LinkButtonField lbUpload = Grid1.FindColumn(6) as LinkButtonField;
|
||||
LinkButtonField lbDelete = Grid1.FindColumn(7) as LinkButtonField;
|
||||
@@ -272,8 +347,6 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
lbUpload.Enabled = false;
|
||||
lbDelete.Enabled = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||
@@ -303,8 +376,8 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
ProblemType = values.Value<string>("ProblemType"),
|
||||
RiskLevel = values.Value<string>("RiskLevel"),
|
||||
RectifyRequirement = values.Value<string>("RectifyRequirement"),
|
||||
CompleteStatus = 0
|
||||
};
|
||||
CompleteStatus = 0
|
||||
};
|
||||
if (UnitHazardRegisterItemService.GetUnitHazardRegisterItemById(registerItem.UnitHazardRegisterItemId) != null)
|
||||
{
|
||||
UnitHazardRegisterItemService.UpdateUnitHazardRegisterItem(registerItem);
|
||||
@@ -313,10 +386,10 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
{
|
||||
BLL.UnitHazardRegisterItemService.AddUnitHazardRegisterItem(registerItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void SaveNew(string type="")
|
||||
protected void SaveNew(string type = "")
|
||||
{
|
||||
Supervise_UnitHazardRegister register = new Supervise_UnitHazardRegister
|
||||
{
|
||||
@@ -324,16 +397,20 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
CheckDate = Funs.GetNewDateTime(this.dpkCheckDate.Text.Trim()),
|
||||
CheckMainType = this.drpCheckMainType.SelectedValue,
|
||||
CheckType = this.drpCheckType.SelectedValue,
|
||||
ProjectId = this.ddlProjectId.SelectedValue,
|
||||
InspectionUnit = this.ddlInspectionUnit.SelectedValue,
|
||||
//ProjectId = this.ddlProjectId.SelectedValue,
|
||||
CheckUnitId = this.ddlCheckUnitId.SelectedValue,
|
||||
InsResponsibleUserId = this.ddlInsResponsibleUserId.SelectedValue,
|
||||
CheckTeam = this.txtCheckTeam.Text.Trim(),
|
||||
CompileMan = this.CurrUser.PersonId,
|
||||
States = (int)UnitHazardRegisterService.StateInt.待提交
|
||||
};
|
||||
if (!string.IsNullOrEmpty(this.ddlProjectId.SelectedValue) && this.ddlProjectId.SelectedValue != Const._Null)
|
||||
{
|
||||
register.ProjectId = this.ddlProjectId.SelectedValue;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(type))
|
||||
{
|
||||
|
||||
register.States = (int)UnitHazardRegisterService.StateInt.待整改;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(this.UnitHazardRegisterId))
|
||||
@@ -363,7 +440,7 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
.Select(x => new View_UnitHazardRegisterItem
|
||||
{
|
||||
UnitHazardRegisterItemId = x.UnitHazardRegisterItemId,
|
||||
ProblemDescription = x.ProblemDescription,
|
||||
ProblemDescription = x.ProblemDescription,
|
||||
ProblemType = x.ProblemType,
|
||||
RiskLevel = x.RiskLevel,
|
||||
RectifyRequirement = x.RectifyRequirement,
|
||||
@@ -374,7 +451,7 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
Grid1.DataSource = items;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
|
||||
protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
// 刷新Grid数据
|
||||
@@ -402,24 +479,52 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
#endregion Methods
|
||||
|
||||
|
||||
#region 导入
|
||||
/// <summary>
|
||||
/// 导入按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.UnitHazardRegisterId))
|
||||
{
|
||||
SaveNew();
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("UnitHazardRegisterDetailIn.aspx?Type={0}&UnitHazardRegisterId={1}", type, this.UnitHazardRegisterId, "导入 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭导入弹出窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window2_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindDetailGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 企业级检查明细视图类
|
||||
/// </summary>
|
||||
public class View_UnitHazardRegisterItem
|
||||
{
|
||||
#region Properties
|
||||
{
|
||||
#region Properties
|
||||
|
||||
public DateTime? CompletedDate { get; set; }
|
||||
public int? CompleteStatus { get; set; }
|
||||
public string ProblemDescription { get; set; }
|
||||
public string ProblemImageUrl { get; set; }
|
||||
public string ProblemType { get; set; }
|
||||
public string RectifyRequirement { get; set; }
|
||||
public string RiskLevel { get; set; }
|
||||
public string UnitHazardRegisterItemId { get; set; }
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
|
||||
public DateTime? CompletedDate { get; set; }
|
||||
public int? CompleteStatus { get; set; }
|
||||
public string ProblemDescription { get; set; }
|
||||
public string ProblemImageUrl { get; set; }
|
||||
public string ProblemType { get; set; }
|
||||
public string RectifyRequirement { get; set; }
|
||||
public string RiskLevel { get; set; }
|
||||
public string UnitHazardRegisterItemId { get; set; }
|
||||
|
||||
#endregion Properties
|
||||
}
|
||||
}
|
||||
@@ -77,6 +77,15 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpCheckType;
|
||||
|
||||
/// <summary>
|
||||
/// ddlInspectionUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlInspectionUnit;
|
||||
|
||||
/// <summary>
|
||||
/// ddlCheckUnitId 控件。
|
||||
/// </summary>
|
||||
@@ -149,6 +158,15 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAdd;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// txtProblemDescription 控件。
|
||||
/// </summary>
|
||||
@@ -275,6 +293,15 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<f:ListItem Text="重大" Value="重大" />
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpProblemStates" runat="server" Label="问题整改状态" AutoPostBack="true" EmptyText="-请选择-" AutoSelectFirstItem="false"
|
||||
OnSelectedIndexChanged="TextBox_TextChanged" LabelWidth="120px" LabelAlign="Right" Width="200px">
|
||||
OnSelectedIndexChanged="TextBox_TextChanged" LabelWidth="120px" LabelAlign="Right" Width="220px">
|
||||
<f:ListItem Text="待整改" Value="0" />
|
||||
<f:ListItem Text="已整改" Value="1" />
|
||||
</f:DropDownList>
|
||||
@@ -178,7 +178,7 @@
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="查看明细" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
|
||||
Width="900px" Height="580px">
|
||||
Width="1200px" Height="720px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="问题图片" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="750px"
|
||||
|
||||
@@ -15,7 +15,10 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
|
||||
|
||||
//if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
//{
|
||||
// Grid1.PageSize = this.CurrUser.PageSize.Value;
|
||||
//}
|
||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
|
||||
// 绑定表格
|
||||
|
||||
@@ -18,24 +18,30 @@
|
||||
<Items>
|
||||
<f:TextBox ID="txtCheckType" runat="server" Label="检查类别" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtProblemType" runat="server" Label="问题类型" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtRiskLevel" runat="server" Label="风险级别" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtCheckDate" runat="server" Label="检查日期" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtInspectionUnit" runat="server" Label="检查单位" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtCheckTeam" runat="server" Label="检查组/人" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtCheckUnitName" runat="server" Label="检查单位" Readonly="true">
|
||||
<%--<f:TextBox ID="txtCheckUnitName" runat="server" Label="受检单位" Readonly="true">
|
||||
</f:TextBox>--%>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtProblemType" runat="server" Label="问题类型" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtRiskLevel" runat="server" Label="风险级别" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
|
||||
@@ -92,11 +92,12 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", register.CheckDate);
|
||||
}
|
||||
|
||||
this.txtInspectionUnit.Text = BLL.UnitService.GetUnitNameByUnitId(register.InspectionUnit);
|
||||
this.txtCheckTeam.Text = register.CheckTeam;
|
||||
this.txtCheckUnitName.Text = BLL.UnitService.GetUnitNameByUnitId(register.CheckUnitId);
|
||||
//this.txtCheckUnitName.Text = BLL.UnitService.GetUnitNameByUnitId(register.CheckUnitId);
|
||||
this.txtProblemDescription.Text = item.ProblemDescription;
|
||||
this.txtRectifyRequirement.Text = item.RectifyRequirement;
|
||||
this.txtInsResponsibleUserName.Text = Person_PersonsService.GetPersonsNameById(register.InsResponsibleUserId);
|
||||
this.txtInsResponsibleUserName.Text = Person_PersonsService.GetUserNameByUserId(register.InsResponsibleUserId);
|
||||
|
||||
// 填充可编辑字段
|
||||
this.txtRectificationMeasures.Text = item.RectificationMeasures;
|
||||
|
||||
+27
-27
@@ -50,6 +50,33 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCheckType;
|
||||
|
||||
/// <summary>
|
||||
/// txtCheckDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCheckDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtInspectionUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtInspectionUnit;
|
||||
|
||||
/// <summary>
|
||||
/// txtCheckTeam 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCheckTeam;
|
||||
|
||||
/// <summary>
|
||||
/// txtProblemType 控件。
|
||||
/// </summary>
|
||||
@@ -68,33 +95,6 @@ namespace FineUIPro.Web.ZHGL.Supervise
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtRiskLevel;
|
||||
|
||||
/// <summary>
|
||||
/// txtCheckDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCheckDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtCheckTeam 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCheckTeam;
|
||||
|
||||
/// <summary>
|
||||
/// txtCheckUnitName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCheckUnitName;
|
||||
|
||||
/// <summary>
|
||||
/// txtProblemDescription 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user