公司级树补充

This commit is contained in:
夏菊 2025-04-11 11:33:48 +08:00
parent ae90319ee4
commit 2a876b4c2f
21 changed files with 1332 additions and 662 deletions

View File

@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InspectionEquipment.aspx.cs" Inherits="FineUIPro.Web.Comprehensive.InspectionEquipment" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
@ -9,9 +11,21 @@
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<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" ShowHeader="false" Title="设备材料报验" EnableCollapse="true" ForceFit="true"
runat="server" BoxFlex="1" DataKeyNames="InspectionEquipmentId" AllowCellEditing="true" EnableColumnLines="true"
@ -110,6 +124,8 @@
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="设备材料报验" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="900px" Height="480px">

View File

@ -9,6 +9,22 @@ namespace FineUIPro.Web.Comprehensive
{
public partial class InspectionEquipment : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@ -19,17 +35,55 @@ namespace FineUIPro.Web.Comprehensive
{
if (!IsPostBack)
{
GetButtonPower();
BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.CurrUser.LoginProjectId, true);
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
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();
}
BindGrid();
}
}
private void InitDropDownList()
{
BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.ProjectId, 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();
}
/// <summary>
/// 数据绑定
/// </summary>
public void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"select InspectionEquipmentId,ProjectId,C.UnitId,Status, U.UnitName,InspectionCode,CN.ProfessionalName,InspectionName,Specifications,
Supplier,Counts,SamplingCount,(CASE WHEN SamplingResult=1 THEN '' WHEN SamplingResult=0 THEN '' ELSE '' END) AS SamplingResult,
InspectionDate,AttachUrl,Attribute,RemarkCode,UsedPlace,EquipmentNO from Comprehensive_InspectionEquipment C
@ -37,8 +91,8 @@ namespace FineUIPro.Web.Comprehensive
left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId
where C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
if (sdrpUnitId.SelectedValue != BLL.Const._Null)
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (this.sdrpUnitId.SelectedValue != null && this.sdrpUnitId.SelectedValue != BLL.Const._Null)
{
strSql += " AND C.UnitId=@UnitId";
listStr.Add(new SqlParameter("@UnitId", sdrpUnitId.SelectedValue));
@ -214,7 +268,7 @@ namespace FineUIPro.Web.Comprehensive
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.InspectionEquipmentMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.InspectionEquipmentMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))

View File

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Comprehensive {
namespace FineUIPro.Web.Comprehensive
{
public partial class InspectionEquipment {
public partial class InspectionEquipment
{
/// <summary>
/// form1 控件。
@ -39,6 +41,42 @@ namespace FineUIPro.Web.Comprehensive {
/// </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>

View File

@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InspectionMachine.aspx.cs" Inherits="FineUIPro.Web.Comprehensive.InspectionMachine" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
@ -9,9 +11,21 @@
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<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" OnPageIndexChange="Grid1_PageIndexChange"
runat="server" BoxFlex="1" DataKeyNames="InspectionMachineId" AllowCellEditing="true" ClicksToEdit="2" DataIDField="InspectionMachineId" AllowSorting="true" SortField="InspectionMachineCode"
@ -86,7 +100,7 @@
<f:RenderField ColumnID="LeaveDate" DataField="LeaveDate" FieldType="Date" Renderer="Date" HeaderText="离场时间" TextAlign="Center"
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" >
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left">
<ItemTemplate>
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
Text='<%# BLL.AttachFileService.GetBtnFileUrl(Eval("InspectionMachineId")) %>' ToolTip="附件查看"></asp:LinkButton>
@ -110,6 +124,8 @@
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="机具报验" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="900px" Height="460px">

View File

@ -8,7 +8,22 @@ namespace FineUIPro.Web.Comprehensive
{
public partial class InspectionMachine : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@ -19,18 +34,55 @@ namespace FineUIPro.Web.Comprehensive
{
if (!IsPostBack)
{
GetButtonPower();
BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.CurrUser.LoginProjectId, true);
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
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();
}
BLL.CNProfessionalService.InitCNProfessionalDownList(this.sdrpCNProfessional, true);
BindGrid();
}
}
private void InitDropDownList()
{
BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.ProjectId, 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();
}
/// <summary>
/// 数据绑定
/// </summary>
public void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"select InspectionMachineId, InspectionMachineCode, U.UnitName,CN.ProfessionalName ,Status,
InspectionMachineName, SpecificationModel, NextTestDate, TestCycle, C.InspectionDate,
InspectionDate CompileDate, (CASE WHEN IsVerification=1 THEN '是' WHEN IsVerification=0 THEN '否' ELSE '' END) AS IsVerification,(CASE WHEN IsCheckOK=1 THEN '是' WHEN IsCheckOK=0 THEN '否' ELSE '' END) AS IsCheckOK, InspectionType, LeaveDate, UnitsCount
@ -39,7 +91,7 @@ namespace FineUIPro.Web.Comprehensive
left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId
where C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (sdrpUnitId.SelectedValue != BLL.Const._Null)
{
strSql += " AND C.UnitId=@UnitId";
@ -182,7 +234,7 @@ namespace FineUIPro.Web.Comprehensive
BLL.InspectionMachineService.DeleteInspectionMachine(rowID);
}
}
//Project_CQMSDataService.StatisticalData(this.CurrUser.LoginProjectId, Project_CQMSDataService.CQMSDateType.MeasuringInstruments);
//Project_CQMSDataService.StatisticalData(this.ProjectId, Project_CQMSDataService.CQMSDateType.MeasuringInstruments);
BindGrid();
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
}
@ -213,7 +265,7 @@ namespace FineUIPro.Web.Comprehensive
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.InspectionMachineMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.InspectionMachineMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))

