增加数据穿透界面

This commit is contained in:
2023-06-07 18:55:33 +08:00
parent e66750312e
commit b592ccfe5e
358 changed files with 30974 additions and 2388 deletions
@@ -48,10 +48,10 @@
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1"
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1" Text="保存"
OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose">
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose" Text="关闭">
</f:Button>
</Items>
</f:Toolbar>
@@ -1,6 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShowRectifyItem.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Supervise.ShowRectifyItem" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
@@ -41,17 +42,14 @@
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:Button ID="btnSave" ToolTip="确认" Icon="Pencil" runat="server" OnClick="btnSave_Click">
<f:Button ID="btnSave" ToolTip="确认" Icon="Pencil" runat="server" OnClick="btnSave_Click" Text="确认">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:CheckBoxField ColumnID="ckbIsSelected" Width="50px" RenderAsStaticField="false" DataField="IsSelected"
<f:CheckBoxField ColumnID="ckbIsSelected" Width="50px" RenderAsStaticField="false"
AutoPostBack="true" CommandName="IsSelected" HeaderText="选择" HeaderTextAlign="Center" />
<%-- <f:RenderField Width="100px" ColumnID="RectifyName" DataField="RectifyName" SortField="RectifyName"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="作业类别">
</f:RenderField>--%>
<f:TemplateField Width="180px" HeaderText="隐患源点" HeaderTextAlign="Center" TextAlign="Left">
<ItemTemplate>
<asp:Label ID="Label5" runat="server" Text='<%# Bind("HazardSourcePoint") %>' ToolTip='<%#Bind("HazardSourcePoint") %>'></asp:Label>
@@ -79,7 +77,12 @@
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="100000" />
</f:DropDownList>
</PageItems>
</f:Grid>
@@ -26,7 +26,6 @@ namespace FineUIPro.Web.ZHGL.Supervise
{
if (!IsPostBack)
{
Funs.DropDownPageSize(this.ddlPageSize);
list = new List<string>();
string lists = Request.Params["lists"];
list = Funs.GetStrListByStr(lists, ',');
@@ -101,37 +100,33 @@ namespace FineUIPro.Web.ZHGL.Supervise
/// </summary>
private void BindGrid()
{
var getData = (from x in Funs.DB.View_Technique_RectifyItem
where x.RectifyId == this.trRectify.SelectedNode.NodeID && x.IsPass == true
select x).ToList();
if (list.Count() > 0 && getData.Count() > 0)
{
foreach (var item in getData)
{
if (list.Contains(item.RectifyItemId))
string strSql = "select * from View_Technique_RectifyItem where RectifyId=@RectifyId and IsPass=@IsPass";
SqlParameter[] parameter = new SqlParameter[]
{
item.IsSelected = true;
}
}
}
new SqlParameter("@RectifyId",this.trRectify.SelectedNode.NodeID),
new SqlParameter("@IsPass",true)
};
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
DataTable tb = this.LINQToDataTable(getData);
Grid1.RecordCount = tb.Rows.Count;
Grid1.RecordCount = tb.Rows.Count;
//tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
//if (list.Count() > 0)
//{
// for (int i = 0; i < Grid1.Rows.Count; i++)
// {
// string id = Grid1.DataKeys[i][0].ToString();
// if (list.Contains(id))
// {
// Grid1.Rows[i].Values[0]= "True";
// }
// }
//}
if (list.Count() > 0)
{
for (int i = 0; i < Grid1.Rows.Count; i++)
{
CheckBoxField checkField = (CheckBoxField)Grid1.FindColumn("ckbIsSelected");
string id = Grid1.DataKeys[i][0].ToString();
if (list.Contains(id))
{
checkField.SetCheckedState(i, true);
}
}
}
}
#endregion
@@ -192,10 +192,10 @@
<f:Button ID="btnUpAttachUrl" Icon="Tick" runat="server" OnClick="btnUpAttachUrl_Click"
ValidateForms="SimpleForm1" ToolTip="上传附件" Hidden="false">
</f:Button>
<f:Button ID="btnDeleteAttachUrl" Icon="Delete" runat="server" OnClick="btnDeleteAttachUrl_Click"
<f:Button ID="btnDeleteAttachUrl" Icon="Delete" runat="server" OnClick="btnDeleteAttachUrl_Click" Text="删除附件"
ToolTip="删除附件" Hidden="false">
</f:Button>
<f:Button ID="btnSeeAttachUrl" Icon="Find" runat="server" OnClick="btnSeeAttachUrl_Click"
<f:Button ID="btnSeeAttachUrl" Icon="Find" runat="server" OnClick="btnSeeAttachUrl_Click" Text="查看附件"
ToolTip="查看附件">
</f:Button>
</Items>
@@ -204,10 +204,10 @@
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1"
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1" Text="保存"
OnClick="btnSave_Click" Hidden="true">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose">
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose" Text="关闭">
</f:Button>
</Items>
</f:Toolbar>
@@ -36,10 +36,10 @@
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="安全监督检查整改" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="SuperviseCheckRectifyId" AllowCellEditing="true" ForceFit="true"
runat="server" BoxFlex="1" DataKeyNames="SuperviseCheckRectifyId" AllowCellEditing="true"
ClicksToEdit="2" DataIDField="SuperviseCheckRectifyId" AllowSorting="true" SortField="CheckDate"
SortDirection="DESC" OnSort="Grid1_Sort" OnRowCommand="Grid1_RowCommand" EnableColumnLines="true"
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
@@ -48,13 +48,13 @@
AutoPostBack="true" OnTextChanged="txtName_TextChanged">
</f:TextBox>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnEdit" ToolTip="编辑" Icon="Pencil" runat="server" OnClick="btnEdit_Click"
<f:Button ID="btnEdit" ToolTip="编辑" Icon="Pencil" runat="server" OnClick="btnEdit_Click" Text="编辑"
Hidden="true">
</f:Button>
<f:Button ID="btnDelete" ToolTip="删除" Icon="Delete" ConfirmText="确定删除当前数据?" OnClick="btnDelete_Click"
<f:Button ID="btnDelete" ToolTip="删除" Icon="Delete" ConfirmText="确定删除当前数据?" OnClick="btnDelete_Click" Text="删除"
Hidden="true" runat="server">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
@@ -73,10 +73,10 @@
</f:RenderField>
<f:GroupField HeaderText="检查对象" TextAlign="Left" HeaderTextAlign="Center">
<Columns>
<f:RenderField Width="220px" ColumnID="ProjectName" DataField="ProjectName" FieldType="String" ExpandUnusedSpace="true"
<f:RenderField Width="200px" ColumnID="ProjectName" DataField="ProjectName" FieldType="String" ExpandUnusedSpace="true"
HeaderText="项目" HeaderToolTip="检查项目" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="220px" ColumnID="UnitName" DataField="UnitName" FieldType="String"
<f:RenderField Width="240px" ColumnID="UnitName" DataField="UnitName" FieldType="String"
HeaderText="单位" HeaderToolTip="检查单位" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
</Columns>
@@ -111,7 +111,12 @@
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" Selected="true"/>
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="100000" />
</f:DropDownList>
</PageItems>
</f:Grid>
@@ -119,7 +124,7 @@
</f:Panel>
<f:Window ID="Window1" runat="server" Hidden="true"
IsModal="false" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window1_Close"
Title="编辑安全监督检查整改" CloseAction="HidePostBack" EnableIFrame="true" Height="560px" Maximized="true"
Title="编辑安全监督检查整改" CloseAction="HidePostBack" EnableIFrame="true" Height="560px"
Width="1300px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
@@ -21,7 +21,6 @@ namespace FineUIPro.Web.ZHGL.Supervise
{
if (!IsPostBack)
{
Funs.DropDownPageSize(this.ddlPageSize);
////权限按钮方法
this.GetButtonPower();
//btnNew.OnClientClick = Window1.GetShowReference("SuperviseCheckRectifyEdit.aspx") + "return false;";
@@ -48,6 +47,11 @@ namespace FineUIPro.Web.ZHGL.Supervise
strSql += " AND (SuperviseCheckRectifyCode like @name OR ProjectName like @name OR UnitName like @name OR HandleState like @name)";
listStr.Add(new SqlParameter("@name", "%" + this.txtName.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.CurrUser.UnitId) && BLL.Const.UnitId_CWCEC != this.CurrUser.UnitId)
{
strSql += " AND ProjectUnitId = @UnitId";
listStr.Add(new SqlParameter("@UnitId", this.CurrUser.UnitId));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@@ -45,10 +45,12 @@
</f:Panel>
</Items>
</f:FormRow>
<f:FormRow >
<f:FormRow ColumnWidths="10% 25% 30% 30%">
<Items>
<f:Label runat="server" ID="lbSuperviseCheckRectifyCode" Label="编号">
</f:Label>
<f:Label runat="server" ID="Label22" Text="编号">
</f:Label>
<f:Label runat="server" ID="lbSuperviseCheckRectifyCode">
</f:Label>
<f:TextBox ID="txtIssueMan" runat="server" Label="签发人">
</f:TextBox>
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="签发时间" ID="txtIssueDate">
@@ -58,11 +60,11 @@
<f:FormRow>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true" runat="server"
BoxFlex="1" DataKeyNames="SuperviseCheckRectifyItemId" AllowCellEditing="true" Height="420px"
BoxFlex="1" DataKeyNames="SuperviseCheckRectifyItemId" AllowCellEditing="true" Height="330px"
ClicksToEdit="1" DataIDField="SuperviseCheckRectifyItemId" EnableColumnLines="true">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center" TextAlign="Center"/>
<f:RenderField Width="110px" ColumnID="RectifyName" DataField="RectifyName" SortField="RectifyName"
<f:RenderField Width="120px" ColumnID="RectifyName" DataField="RectifyName" SortField="RectifyName"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="作业类别">
</f:RenderField>
<f:TemplateField Width="230px" HeaderText="隐患源点" HeaderTextAlign="Center" TextAlign="Left">
@@ -75,7 +77,8 @@
<asp:Label ID="Label4" runat="server" Text='<%# Bind("RiskAnalysis") %>' ToolTip='<%#Bind("RiskAnalysis") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField Width="300px" HeaderText="风险防范" HeaderTextAlign="Center" TextAlign="Left">
<f:TemplateField Width="200px" HeaderText="风险防范" HeaderTextAlign="Center" TextAlign="Left">
<ItemTemplate>
<asp:Label ID="Label24" runat="server" Text='<%# Bind("RiskPrevention") %>' ToolTip='<%#Bind("RiskPrevention") %>'></asp:Label>
</ItemTemplate>
@@ -156,13 +159,13 @@
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1"
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1" Text="保存"
Hidden="true" OnClick="btnSave_Click">
</f:Button>
<%-- <f:Button ID="btnUpdata" Icon="SystemSave" runat="server" Hidden="true" ConfirmText="确定保存并上报?"
ToolTip="保存并上报" ValidateForms="SimpleForm1" OnClick="btnUpdata_Click">
</f:Button>--%>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose">
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose" Text="关闭">
</f:Button>
</Items>
</f:Toolbar>
@@ -28,7 +28,7 @@ namespace FineUIPro.Web.ZHGL.Supervise
/// <summary>
/// 定义集合
/// </summary>
//private static List<Model.View_Supervise_SuperviseCheckRectifyItem> superviseCheckRectifyItems = new List<Model.View_Supervise_SuperviseCheckRectifyItem>();
private static List<Model.View_Supervise_SuperviseCheckRectifyItem> superviseCheckRectifyItems = new List<Model.View_Supervise_SuperviseCheckRectifyItem>();
#endregion
#region
@@ -69,19 +69,13 @@ namespace FineUIPro.Web.ZHGL.Supervise
{
this.txtIssueDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
}
if (rectify.HandleState == "4") //已闭环
{
this.btnSave.Hidden = true;
}
//this.btnUpdata.Hidden = true;
//if (rectify.IsFromMainUnit == true)
//{
// this.btnUpdata.Hidden = false;
//}
var superviseCheckRectifyItems = (from x in Funs.DB.View_Supervise_SuperviseCheckRectifyItem
where x.SuperviseCheckRectifyId == this.SuperviseCheckRectifyId
orderby x.RectifyCode
select x).ToList();
superviseCheckRectifyItems = (from x in Funs.DB.View_Supervise_SuperviseCheckRectifyItem where x.SuperviseCheckRectifyId == this.SuperviseCheckRectifyId orderby x.RectifyCode select x).ToList();
Grid1.DataSource = superviseCheckRectifyItems;
Grid1.DataBind();
}
@@ -112,16 +106,14 @@ namespace FineUIPro.Web.ZHGL.Supervise
/// <param name="type"></param>
private void Save(string type)
{
var superviseCheckRectifyItems = jerqueSaveList();
var superviseCheckRectify = BLL.SuperviseCheckRectifyService.GetSuperviseCheckRectifyById(Request.Params["SuperviseCheckRectifyId"]);
Model.Supervise_SuperviseCheckRectify superviseCheckRectify = BLL.SuperviseCheckRectifyService.GetSuperviseCheckRectifyById(Request.Params["SuperviseCheckRectifyId"]);
superviseCheckRectify.IssueMan = this.txtIssueMan.Text.Trim();
if (!string.IsNullOrEmpty(this.txtIssueDate.Text.Trim()))
{
superviseCheckRectify.IssueDate = Convert.ToDateTime(this.txtIssueDate.Text.Trim());
}
BLL.SuperviseCheckRectifyItemService.DeleteSuperviseCheckRectifyItemBySuperviseCheckRectifyId(Request.Params["SuperviseCheckRectifyId"]);
jerqueSaveList();
bool result = true;
bool resultAll = true;
foreach (var item in superviseCheckRectifyItems)
@@ -231,18 +223,14 @@ namespace FineUIPro.Web.ZHGL.Supervise
/// <summary>
/// 保存集合
/// </summary>
private List<Model.View_Supervise_SuperviseCheckRectifyItem> jerqueSaveList()
private void jerqueSaveList()
{
List<Model.View_Supervise_SuperviseCheckRectifyItem> newViewList = (from x in Funs.DB.View_Supervise_SuperviseCheckRectifyItem
where x.SuperviseCheckRectifyId == this.SuperviseCheckRectifyId
orderby x.RectifyCode
select x).ToList();
JArray mergedData = Grid1.GetMergedData();
foreach (JObject mergedRow in mergedData)
{
string status = mergedRow.Value<string>("status");
JObject values = mergedRow.Value<JObject>("values");
var item = newViewList.FirstOrDefault(e => e.SuperviseCheckRectifyItemId == values.Value<string>("SuperviseCheckRectifyItemId"));
var item = superviseCheckRectifyItems.FirstOrDefault(e => e.SuperviseCheckRectifyItemId == values.Value<string>("SuperviseCheckRectifyItemId"));
item.ConfirmMan = values.Value<string>("ConfirmMan");
item.ConfirmDate = Funs.GetNewDateTime(values.Value<string>("ConfirmDate"));
item.OrderEndDate = Funs.GetNewDateTime(values.Value<string>("OrderEndDate"));
@@ -252,8 +240,6 @@ namespace FineUIPro.Web.ZHGL.Supervise
item.VerifierName = values.Value<string>("VerifierName");
item.VerifierDate = Funs.GetNewDateTime(values.Value<string>("VerifierDate"));
}
return newViewList;
}
#endregion
@@ -93,6 +93,15 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// </remarks>
protected global::FineUIPro.Label Label1;
/// <summary>
/// Label22 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label22;
/// <summary>
/// lbSuperviseCheckRectifyCode 控件。
/// </summary>
@@ -30,7 +30,7 @@
SortDirection="DESC" OnSort="Grid1_Sort" OnRowCommand="Grid1_RowCommand" EnableColumnLines="true"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" AllowFilters="true"
OnFilterChange="Grid1_FilterChange" EnableTextSelection="True" ForceFit="true">
OnFilterChange="Grid1_FilterChange" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
@@ -38,16 +38,16 @@
AutoPostBack="true" OnTextChanged="txtName_TextChanged">
</f:TextBox>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server"
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server" Text="新增"
Hidden="true">
</f:Button>
<f:Button ID="btnEdit" ToolTip="编辑" Icon="Pencil" runat="server" OnClick="btnEdit_Click"
<f:Button ID="btnEdit" ToolTip="编辑" Icon="Pencil" runat="server" OnClick="btnEdit_Click" Text="编辑"
Hidden="true">
</f:Button>
<f:Button ID="btnDelete" ToolTip="删除" Icon="Delete" ConfirmText="确定删除当前数据?" OnClick="btnDelete_Click"
<f:Button ID="btnDelete" ToolTip="删除" Icon="Delete" ConfirmText="确定删除当前数据?" OnClick="btnDelete_Click" Text="删除"
Hidden="true" runat="server">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
@@ -81,6 +81,10 @@
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="检查日期"
HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="CheckTypeName" DataField="CheckTypeName"
SortField="CheckTypeName" FieldType="String" HeaderText="检查类别" TextAlign="Left"
HeaderTextAlign="Center">
</f:RenderField>
<f:TemplateField ColumnID="tfRectify" Width="120px" HeaderText="检查整改" HeaderTextAlign="Center" TextAlign="Left">
<ItemTemplate>
<asp:LinkButton ID="lbtnRectify" runat="server" Text="整改单" CommandArgument='<%#Bind("SuperviseCheckReportId") %>'
@@ -106,6 +110,11 @@
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="100000" />
</f:DropDownList>
</PageItems>
</f:Grid>
@@ -113,11 +122,11 @@
</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="1300px" Height="500px" Maximized="true">
Width="1300px" Height="500px">
</f:Window>
<f:Window ID="Window2" Title="编辑安全监督检查报告" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="true" runat="server" IsModal="true" Width="1024px"
Height="600px" OnClose="Window2_Close1" Maximized="true">
Height="600px" OnClose="Window2_Close1">
</f:Window>
</form>
<script type="text/javascript">
@@ -23,7 +23,6 @@ namespace FineUIPro.Web.ZHGL.Supervise
//FilterDataRowItem = FilterDataRowItemImplement;
if (!IsPostBack)
{
Funs.DropDownPageSize(this.ddlPageSize);
////权限按钮方法
this.GetButtonPower();
btnNew.OnClientClick = Window1.GetShowReference("SuperviseCheckReportEdit.aspx") + "return false;";
@@ -41,7 +40,7 @@ namespace FineUIPro.Web.ZHGL.Supervise
/// </summary>
private void BindGrid()
{
string strSql = @"SELECT S.SuperviseCheckReportId,S.SuperviseCheckReportCode,S.CheckDate,S.ProjectId,P.ProjectName,S.UnitId,u.UnitName,S.CheckTeam,S.EvaluationResult,S.AttachUrl,S.IsIssued"
string strSql = @"SELECT S.SuperviseCheckReportId,S.SuperviseCheckReportCode,S.CheckDate,S.ProjectId,P.ProjectName,S.UnitId,u.UnitName,S.CheckTeam,S.EvaluationResult,S.AttachUrl,S.IsIssued,case S.CheckType when '1' then '企业负责人带班检查' when '2' then '企业综合检查' when '3' then '企业专项检查' else '' end as CheckTypeName"
+ @" FROM dbo.Supervise_SuperviseCheckReport AS S"
+ @" LEFT JOIN dbo.Base_Project AS P ON P.ProjectId=S.ProjectId"
+ @" LEFT JOIN dbo.Base_Unit AS U ON U.UnitId=S.UnitId"
@@ -52,6 +51,11 @@ namespace FineUIPro.Web.ZHGL.Supervise
strSql += " AND (S.SuperviseCheckReportCode like @name OR P.ProjectName like @name OR u.UnitName like @name OR S.CheckTeam like @name OR S.EvaluationResult like @name)";
listStr.Add(new SqlParameter("@name", "%" + this.txtName.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.CurrUser.UnitId) && BLL.Const.UnitId_CWCEC != this.CurrUser.UnitId)
{
strSql += " AND P.UnitId = @UnitId";
listStr.Add(new SqlParameter("@UnitId", this.CurrUser.UnitId));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@@ -29,6 +29,11 @@
<f:TextBox ID="txtSuperviseCheckReportCode" runat="server" Label="检查编号" Required="true" FocusOnPageLoad="true"
MaxLength="50" ShowRedStar="true" AutoPostBack="true" OnTextChanged="TextBox_TextChanged">
</f:TextBox>
<f:DropDownList ID="drpCheckType" runat="server" EmptyText="请选择检查类别" ShowRedStar="true" Label="检查类别">
<f:ListItem Value="1" Text="企业负责人带班检查" />
<f:ListItem Value="2" Text="企业综合检查" />
<f:ListItem Value="3" Text="企业专项检查" />
</f:DropDownList>
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="检查日期" ID="dpkCheckDate">
</f:DatePicker>
</Items>
@@ -40,6 +45,7 @@
</f:DropDownList>
<f:DropDownList ID="ddlUnitId" runat="server" EmptyText="请选择单位" ShowRedStar="true">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
@@ -50,14 +56,14 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" runat="server" ClicksToEdit="1" Height="420px"
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" runat="server" ClicksToEdit="1" Height="280px"
DataKeyNames="SuperviseCheckReportItemId" EnableMultiSelect="false" ShowGridHeader="true"
EnableColumnLines="true" OnRowCommand="Grid1_RowCommand" ForceFit="true">
EnableColumnLines="true" OnRowCommand="Grid1_RowCommand">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:HiddenField runat="server" ID="hdItemId">
</f:HiddenField>
<f:TextBox Hidden="true" runat="server" ID="hdItemId">
</f:TextBox>
<f:Button ID="btnSelect" Icon="Pencil" runat="server" Text="选择" ValidateForms="SimpleForm1"
OnClick="btnSelect_Click">
</f:Button>
@@ -66,7 +72,7 @@
</Toolbars>
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center" TextAlign="Center" />
<f:RenderField Width="100px" ColumnID="RectifyName" DataField="RectifyName" SortField="RectifyName"
<f:RenderField Width="110px" ColumnID="RectifyName" DataField="RectifyName" SortField="RectifyName"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" HeaderText="作业类别">
</f:RenderField>
<f:TemplateField Width="230px" HeaderText="隐患源点" HeaderTextAlign="Center" TextAlign="Left">
@@ -79,7 +85,7 @@
<asp:Label ID="Label4" runat="server" Text='<%# Bind("RiskAnalysis") %>' ToolTip='<%#Bind("RiskAnalysis") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField Width="300px" HeaderText="风险防范" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
<f:TemplateField Width="250px" HeaderText="风险防范" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("RiskPrevention") %>' ToolTip='<%#Bind("RiskPrevention") %>'></asp:Label>
</ItemTemplate>
@@ -89,9 +95,8 @@
<asp:Label ID="Label3" runat="server" Text='<%# Bind("SimilarRisk") %>' ToolTip='<%#Bind("SimilarRisk") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:CheckBoxField ColumnID="ckbIsSelected" Width="70px" RenderAsStaticField="false"
<f:CheckBoxField ColumnID="ckbIsSelected" Width="80px" RenderAsStaticField="false"
DataField="IsSelected" AutoPostBack="true" CommandName="IsSelected" HeaderText="隐患立项" />
<f:RenderField Width="90px" ColumnID="SuperviseCheckReportItemId" DataField="SuperviseCheckReportItemId"
FieldType="String" HeaderText="主键" Hidden="true" HeaderTextAlign="Center">
<Editor>
@@ -106,7 +111,7 @@
</f:TextBox>
</Editor>
</f:RenderField>
<f:LinkButtonField EnableAjax="false" Width="100px" CommandName="Attach" DataTextField="AttachUrlName"
<f:LinkButtonField EnableAjax="false" Width="120px" CommandName="Attach" DataTextField="AttachUrlName"
HeaderText="附件" ColumnID="AttachUrl" DataToolTipField="AttachUrlName" TextAlign="Left" />
<f:LinkButtonField Width="30px" ConfirmText="删除选中行?" ConfirmTarget="Parent" CommandName="Delete"
Icon="Delete" ToolTip="删除" />
@@ -121,15 +126,15 @@
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1"
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1" Text="保存"
Hidden="true" OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose">
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose" Text="关闭">
</f:Button>
<f:HiddenField ID="hdId" runat="server">
</f:HiddenField>
<f:HiddenField ID="hdAttachUrl" runat="server">
</f:HiddenField>
<f:TextBox Hidden="true" ID="hdId" runat="server">
</f:TextBox>
<f:TextBox Hidden="true" ID="hdAttachUrl" runat="server">
</f:TextBox>
</Items>
</f:Toolbar>
</Toolbars>
@@ -46,12 +46,15 @@ namespace FineUIPro.Web.ZHGL.Supervise
btnClose.OnClientClick = ActiveWindow.GetHideReference();
superviseCheckReportItems.Clear();
////权限按钮方法
this.GetButtonPower();
if (Request.Params["type"] != "-1")
{
////权限按钮方法
this.GetButtonPower();
}
BLL.ProjectService.InitProjectDropDownList(this.ddlProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.ddlUnitId, this.ddlProjectId.SelectedValue, true);
Funs.FineUIPleaseSelect(this.drpCheckType);
this.SuperviseCheckReportId = Request.Params["SuperviseCheckReportId"];
var superviseCheckReport = BLL.SuperviseCheckReportService.GetSuperviseCheckReportById(this.SuperviseCheckReportId);
if (superviseCheckReport != null)
@@ -61,6 +64,10 @@ namespace FineUIPro.Web.ZHGL.Supervise
{
this.dpkCheckDate.Text = string.Format("{0:yyyy-MM-dd}", superviseCheckReport.CheckDate);
}
if (!string.IsNullOrEmpty(superviseCheckReport.CheckType))
{
this.drpCheckType.SelectedValue = superviseCheckReport.CheckType;
}
if (!string.IsNullOrEmpty(superviseCheckReport.ProjectId))
{
this.ddlProjectId.SelectedValue = superviseCheckReport.ProjectId;
@@ -73,19 +80,14 @@ namespace FineUIPro.Web.ZHGL.Supervise
}
}
this.txtCheckTeam.Text = superviseCheckReport.CheckTeam;
superviseCheckReportItems = (from x in Funs.DB.View_Supervise_SuperviseCheckReportItem
where x.SuperviseCheckReportId == this.SuperviseCheckReportId
orderby x.RectifyCode select x).ToList();
superviseCheckReportItems = (from x in Funs.DB.View_Supervise_SuperviseCheckReportItem where x.SuperviseCheckReportId == this.SuperviseCheckReportId orderby x.RectifyCode select x).ToList();
var report = BLL.SuperviseCheckReportService.GetSuperviseCheckReportById(this.SuperviseCheckReportId);
if (report != null && report.IsIssued == "1") //已下发
{
this.btnSave.Hidden = true;
this.btnSelect.Hidden = true;
this.ddlProjectId.Readonly = true;
this.ddlUnitId.Readonly = true;
Grid1.Columns[6].Enabled = false;
Grid1.Columns[10].Hidden = true;
}
}
@@ -96,6 +98,24 @@ namespace FineUIPro.Web.ZHGL.Supervise
}
Grid1.DataSource = superviseCheckReportItems;
Grid1.DataBind();
GetCheckItem();
}
}
private void GetCheckItem()
{
for (int i = 0; i < Grid1.Rows.Count; i++)
{
var item = superviseCheckReportItems.FirstOrDefault(x => x.SuperviseCheckReportItemId == Grid1.Rows[i].Values[7].ToString());
if (item != null)
{
CheckBoxField checkField = (CheckBoxField)Grid1.FindColumn("ckbIsSelected");
if (item.IsSelected == true)
{
//Grid1.Rows[i].Values[6] = "True";
checkField.SetCheckedState(i, true);
}
}
}
}
#endregion
@@ -109,7 +129,7 @@ namespace FineUIPro.Web.ZHGL.Supervise
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
{
string rowID = Grid1.DataKeys[e.RowIndex][0].ToString();
if (e.CommandName == "IsSelected" && !this.btnSave.Hidden)
if (e.CommandName == "IsSelected")
{
CheckBoxField checkField = (CheckBoxField)Grid1.FindColumn("ckbIsSelected");
if (checkField.GetCheckedState(e.RowIndex))
@@ -134,7 +154,7 @@ namespace FineUIPro.Web.ZHGL.Supervise
superviseCheckReportItems = (from x in superviseCheckReportItems where x.SuperviseCheckReportItemId != rowID select x).ToList();
Grid1.DataSource = superviseCheckReportItems;
Grid1.DataBind();
//GetCheckItem();
GetCheckItem();
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
}
@@ -247,6 +267,11 @@ namespace FineUIPro.Web.ZHGL.Supervise
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (this.drpCheckType.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("检查类别不能为空!", MessageBoxIcon.Warning);
return;
}
Model.Supervise_SuperviseCheckReport superviseCheckReport = new Model.Supervise_SuperviseCheckReport
{
SuperviseCheckReportCode = this.txtSuperviseCheckReportCode.Text.Trim()
@@ -255,6 +280,10 @@ namespace FineUIPro.Web.ZHGL.Supervise
{
superviseCheckReport.CheckDate = Convert.ToDateTime(this.dpkCheckDate.Text.Trim());
}
if (this.drpCheckType.SelectedValue != BLL.Const._Null)
{
superviseCheckReport.CheckType = this.drpCheckType.SelectedValue;
}
if (this.ddlProjectId.SelectedValue != BLL.Const._Null)
{
superviseCheckReport.ProjectId = this.ddlProjectId.SelectedValue;
@@ -318,7 +347,7 @@ namespace FineUIPro.Web.ZHGL.Supervise
}
Grid1.DataSource = superviseCheckReportItems;
Grid1.DataBind();
//GetCheckItem();
GetCheckItem();
hdId.Text = string.Empty;
hdAttachUrl.Text = string.Empty;
}
@@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.ZHGL.Supervise {
public partial class SuperviseCheckReportEdit {
namespace FineUIPro.Web.ZHGL.Supervise
{
public partial class SuperviseCheckReportEdit
{
/// <summary>
/// form1 控件。
/// </summary>
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtSuperviseCheckReportCode 控件。
/// </summary>
@@ -47,7 +49,16 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSuperviseCheckReportCode;
/// <summary>
/// drpCheckType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpCheckType;
/// <summary>
/// dpkCheckDate 控件。
/// </summary>
@@ -56,7 +67,7 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker dpkCheckDate;
/// <summary>
/// ddlProjectId 控件。
/// </summary>
@@ -65,7 +76,7 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlProjectId;
/// <summary>
/// ddlUnitId 控件。
/// </summary>
@@ -74,7 +85,7 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlUnitId;
/// <summary>
/// txtCheckTeam 控件。
/// </summary>
@@ -83,7 +94,7 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCheckTeam;
/// <summary>
/// Grid1 控件。
/// </summary>
@@ -92,7 +103,7 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
@@ -101,7 +112,7 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// hdItemId 控件。
/// </summary>
@@ -109,8 +120,8 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdItemId;
protected global::FineUIPro.TextBox hdItemId;
/// <summary>
/// btnSelect 控件。
/// </summary>
@@ -119,7 +130,7 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSelect;
/// <summary>
/// Label5 控件。
/// </summary>
@@ -128,7 +139,7 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label5;
/// <summary>
/// Label4 控件。
/// </summary>
@@ -137,7 +148,7 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label4;
/// <summary>
/// Label2 控件。
/// </summary>
@@ -146,7 +157,7 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label2;
/// <summary>
/// Label3 控件。
/// </summary>
@@ -155,7 +166,7 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label3;
/// <summary>
/// txtSuperviseCheckReportItemId 控件。
/// </summary>
@@ -164,7 +175,7 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSuperviseCheckReportItemId;
/// <summary>
/// txtAttachUrl 控件。
/// </summary>
@@ -173,7 +184,7 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtAttachUrl;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@@ -182,7 +193,7 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnSave 控件。
/// </summary>
@@ -191,7 +202,7 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnClose 控件。
/// </summary>
@@ -200,7 +211,7 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
/// <summary>
/// hdId 控件。
/// </summary>
@@ -208,8 +219,8 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdId;
protected global::FineUIPro.TextBox hdId;
/// <summary>
/// hdAttachUrl 控件。
/// </summary>
@@ -217,8 +228,8 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdAttachUrl;
protected global::FineUIPro.TextBox hdAttachUrl;
/// <summary>
/// Window1 控件。
/// </summary>
@@ -227,7 +238,7 @@ namespace FineUIPro.Web.ZHGL.Supervise {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Window2 控件。
/// </summary>