补充公司级树

This commit is contained in:
2025-04-13 20:44:26 +08:00
parent 96899ce306
commit f5344bddfb
34 changed files with 2330 additions and 1350 deletions
@@ -1,10 +1,12 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ConstructSolution.aspx.cs" Inherits="FineUIPro.Web.CQMS.Solution.ConstructSolution" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>施工组织设计及施工方案</title>
<style type="text/css">
@@ -21,6 +23,7 @@
color: Red;
font-size: small;
}
.red {
background-color: red;
}
@@ -56,157 +59,170 @@
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
BodyPadding="0px">
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="施工方案" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="ConstructSolutionId" AllowCellEditing="true"
OnRowDataBound="Grid1_RowDataBound"
ClicksToEdit="2" DataIDField="ConstructSolutionId" AllowSorting="true" SortField="ApproveDate"
SortDirection="DESC" EnableColumnLines="true" OnPageIndexChange="Grid1_PageIndexChange"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" ForceFit="true" OnRowCommand="Grid1_RowCommand"
EnableRowDoubleClickEvent="true" AllowFilters="true" OnRowDoubleClick="Grid1_RowDoubleClick"
EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpModelType" runat="server" Label="模板类别" LabelAlign="Right" EnableEdit="true">
<f:ListItem Text="施工组织设计模板" Value="1" />
<f:ListItem Text="施工方案模板" Value="3" />
</f:DropDownList>
<f:DropDownList ID="drpUnitWork" runat="server" Label="单位工程" LabelAlign="Right" EnableEdit="true">
</f:DropDownList>
<f:DropDownList ID="drpCNProfessional" runat="server" Label="专业" LabelAlign="Right" EnableEdit="true">
</f:DropDownList>
<f:DropDownList ID="drpProposeUnit" runat="server" Label="单位名称" LabelAlign="Right" EnableEdit="true">
</f:DropDownList>
<f:DropDownList ID="drpSolutionType" runat="server" Label="方案类别" LabelAlign="Right" EnableEdit="true">
</f:DropDownList>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpState" runat="server" Label="审批状态" LabelAlign="Right" EnableEdit="true">
<f:ListItem Text="全部" Value="null" />
<f:ListItem Text="已闭合" Value="1" />
<f:ListItem Text="未闭合" Value="0" Selected="true" />
</f:DropDownList>
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="施工方案" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="ConstructSolutionId" AllowCellEditing="true"
OnRowDataBound="Grid1_RowDataBound"
ClicksToEdit="2" DataIDField="ConstructSolutionId" AllowSorting="true" SortField="ApproveDate"
SortDirection="DESC" EnableColumnLines="true" OnPageIndexChange="Grid1_PageIndexChange"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" ForceFit="true" OnRowCommand="Grid1_RowCommand"
EnableRowDoubleClickEvent="true" AllowFilters="true" OnRowDoubleClick="Grid1_RowDoubleClick"
EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpModelType" runat="server" Label="模板类别" LabelAlign="Right" EnableEdit="true">
<f:ListItem Text="施工组织设计模板" Value="1" />
<f:ListItem Text="施工方案模板" Value="3" />
</f:DropDownList>
<f:DropDownList ID="drpUnitWork" runat="server" Label="单位工程" LabelAlign="Right" EnableEdit="true">
</f:DropDownList>
<f:DropDownList ID="drpCNProfessional" runat="server" Label="专业" LabelAlign="Right" EnableEdit="true">
</f:DropDownList>
<f:DropDownList ID="drpProposeUnit" runat="server" Label="单位名称" LabelAlign="Right" EnableEdit="true">
</f:DropDownList>
<f:DropDownList ID="drpSolutionType" runat="server" Label="方案类别" LabelAlign="Right" EnableEdit="true">
</f:DropDownList>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpState" runat="server" Label="审批状态" LabelAlign="Right" EnableEdit="true" >
<f:ListItem Text="全部" Value="null" />
<f:ListItem Text="已闭合" Value="1" />
<f:ListItem Text="未闭合" Value="0" Selected="true"/>
</f:DropDownList>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnQuery" ToolTip="查询" OnClick="btnQuery_Click" Icon="SystemSearch" EnablePostBack="true" runat="server" Text="查询">
</f:Button>
<f:Button runat="server" ID="btnDownLoad" Icon="ArrowDown" ToolTip="模板下载" Text="模板下载">
<Listeners>
<f:Listener Event="click" Handler="ButtonClick" />
</Listeners>
</f:Button>
<f:Button ID="btnRset" ToolTip="重置" OnClick="btnRset_Click" Icon="ArrowUndo" EnablePostBack="true" runat="server" Text="重置">
</f:Button>
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server" Text="新增">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnQuery" ToolTip="查询" OnClick="btnQuery_Click" Icon="SystemSearch" EnablePostBack="true" runat="server" Text="查询">
</f:Button>
<f:Button runat="server" ID="btnDownLoad" Icon="ArrowDown" ToolTip="模板下载" Text="模板下载">
<Listeners>
<f:Listener Event="click" Handler="ButtonClick" />
</Listeners>
</f:Button>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField ColumnID="code" DataField="code" Width="120px"
SortField="code" FieldType="String" HeaderText="编号" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField ColumnID="SolutionName" DataField="SolutionName" Width="130px"
SortField="SolutionName" FieldType="String" HeaderText="方案名称" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:Button ID="btnRset" ToolTip="重置" OnClick="btnRset_Click" Icon="ArrowUndo" EnablePostBack="true" runat="server" Text="重置">
</f:Button>
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server" Text="新增">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
<f:RenderField ColumnID="UnitName" DataField="UnitName" Width="160px"
SortField="UnitName" FieldType="String" HeaderText="施工单位" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField ColumnID="UnitWorkIds" Width="120px" DataField="UnitWorkIds"
SortField="UnitWorkIds" FieldType="String" HeaderText="单位工程" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="70px" ColumnID="CNProfessionalCodes" DataField="CNProfessionalCodes" SortField="CNProfessionalCodes"
FieldType="String" HeaderText="专业" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:TemplateField ColumnID="Edition" Width="70px" HeaderText="版本号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="Label41" runat="server" Text='<%# ConvertEdition(Eval("Edition")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="120px" ColumnID="SolutionTempleteTypeName" DataField="SolutionTempleteTypeName" SortField="SolutionTempleteTypeName"
FieldType="String" HeaderText="方案类别" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField ColumnID="code" DataField="code" Width="120px"
SortField="code" FieldType="String" HeaderText="编号" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField ColumnID="SolutionName" DataField="SolutionName" Width="130px"
SortField="SolutionName" FieldType="String" HeaderText="方案名称" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField ColumnID="UnitName" DataField="UnitName" Width="160px"
SortField="UnitName" FieldType="String" HeaderText="施工单位" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField ColumnID="UnitWorkIds" Width="120px" DataField="UnitWorkIds"
SortField="UnitWorkIds" FieldType="String" HeaderText="单位工程" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="70px" ColumnID="CNProfessionalCodes" DataField="CNProfessionalCodes" SortField="CNProfessionalCodes"
FieldType="String" HeaderText="专业" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:TemplateField ColumnID="Edition" Width="70px" HeaderText="版本号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="Label41" runat="server" Text='<%# ConvertEdition(Eval("Edition")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="120px" ColumnID="SolutionTempleteTypeName" DataField="SolutionTempleteTypeName" SortField="SolutionTempleteTypeName"
FieldType="String" HeaderText="方案类别" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField ColumnID="CompileManName" Width="70px" DataField="CompileManName"
SortField="CompileManName" FieldType="String" HeaderText="编制人" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:TemplateField ColumnID="AuditDate" Width="100px" HeaderText="审核时间" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# BLL.CQMSConstructSolutionApproveService.ConvertAuditDate(Eval("ConstructSolutionId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="State" Width="60px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# BLL.CQMSConstructSolutionService.ConvertState(Eval("State")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="ToAuditMan" Width="60px" HeaderText="待审批人" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# BLL.CQMSConstructSolutionApproveService.ConvertToDo(Eval("ConstructSolutionId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:LinkButtonField ColumnID="exportSuggestion" HeaderText="意见" Width="70px" Icon="ArrowDown" CommandName="exportSuggestion" />
<f:LinkButtonField HeaderText="审批表" ColumnID="exportApproval" Width="70px" Icon="ArrowDown" CommandName="exportApproval" />
<f:LinkButtonField HeaderText="附件" ConfirmTarget="Top" Width="60px" CommandName="attchUrl" ColumnID="AttchUrl"
TextAlign="Center" ToolTip="附件" Text="附件" />
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</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>
<f:ToolbarFill runat="server">
</f:ToolbarFill>
<f:RenderField ColumnID="CompileManName" Width="70px" DataField="CompileManName"
SortField="CompileManName" FieldType="String" HeaderText="编制人" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
</PageItems>
</f:Grid>
<f:TemplateField ColumnID="AuditDate" Width="100px" HeaderText="审核时间" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# BLL.CQMSConstructSolutionApproveService.ConvertAuditDate(Eval("ConstructSolutionId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="State" Width="60px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# BLL.CQMSConstructSolutionService.ConvertState(Eval("State")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="ToAuditMan" Width="60px" HeaderText="待审批人" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# BLL.CQMSConstructSolutionApproveService.ConvertToDo(Eval("ConstructSolutionId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:LinkButtonField ColumnID="exportSuggestion" HeaderText="意见" Width="70px" Icon="ArrowDown" CommandName="exportSuggestion" />
<f:LinkButtonField HeaderText="审批表" ColumnID="exportApproval" Width="70px" Icon="ArrowDown" CommandName="exportApproval" />
<f:LinkButtonField HeaderText="附件" ConfirmTarget="Top" Width="60px" CommandName="attchUrl" ColumnID="AttchUrl"
TextAlign="Center" ToolTip="附件" Text="附件" />
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</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>
<f:ToolbarFill runat="server">
</f:ToolbarFill>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="500px">
</f:Window>
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="500px">
</f:Window>
<f:Window ID="Window1" Title="施工组织设计及施工方案" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="850px" Height="500px">
@@ -15,52 +15,43 @@ namespace FineUIPro.Web.CQMS.Solution
{
public partial class ConstructSolution : PageBase
{
#region
#region
/// <summary>
/// 获取按钮权限
/// 项目主键
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
public string ProjectId
{
if (Request.Params["value"] == "0")
get
{
return;
return (string)ViewState["ProjectId"];
}
var buttonList = CommonService.GetAllButtonList(CurrUser.LoginProjectId, CurrUser.UserId, Const.CQMSConstructSolutionMenuId);
if (buttonList.Count() > 0)
set
{
if (buttonList.Contains(Const.BtnAdd))
{
btnNew.Hidden = false;
}
if (buttonList.Contains(Const.BtnModify) || buttonList.Contains(Const.BtnSubmit))
{
btnMenuModify.Hidden = false;
}
if (buttonList.Contains(Const.BtnDelete))
{
btnMenuDel.Hidden = false;
}
ViewState["ProjectId"] = value;
}
}
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GetButtonPower();
BLL.SolutionTempleteTypeService.InitSolutionTempleteDropDownList(drpSolutionType, true);
//Funs.FineUIPleaseSelect(drpState);
UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.CurrUser.LoginProjectId, true);
CNProfessionalService.InitCNProfessionalDownList(drpCNProfessional, true);
UnitService.InitMainAndSubUnitDropDownList(drpProposeUnit, CurrUser.LoginProjectId, false);
btnNew.OnClientClick = window_tt.GetShowReference("EditConstructSolution.aspx") + "return false;";
if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId)
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.drpProposeUnit.Hidden = true;
this.ProjectId = Request.Params["projectId"];
}
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
CNProfessionalService.InitCNProfessionalDownList(drpCNProfessional, true);
btnNew.OnClientClick = window_tt.GetShowReference("EditConstructSolution.aspx") + "return false;";
BindGrid();
}
else
@@ -93,6 +84,65 @@ namespace FineUIPro.Web.CQMS.Solution
}
}
private void InitDropDownList()
{
BLL.SolutionTempleteTypeService.InitSolutionTempleteDropDownList(drpSolutionType, true);
//Funs.FineUIPleaseSelect(drpState);
UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.ProjectId, true);
UnitService.InitMainAndSubUnitDropDownList(drpProposeUnit, ProjectId, false);
if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.ProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId)
{
this.drpProposeUnit.Hidden = true;
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
this.GetButtonPower();
this.BindGrid();
}
#region
/// <summary>
/// 获取按钮权限
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
{
if (Request.Params["value"] == "0")
{
return;
}
var buttonList = CommonService.GetAllButtonList(ProjectId, CurrUser.UserId, Const.CQMSConstructSolutionMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(Const.BtnAdd))
{
btnNew.Hidden = false;
}
if (buttonList.Contains(Const.BtnModify) || buttonList.Contains(Const.BtnSubmit))
{
btnMenuModify.Hidden = false;
}
if (buttonList.Contains(Const.BtnDelete))
{
btnMenuDel.Hidden = false;
}
}
}
#endregion
protected string ConvertEdition(object edition)
{
return string.Format("{0:#0.#}",((int)edition)/10.0);
@@ -136,8 +186,8 @@ namespace FineUIPro.Web.CQMS.Solution
+ @" where chec.ProjectId=@ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", CurrUser.LoginProjectId));
if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId)
listStr.Add(new SqlParameter("@ProjectId", ProjectId));
if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.ProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId)
{
strSql += " AND chec.UnitId='" + this.CurrUser.UnitId + "'";
}
@@ -216,10 +266,14 @@ namespace FineUIPro.Web.CQMS.Solution
}
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
var list = ChecklistData();
Grid1.RecordCount = list.Rows.Count;
var CNProfessional = CNProfessionalService.GetCNProfessionalItem();
var uniWork = UnitWorkService.GetUnitWorkLists(CurrUser.LoginProjectId);
var uniWork = UnitWorkService.GetUnitWorkLists(ProjectId);
if (list.Rows.Count > 0)
{
for (int i = 0; i < list.Rows.Count; i++)
@@ -835,7 +889,7 @@ namespace FineUIPro.Web.CQMS.Solution
return;
}
string id = Grid1.SelectedRowID.Split(',')[0];
if (CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, CurrUser.UserId, Const.CQMSConstructSolutionMenuId, Const.BtnDelete))
if (CommonService.GetAllButtonPowerList(ProjectId, CurrUser.UserId, Const.CQMSConstructSolutionMenuId, Const.BtnDelete))
{
var constructSolution = CQMSConstructSolutionService.GetConstructSolutionByConstructSolutionId(id);
CQMSConstructSolutionApproveService.DeleteConstructSolutionApprovesByConstructSolutionId(id);
@@ -41,6 +41,42 @@ namespace FineUIPro.Web.CQMS.Solution
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ucTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Grid1 控件。
/// </summary>
@@ -42,7 +42,7 @@ namespace FineUIPro.Web.CQMS.Solution
{
return;
}
var buttonList = CommonService.GetAllButtonList(CurrUser.LoginProjectId, CurrUser.UserId, Const.CQMSConstructSolutionMenuId);
var buttonList = CommonService.GetAllButtonList(ProjectId, CurrUser.UserId, Const.CQMSConstructSolutionMenuId);
if (buttonList.Count() > 0)
{
@@ -138,7 +138,7 @@ namespace FineUIPro.Web.CQMS.Solution
where ProjectId=@ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", ProjectId));
if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.ProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId)
{
strSql += " AND solution.UnitId='" + this.CurrUser.UnitId + "'";
@@ -192,6 +192,10 @@ namespace FineUIPro.Web.CQMS.Solution
}
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
var list = ChecklistData();
Grid1.RecordCount = list.Rows.Count;
var CNProfessional = CNProfessionalService.GetCNProfessionalItem();
@@ -661,7 +665,7 @@ namespace FineUIPro.Web.CQMS.Solution
return;
}
string id = Grid1.SelectedRowID.Split(',')[0];
if (CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, CurrUser.UserId, Const.CQMSConstructSolutionMenuId, Const.BtnDelete))
if (CommonService.GetAllButtonPowerList(ProjectId, CurrUser.UserId, Const.CQMSConstructSolutionMenuId, Const.BtnDelete))
{
var constructSolution = CQMSConstructSolutionFinalService.GetConstructSolutionByConstructSolutionId(id);
CQMSConstructSolutionFinalService.DeleteConstructSolution(id);