风险分级管控清单改为文档式;安全防护验收新增检查人/检查时间并修复默认当前账号;实体重生成并移除旁路Code文件
- 风险分级管控清单(RiskControlList)由『一风险点一记录』明细结构改为文档式:工程名称(手输)/项目(绑定当前项目)/编制人/编制日期/附件/备注;新增 ProjectName/CompileMan/CompileDate 列(CREATE TABLE 脚本 2026-08-27-001);BLL 映射、编辑页/列表页、菜单(CQMS)同步 - 安全防护验收(SafetyAcceptanceEdit)加入 检查人/检查时间,检查人默认当前登录账号并兜底不显示问题 - 重新生成 Model.cs(含 HSSE_RiskControlList 新列与 HSSE_SafetyPatrol.Code),删除已由实体内置的旁路 HSSE_SafetyPatrol.Code.cs 及其 csproj 引用
This commit is contained in:
@@ -17,25 +17,17 @@
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="风险分级管控清单" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="RiskId"
|
||||
DataIDField="RiskId" AllowSorting="true"
|
||||
SortField="RiskName" SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true"
|
||||
SortField="ProjectName" SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"
|
||||
OnRowCommand="Grid1_RowCommand" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox runat="server" Label="风险点" ID="txtRiskName" EmptyText="输入查询条件"
|
||||
<f:TextBox runat="server" Label="工程名称" ID="txtProjectName" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="220px" LabelAlign="right"
|
||||
LabelWidth="80px">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="ddlRiskLevel" runat="server" Label="等级" LabelAlign="right" LabelWidth="50px"
|
||||
Width="140px" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||
<f:ListItem Text="全部" Value="" />
|
||||
<f:ListItem Text="重大" Value="重大" />
|
||||
<f:ListItem Text="较大" Value="较大" />
|
||||
<f:ListItem Text="一般" Value="一般" />
|
||||
<f:ListItem Text="低" Value="低" />
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" runat="server" OnClick="btnNew_Click">
|
||||
@@ -50,33 +42,25 @@
|
||||
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="150px" ColumnID="RiskName" DataField="RiskName"
|
||||
SortField="RiskName" FieldType="String" HeaderText="风险点" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="RiskLevel" DataField="RiskLevel"
|
||||
SortField="RiskLevel" FieldType="String" HeaderText="风险等级" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="RiskType" DataField="RiskType"
|
||||
SortField="RiskType" FieldType="String" HeaderText="风险类别" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="260px" ColumnID="ControlMeasure" DataField="ControlMeasure"
|
||||
SortField="ControlMeasure" FieldType="String" HeaderText="管控措施" HeaderTextAlign="Center"
|
||||
<f:RenderField Width="260px" ColumnID="ProjectName" DataField="ProjectName"
|
||||
SortField="ProjectName" FieldType="String" HeaderText="工程名称" HeaderTextAlign="Center"
|
||||
TextAlign="Left" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="140px" ColumnID="ManagerUnit" DataField="ManagerUnit"
|
||||
SortField="ManagerUnit" FieldType="String" HeaderText="责任单位" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
<f:RenderField Width="100px" ColumnID="CompileMan" DataField="CompileMan"
|
||||
SortField="CompileMan" FieldType="String" HeaderText="编制人" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="ManagerMan" DataField="ManagerMan"
|
||||
SortField="ManagerMan" FieldType="String" HeaderText="责任人" HeaderTextAlign="Center"
|
||||
<f:RenderField Width="120px" ColumnID="CompileDate" DataField="CompileDate"
|
||||
SortField="CompileDate" FieldType="Date" Renderer="Date" HeaderText="编制日期" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:LinkButtonField Width="80px" ColumnID="UploadFile" CommandName="attchUrl"
|
||||
HeaderText="附件" HeaderTextAlign="Center" TextAlign="Center" Text="附件">
|
||||
</f:LinkButtonField>
|
||||
<f:RenderField Width="200px" ColumnID="Remark" DataField="Remark"
|
||||
SortField="Remark" FieldType="String" HeaderText="备注" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
|
||||
@@ -48,15 +48,11 @@ namespace FineUIPro.Web.HSSE.HazardousMG
|
||||
return;
|
||||
}
|
||||
List<Model.HSSE_RiskControlList> list = BLL.RiskControlListService.GetList(this.CurrUser.LoginProjectId);
|
||||
////查询条件过滤
|
||||
string name = this.txtRiskName.Text.Trim();
|
||||
////查询条件过滤:按工程名称
|
||||
string name = this.txtProjectName.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(name))
|
||||
{
|
||||
list = list.Where(x => x.RiskName.Contains(name)).ToList();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.ddlRiskLevel.SelectedValue))
|
||||
{
|
||||
list = list.Where(x => x.RiskLevel == this.ddlRiskLevel.SelectedValue).ToList();
|
||||
list = list.Where(x => x.ProjectName != null && x.ProjectName.Contains(name)).ToList();
|
||||
}
|
||||
Grid1.RecordCount = list.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, list);
|
||||
|
||||
@@ -40,14 +40,9 @@ namespace FineUIPro.Web.HSSE.HazardousMG
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// txtRiskName 控件。
|
||||
/// txtProjectName 控件。
|
||||
/// </summary>
|
||||
protected global::FineUIPro.TextBox txtRiskName;
|
||||
|
||||
/// <summary>
|
||||
/// ddlRiskLevel 控件。
|
||||
/// </summary>
|
||||
protected global::FineUIPro.DropDownList ddlRiskLevel;
|
||||
protected global::FineUIPro.TextBox txtProjectName;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
|
||||
@@ -16,40 +16,26 @@
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtRiskName" runat="server" Label="风险点" LabelAlign="Right"
|
||||
MaxLength="100" Required="true" ShowRedStar="true" LabelWidth="90px">
|
||||
<f:TextBox ID="txtProjectName" runat="server" Label="工程名称" LabelAlign="Right"
|
||||
MaxLength="200" Required="true" ShowRedStar="true" LabelWidth="110px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="ddlRiskLevel" runat="server" Label="风险等级" LabelAlign="Right"
|
||||
LabelWidth="90px" Required="true" ShowRedStar="true">
|
||||
<f:ListItem Text="重大" Value="重大" />
|
||||
<f:ListItem Text="较大" Value="较大" />
|
||||
<f:ListItem Text="一般" Value="一般" />
|
||||
<f:ListItem Text="低" Value="低" />
|
||||
<f:TextBox ID="txtBindProject" runat="server" Label="项目" LabelAlign="Right"
|
||||
Readonly="true" LabelWidth="110px">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="ddlCompileMan" runat="server" Label="编制人" LabelAlign="Right"
|
||||
LabelWidth="110px" Required="true" ShowRedStar="true">
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtRiskType" runat="server" Label="风险类别" LabelAlign="Right"
|
||||
MaxLength="50" LabelWidth="90px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtControlMeasure" runat="server" Label="管控措施" LabelAlign="Right" Height="80px"
|
||||
MaxLength="500" Required="true" ShowRedStar="true" LabelWidth="90px">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtManagerUnit" runat="server" Label="责任单位" LabelAlign="Right"
|
||||
MaxLength="100" LabelWidth="90px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtManagerMan" runat="server" Label="责任人" LabelAlign="Right"
|
||||
MaxLength="50" LabelWidth="90px">
|
||||
</f:TextBox>
|
||||
<f:DatePicker ID="dpkCompileDate" runat="server" Label="编制日期" LabelAlign="Right"
|
||||
LabelWidth="110px" DateFormatString="yyyy-MM-dd" Required="true" ShowRedStar="true">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
@@ -57,7 +43,7 @@
|
||||
<f:Panel ID="Panel2" ShowHeader="false" ShowBorder="false" Layout="Column" CssClass="" runat="server">
|
||||
<Items>
|
||||
<f:Label ID="Label1" runat="server" ShowRedStar="true" Label="上传附件"
|
||||
LabelWidth="90px" LabelAlign="Right">
|
||||
LabelWidth="110px" LabelAlign="Right">
|
||||
</f:Label>
|
||||
<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" Text="附件" runat="server" OnClick="btnAttach_Click">
|
||||
</f:Button>
|
||||
@@ -68,7 +54,7 @@
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtRemark" runat="server" Label="备注" LabelAlign="Right"
|
||||
MaxLength="500" LabelWidth="90px">
|
||||
MaxLength="500" LabelWidth="110px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
@@ -35,6 +35,7 @@ namespace FineUIPro.Web.HSSE.HazardousMG
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
this.InitCompileMan();
|
||||
this.RiskId = Request.Params["RiskId"];
|
||||
if (!string.IsNullOrEmpty(this.RiskId))
|
||||
{
|
||||
@@ -42,17 +43,54 @@ namespace FineUIPro.Web.HSSE.HazardousMG
|
||||
Model.HSSE_RiskControlList info = BLL.RiskControlListService.GetById(this.RiskId);
|
||||
if (info != null)
|
||||
{
|
||||
this.txtRiskName.Text = info.RiskName;
|
||||
this.ddlRiskLevel.SelectedValue = info.RiskLevel;
|
||||
this.txtRiskType.Text = info.RiskType;
|
||||
this.txtControlMeasure.Text = info.ControlMeasure;
|
||||
this.txtManagerUnit.Text = info.ManagerUnit;
|
||||
this.txtManagerMan.Text = info.ManagerMan;
|
||||
this.txtProjectName.Text = info.ProjectName;
|
||||
this.txtBindProject.Text = BLL.ProjectService.GetProjectByProjectId(info.ProjectId).ProjectName;
|
||||
////编制人按人名回显;名称不在名单则追加原名称(保留旧数据)
|
||||
FineUIPro.ListItem item = this.ddlCompileMan.Items.FirstOrDefault(x => x.Text == info.CompileMan);
|
||||
if (item != null)
|
||||
{
|
||||
this.ddlCompileMan.SelectedValue = item.Value;
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(info.CompileMan))
|
||||
{
|
||||
this.ddlCompileMan.Items.Insert(0, new FineUIPro.ListItem(info.CompileMan, ""));
|
||||
if (this.ddlCompileMan.Items.Count > 0)
|
||||
{
|
||||
this.ddlCompileMan.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
this.dpkCompileDate.SelectedDate = info.CompileDate;
|
||||
this.txtRemark.Text = info.Remark;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
////新增:项目绑定当前登录项目,编制日期默认当天(编制人默认当前账号已在 InitCompileMan 中选中)
|
||||
this.txtBindProject.Text = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectName;
|
||||
this.dpkCompileDate.SelectedDate = DateTime.Now;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化编制人下拉并默认当前登录账号。
|
||||
/// 若当前账号不在项目用户名单(如管理账号未挂成员记录),追加到首位保证默认可选中。
|
||||
/// </summary>
|
||||
private void InitCompileMan()
|
||||
{
|
||||
if (this.CurrUser == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
BLL.UserService.InitUserDropDownList(this.ddlCompileMan, this.CurrUser.LoginProjectId, false);
|
||||
////当前账号不在下拉项中则追加到首位
|
||||
bool found = this.ddlCompileMan.Items.Any(x => x.Value == this.CurrUser.UserId);
|
||||
if (!found)
|
||||
{
|
||||
this.ddlCompileMan.Items.Insert(0, new FineUIPro.ListItem(this.CurrUser.UserName, this.CurrUser.UserId));
|
||||
}
|
||||
this.ddlCompileMan.SelectedValue = this.CurrUser.UserId;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
@@ -78,16 +116,15 @@ namespace FineUIPro.Web.HSSE.HazardousMG
|
||||
Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
////编制人取下拉选中项文本(存人名),无选中则为空
|
||||
string compileManName = this.ddlCompileMan.SelectedItem == null ? string.Empty : this.ddlCompileMan.SelectedItem.Text.Trim();
|
||||
Model.HSSE_RiskControlList info = new Model.HSSE_RiskControlList
|
||||
{
|
||||
RiskId = this.RiskId,
|
||||
ProjectId = this.CurrUser.LoginProjectId,
|
||||
RiskName = this.txtRiskName.Text.Trim(),
|
||||
RiskLevel = this.ddlRiskLevel.SelectedValue,
|
||||
RiskType = this.txtRiskType.Text.Trim(),
|
||||
ControlMeasure = this.txtControlMeasure.Text.Trim(),
|
||||
ManagerUnit = this.txtManagerUnit.Text.Trim(),
|
||||
ManagerMan = this.txtManagerMan.Text.Trim(),
|
||||
ProjectName = this.txtProjectName.Text.Trim(),
|
||||
CompileMan = compileManName,
|
||||
CompileDate = this.dpkCompileDate.SelectedDate,
|
||||
Remark = this.txtRemark.Text.Trim()
|
||||
};
|
||||
////存在则更新,不存在则新增(服务层已处理)
|
||||
|
||||
@@ -45,34 +45,24 @@ namespace FineUIPro.Web.HSSE.HazardousMG
|
||||
protected global::FineUIPro.Button btnAttach;
|
||||
|
||||
/// <summary>
|
||||
/// txtRiskName 控件。
|
||||
/// txtProjectName 控件。
|
||||
/// </summary>
|
||||
protected global::FineUIPro.TextBox txtRiskName;
|
||||
protected global::FineUIPro.TextBox txtProjectName;
|
||||
|
||||
/// <summary>
|
||||
/// ddlRiskLevel 控件。
|
||||
/// txtBindProject 控件。
|
||||
/// </summary>
|
||||
protected global::FineUIPro.DropDownList ddlRiskLevel;
|
||||
protected global::FineUIPro.TextBox txtBindProject;
|
||||
|
||||
/// <summary>
|
||||
/// txtRiskType 控件。
|
||||
/// ddlCompileMan 控件。
|
||||
/// </summary>
|
||||
protected global::FineUIPro.TextBox txtRiskType;
|
||||
protected global::FineUIPro.DropDownList ddlCompileMan;
|
||||
|
||||
/// <summary>
|
||||
/// txtControlMeasure 控件。
|
||||
/// dpkCompileDate 控件。
|
||||
/// </summary>
|
||||
protected global::FineUIPro.TextArea txtControlMeasure;
|
||||
|
||||
/// <summary>
|
||||
/// txtManagerUnit 控件。
|
||||
/// </summary>
|
||||
protected global::FineUIPro.TextBox txtManagerUnit;
|
||||
|
||||
/// <summary>
|
||||
/// txtManagerMan 控件。
|
||||
/// </summary>
|
||||
protected global::FineUIPro.TextBox txtManagerMan;
|
||||
protected global::FineUIPro.DatePicker dpkCompileDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
|
||||
@@ -51,11 +51,11 @@
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="AcceptanceMan" DataField="AcceptanceMan"
|
||||
SortField="AcceptanceMan" FieldType="String" HeaderText="验收人" HeaderTextAlign="Center"
|
||||
SortField="AcceptanceMan" FieldType="String" HeaderText="检查人" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="AcceptanceDate" DataField="AcceptanceDate"
|
||||
SortField="AcceptanceDate" FieldType="Date" Renderer="Date" HeaderText="验收时间" HeaderTextAlign="Center"
|
||||
SortField="AcceptanceDate" FieldType="Date" Renderer="Date" HeaderText="检查时间" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:LinkButtonField Width="80px" ColumnID="Attachment" CommandName="attchUrl"
|
||||
|
||||
@@ -31,6 +31,16 @@
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="ddlPatrolMan" runat="server" Label="检查人" LabelAlign="Right"
|
||||
LabelWidth="130px">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker ID="dpPatrolDate" runat="server" Label="检查时间" LabelAlign="Right"
|
||||
LabelWidth="130px" DateFormatString="yyyy-MM-dd">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Panel ID="Panel2" ShowHeader="false" ShowBorder="false" Layout="Column" CssClass="" runat="server">
|
||||
|
||||
@@ -45,9 +45,15 @@ namespace FineUIPro.Web.HSSE.HazardousMG
|
||||
{
|
||||
this.ddlHazardProject.SelectedValue = info.HazardProjectId;
|
||||
this.ddlAcceptanceResult.SelectedValue = info.AcceptanceResult;
|
||||
this.InitCheckMan(info.AcceptanceMan, info.AcceptanceDate);
|
||||
this.txtRemark.Text = info.Remark;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
////新增:检查人默认当前登录账号,检查时间默认当天
|
||||
this.InitCheckMan(null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,6 +72,57 @@ namespace FineUIPro.Web.HSSE.HazardousMG
|
||||
this.ddlHazardProject.Items.Add(new FineUIPro.ListItem(p.ProjectName + "(" + p.ProjectCode + ")", p.HazardProjectId));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化检查人下拉并回显检查时间。新增默认当前登录账号、当天;编辑按名称回显。
|
||||
/// </summary>
|
||||
/// <param name="acceptanceMan">检查人名称(回显用,可为空)</param>
|
||||
/// <param name="acceptanceDate">检查时间(回显用,可为空)</param>
|
||||
private void InitCheckMan(string acceptanceMan, DateTime? acceptanceDate)
|
||||
{
|
||||
if (this.CurrUser == null || string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
List<Model.Sys_User> users = BLL.UserService.GetProjectUserListByProjectId(this.CurrUser.LoginProjectId);
|
||||
this.ddlPatrolMan.Items.Clear();
|
||||
|
||||
bool isNew = string.IsNullOrEmpty(acceptanceMan);
|
||||
////若当前登录账号不在项目用户名单(如管理账号未挂成员记录),追加到首位,
|
||||
////保证新增时“检查人”始终能显示并默认选中当前登录账号
|
||||
bool currUserInList = users.Any(u => u.UserId == this.CurrUser.UserId || u.UserName == this.CurrUser.UserName);
|
||||
if (!currUserInList)
|
||||
{
|
||||
this.ddlPatrolMan.Items.Add(new FineUIPro.ListItem(this.CurrUser.UserName, this.CurrUser.UserId));
|
||||
}
|
||||
|
||||
////新增且无回显名称:默认当前登录账号;编辑:按名称回显
|
||||
string selectValue = isNew ? this.CurrUser.UserId : string.Empty;
|
||||
foreach (Model.Sys_User u in users)
|
||||
{
|
||||
////编辑:按名称回显
|
||||
if (!isNew && string.IsNullOrEmpty(selectValue) && !string.IsNullOrEmpty(acceptanceMan) && u.UserName == acceptanceMan)
|
||||
{
|
||||
selectValue = u.UserId;
|
||||
}
|
||||
this.ddlPatrolMan.Items.Add(new FineUIPro.ListItem(u.UserName, u.UserId));
|
||||
}
|
||||
////名称在项目用户中找不到(如外部人员):追加原名称选项,保留旧数据
|
||||
if (!isNew && string.IsNullOrEmpty(selectValue) && !string.IsNullOrEmpty(acceptanceMan))
|
||||
{
|
||||
this.ddlPatrolMan.Items.Insert(0, new FineUIPro.ListItem(acceptanceMan, ""));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(selectValue))
|
||||
{
|
||||
this.ddlPatrolMan.SelectedValue = selectValue;
|
||||
}
|
||||
else if (this.ddlPatrolMan.Items.Count > 0)
|
||||
{
|
||||
this.ddlPatrolMan.SelectedIndex = 0;
|
||||
}
|
||||
////检查时间:有值回显,无值默认当天
|
||||
this.dpPatrolDate.SelectedDate = acceptanceDate.HasValue ? acceptanceDate.Value : DateTime.Now;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
@@ -98,6 +155,9 @@ namespace FineUIPro.Web.HSSE.HazardousMG
|
||||
{
|
||||
hazardProjectName = project.ProjectName;
|
||||
}
|
||||
////检查人名称:优先取下拉选中项文本;无选中则为空
|
||||
string patrolManName = this.ddlPatrolMan.SelectedItem == null ? string.Empty : this.ddlPatrolMan.SelectedItem.Text.Trim();
|
||||
DateTime? patrolDate = this.dpPatrolDate.SelectedDate;
|
||||
Model.HSSE_SafetyAcceptance info = new Model.HSSE_SafetyAcceptance
|
||||
{
|
||||
AcceptanceId = this.AcceptanceId,
|
||||
@@ -105,8 +165,8 @@ namespace FineUIPro.Web.HSSE.HazardousMG
|
||||
HazardProjectId = this.ddlHazardProject.SelectedValue,
|
||||
HazardProjectName = hazardProjectName,
|
||||
AcceptanceResult = this.ddlAcceptanceResult.SelectedValue,
|
||||
AcceptanceMan = this.CurrUser.UserName,
|
||||
AcceptanceDate = DateTime.Now,
|
||||
AcceptanceMan = patrolManName,
|
||||
AcceptanceDate = patrolDate,
|
||||
Remark = this.txtRemark.Text.Trim()
|
||||
};
|
||||
////存在则更新,不存在则新增(服务层已处理)
|
||||
|
||||
@@ -39,6 +39,16 @@ namespace FineUIPro.Web.HSSE.HazardousMG
|
||||
/// </summary>
|
||||
protected global::FineUIPro.DropDownList ddlAcceptanceResult;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPatrolMan 控件。
|
||||
/// </summary>
|
||||
protected global::FineUIPro.DropDownList ddlPatrolMan;
|
||||
|
||||
/// <summary>
|
||||
/// dpPatrolDate 控件。
|
||||
/// </summary>
|
||||
protected global::FineUIPro.DatePicker dpPatrolDate;
|
||||
|
||||
/// <summary>
|
||||
/// Panel2 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user