View File

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Comprehensive {
namespace FineUIPro.Web.Comprehensive
{
public partial class InspectionMachine {
public partial class InspectionMachine
{
/// <summary>
/// form1 控件。
@ -39,6 +41,42 @@ namespace FineUIPro.Web.Comprehensive {
/// </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>

View File

@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InspectionPerson.aspx.cs" Inherits="FineUIPro.Web.Comprehensive.InspectionPerson" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
@ -9,9 +11,21 @@
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<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" ShowHeader="false" Title="人员报验" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="InspectionPersonId" AllowCellEditing="true" EnableColumnLines="true"
@ -85,7 +99,7 @@
</ItemTemplate>
</f:TemplateField>--%>
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" >
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left">
<ItemTemplate>
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
Text='<%# BLL.AttachFileService.GetBtnFileUrl(Eval("InspectionPersonId")) %>' ToolTip="附件查看"></asp:LinkButton>
@ -111,6 +125,8 @@
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="人员报验" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="900px" Height="470px">

View File

@ -8,6 +8,22 @@ namespace FineUIPro.Web.Comprehensive
{
public partial class InspectionPerson : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@ -18,18 +34,55 @@ namespace FineUIPro.Web.Comprehensive
{
if (!IsPostBack)
{
GetButtonPower();
BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.CurrUser.LoginProjectId, true);
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
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();
}
BLL.PostService.InitPostDownList(this.sdrpPost, true);
BindGrid();
}
}
private void InitDropDownList()
{
BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.ProjectId, 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();
}
/// <summary>
/// 数据绑定
/// </summary>
public void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"select InspectionPersonId, InspectionPersonCode, PersonName, Status,
CertificateNumber, QualifiedProjectCode, ValidityDate, ApprovalTime,
DepartureTime, AttachUrl,CompileMan, CompileDate,
@ -40,7 +93,7 @@ namespace FineUIPro.Web.Comprehensive
left join Base_WorkPost P on C.PostId=P.WorkPostId
where C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (sdrpUnitId.SelectedValue != BLL.Const._Null)
{
strSql += " AND C.UnitId=@UnitId";
@ -183,8 +236,8 @@ namespace FineUIPro.Web.Comprehensive
BLL.InspectionPersonService.DeleteInspectionPerson(rowID);
}
}
//Project_CQMSDataService.StatisticalData(this.CurrUser.LoginProjectId, Project_CQMSDataService.CQMSDateType.QualityTraining);
//Project_CQMSDataService.StatisticalData(this.CurrUser.LoginProjectId, Project_CQMSDataService.CQMSDateType.ManagerData);
//Project_CQMSDataService.StatisticalData(this.ProjectId, Project_CQMSDataService.CQMSDateType.QualityTraining);
//Project_CQMSDataService.StatisticalData(this.ProjectId, Project_CQMSDataService.CQMSDateType.ManagerData);
BindGrid();
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
}
@ -247,7 +300,7 @@ namespace FineUIPro.Web.Comprehensive
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.InspectionPersonMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.InspectionPersonMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))

