补充公司级别树

This commit is contained in:
夏菊 2025-04-11 18:02:46 +08:00
parent fc7601612a
commit 96899ce306
28 changed files with 1777 additions and 939 deletions

View File

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

View File

@ -9,6 +9,23 @@ namespace FineUIPro.Web.Comprehensive
{ {
public partial class DataDistribution : PageBase public partial class DataDistribution : PageBase
{ {
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region #region
/// <summary> /// <summary>
/// 加载页面 /// 加载页面
@ -19,12 +36,47 @@ namespace FineUIPro.Web.Comprehensive
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
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(); 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();
}
public void BindGrid() public void BindGrid()
{ {
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"select DataDistributionId, ProjectId, SendDate, FileCode, FileName, Status, string strSql = @"select DataDistributionId, ProjectId, SendDate, FileCode, FileName, Status,
SendMan, ReceivingUnit, ReceivingMan, (case when FileType='1' then '' ELSE '' end)AS FileType, CopiesCount, (case when IsReply='True' then '是' else '否' end) as IsReply, ReplyCode, SendMan, ReceivingUnit, ReceivingMan, (case when FileType='1' then '' ELSE '' end)AS FileType, CopiesCount, (case when IsReply='True' then '是' else '否' end) as IsReply, ReplyCode,
ReplyDate, Remark, AttachUrl, CompileMan, CompileDate,CN.ProfessionalName ReplyDate, Remark, AttachUrl, CompileMan, CompileDate,CN.ProfessionalName
@ -32,7 +84,7 @@ namespace FineUIPro.Web.Comprehensive
left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId
where C.ProjectId = @ProjectId"; where C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
SqlParameter[] parameter = listStr.ToArray(); SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count; Grid1.RecordCount = tb.Rows.Count;
@ -222,7 +274,7 @@ namespace FineUIPro.Web.Comprehensive
{ {
return; return;
} }
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.DataDistributionMenuId); var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.DataDistributionMenuId);
if (buttonList.Count() > 0) if (buttonList.Count() > 0)
{ {
if (buttonList.Contains(BLL.Const.BtnAdd)) if (buttonList.Contains(BLL.Const.BtnAdd))

View File

@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.Comprehensive { namespace FineUIPro.Web.Comprehensive
{
public partial class DataDistribution { public partial class DataDistribution
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@ -39,6 +41,42 @@ namespace FineUIPro.Web.Comprehensive {
/// </remarks> /// </remarks>
protected global::FineUIPro.Panel Panel1; 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> /// <summary>
/// Grid1 控件。 /// Grid1 控件。
/// </summary> /// </summary>

View File

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

View File

@ -10,6 +10,22 @@ namespace FineUIPro.Web.Comprehensive
{ {
public partial class DataReceiving : PageBase public partial class DataReceiving : PageBase
{ {
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region #region
/// <summary> /// <summary>
/// 加载页面 /// 加载页面
@ -20,23 +36,56 @@ namespace FineUIPro.Web.Comprehensive
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
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(); 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>
/// 数据绑定 /// 数据绑定
/// </summary> /// </summary>
public void BindGrid() public void BindGrid()
{ {
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"select DataReceivingId, DataReceivingDate, FileCode, FileName, SendUnit, SendMan, Status, string strSql = @"select DataReceivingId, DataReceivingDate, FileCode, FileName, SendUnit, SendMan, Status,
(CASE WHEN FileType='1' THEN '' ELSE '' END)as FileType, CopiesCount, ReceivingMan, FileHandler, (CASE WHEN IsReply='true' THEN '是' ELSE '否' END)as IsReply, ReplyCode, ReplyDate, (CASE WHEN FileType='1' THEN '' ELSE '' END)as FileType, CopiesCount, ReceivingMan, FileHandler, (CASE WHEN IsReply='true' THEN '是' ELSE '否' END)as IsReply, ReplyCode, ReplyDate,
Remark, AttachUrl, CompileMan, CompileDate Remark, AttachUrl, CompileMan, CompileDate
from Comprehensive_DataReceiving C from Comprehensive_DataReceiving C
where C.ProjectId = @ProjectId"; where C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
SqlParameter[] parameter = listStr.ToArray(); SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count; Grid1.RecordCount = tb.Rows.Count;
@ -226,7 +275,7 @@ namespace FineUIPro.Web.Comprehensive
{ {
return; return;
} }
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.DataReceivingMenuId); var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.DataReceivingMenuId);
if (buttonList.Count() > 0) if (buttonList.Count() > 0)
{ {
if (buttonList.Contains(BLL.Const.BtnAdd)) if (buttonList.Contains(BLL.Const.BtnAdd))

View File

@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.Comprehensive { namespace FineUIPro.Web.Comprehensive
{
public partial class DataReceiving { public partial class DataReceiving
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@ -39,6 +41,42 @@ namespace FineUIPro.Web.Comprehensive {
/// </remarks> /// </remarks>
protected global::FineUIPro.Panel Panel1; 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> /// <summary>
/// Grid1 控件。 /// Grid1 控件。
/// </summary> /// </summary>

View File

@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DesignDrawings.aspx.cs" Inherits="FineUIPro.Web.Comprehensive.DesignDrawings" %> <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DesignDrawings.aspx.cs" Inherits="FineUIPro.Web.Comprehensive.DesignDrawings" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html> <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
@ -9,9 +11,21 @@
</head> </head>
<body> <body>
<form id="form1" runat="server"> <form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" /> <f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" <f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch"> <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> <Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="图纸收发记录" EnableCollapse="true" ForceFit="true" <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="图纸收发记录" EnableCollapse="true" ForceFit="true"
runat="server" BoxFlex="1" DataKeyNames="DesignDrawingsId" AllowCellEditing="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="DesignDrawingsId" AllowSorting="true" runat="server" BoxFlex="1" DataKeyNames="DesignDrawingsId" AllowCellEditing="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="DesignDrawingsId" AllowSorting="true"
@ -105,6 +119,8 @@
</f:Grid> </f:Grid>
</Items> </Items>
</f:Panel> </f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="图纸收发记录" Hidden="true" EnableIFrame="true" EnableMaximize="true" <f:Window ID="Window1" Title="图纸收发记录" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close" Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="900px" Height="590px"> Width="900px" Height="590px">

View File

@ -9,7 +9,22 @@ namespace FineUIPro.Web.Comprehensive
{ {
public partial class DesignDrawings :PageBase public partial class DesignDrawings :PageBase
{ {
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region #region
/// <summary> /// <summary>
/// 加载页面 /// 加载页面
@ -20,17 +35,50 @@ namespace FineUIPro.Web.Comprehensive
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
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();
}
BLL.CNProfessionalService.InitCNProfessionalDownList(this.sdrpCNProfessionalId, true); BLL.CNProfessionalService.InitCNProfessionalDownList(this.sdrpCNProfessionalId, true);
BindGrid(); 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>
/// 数据绑定 /// 数据绑定
/// </summary> /// </summary>
public void BindGrid() public void BindGrid()
{ {
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT C.DesignDrawingsId, string strSql = @"SELECT C.DesignDrawingsId,
C.ProjectId, C.ProjectId,
C.CNProfessionalId, C.CNProfessionalId,
@ -51,7 +99,7 @@ namespace FineUIPro.Web.Comprehensive
+@" LEFT JOIN Base_CNProfessional CN ON C.CNProfessionalId=CN.CNProfessionalId" +@" LEFT JOIN Base_CNProfessional CN ON C.CNProfessionalId=CN.CNProfessionalId"
+@" WHERE C.ProjectId = @ProjectId"; +@" WHERE C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (sdrpCNProfessionalId.SelectedValue != BLL.Const._Null) if (sdrpCNProfessionalId.SelectedValue != BLL.Const._Null)
{ {
strSql += " AND C.CNProfessionalId=@CNProfessionalId"; strSql += " AND C.CNProfessionalId=@CNProfessionalId";
@ -286,7 +334,7 @@ namespace FineUIPro.Web.Comprehensive
{ {
return; return;
} }
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.DesignDrawingsMenuId); var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.DesignDrawingsMenuId);
if (buttonList.Count() > 0) if (buttonList.Count() > 0)
{ {
if (buttonList.Contains(BLL.Const.BtnAdd)) if (buttonList.Contains(BLL.Const.BtnAdd))

View File

@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.Comprehensive { namespace FineUIPro.Web.Comprehensive
{
public partial class DesignDrawings { public partial class DesignDrawings
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@ -39,6 +41,42 @@ namespace FineUIPro.Web.Comprehensive {
/// </remarks> /// </remarks>
protected global::FineUIPro.Panel Panel1; 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> /// <summary>
/// Grid1 控件。 /// Grid1 控件。
/// </summary> /// </summary>

View File

@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FinalFile.aspx.cs" Inherits="FineUIPro.Web.Comprehensive.FinalFile" %> <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FinalFile.aspx.cs" Inherits="FineUIPro.Web.Comprehensive.FinalFile" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html> <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
@ -9,9 +11,21 @@
</head> </head>
<body> <body>
<form id="form1" runat="server"> <form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" /> <f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" <f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch"> <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> <Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="特种设备管理" EnableCollapse="true" <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="特种设备管理" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="FinalFileId" AllowCellEditing="true" EnableColumnLines="true" runat="server" BoxFlex="1" DataKeyNames="FinalFileId" AllowCellEditing="true" EnableColumnLines="true"
@ -86,6 +100,8 @@
</f:Grid> </f:Grid>
</Items> </Items>
</f:Panel> </f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="定稿文件" Hidden="true" EnableIFrame="true" EnableMaximize="true" <f:Window ID="Window1" Title="定稿文件" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close" Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="800px" Height="320px"> Width="800px" Height="320px">

View File

@ -9,6 +9,22 @@ namespace FineUIPro.Web.Comprehensive
{ {
public partial class FinalFile : PageBase public partial class FinalFile : PageBase
{ {
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region #region
/// <summary> /// <summary>
/// 加载页面 /// 加载页面
@ -19,28 +35,66 @@ namespace FineUIPro.Web.Comprehensive
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
GetButtonPower(); this.ProjectId = this.CurrUser.LoginProjectId;
BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.CurrUser.LoginProjectId, true); if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
var punit = ProjectUnitService.GetProjectUnitByUnitIdProjectId(this.CurrUser.LoginProjectId, this.CurrUser.UnitId);
if (CurrUser.UserId == Const.sysglyId || CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) == BLL.Const.ProjectUnitType_1 || (punit != null && punit.UnitType == Const.ProjectUnitType_3))
{ {
BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.CurrUser.LoginProjectId, true); this.ProjectId = Request.Params["projectId"];
} }
else this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{ {
sdrpUnitId.SelectedValue = this.CurrUser.UnitId; this.panelLeftRegion.Hidden = true;
sdrpUnitId.Enabled = false; ////权限按钮方法
this.GetButtonPower();
} }
BindGrid(); BindGrid();
} }
} }
private void InitDropDownList()
{
BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.ProjectId, true);
var punit = ProjectUnitService.GetProjectUnitByUnitIdProjectId(this.ProjectId, this.CurrUser.UnitId);
if (CurrUser.UserId == Const.sysglyId || CommonService.GetProjectUnitType(this.ProjectId, this.CurrUser.UnitId) == BLL.Const.ProjectUnitType_1 || (punit != null && punit.UnitType == Const.ProjectUnitType_3))
{
BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.ProjectId, true);
}
else
{
sdrpUnitId.SelectedValue = this.CurrUser.UnitId;
sdrpUnitId.Enabled = false;
}
}
/// <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>
/// 数据绑定 /// 数据绑定
/// </summary> /// </summary>
public void BindGrid() public void BindGrid()
{ {
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT FinalFileId string strSql = @"SELECT FinalFileId
, a.ProjectId , a.ProjectId
, a.UnitId , a.UnitId
@ -54,8 +108,8 @@ namespace FineUIPro.Web.Comprehensive
FROM dbo.Comprehensive_FinalFile a left join Base_Unit b on a.unitId=b.UnitId FROM dbo.Comprehensive_FinalFile a left join Base_Unit b on a.unitId=b.UnitId
where a.ProjectId= @ProjectId"; where a.ProjectId= @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>(); 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) if (this.sdrpUnitId.SelectedValue != null && this.sdrpUnitId.SelectedValue != BLL.Const._Null)
{ {
strSql += " AND a.UnitId=@UnitId"; strSql += " AND a.UnitId=@UnitId";
listStr.Add(new SqlParameter("@UnitId", sdrpUnitId.SelectedValue)); listStr.Add(new SqlParameter("@UnitId", sdrpUnitId.SelectedValue));
@ -215,7 +269,7 @@ namespace FineUIPro.Web.Comprehensive
{ {
return; return;
} }
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.FinalFileMenuId); var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.FinalFileMenuId);
if (buttonList.Count() > 0) if (buttonList.Count() > 0)
{ {
if (buttonList.Contains(BLL.Const.BtnAdd)) if (buttonList.Contains(BLL.Const.BtnAdd))

View File

@ -41,6 +41,42 @@ namespace FineUIPro.Web.Comprehensive
/// </remarks> /// </remarks>
protected global::FineUIPro.Panel Panel1; 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> /// <summary>
/// Grid1 控件。 /// Grid1 控件。
/// </summary> /// </summary>

View File

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

View File

@ -10,6 +10,22 @@ namespace FineUIPro.Web.Comprehensive
{ {
public partial class NCRManagement : PageBase public partial class NCRManagement : PageBase
{ {
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region #region
/// <summary> /// <summary>
/// 加载页面 /// 加载页面
@ -20,14 +36,52 @@ namespace FineUIPro.Web.Comprehensive
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
GetButtonPower(); this.ProjectId = this.CurrUser.LoginProjectId;
BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.CurrUser.LoginProjectId, true); 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.drpProfessionalId, true); BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpProfessionalId, true);
BindGrid(); 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();
}
public void BindGrid() public void BindGrid()
{ {
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"select NCRManagementId, ProjectId, SendUnit, NCRCode, Contents, IssuedDate, ReceiveUnit,Status, string strSql = @"select NCRManagementId, ProjectId, SendUnit, NCRCode, Contents, IssuedDate, ReceiveUnit,Status,
ClosedDate, CompleteDate, ResponsibleMan, AttachUrl, ImplementationFrontState, ClosedDate, CompleteDate, ResponsibleMan, AttachUrl, ImplementationFrontState,
CompileMan, UnitWorkId,CN.ProfessionalName,C.CNProfessionalId,u.UnitName CompileMan, UnitWorkId,CN.ProfessionalName,C.CNProfessionalId,u.UnitName
@ -36,7 +90,7 @@ namespace FineUIPro.Web.Comprehensive
left join Base_Unit u on u.UnitId = C.SendUnit left join Base_Unit u on u.UnitId = C.SendUnit
where C.ProjectId = @ProjectId"; where C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>(); 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) if (sdrpUnitId.SelectedValue != BLL.Const._Null)
{ {
strSql += " AND C.SendUnit=@UnitId"; strSql += " AND C.SendUnit=@UnitId";
@ -271,7 +325,7 @@ namespace FineUIPro.Web.Comprehensive
{ {
return; return;
} }
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.NCRManagementMenuId); var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.NCRManagementMenuId);
if (buttonList.Count() > 0) if (buttonList.Count() > 0)
{ {
if (buttonList.Contains(BLL.Const.BtnAdd)) if (buttonList.Contains(BLL.Const.BtnAdd))

View File

@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.Comprehensive { namespace FineUIPro.Web.Comprehensive
{
public partial class NCRManagement { public partial class NCRManagement
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@ -39,6 +41,42 @@ namespace FineUIPro.Web.Comprehensive {
/// </remarks> /// </remarks>
protected global::FineUIPro.Panel Panel1; 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> /// <summary>
/// Grid1 控件。 /// Grid1 控件。
/// </summary> /// </summary>

View File

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

View File

@ -11,6 +11,20 @@ namespace FineUIPro.Web.Comprehensive
{ {
#region #region
/// <summary> /// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 主键 /// 主键
/// </summary> /// </summary>
public string PressurePipeId public string PressurePipeId
@ -36,24 +50,61 @@ namespace FineUIPro.Web.Comprehensive
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
GetButtonPower(); this.ProjectId = this.CurrUser.LoginProjectId;
BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.CurrUser.LoginProjectId, true); 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(); 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>
/// 数据绑定 /// 数据绑定
/// </summary> /// </summary>
public void BindGrid() public void BindGrid()
{ {
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"select PressurePipeId, EstimateNumber, ActualNumber, PackageNumber, Status, string strSql = @"select PressurePipeId, EstimateNumber, ActualNumber, PackageNumber, Status,
CompletePackageNumber, PressurePipeNumber, IssuedReportNumber, CompileMan,U.UnitName CompletePackageNumber, PressurePipeNumber, IssuedReportNumber, CompileMan,U.UnitName
from Comprehensive_PressurePipe C from Comprehensive_PressurePipe C
left join Base_Unit U on C.UnitId=U.UnitId left join Base_Unit U on C.UnitId=U.UnitId
where C.Projctid = @ProjectId"; where C.Projctid = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>(); 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) if (sdrpUnitId.SelectedValue != BLL.Const._Null)
{ {
strSql += " AND C.UnitId=@UnitId"; strSql += " AND C.UnitId=@UnitId";
@ -204,7 +255,7 @@ namespace FineUIPro.Web.Comprehensive
{ {
return; return;
} }
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.PressurePipeMenuId); var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.PressurePipeMenuId);
if (buttonList.Count() > 0) if (buttonList.Count() > 0)
{ {
if (buttonList.Contains(BLL.Const.BtnAdd)) if (buttonList.Contains(BLL.Const.BtnAdd))

View File

@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.Comprehensive { namespace FineUIPro.Web.Comprehensive
{
public partial class PressurePipe { public partial class PressurePipe
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@ -39,6 +41,42 @@ namespace FineUIPro.Web.Comprehensive {
/// </remarks> /// </remarks>
protected global::FineUIPro.Panel Panel1; 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> /// <summary>
/// Grid1 控件。 /// Grid1 控件。
/// </summary> /// </summary>

View File

@ -56,7 +56,6 @@ namespace FineUIPro.Web.Comprehensive
} }
protected void changeTree(object sender, EventArgs e) protected void changeTree(object sender, EventArgs e)
{ {
this.ProjectId = this.ucTree.ProjectId; this.ProjectId = this.ucTree.ProjectId;
this.BindGrid(); this.BindGrid();
@ -71,8 +70,10 @@ namespace FineUIPro.Web.Comprehensive
/// </summary> /// </summary>
public void BindGrid() public void BindGrid()
{ {
if (!string.IsNullOrEmpty(this.ProjectId)) if (string.IsNullOrEmpty(this.ProjectId))
{ {
return;
}
string strSql = @"select QualityAccidentId, time, Place, DirectEconomicLoss, RemedialMeasures,Status, string strSql = @"select QualityAccidentId, time, Place, DirectEconomicLoss, RemedialMeasures,Status,
ResponsibilityDetermination, CorrectiveActions, AttachUrl, CompileMan, CompileDate, ResponsibilityDetermination, CorrectiveActions, AttachUrl, CompileMan, CompileDate,
UnitWorkId,U.UnitName UnitWorkId,U.UnitName
@ -89,7 +90,6 @@ namespace FineUIPro.Web.Comprehensive
Grid1.DataSource = table; Grid1.DataSource = table;
Grid1.DataBind(); Grid1.DataBind();
} }
}
#endregion #endregion
#region #region

View File

@ -42,7 +42,7 @@ namespace FineUIPro.Web.Comprehensive
{ {
this.ProjectId = Request.Params["projectId"]; this.ProjectId = Request.Params["projectId"];
} }
this.InitDownList();
this.ucTree.UnitId = this.CurrUser.UnitId; this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId; this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
@ -53,11 +53,10 @@ namespace FineUIPro.Web.Comprehensive
this.GetButtonPower(); this.GetButtonPower();
} }
GetList();
BindGrid(); BindGrid();
} }
} }
private void GetList() private void InitDownList()
{ {
BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.ProjectId, true); BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.ProjectId, true);
var punit = ProjectUnitService.GetProjectUnitByUnitIdProjectId(this.ProjectId, this.CurrUser.UnitId); var punit = ProjectUnitService.GetProjectUnitByUnitIdProjectId(this.ProjectId, this.CurrUser.UnitId);
@ -73,24 +72,25 @@ namespace FineUIPro.Web.Comprehensive
} }
protected void changeTree(object sender, EventArgs e) protected void changeTree(object sender, EventArgs e)
{ {
this.ProjectId = this.ucTree.ProjectId; this.ProjectId = this.ucTree.ProjectId;
GetList(); this.InitDownList();
this.BindGrid();
this.GetButtonPower(); this.GetButtonPower();
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{ {
btnNew.Hidden = true; btnNew.Hidden = true;
} }
this.BindGrid();
} }
/// <summary> /// <summary>
/// 数据绑定 /// 数据绑定
/// </summary> /// </summary>
public void BindGrid() public void BindGrid()
{ {
if (!string.IsNullOrEmpty(this.ProjectId)) if (string.IsNullOrEmpty(this.ProjectId))
{ {
return;
}
string strSql = @"SELECT QualitySampleFirstAccFileId string strSql = @"SELECT QualitySampleFirstAccFileId
, a.ProjectId , a.ProjectId
, a.UnitId , a.UnitId
@ -127,9 +127,9 @@ namespace FineUIPro.Web.Comprehensive
var table = this.GetPagedDataTable(Grid1, tb); var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table; Grid1.DataSource = table;
Grid1.DataBind(); Grid1.DataBind();
}
} }
#endregion #endregion
#region #region

View File

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

View File

@ -9,6 +9,22 @@ namespace FineUIPro.Web.Comprehensive
{ {
public partial class SpecialEquipment :PageBase public partial class SpecialEquipment :PageBase
{ {
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region #region
/// <summary> /// <summary>
/// 加载页面 /// 加载页面
@ -19,18 +35,55 @@ namespace FineUIPro.Web.Comprehensive
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
GetButtonPower(); this.ProjectId = this.CurrUser.LoginProjectId;
BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.CurrUser.LoginProjectId, true); 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.SpecialEquipmentService.InitSpecialEquipmentDropDownList(this.drpEquipmentId, true, true); BLL.SpecialEquipmentService.InitSpecialEquipmentDropDownList(this.drpEquipmentId, true, true);
BindGrid(); 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>
/// 数据绑定 /// 数据绑定
/// </summary> /// </summary>
public void BindGrid() public void BindGrid()
{ {
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"select C.SpecialEquipmentId, ProjectId,C.EquipmentId, SunNumber, Status, string strSql = @"select C.SpecialEquipmentId, ProjectId,C.EquipmentId, SunNumber, Status,
InformNumber, SubmitDataNumber, MonitoringReportNumber, CompileMan,U.UnitName,eq.SpecialEquipmentName InformNumber, SubmitDataNumber, MonitoringReportNumber, CompileMan,U.UnitName,eq.SpecialEquipmentName
from Comprehensive_SpecialEquipment C from Comprehensive_SpecialEquipment C
@ -38,7 +91,7 @@ namespace FineUIPro.Web.Comprehensive
left join Base_SpecialEquipment eq on eq.SpecialEquipmentId = C.EquipmentId left join Base_SpecialEquipment eq on eq.SpecialEquipmentId = C.EquipmentId
where C.ProjectId = @ProjectId"; where C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>(); 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) if (sdrpUnitId.SelectedValue != BLL.Const._Null)
{ {
strSql += " AND C.UnitId=@UnitId"; strSql += " AND C.UnitId=@UnitId";
@ -194,7 +247,7 @@ namespace FineUIPro.Web.Comprehensive
{ {
return; return;
} }
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.SpecialEquipmentsMenuId); var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.SpecialEquipmentsMenuId);
if (buttonList.Count() > 0) if (buttonList.Count() > 0)
{ {
if (buttonList.Contains(BLL.Const.BtnAdd)) if (buttonList.Contains(BLL.Const.BtnAdd))

View File

@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.Comprehensive { namespace FineUIPro.Web.Comprehensive
{
public partial class SpecialEquipment { public partial class SpecialEquipment
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@ -39,6 +41,42 @@ namespace FineUIPro.Web.Comprehensive {
/// </remarks> /// </remarks>
protected global::FineUIPro.Panel Panel1; 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> /// <summary>
/// Grid1 控件。 /// Grid1 控件。
/// </summary> /// </summary>

View File

@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrainingRecords.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.TrainingRecords" %> <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrainingRecords.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.TrainingRecords" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html> <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
@ -9,9 +11,21 @@
</head> </head>
<body> <body>
<form id="form1" runat="server"> <form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" /> <f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" <f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch"> <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> <Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="培训记录" EnableCollapse="true" <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="培训记录" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="TrainingRecordsId" AllowCellEditing="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="TrainingRecordsId" AllowSorting="true" runat="server" BoxFlex="1" DataKeyNames="TrainingRecordsId" AllowCellEditing="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="TrainingRecordsId" AllowSorting="true"
@ -82,6 +96,8 @@
</f:Grid> </f:Grid>
</Items> </Items>
</f:Panel> </f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="培训记录" Hidden="true" EnableIFrame="true" EnableMaximize="true" <f:Window ID="Window1" Title="培训记录" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close" Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="800px" Height="500px"> Width="800px" Height="500px">

View File

@ -1,19 +1,31 @@
using BLL; using BLL;
using RestSharp.Extensions;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.CQMS.Comprehensive namespace FineUIPro.Web.CQMS.Comprehensive
{ {
public partial class TrainingRecords : PageBase public partial class TrainingRecords : PageBase
{ {
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region #region
/// <summary> /// <summary>
/// 加载页面 /// 加载页面
@ -24,17 +36,50 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
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();
}
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true); BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);
BindGrid(); 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>
/// 数据绑定 /// 数据绑定
/// </summary> /// </summary>
public void BindGrid() public void BindGrid()
{ {
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT C.TrainingRecordsId, string strSql = @"SELECT C.TrainingRecordsId,
C.ProjectId, C.ProjectId,
C.TrainingContents, C.TrainingContents,
@ -50,7 +95,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
+ @" LEFT JOIN Base_CNProfessional CN ON C.CNProfessionalId=CN.CNProfessionalId" + @" LEFT JOIN Base_CNProfessional CN ON C.CNProfessionalId=CN.CNProfessionalId"
+ @" WHERE C.ProjectId = @ProjectId"; + @" WHERE C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (drpCNProfessionalId.SelectedValue != BLL.Const._Null) if (drpCNProfessionalId.SelectedValue != BLL.Const._Null)
{ {
strSql += " AND C.CNProfessionalId=@CNProfessionalId"; strSql += " AND C.CNProfessionalId=@CNProfessionalId";
@ -213,6 +258,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="e"></param> /// <param name="e"></param>
protected void btnOut_Click(object sender, EventArgs e) protected void btnOut_Click(object sender, EventArgs e)
{ {
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string rootPath = Server.MapPath("~/"); string rootPath = Server.MapPath("~/");
string initTemplatePath = Const.CQMS_TrainingRecordsTemplateUrl; string initTemplatePath = Const.CQMS_TrainingRecordsTemplateUrl;
string uploadfilepath = string.Empty; string uploadfilepath = string.Empty;
@ -220,7 +270,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
uploadfilepath = rootPath + initTemplatePath; uploadfilepath = rootPath + initTemplatePath;
var lists = (from x in Funs.DB.Comprehensive_TrainingRecords var lists = (from x in Funs.DB.Comprehensive_TrainingRecords
where x.ProjectId == this.CurrUser.LoginProjectId where x.ProjectId == this.ProjectId
select x); select x);
if (drpCNProfessionalId.SelectedValue != BLL.Const._Null) if (drpCNProfessionalId.SelectedValue != BLL.Const._Null)
{ {
@ -233,7 +283,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
lists = lists.OrderBy(x => x.RemarkCode); lists = lists.OrderBy(x => x.RemarkCode);
if (lists != null) if (lists != null)
{ {
string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId); string projectName = BLL.ProjectService.GetShortNameByProjectId(this.ProjectId);
newUrl = uploadfilepath.Replace("培训记录导入模板", "培训记录(" + projectName + DateTime.Now.ToString("yyyyMMdd") + ""); newUrl = uploadfilepath.Replace("培训记录导入模板", "培训记录(" + projectName + DateTime.Now.ToString("yyyyMMdd") + "");
File.Copy(uploadfilepath, newUrl); File.Copy(uploadfilepath, newUrl);
// 第一步:读取文件流 // 第一步:读取文件流
@ -342,7 +392,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ {
return; return;
} }
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.TrainingRecordsMenuId); var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.TrainingRecordsMenuId);
if (buttonList.Count() > 0) if (buttonList.Count() > 0)
{ {
if (buttonList.Contains(BLL.Const.BtnAdd)) if (buttonList.Contains(BLL.Const.BtnAdd))

View File

@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.CQMS.Comprehensive { namespace FineUIPro.Web.CQMS.Comprehensive
{
public partial class TrainingRecords { public partial class TrainingRecords
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@ -39,6 +41,42 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// </remarks> /// </remarks>
protected global::FineUIPro.Panel Panel1; 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> /// <summary>
/// Grid1 控件。 /// Grid1 控件。
/// </summary> /// </summary>

View File

@ -53,11 +53,11 @@ namespace FineUIPro.Web.CQMS.ProcessControl
this.GetButtonPower(); this.GetButtonPower();
} }
GetList(); InitDownList();
BindGrid(); BindGrid();
} }
} }
private void GetList() private void InitDownList()
{ {
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, true);//专业 BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, true);//专业
UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.ProjectId, true); UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.ProjectId, true);
@ -67,7 +67,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
{ {
this.ProjectId = this.ucTree.ProjectId; this.ProjectId = this.ucTree.ProjectId;
GetList(); InitDownList();
this.BindGrid(); this.BindGrid();
this.GetButtonPower(); this.GetButtonPower();

View File

@ -44,7 +44,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
{ {
this.ProjectId = Request.Params["projectId"]; this.ProjectId = Request.Params["projectId"];
} }
this.InitDownList();
this.ucTree.UnitId = this.CurrUser.UnitId; this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId; this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
@ -54,11 +54,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl
////权限按钮方法 ////权限按钮方法
this.GetButtonPower(); this.GetButtonPower();
} }
GetList();
BindGrid(); BindGrid();
} }
} }
private void GetList() private void InitDownList()
{ {
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, true);//专业 BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, true);//专业
UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.ProjectId, true); UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.ProjectId, true);
@ -66,16 +65,14 @@ namespace FineUIPro.Web.CQMS.ProcessControl
} }
protected void changeTree(object sender, EventArgs e) protected void changeTree(object sender, EventArgs e)
{ {
this.ProjectId = this.ucTree.ProjectId; this.ProjectId = this.ucTree.ProjectId;
GetList(); this.InitDownList();
this.BindGrid();
this.GetButtonPower(); this.GetButtonPower();
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{ {
btnNew.Hidden = true; btnNew.Hidden = true;
} }
this.BindGrid();
} }
/// <summary> /// <summary>
/// 数据绑定 /// 数据绑定
@ -297,7 +294,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
BLL.InspectionManagementService.DeleteInspectionManagement(rowID); BLL.InspectionManagementService.DeleteInspectionManagement(rowID);
} }
} }
//Project_CQMSDataService.StatisticalData(this.CurrUser.LoginProjectId, Project_CQMSDataService.CQMSDateType.QualityAcceptance); //Project_CQMSDataService.StatisticalData(this.ProjectId, Project_CQMSDataService.CQMSDateType.QualityAcceptance);
BindGrid(); BindGrid();
ShowNotify("删除数据成功!", MessageBoxIcon.Success); ShowNotify("删除数据成功!", MessageBoxIcon.Success);
} }