集成人员同步,专项检查同步
This commit is contained in:
@@ -25,6 +25,9 @@
|
||||
<f:TextBox runat="server" Label="检查人" ID="txtCheckMan" EmptyText="输入查询条件" AutoPostBack="true"
|
||||
OnTextChanged="TextBox_TextChanged" LabelAlign="right" Width="210px" LabelWidth="80px">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpProblemTypes" runat="server" Label="检查类型" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged"
|
||||
LabelWidth="80px" LabelAlign="Right">
|
||||
</f:DropDownList>
|
||||
<%--<f:TextBox runat="server" Label="检查项" ID="txtType" EmptyText="输入查询条件" AutoPostBack="true"
|
||||
OnTextChanged="TextBox_TextChanged" LabelAlign="right" Width="210px" LabelWidth="80px">
|
||||
</f:TextBox>--%>
|
||||
@@ -44,6 +47,12 @@
|
||||
<f:ListItem Text="较大事故隐患" Value="较大事故隐患" />
|
||||
<f:ListItem Text="重大事故隐患" Value="重大事故隐患" />
|
||||
</f:DropDownList>
|
||||
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" LabelWidth="80px" LabelAlign="Right" Label="来源" ID="drpDataSource" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||
<f:ListItem Text="-请选择-" Value="null" />
|
||||
<f:ListItem Text="本单位" Value="0" />
|
||||
<f:ListItem Text="总包" Value="1" />
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
@@ -75,6 +84,8 @@
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPull" runat="server" OnClick="btnPull_Click" ToolTip="获取" Text="获取">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
@@ -94,7 +105,7 @@
|
||||
HeaderText="检查时间" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="HiddenType" DataField="HiddenType"
|
||||
FieldType="String" HeaderText="隐患类型" TextAlign="Center"
|
||||
FieldType="String" HeaderText="隐患类型" TextAlign="Center"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="Risk_Level" DataField="Risk_Level"
|
||||
@@ -169,6 +180,14 @@
|
||||
<asp:LinkButton ID="lbtnRectificationImageUrl" runat="server" Text='<%#ConvertImgUrl(Eval("HazardRegisterId")) %>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>--%>
|
||||
|
||||
<f:TemplateField ColumnID="DataSource" Width="120px" HeaderText="来源" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbDataSource" runat="server" Text='<%# ConvertDataSource(Eval("DataSource")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
|
||||
<f:LinkButtonField Width="50px" HeaderText="删除" ConfirmText="确定要删除此条信息吗?" ConfirmTarget="Parent" ColumnID="Del"
|
||||
CommandName="del" TextAlign="Center" ToolTip="删除" Icon="Delete" Hidden="true" />
|
||||
</Columns>
|
||||
|
||||
@@ -55,6 +55,15 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
{
|
||||
Type = Request.Params["Type"];
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
ListItem[] ProblemTypes = new ListItem[2];
|
||||
ProblemTypes[0] = new ListItem("日常巡检", "1");
|
||||
ProblemTypes[1] = new ListItem("专项巡检", "2");
|
||||
this.drpProblemTypes.DataValueField = "Value";
|
||||
this.drpProblemTypes.DataTextField = "Text";
|
||||
this.drpProblemTypes.DataSource = ProblemTypes;
|
||||
this.drpProblemTypes.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpProblemTypes);
|
||||
|
||||
GetButtonPower();
|
||||
this.ItemSelectedList = new List<string>();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
@@ -73,7 +82,8 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = "SELECT * FROM View_Hazard_HazardRegister WHERE ProblemTypes='1' ";
|
||||
//string strSql = "SELECT * FROM View_Hazard_HazardRegister WHERE ProblemTypes='1' ";
|
||||
string strSql = "SELECT * FROM View_Hazard_HazardRegister ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
@@ -90,6 +100,23 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
strSql += " AND CheckManName LIKE @CheckMan";
|
||||
listStr.Add(new SqlParameter("@CheckMan", "%" + this.txtCheckMan.Text.Trim() + "%"));
|
||||
}
|
||||
if (this.drpProblemTypes.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND ProblemTypes = @ProblemTypes";
|
||||
listStr.Add(new SqlParameter("@ProblemTypes", this.drpProblemTypes.SelectedValue));
|
||||
}
|
||||
if (this.drpDataSource.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
if (this.drpDataSource.SelectedValue == "0")
|
||||
{
|
||||
strSql += " AND DataSource = @DataSource";
|
||||
}
|
||||
else
|
||||
{
|
||||
strSql += " AND (DataSource = @DataSource OR DataSource is null)";
|
||||
}
|
||||
listStr.Add(new SqlParameter("@DataSource", this.drpDataSource.SelectedValue));
|
||||
}
|
||||
//if (!string.IsNullOrEmpty(this.txtType.Text.Trim()))
|
||||
//{
|
||||
// strSql += " AND RegisterTypesName LIKE @Type";
|
||||
@@ -285,6 +312,20 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected string ConvertDataSource(object dataSource)
|
||||
{
|
||||
string data = "本单位";
|
||||
if (dataSource != null)
|
||||
{
|
||||
if (dataSource.ToString() == "1")
|
||||
{
|
||||
data = "总包";
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
#region 整改
|
||||
/// <summary>
|
||||
/// 整改按钮
|
||||
@@ -292,6 +333,50 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuRectify_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string RegistrationId = Grid1.SelectedRowID;
|
||||
var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(RegistrationId);
|
||||
if (registration != null)
|
||||
{
|
||||
if (registration.States == "1") //待整改
|
||||
{
|
||||
if (registration.DataSource == "1")
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationRectify.aspx?HazardRegisterId={0}", RegistrationId, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (registration.ResponsibleMan == this.CurrUser.UserId) //当前人是责任人,可以进行整改操作
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationRectify.aspx?HazardRegisterId={0}", RegistrationId, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您不是记录责任人,无法整改!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("该记录不是待整改状态,无法进行整改操作!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/// <summary>
|
||||
/// 整改按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuRectify_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
@@ -321,6 +406,8 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
#region 确认
|
||||
|
||||
+36
@@ -68,6 +68,15 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCheckMan;
|
||||
|
||||
/// <summary>
|
||||
/// drpProblemTypes 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpProblemTypes;
|
||||
|
||||
/// <summary>
|
||||
/// txtWorkAreaName 控件。
|
||||
/// </summary>
|
||||
@@ -104,6 +113,15 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList dpRiskLevel;
|
||||
|
||||
/// <summary>
|
||||
/// drpDataSource 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpDataSource;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
@@ -203,6 +221,15 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// btnPull 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPull;
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
@@ -230,6 +257,15 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label2;
|
||||
|
||||
/// <summary>
|
||||
/// lbDataSource 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbDataSource;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -128,6 +128,17 @@ namespace FineUIPro.Web.HiddenInspection
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HSSE_HiddenRectificationListMenuId, BLL.Const.BtnSave))
|
||||
{
|
||||
SaveData(true);
|
||||
#region 推送到总包
|
||||
var register = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(this.HazardRegisterId);
|
||||
if (register != null)
|
||||
{
|
||||
if (register.DataSource == "1")
|
||||
{
|
||||
//推送到总包
|
||||
APIHazardRegisterSyncService.pushHazardRegisterLists(this.CurrUser.LoginProjectId, register.HazardRegisterId);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user