View File

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Comprehensive {
namespace FineUIPro.Web.Comprehensive
{
public partial class InspectionPerson {
public partial class InspectionPerson
{
/// <summary>
/// form1 控件。
@ -39,6 +41,42 @@ namespace FineUIPro.Web.Comprehensive {
/// </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>

View File

@ -1,10 +1,12 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectControlPoint.aspx.cs" Inherits="FineUIPro.Web.CQMS.WBS.ProjectControlPoint" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>现场控制点裁剪</title>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<style>
@ -24,7 +26,17 @@
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" CssClass="blockpanel" Margin="5px" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true" EnableCollapse="true" Layout="Fit"
<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="panelLeftRegion2" RegionPosition="Left" RegionSplit="true" EnableCollapse="true" Layout="Fit"
RegionPercent="20%" Title="现场控制点裁剪" TitleToolTip="现场控制点裁剪" ShowBorder="true" ShowHeader="true"
BodyPadding="10px">
<Items>
@ -158,7 +170,7 @@
runat="server" Text="修改">
</f:MenuButton>
<f:MenuButton ID="btnMenuCopy" OnClick="btnMenuCopy_Click" EnablePostBack="true" Hidden="true" Icon="DatabaseCopy"
runat="server" Text="拷贝" >
runat="server" Text="拷贝">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true" Hidden="true" Icon="Delete"
ConfirmText="确认删除选中项?" ConfirmTarget="Top" runat="server" Text="删除">

View File

@ -15,6 +15,22 @@ namespace FineUIPro.Web.CQMS.WBS
{
public partial class ProjectControlPoint : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
/// <summary>
/// 被选择项列表
/// </summary>
@ -55,9 +71,23 @@ namespace FineUIPro.Web.CQMS.WBS
{
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
this.SelectedList = new List<string>();
this.NoSelectedList = new List<string>();
GetButtonPower();
//GetButtonPower();
InitTreeMenu();
this.Grid1.Columns[2].Hidden = false;
this.Grid1.Columns[3].Hidden = true;
@ -75,17 +105,37 @@ namespace FineUIPro.Web.CQMS.WBS
#region
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
this.GetButtonPower();
this.InitTreeMenu();
}
/// <summary>
/// 加载树
/// </summary>
private void InitTreeMenu()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
this.trWBS.Nodes.Clear();
this.trWBS.ShowBorder = false;
this.trWBS.ShowHeader = false;
this.trWBS.EnableIcons = true;
this.trWBS.AutoScroll = true;
this.trWBS.EnableSingleClickExpand = true;
var unitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId orderby x.UnitWorkCode select x;
var unitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.ProjectId orderby x.UnitWorkCode select x;
foreach (var q in unitWorks)
{
TreeNode newNode = new TreeNode();
@ -202,7 +252,7 @@ namespace FineUIPro.Web.CQMS.WBS
cNProfessionalId = e.NodeID.Split('|')[1];
}
var divisions = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.CNProfessionalId == cNProfessionalId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId
where x.CNProfessionalId == cNProfessionalId && x.ProjectId == this.ProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId
orderby x.SortIndex
select x).ToList();
foreach (var q in divisions)
@ -221,7 +271,7 @@ namespace FineUIPro.Web.CQMS.WBS
newNode.Checked = true;
}
var list = (from x in Funs.DB.WBS_DivisionProject
where x.SuperDivisionId == q.DivisionProjectId && x.ProjectId == this.CurrUser.LoginProjectId
where x.SuperDivisionId == q.DivisionProjectId && x.ProjectId == this.ProjectId
orderby x.SortIndex
select x).ToList();
if (list.Count > 0)
@ -237,7 +287,7 @@ namespace FineUIPro.Web.CQMS.WBS
else if (e.Node.CommandName == "DivisionProject") //展开分部节点
{
var childDivisions = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.SuperDivisionId == e.Node.NodeID && x.ProjectId == this.CurrUser.LoginProjectId
where x.SuperDivisionId == e.Node.NodeID && x.ProjectId == this.ProjectId
orderby x.SortIndex
select x).ToList();
foreach (var q in childDivisions)
@ -256,7 +306,7 @@ namespace FineUIPro.Web.CQMS.WBS
newNode.Checked = true;
}
var list = (from x in Funs.DB.WBS_DivisionProject
where x.SuperDivisionId == q.DivisionProjectId && x.ProjectId == this.CurrUser.LoginProjectId
where x.SuperDivisionId == q.DivisionProjectId && x.ProjectId == this.ProjectId
orderby x.SortIndex
select x).ToList();
if (list.Count > 0)
@ -279,7 +329,11 @@ namespace FineUIPro.Web.CQMS.WBS
/// <param name="e"></param>
protected void trWBS_NodeCheck(object sender, FineUIPro.TreeCheckEventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId, BLL.Const.BtnSave))
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId, BLL.Const.BtnSave))
{
Model.WBS_DivisionProject divisionProject = BLL.DivisionProjectService.GetDivisionProjectById(e.NodeID);
divisionProject.IsSelected = e.Checked;
@ -425,7 +479,7 @@ namespace FineUIPro.Web.CQMS.WBS
{
if (this.trWBS.SelectedNode != null)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId, BLL.Const.BtnModify))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId, BLL.Const.BtnModify))
{
if (this.trWBS.SelectedNode.CommandName != "ProjectType" && this.trWBS.SelectedNode.CommandName != "UnitWork" && this.trWBS.SelectedNode.CommandName != "CNProfessional") //非工程类型和单位工程、专业节点可以修改
{
@ -483,7 +537,7 @@ namespace FineUIPro.Web.CQMS.WBS
{
if (this.trWBS.SelectedNode != null)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId, BLL.Const.BtnAdd))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId, BLL.Const.BtnAdd))
{
if (this.trWBS.SelectedNode.CommandName != "ProjectType" && this.trWBS.SelectedNode.CommandName != "UnitWork") //非工程类型和单位工程节点可以增加
{
@ -517,12 +571,12 @@ namespace FineUIPro.Web.CQMS.WBS
{
if (this.trWBS.SelectedNode != null)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId, BLL.Const.BtnDelete))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId, BLL.Const.BtnDelete))
{
if (this.trWBS.SelectedNode.CommandName != "ProjectType" && this.trWBS.SelectedNode.CommandName != "UnitWork" && this.trWBS.SelectedNode.CommandName != "CNProfessional") //非工程类型和单位工程、专业节点可以删除
{
string id = this.trWBS.SelectedNodeID;
//var workPackage = Funs.DB.WBS_WorkPackage.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.InitWorkPackageCode == this.trWBS.SelectedNodeID);
//var workPackage = Funs.DB.WBS_WorkPackage.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.InitWorkPackageCode == this.trWBS.SelectedNodeID);
//if (workPackage != null)
//{
// ShowNotify("WBS定制中已使用该数据无法删除", MessageBoxIcon.Warning);
@ -605,8 +659,8 @@ namespace FineUIPro.Web.CQMS.WBS
}
BLL.DivisionProjectService.DeleteDivisionProject(divisionProjectId);
}
// Project_CQMSDataService.StatisticalData(this.CurrUser.LoginProjectId, Project_CQMSDataService.CQMSDateType.QualityControlPoint);
// Project_CQMSDataService.StatisticalData(this.CurrUser.LoginProjectId, Project_CQMSDataService.CQMSDateType.ProjectDivision);
// Project_CQMSDataService.StatisticalData(this.ProjectId, Project_CQMSDataService.CQMSDateType.QualityControlPoint);
// Project_CQMSDataService.StatisticalData(this.ProjectId, Project_CQMSDataService.CQMSDateType.ProjectDivision);
}
BLL.LogService.AddSys_Log(this.CurrUser, id, id, BLL.Const.ProjectControlPointMenuId, "删除分部或子分部工程及其下所有内容!");
}
@ -710,7 +764,7 @@ namespace FineUIPro.Web.CQMS.WBS
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
//var controlItemAndCycle = Funs.DB.WBS_ControlItemAndCycle.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.InitControlItemCode == Grid1.SelectedRowID);
//var controlItemAndCycle = Funs.DB.WBS_ControlItemAndCycle.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.InitControlItemCode == Grid1.SelectedRowID);
//if (controlItemAndCycle != null)
//{
// ShowNotify("WBS定制中已使用该数据无法删除", MessageBoxIcon.Warning);
@ -718,8 +772,8 @@ namespace FineUIPro.Web.CQMS.WBS
//else
//{
BLL.BreakdownProjectService.DeleteBreakdown(Grid1.SelectedRowID);
//Project_CQMSDataService.StatisticalData(this.CurrUser.LoginProjectId, Project_CQMSDataService.CQMSDateType.QualityControlPoint);
//Project_CQMSDataService.StatisticalData(this.CurrUser.LoginProjectId, Project_CQMSDataService.CQMSDateType.ProjectDivision);
//Project_CQMSDataService.StatisticalData(this.ProjectId, Project_CQMSDataService.CQMSDateType.QualityControlPoint);
//Project_CQMSDataService.StatisticalData(this.ProjectId, Project_CQMSDataService.CQMSDateType.ProjectDivision);
BLL.LogService.AddSys_Log(this.CurrUser, Grid1.SelectedRowID, Grid1.SelectedRowID, BLL.Const.ProjectControlPointMenuId, "删除分项");
Grid1.DataBind();
BindGrid();
@ -773,12 +827,16 @@ namespace FineUIPro.Web.CQMS.WBS
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT BreakdownProjectId,BreakdownCode,BreakdownName,Basis,CheckPoints,RecordAndCode,Class,FenBao,WuHuan,JianLi,YeZhu,Remark,ModelURL,CheckAcceptType"
+ @" FROM WBS_BreakdownProject ";
List<SqlParameter> listStr = new List<SqlParameter>();
strSql += " where DivisionProjectId = @DivisionProjectId and ProjectId=@ProjectId";
listStr.Add(new SqlParameter("@DivisionProjectId", this.trWBS.SelectedNodeID));
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@ -868,7 +926,7 @@ namespace FineUIPro.Web.CQMS.WBS
if (trWBS.Nodes[i].Nodes[j].NodeID.Split('|')[1] == "1") //建筑工程
{
var divisionsCV = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.CNProfessionalId == BLL.Const.CNProfessionalCVId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId
where x.CNProfessionalId == BLL.Const.CNProfessionalCVId && x.ProjectId == this.ProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId
orderby x.SortIndex
select x).ToList();
if (divisionsCV.Count > 0) //建筑工程下存在土建内容
@ -882,7 +940,7 @@ namespace FineUIPro.Web.CQMS.WBS
trWBS.Nodes[i].Nodes[j].Nodes.Add(newNode3);
newNode3.Expanded = true;
var divisions = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.CNProfessionalId == BLL.Const.CNProfessionalCVId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId
where x.CNProfessionalId == BLL.Const.CNProfessionalCVId && x.ProjectId == this.ProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId
orderby x.SortIndex
select x).ToList();
foreach (var q in divisions)
@ -899,7 +957,7 @@ namespace FineUIPro.Web.CQMS.WBS
}
newNode3.Nodes.Add(newNode4);
var division1s = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == q.DivisionProjectId
where x.ProjectId == this.ProjectId && x.SuperDivisionId == q.DivisionProjectId
orderby x.SortIndex
select x).ToList();
if (list.Contains(q.DivisionProjectId))
@ -915,7 +973,7 @@ namespace FineUIPro.Web.CQMS.WBS
newNode5.EnableClickEvent = true;
newNode4.Nodes.Add(newNode5);
var division2s = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == division1.DivisionProjectId
where x.ProjectId == this.ProjectId && x.SuperDivisionId == division1.DivisionProjectId
orderby x.SortIndex
select x).ToList();
if (list.Contains(division1.DivisionProjectId))
@ -931,7 +989,7 @@ namespace FineUIPro.Web.CQMS.WBS
newNode6.EnableClickEvent = true;
newNode5.Nodes.Add(newNode6);
var division3s = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == division2.DivisionProjectId
where x.ProjectId == this.ProjectId && x.SuperDivisionId == division2.DivisionProjectId
orderby x.SortIndex
select x).ToList();
if (list.Contains(division2.DivisionProjectId))
@ -977,7 +1035,7 @@ namespace FineUIPro.Web.CQMS.WBS
else
{
var divisions = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.CNProfessionalId == BLL.Const.CNProfessionalConstructId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId
where x.CNProfessionalId == BLL.Const.CNProfessionalConstructId && x.ProjectId == this.ProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId
orderby x.SortIndex
select x).ToList();
foreach (var q in divisions)
@ -994,7 +1052,7 @@ namespace FineUIPro.Web.CQMS.WBS
newNode4.Checked = true;
}
var division1s = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == q.DivisionProjectId
where x.ProjectId == this.ProjectId && x.SuperDivisionId == q.DivisionProjectId
orderby x.SortIndex
select x).ToList();
if (list.Contains(q.DivisionProjectId))
@ -1010,7 +1068,7 @@ namespace FineUIPro.Web.CQMS.WBS
newNode5.EnableClickEvent = true;
newNode4.Nodes.Add(newNode5);
var division2s = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == division1.DivisionProjectId
where x.ProjectId == this.ProjectId && x.SuperDivisionId == division1.DivisionProjectId
orderby x.SortIndex
select x).ToList();
if (list.Contains(division1.DivisionProjectId))
@ -1026,7 +1084,7 @@ namespace FineUIPro.Web.CQMS.WBS
newNode6.EnableClickEvent = true;
newNode5.Nodes.Add(newNode6);
var division3s = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == division2.DivisionProjectId
where x.ProjectId == this.ProjectId && x.SuperDivisionId == division2.DivisionProjectId
orderby x.SortIndex
select x).ToList();
if (list.Contains(division2.DivisionProjectId))
@ -1086,7 +1144,7 @@ namespace FineUIPro.Web.CQMS.WBS
{
newCNProfessionalNode.Expanded = true;
var divisions = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.CNProfessionalId == c.CNProfessionalId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId
where x.CNProfessionalId == c.CNProfessionalId && x.ProjectId == this.ProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId
orderby x.SortIndex
select x).ToList();
foreach (var q in divisions)
@ -1103,7 +1161,7 @@ namespace FineUIPro.Web.CQMS.WBS
newNode4.Checked = true;
}
var division1s = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == q.DivisionProjectId
where x.ProjectId == this.ProjectId && x.SuperDivisionId == q.DivisionProjectId
orderby x.SortIndex
select x).ToList();
if (list.Contains(q.DivisionProjectId))
@ -1119,7 +1177,7 @@ namespace FineUIPro.Web.CQMS.WBS
newNode5.EnableClickEvent = true;
newNode4.Nodes.Add(newNode5);
var division2s = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == division1.DivisionProjectId
where x.ProjectId == this.ProjectId && x.SuperDivisionId == division1.DivisionProjectId
orderby x.SortIndex
select x).ToList();
if (list.Contains(division1.DivisionProjectId))
@ -1135,7 +1193,7 @@ namespace FineUIPro.Web.CQMS.WBS
newNode6.EnableClickEvent = true;
newNode5.Nodes.Add(newNode6);
var division3s = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == division2.DivisionProjectId
where x.ProjectId == this.ProjectId && x.SuperDivisionId == division2.DivisionProjectId
orderby x.SortIndex
select x).ToList();
if (list.Contains(division2.DivisionProjectId))
@ -1305,7 +1363,7 @@ namespace FineUIPro.Web.CQMS.WBS
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))

