20230327展示页跳转
This commit is contained in:
@@ -19,7 +19,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
|
||||
@@ -24,7 +24,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
|
||||
@@ -20,7 +20,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格t
|
||||
BindGrid();
|
||||
|
||||
@@ -21,7 +21,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
// btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
|
||||
@@ -19,7 +19,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
// btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
|
||||
@@ -20,8 +20,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
@@ -21,7 +19,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
// btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格t
|
||||
BindGrid();
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.BaseInfo;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
@@ -21,7 +19,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
|
||||
@@ -20,7 +20,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
|
||||
@@ -21,7 +21,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
|
||||
@@ -29,6 +29,11 @@
|
||||
<f:DatePicker ID="txtStartTime" runat="server" Label="检查时间" LabelAlign="Right"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="200px" LabelWidth="80px">
|
||||
</f:DatePicker>
|
||||
<f:RadioButtonList runat="server" ID="rbType" Width="200px" Label="级别" LabelWidth="50px"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||
<f:RadioItem Text="重大" Value="0" Selected="true" />
|
||||
<f:RadioItem Text="一般" Value="1" />
|
||||
</f:RadioButtonList>
|
||||
<f:Label ID="Label3" runat="server" Text="至">
|
||||
</f:Label>
|
||||
<f:DatePicker ID="txtEndTime" runat="server" AutoPostBack="true" OnTextChanged="TextBox_TextChanged"
|
||||
@@ -52,19 +57,27 @@
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="350px" ColumnID="ProjectName" DataField="ProjectName" FieldType="String" HeaderText="项目名称" TextAlign="Left"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="allcount" DataField="allcount" FieldType="Int"
|
||||
HeaderText="问题数量" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="ccount" DataField="ccount" FieldType="Int"
|
||||
HeaderText="整改数量" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="ucCount" DataField="ucCount" FieldType="Int"
|
||||
HeaderText="未整改数量" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="rateV" DataField="rateV" FieldType="String" HeaderText="整改率(%)" TextAlign="Left"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
</f:RenderField>
|
||||
<f:TemplateField ColumnID="Count1" Width="120px" HeaderText="问题数量" HeaderTextAlign="Center" TextAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# Count1(Eval("ProjectId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField ColumnID="Count2" Width="120px" HeaderText="整改数量" HeaderTextAlign="Center" TextAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Count2(Eval("ProjectId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField ColumnID="Count3" Width="120px" HeaderText="未整改数量" HeaderTextAlign="Center" TextAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label4" runat="server" Text='<%# Count3(Eval("ProjectId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField ColumnID="Count4" Width="120px" HeaderText="整改率(%)" HeaderTextAlign="Center" TextAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label5" runat="server" Text='<%# Count4(Eval("ProjectId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
using Aspose.Words;
|
||||
using BLL;
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
@@ -24,7 +21,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
@@ -37,56 +33,36 @@ namespace FineUIPro.Web.DataShow
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"select NEWID() as ID, v.ProjectId,v.ProjectCode,v.ProjectName,v.allcount,v.ccount,isnull(v.allCount,0)-ISNULL(v.cCount,0) as ucCount,
|
||||
(case when isnull(v.allCount,0) > 0 then cast((isnull(v.allCount,0)-ISNULL(v.cCount,0)) *1.0 /isnull(v.allCount,0)*100 as decimal(18, 2))
|
||||
else 0 end) as rateV
|
||||
from (select h.ProjectId,p.ProjectCode,p.ProjectName,COUNT(*) as allCount,
|
||||
isnull((select COUNT(*) from HSSE_Hazard_HazardRegister as c
|
||||
where c.ProjectId=h.ProjectId and states =3
|
||||
and '1' = @cpara
|
||||
group by c.ProjectId),0) as cCount
|
||||
from HSSE_Hazard_HazardRegister as h
|
||||
left join Base_Project as p on h.ProjectId=p.ProjectId
|
||||
where p.projectId is not null ";
|
||||
string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
string cpara = string.Empty;
|
||||
if (this.drpProject.SelectedValue != Const._Null)
|
||||
{
|
||||
strSql += " AND h.projectId = @projectId"; ///状态为已完成
|
||||
strSql += " AND projectId = @projectId"; ///状态为已完成
|
||||
listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue));
|
||||
|
||||
cpara += " AND c.projectId ="+ this.drpProject.SelectedValue;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtStartTime.Text))
|
||||
{
|
||||
strSql += " AND h.RegisterDate >=@StartTime";
|
||||
listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text));
|
||||
//if (!string.IsNullOrEmpty(this.txtStartTime.Text))
|
||||
//{
|
||||
// strSql += " AND h.RegisterDate >=@StartTime";
|
||||
// listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text));
|
||||
|
||||
cpara += " AND c.RegisterDate >=" + this.txtStartTime.Text;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtEndTime.Text))
|
||||
{
|
||||
strSql += " AND h.RegisterDate <=@EndTime";
|
||||
listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text));
|
||||
// cpara += " AND c.RegisterDate >=" + this.txtStartTime.Text;
|
||||
//}
|
||||
//if (!string.IsNullOrEmpty(this.txtEndTime.Text))
|
||||
//{
|
||||
// strSql += " AND h.RegisterDate <=@EndTime";
|
||||
// listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text));
|
||||
|
||||
// cpara += " AND c.RegisterDate <=" + this.txtEndTime.Text;
|
||||
//}
|
||||
|
||||
cpara += " AND c.RegisterDate <=" + this.txtEndTime.Text;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(cpara))
|
||||
{
|
||||
listStr.Add(new SqlParameter("@cpara"," '1' And "+ cpara));
|
||||
}
|
||||
else
|
||||
{
|
||||
listStr.Add(new SqlParameter("@cpara", "'1'"));
|
||||
}
|
||||
strSql += " group by h.ProjectId,p.ProjectCode,p.ProjectName) as v";
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -177,5 +153,132 @@ namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
EditData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 数量
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <returns></returns>
|
||||
protected int Count1(object projectId)
|
||||
{
|
||||
int cout1 = 0;
|
||||
if (projectId != null)
|
||||
{
|
||||
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var getT = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId == projectId.ToString() && x.States != "4");
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getT = getT.Where(x => x.RegisterDate >= datetime1);
|
||||
}
|
||||
if (datetime2.HasValue)
|
||||
{
|
||||
getT = getT.Where(x => x.RegisterDate <= datetime2);
|
||||
}
|
||||
if (this.rbType.SelectedValue == "0")
|
||||
{
|
||||
getT = getT.Where(x => x.HazardValue == "3");
|
||||
}
|
||||
else
|
||||
{
|
||||
getT = getT.Where(x => x.HazardValue != "3");
|
||||
}
|
||||
cout1 = getT.Count();
|
||||
}
|
||||
return cout1;
|
||||
}
|
||||
|
||||
protected int Count2(object projectId)
|
||||
{
|
||||
int cout1 = 0;
|
||||
if (projectId != null)
|
||||
{
|
||||
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var getT = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId == projectId.ToString() && x.States == "3");
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getT = getT.Where(x => x.RegisterDate >= datetime1);
|
||||
}
|
||||
if (datetime2.HasValue)
|
||||
{
|
||||
getT = getT.Where(x => x.RegisterDate <= datetime2);
|
||||
}
|
||||
if (this.rbType.SelectedValue == "0")
|
||||
{
|
||||
getT = getT.Where(x => x.HazardValue == "3");
|
||||
}
|
||||
else
|
||||
{
|
||||
getT = getT.Where(x => x.HazardValue != "3");
|
||||
}
|
||||
cout1 = getT.Count();
|
||||
}
|
||||
return cout1;
|
||||
}
|
||||
|
||||
protected int Count3(object projectId)
|
||||
{
|
||||
int cout1 = 0;
|
||||
if (projectId != null)
|
||||
{
|
||||
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var getT = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId == projectId.ToString() && x.States != "3" && x.States != "4");
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getT = getT.Where(x => x.RegisterDate >= datetime1);
|
||||
}
|
||||
if (datetime2.HasValue)
|
||||
{
|
||||
getT = getT.Where(x => x.RegisterDate <= datetime2);
|
||||
}
|
||||
if (this.rbType.SelectedValue == "0")
|
||||
{
|
||||
getT = getT.Where(x => x.HazardValue == "3");
|
||||
}
|
||||
else
|
||||
{
|
||||
getT = getT.Where(x => x.HazardValue != "3");
|
||||
}
|
||||
cout1 = getT.Count();
|
||||
}
|
||||
return cout1;
|
||||
}
|
||||
|
||||
protected string Count4(object projectId)
|
||||
{
|
||||
string rate=string.Empty;
|
||||
if (projectId != null)
|
||||
{
|
||||
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var getALL= Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId == projectId.ToString() && x.States != "4");
|
||||
if (this.rbType.SelectedValue == "0")
|
||||
{
|
||||
getALL = getALL.Where(x => x.HazardValue == "3");
|
||||
}
|
||||
else
|
||||
{
|
||||
getALL = getALL.Where(x => x.HazardValue != "3");
|
||||
}
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getALL = getALL.Where(x => x.RegisterDate >= datetime1);
|
||||
}
|
||||
if (datetime2.HasValue)
|
||||
{
|
||||
getALL = getALL.Where(x => x.RegisterDate >= datetime1);
|
||||
}
|
||||
var getT = getALL.Where(x => x.ProjectId == projectId.ToString() && x.States == "3");
|
||||
int coutall = getALL.Count();
|
||||
int cout0 = getT.Count();
|
||||
if (coutall > 0)
|
||||
{
|
||||
rate = Math.Round(cout0 * 1.0 / coutall * 100, 2).ToString();
|
||||
}
|
||||
}
|
||||
return rate;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -77,6 +77,15 @@ namespace FineUIPro.Web.DataShow
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtStartTime;
|
||||
|
||||
/// <summary>
|
||||
/// rbType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rbType;
|
||||
|
||||
/// <summary>
|
||||
/// Label3 控件。
|
||||
/// </summary>
|
||||
@@ -113,6 +122,42 @@ namespace FineUIPro.Web.DataShow
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label labNumber;
|
||||
|
||||
/// <summary>
|
||||
/// Label2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label2;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// Label4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label4;
|
||||
|
||||
/// <summary>
|
||||
/// Label5 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label5;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -32,6 +32,11 @@
|
||||
<f:DatePicker ID="txtEndTime" runat="server" AutoPostBack="true" OnTextChanged="TextBox_TextChanged"
|
||||
Width="130px">
|
||||
</f:DatePicker>
|
||||
<f:RadioButtonList runat="server" ID="rbType" Width="200px" Label="级别" LabelWidth="50px"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||
<f:RadioItem Text="重大" Value="0" Selected="true" />
|
||||
<f:RadioItem Text="一般" Value="1" />
|
||||
</f:RadioButtonList>
|
||||
<f:DropDownList ID="drpStates" runat="server" Label="状态" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged"
|
||||
LabelWidth="70px" LabelAlign="Right" Width="210px">
|
||||
</f:DropDownList>
|
||||
|
||||
@@ -79,6 +79,16 @@ namespace FineUIPro.Web.DataShow
|
||||
strSql += " AND States LIKE @States";
|
||||
listStr.Add(new SqlParameter("@States", "%" + this.drpStates.SelectedValue + "%"));
|
||||
}
|
||||
if (this.rbType.SelectedValue == "0")
|
||||
{
|
||||
strSql += " AND HazardValue =@HazardValue";
|
||||
}
|
||||
else
|
||||
{
|
||||
strSql += " AND HazardValue != @HazardValue";
|
||||
}
|
||||
listStr.Add(new SqlParameter("@HazardValue", "3"));
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
|
||||
@@ -95,6 +95,15 @@ namespace FineUIPro.Web.DataShow
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtEndTime;
|
||||
|
||||
/// <summary>
|
||||
/// rbType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rbType;
|
||||
|
||||
/// <summary>
|
||||
/// drpStates 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -25,7 +25,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
LargerHazard = (from x in Funs.DB.Solution_LargerHazard
|
||||
|
||||
@@ -21,7 +21,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
// btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
@@ -37,7 +36,7 @@ namespace FineUIPro.Web.DataShow
|
||||
string strSql = string.Empty;
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
|
||||
strSql = @"T V.LicenseManagerId,V.ProjectId,V.ProjectCode,V.ProjectName,V.LicenseTypeName,V.UnitName
|
||||
strSql = @"SELECT V.LicenseManagerId,V.ProjectId,V.ProjectCode,V.ProjectName,V.LicenseTypeName,V.UnitName
|
||||
,V.WorkAreaName,V.CompileDate,V.StartDate,V.EndDate,V.LicenseTypeId,V.UnitId,V.LicenseManageContents
|
||||
,V.CompileMan,V.CompileDate,V.States
|
||||
FROM View_License_LicenseManager AS V
|
||||
|
||||
@@ -24,7 +24,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
|
||||
@@ -22,7 +22,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格t
|
||||
BindGrid();
|
||||
|
||||
@@ -21,7 +21,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
|
||||
@@ -20,7 +20,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.BaseInfo;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
@@ -21,7 +19,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
|
||||
@@ -21,7 +21,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
|
||||
@@ -21,7 +21,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="质量人员" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ID" DataIDField="ID" AllowSorting="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="PersonId" DataIDField="PersonId" AllowSorting="true"
|
||||
SortField="ProjectName,UnitName, PersonName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
EnableTextSelection="True">
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
@@ -38,11 +38,10 @@ namespace FineUIPro.Web.DataShow
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (this.rbCom.SelectedValue != "3")
|
||||
{
|
||||
strSql = @"SELECT Person.CompanyBranchPersonId AS ID,Unit.UnitName, Person.PersonName,case Person.Sex when '1' then '男' else '女' end as SexStr
|
||||
,Person.IdentityCard,WorkPost.WorkPostName,Person.Telephone,Person.IsOnJob,Person.Remark, '' as ProjectName "
|
||||
+ @" FROM Person_CompanyBranchPerson AS Person "
|
||||
+ @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Person.UnitId "
|
||||
+ @" LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId=WorkPost.WorkPostId WHERE WorkPost.IsCQMS=1 ";
|
||||
strSql = @"SELECT Person.PersonId,Unit.UnitName, '' as ProjectName,Person.PersonName,case Person.Sex when '1' then '男' else '女' end as SexStr,Person.IdentityCard,WorkPost.WorkPostName,Person.Telephone
|
||||
FROM Person_Persons AS Person
|
||||
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Person.UnitId
|
||||
LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId=WorkPost.WorkPostId WHERE 1=1 ";
|
||||
string UnitId =Const.UnitId_SEDIN;
|
||||
if (this.rbCom.SelectedValue == "1")
|
||||
{
|
||||
@@ -50,15 +49,16 @@ namespace FineUIPro.Web.DataShow
|
||||
}
|
||||
else
|
||||
{
|
||||
strSql += " AND Person.UnitId != @UnitId";
|
||||
strSql += " AND Unit.IsBranch =1";
|
||||
}
|
||||
listStr.Add(new SqlParameter("@UnitId", UnitId));
|
||||
this.Grid1.Columns[1].Hidden = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
strSql = @"SELECT Person.PersonId AS ID,Unit.UnitName,Project.ProjectName,Person.PersonName,case Person.Sex when '1' then '男' else '女' end as SexStr,Person.IdentityCard,WorkPost.WorkPostName,Person.Telephone,Person.Remark
|
||||
strSql = @"SELECT Person.PersonId AS ID,Unit.UnitName,Project.ProjectName,Person.PersonName,case Persons.Sex when '1' then '男' else '女' end as SexStr,Person.IdentityCard,WorkPost.WorkPostName,Persons.Telephone,Person.Remark
|
||||
FROM SitePerson_Person AS Person
|
||||
LEFT JOIN Person_Persons AS Persons ON Persons.PersonId=Person.PersonId
|
||||
LEFT JOIN Base_Project AS Project ON Project.ProjectId=Person.ProjectId
|
||||
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Person.UnitId
|
||||
LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId=WorkPost.WorkPostId WHERE WorkPost.IsCQMS=1 ";
|
||||
|
||||
@@ -20,7 +20,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
|
||||
@@ -24,7 +24,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
@@ -21,7 +19,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
// btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.BaseInfo;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -21,7 +20,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace FineUIPro.Web.DataShow
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"select Item.HazardSelectedItemId,Item.HazardListId,List.IdentificationDate,List.WorkAreaName,Item.WorkStage,Item.HazardListTypeId
|
||||
string strSql = @"select Item.HazardId AS HazardSelectedItemId,Item.HazardListId,List.IdentificationDate,List.WorkAreaName,Item.WorkStage,Item.HazardListTypeId
|
||||
, Item.HazardListTypeId,Item.HazardId,Item.HazardItems,Item.DefectsType,Item.MayLeadAccidents
|
||||
,Item.HelperMethod,Item.HazardJudge_L,Item.HazardJudge_E,Item.HazardJudge_C,Item.HazardJudge_E
|
||||
,level.RiskLevelName,Item.ControlMeasures
|
||||
@@ -111,7 +111,6 @@ namespace FineUIPro.Web.DataShow
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 转换字符串
|
||||
/// <summary>
|
||||
/// 转换工作阶段
|
||||
|
||||
@@ -21,7 +21,6 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
|
||||
Reference in New Issue
Block a user