View File

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.CQMS.WBS {
namespace FineUIPro.Web.CQMS.WBS
{
public partial class ProjectControlPoint {
public partial class ProjectControlPoint
{
/// <summary>
/// form1 控件。
@ -48,6 +50,33 @@ namespace FineUIPro.Web.CQMS.WBS {
/// </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>
/// panelLeftRegion2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion2;
/// <summary>
/// trWBS 控件。
/// </summary>

View File

@ -1,10 +1,12 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectControlPointAuditRecord.aspx.cs" Inherits="FineUIPro.Web.CQMS.WBS.ProjectControlPointAuditRecord" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>现场控制点审批记录</title>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<style>
@ -22,11 +24,20 @@
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" CssClass="blockpanel" Margin="5px" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" Layout="Fit"
Title="中间面板" ShowBorder="true" ShowHeader="false" BodyPadding="10px">
<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="panel3" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
<Items>
<f:Grid ID="Grid1" Width="870px" ShowBorder="true" ShowHeader="false" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="AuditId" AllowSorting="true" EnableColumnLines="true"
@ -43,7 +54,7 @@
EnablePostBack="true" runat="server" ToolTip="查询" OnClick="btnSearch_Click">
</f:Button>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnNew" ToolTip="新增" Text="新增" Icon="Add" runat="server" OnClick="btnNew_Click" >
<f:Button ID="btnNew" ToolTip="新增" Text="新增" Icon="Add" runat="server" OnClick="btnNew_Click">
</f:Button>
</Items>

View File

@ -10,6 +10,21 @@ namespace FineUIPro.Web.CQMS.WBS
{
public partial class ProjectControlPointAuditRecord : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
public bool Editable
{
get
@ -22,6 +37,7 @@ namespace FineUIPro.Web.CQMS.WBS
}
}
#endregion
#region
/// <summary>
@ -35,13 +51,42 @@ namespace FineUIPro.Web.CQMS.WBS
{
Editable = false;
GetButtonPower();
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
BindGrid();
}
}
#endregion
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
this.GetButtonPower();
this.BindGrid();
}
#region
/// <summary>
/// 关闭窗口
@ -121,6 +166,10 @@ namespace FineUIPro.Web.CQMS.WBS
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT AuditId
,WBS_BreakdownProjectAuditRecord.ProjectId
,AuditCode
@ -134,7 +183,7 @@ namespace FineUIPro.Web.CQMS.WBS
FROM dbo.WBS_BreakdownProjectAuditRecord left join Sys_User on Auditer = UserId ";
List<SqlParameter> listStr = new List<SqlParameter>();
strSql += " where WBS_BreakdownProjectAuditRecord.ProjectId=@ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (!string.IsNullOrEmpty(txtAuditCode.Text))
{
strSql += " and AuditCode like '%" + txtAuditCode.Text + "%'";
@ -198,7 +247,7 @@ namespace FineUIPro.Web.CQMS.WBS
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointAuditMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointAuditMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))

View File

@ -42,13 +42,40 @@ namespace FineUIPro.Web.CQMS.WBS
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelCenterRegion 控件。
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
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>
/// panel3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panel3;
/// <summary>
/// Grid1 控件。

View File

@ -1,10 +1,12 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectControlPointFile.aspx.cs" Inherits="FineUIPro.Web.CQMS.WBS.ProjectControlPointFile" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>现场控制点裁剪</title>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<style>
@ -24,14 +26,23 @@
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" CssClass="blockpanel" Margin="5px" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true" EnableCollapse="true" Layout="Fit"
<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="panelLeftRegion2" RegionPosition="Left" RegionSplit="true" EnableCollapse="true" Layout="Fit"
RegionPercent="20%" Title="现场控制点裁剪" TitleToolTip="现场控制点裁剪" ShowBorder="true" ShowHeader="true"
BodyPadding="10px">
<Items>
<f:Tree ID="trWBS" EnableCollapse="true" ShowHeader="true" OnNodeCheck="trWBS_NodeCheck" OnlyLeafCheck="true"
OnNodeCommand="trWBS_NodeCommand" OnNodeExpand="trWBS_NodeExpand" AutoLeafIdentification="true"
runat="server">
</f:Tree>
<f:HiddenField runat="server" ID="hdSelectId">
</f:HiddenField>

View File

@ -10,6 +10,22 @@ namespace FineUIPro.Web.CQMS.WBS
{
public partial class ProjectControlPointFile : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
/// <summary>
/// 被选择项列表
/// </summary>
@ -50,9 +66,22 @@ namespace FineUIPro.Web.CQMS.WBS
{
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
this.SelectedList = new List<string>();
this.NoSelectedList = new List<string>();
GetButtonPower();
//GetButtonPower();
InitTreeMenu();
this.Grid1.Columns[2].Hidden = false;
this.Grid1.Columns[3].Hidden = true;
@ -68,18 +97,34 @@ namespace FineUIPro.Web.CQMS.WBS
#endregion
#region
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.GetButtonPower();
this.InitTreeMenu();
}
/// <summary>
/// 加载树
/// </summary>
private void InitTreeMenu()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
this.trWBS.Nodes.Clear();
this.trWBS.ShowBorder = false;
this.trWBS.ShowHeader = false;
this.trWBS.EnableIcons = true;
this.trWBS.AutoScroll = true;
this.trWBS.EnableSingleClickExpand = true;
var unitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId orderby x.UnitWorkCode select x;
var unitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.ProjectId orderby x.UnitWorkCode select x;
foreach (var q in unitWorks)
{
TreeNode newNode = new TreeNode();
@ -196,7 +241,7 @@ namespace FineUIPro.Web.CQMS.WBS
cNProfessionalId = e.NodeID.Split('|')[1];
}
var divisions = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.CNProfessionalId == cNProfessionalId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId
where x.CNProfessionalId == cNProfessionalId && x.ProjectId == this.ProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId
orderby x.SortIndex
select x).ToList();
foreach (var q in divisions)
@ -216,7 +261,7 @@ namespace FineUIPro.Web.CQMS.WBS
//newNode.Checked = true;
var list = (from x in Funs.DB.WBS_DivisionProject
where x.SuperDivisionId == q.DivisionProjectId && x.ProjectId == this.CurrUser.LoginProjectId
where x.SuperDivisionId == q.DivisionProjectId && x.ProjectId == this.ProjectId
orderby x.SortIndex
select x).ToList();
if (list.Count > 0)
@ -232,7 +277,7 @@ namespace FineUIPro.Web.CQMS.WBS
else if (e.Node.CommandName == "DivisionProject") //展开分部节点
{
var childDivisions = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.SuperDivisionId == e.Node.NodeID && x.ProjectId == this.CurrUser.LoginProjectId
where x.SuperDivisionId == e.Node.NodeID && x.ProjectId == this.ProjectId
orderby x.SortIndex
select x).ToList();
foreach (var q in childDivisions)
@ -251,7 +296,7 @@ namespace FineUIPro.Web.CQMS.WBS
//newNode.Checked = true;
var list = (from x in Funs.DB.WBS_DivisionProject
where x.SuperDivisionId == q.DivisionProjectId && x.ProjectId == this.CurrUser.LoginProjectId
where x.SuperDivisionId == q.DivisionProjectId && x.ProjectId == this.ProjectId
orderby x.SortIndex
select x).ToList();
if (list.Count > 0)
@ -275,7 +320,7 @@ namespace FineUIPro.Web.CQMS.WBS
/// <param name="e"></param>
protected void trWBS_NodeCheck(object sender, FineUIPro.TreeCheckEventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId, BLL.Const.BtnSave))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId, BLL.Const.BtnSave))
{
Model.WBS_DivisionProject divisionProject = BLL.DivisionProjectService.GetDivisionProjectById(e.NodeID);
divisionProject.IsSelected = e.Checked;
@ -450,7 +495,7 @@ namespace FineUIPro.Web.CQMS.WBS
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
//var controlItemAndCycle = Funs.DB.WBS_ControlItemAndCycle.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.InitControlItemCode == Grid1.SelectedRowID);
//var controlItemAndCycle = Funs.DB.WBS_ControlItemAndCycle.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.InitControlItemCode == Grid1.SelectedRowID);
//if (controlItemAndCycle != null)
//{
// ShowNotify("WBS定制中已使用该数据无法删除", MessageBoxIcon.Warning);
@ -511,12 +556,17 @@ namespace FineUIPro.Web.CQMS.WBS
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT BreakdownProjectId,BreakdownCode,BreakdownName,Basis,CheckPoints,RecordAndCode,Class,FenBao,WuHuan,JianLi,YeZhu,Remark,ModelURL
FROM WBS_BreakdownProject ";
List<SqlParameter> listStr = new List<SqlParameter>();
strSql += " where IsSelected = 1 and DivisionProjectId = @DivisionProjectId and ProjectId=@ProjectId";
listStr.Add(new SqlParameter("@DivisionProjectId", this.trWBS.SelectedNodeID));
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@ -602,7 +652,7 @@ namespace FineUIPro.Web.CQMS.WBS
if (trWBS.Nodes[i].Nodes[j].NodeID == BLL.Const.CNProfessionalConstructId) //建筑工程
{
var divisionsCV = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.CNProfessionalId == BLL.Const.CNProfessionalCVId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId && x.IsSelected == true
where x.CNProfessionalId == BLL.Const.CNProfessionalCVId && x.ProjectId == this.ProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId && x.IsSelected == true
orderby x.SortIndex
select x).ToList();
if (divisionsCV.Count > 0) //建筑工程下存在土建内容
@ -616,7 +666,7 @@ namespace FineUIPro.Web.CQMS.WBS
trWBS.Nodes[i].Nodes[j].Nodes.Add(newNode3);
newNode3.Expanded = true;
var divisions = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.CNProfessionalId == BLL.Const.CNProfessionalCVId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId
where x.CNProfessionalId == BLL.Const.CNProfessionalCVId && x.ProjectId == this.ProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId
orderby x.SortIndex
select x).ToList();
foreach (var q in divisions)
@ -633,7 +683,7 @@ namespace FineUIPro.Web.CQMS.WBS
}
newNode3.Nodes.Add(newNode4);
var division1s = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == q.DivisionProjectId
where x.ProjectId == this.ProjectId && x.SuperDivisionId == q.DivisionProjectId
orderby x.SortIndex
select x).ToList();
if (list.Contains(q.DivisionProjectId))
@ -649,7 +699,7 @@ namespace FineUIPro.Web.CQMS.WBS
newNode5.EnableClickEvent = true;
newNode4.Nodes.Add(newNode5);
var division2s = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == division1.DivisionProjectId
where x.ProjectId == this.ProjectId && x.SuperDivisionId == division1.DivisionProjectId
orderby x.SortIndex
select x).ToList();
if (list.Contains(division1.DivisionProjectId))
@ -665,7 +715,7 @@ namespace FineUIPro.Web.CQMS.WBS
newNode6.EnableClickEvent = true;
newNode5.Nodes.Add(newNode6);
var division3s = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == division2.DivisionProjectId
where x.ProjectId == this.ProjectId && x.SuperDivisionId == division2.DivisionProjectId
orderby x.SortIndex
select x).ToList();
if (list.Contains(division2.DivisionProjectId))
@ -711,7 +761,7 @@ namespace FineUIPro.Web.CQMS.WBS
else
{
var divisions = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.CNProfessionalId == BLL.Const.CNProfessionalConstructId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId
where x.CNProfessionalId == BLL.Const.CNProfessionalConstructId && x.ProjectId == this.ProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId
orderby x.SortIndex
select x).ToList();
foreach (var q in divisions)
@ -728,7 +778,7 @@ namespace FineUIPro.Web.CQMS.WBS
newNode4.Checked = true;
}
var division1s = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == q.DivisionProjectId
where x.ProjectId == this.ProjectId && x.SuperDivisionId == q.DivisionProjectId
orderby x.SortIndex
select x).ToList();
if (list.Contains(q.DivisionProjectId))
@ -744,7 +794,7 @@ namespace FineUIPro.Web.CQMS.WBS
newNode5.EnableClickEvent = true;
newNode4.Nodes.Add(newNode5);
var division2s = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == division1.DivisionProjectId
where x.ProjectId == this.ProjectId && x.SuperDivisionId == division1.DivisionProjectId
orderby x.SortIndex
select x).ToList();
if (list.Contains(division1.DivisionProjectId))
@ -760,7 +810,7 @@ namespace FineUIPro.Web.CQMS.WBS
newNode6.EnableClickEvent = true;
newNode5.Nodes.Add(newNode6);
var division3s = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == division2.DivisionProjectId
where x.ProjectId == this.ProjectId && x.SuperDivisionId == division2.DivisionProjectId
orderby x.SortIndex
select x).ToList();
if (list.Contains(division2.DivisionProjectId))
@ -820,7 +870,7 @@ namespace FineUIPro.Web.CQMS.WBS
{
newCNProfessionalNode.Expanded = true;
var divisions = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.CNProfessionalId == c.CNProfessionalId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId
where x.CNProfessionalId == c.CNProfessionalId && x.ProjectId == this.ProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId
orderby x.SortIndex
select x).ToList();
foreach (var q in divisions)
@ -837,7 +887,7 @@ namespace FineUIPro.Web.CQMS.WBS
newNode4.Checked = true;
}
var division1s = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == q.DivisionProjectId
where x.ProjectId == this.ProjectId && x.SuperDivisionId == q.DivisionProjectId
orderby x.SortIndex
select x).ToList();
if (list.Contains(q.DivisionProjectId))
@ -853,7 +903,7 @@ namespace FineUIPro.Web.CQMS.WBS
newNode5.EnableClickEvent = true;
newNode4.Nodes.Add(newNode5);
var division2s = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == division1.DivisionProjectId
where x.ProjectId == this.ProjectId && x.SuperDivisionId == division1.DivisionProjectId
orderby x.SortIndex
select x).ToList();
if (list.Contains(division1.DivisionProjectId))
@ -869,7 +919,7 @@ namespace FineUIPro.Web.CQMS.WBS
newNode6.EnableClickEvent = true;
newNode5.Nodes.Add(newNode6);
var division3s = (from x in BLL.Funs.DB.WBS_DivisionProject
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == division2.DivisionProjectId
where x.ProjectId == this.ProjectId && x.SuperDivisionId == division2.DivisionProjectId
orderby x.SortIndex
select x).ToList();
if (list.Contains(division2.DivisionProjectId))
@ -999,7 +1049,7 @@ namespace FineUIPro.Web.CQMS.WBS
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId);
if (buttonList.Count() > 0)
{
}

View File

@ -50,6 +50,33 @@ namespace FineUIPro.Web.CQMS.WBS
/// </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>
/// panelLeftRegion2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion2;
/// <summary>
/// trWBS 控件。
/// </summary>

View File

@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BenchmarkWorkSite.aspx.cs" Inherits="FineUIPro.Web.ThreeYearAction.ConstructionStandardization.BenchmarkWorkSite" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
@ -9,6 +11,19 @@
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<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" ShowHeader="false" Title="标杆示范工地" EnableCollapse="true"
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="Id"
@ -91,7 +106,8 @@
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="编辑标杆示范工地" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="true" runat="server" IsModal="true" Width="1024px"
Height="700px">

View File

@ -1,34 +1,27 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using static System.Runtime.CompilerServices.RuntimeHelpers;
using System.Xml.Linq;
namespace FineUIPro.Web.ThreeYearAction.ConstructionStandardization
{
public partial class BenchmarkWorkSite : PageBase
{
#region
///// <summary>
///// 项目主键
///// </summary>
//public string ProjectId
//{
// get
// {
// return (string)ViewState["ProjectId"];
// }
// set
// {
// ViewState["ProjectId"] = value;
// }
//}
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
@ -42,24 +35,56 @@ namespace FineUIPro.Web.ThreeYearAction.ConstructionStandardization
if (!IsPostBack)
{
Funs.DropDownPageSize(this.ddlPageSize);
this.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
this.btnNew.OnClientClick = Window1.GetShowReference("BenchmarkWorkSiteEdit.aspx") + "return false;";
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
{
Grid1.PageSize = this.CurrUser.PageSize.Value;
}
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
////权限按钮方法
this.GetButtonPower();
// 绑定表格
this.BindGrid();
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
this.GetButtonPower();
this.BindGrid();
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
var db = Funs.DB;
var queryData = from x in db.ConstructionStandardization_BenchmarkWorkSite
join pro in db.Base_Project on x.ProjectId equals pro.ProjectId
@ -67,10 +92,8 @@ namespace FineUIPro.Web.ThreeYearAction.ConstructionStandardization
join un2 in db.Base_Unit on x.Supervisor equals un2.UnitId
join un3 in db.Base_Unit on x.Owner equals un3.UnitId
join y in db.Sys_User on x.CompileMan equals y.UserId
where
//x.ProjectId == this.ProjectId
//&&
(string.IsNullOrEmpty(txtCode.Text.Trim()) || x.Code.Contains(txtCode.Text.Trim()))
where x.ProjectId == this.ProjectId
&& (string.IsNullOrEmpty(txtCode.Text.Trim()) || x.Code.Contains(txtCode.Text.Trim()))
&& (string.IsNullOrEmpty(txtName.Text.Trim()) || x.Name.Contains(txtName.Text.Trim()))
&& (string.IsNullOrEmpty(txtProjectName.Text.Trim()) || pro.ProjectName.Contains(txtProjectName.Text.Trim()))
select new
@ -222,7 +245,7 @@ namespace FineUIPro.Web.ThreeYearAction.ConstructionStandardization
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.BenchmarkWorkSiteMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.BenchmarkWorkSiteMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))

View File

@ -41,6 +41,42 @@ namespace FineUIPro.Web.ThreeYearAction.ConstructionStandardization
/// </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>