补充公司级别树

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" %>
<%@ 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="DataDistributionId" AllowCellEditing="true" EnableColumnLines="true"
@ -106,6 +120,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="500px">

View File

@ -9,6 +9,23 @@ namespace FineUIPro.Web.Comprehensive
{
public partial class DataDistribution : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@ -19,12 +36,47 @@ namespace FineUIPro.Web.Comprehensive
{
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();
}
}
/// <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()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
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,
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
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));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
@ -222,7 +274,7 @@ namespace FineUIPro.Web.Comprehensive
{
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.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>
/// 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="DataReceiving.aspx.cs" Inherits="FineUIPro.Web.Comprehensive.DataReceiving" %>
<%@ 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="DataReceivingId" AllowCellEditing="true" EnableColumnLines="true"
@ -83,7 +97,7 @@
<f:RenderField ColumnID="ReplyDate" DataField="ReplyDate" FieldType="String" 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("DataReceivingId")) %>' ToolTip="附件查看"></asp:LinkButton>
@ -107,6 +121,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="490px">

View File

@ -10,6 +10,22 @@ namespace FineUIPro.Web.Comprehensive
{
public partial class DataReceiving : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@ -20,23 +36,56 @@ namespace FineUIPro.Web.Comprehensive
{
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();
}
}
/// <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>
public void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
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,
Remark, AttachUrl, CompileMan, CompileDate
from Comprehensive_DataReceiving C
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));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
@ -226,7 +275,7 @@ namespace FineUIPro.Web.Comprehensive
{
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.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>
/// 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="DesignDrawings.aspx.cs" Inherits="FineUIPro.Web.Comprehensive.DesignDrawings" %>
<%@ 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="DesignDrawingsId" AllowCellEditing="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="DesignDrawingsId" AllowSorting="true"
@ -81,7 +95,7 @@
<f:RenderField ColumnID="ReceiveMan" DataField="ReceiveMan" FieldType="String" 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("DesignDrawingsId")) %>' ToolTip="附件查看"></asp:LinkButton>
@ -105,6 +119,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="590px">

View File

@ -9,7 +9,22 @@ namespace FineUIPro.Web.Comprehensive
{
public partial class DesignDrawings :PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@ -20,17 +35,50 @@ namespace FineUIPro.Web.Comprehensive
{
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);
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>
public void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT C.DesignDrawingsId,
C.ProjectId,
C.CNProfessionalId,
@ -51,7 +99,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 (sdrpCNProfessionalId.SelectedValue != BLL.Const._Null)
{
strSql += " AND C.CNProfessionalId=@CNProfessionalId";
@ -286,7 +334,7 @@ namespace FineUIPro.Web.Comprehensive
{
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.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>
/// 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="FinalFile.aspx.cs" Inherits="FineUIPro.Web.Comprehensive.FinalFile" %>
<%@ 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="FinalFileId" AllowCellEditing="true" EnableColumnLines="true"
@ -62,7 +76,7 @@
<f:RenderField ColumnID="Remark" DataField="Remark" FieldType="String" HeaderText="备注" TextAlign="Center"
HeaderTextAlign="Center" Width="250px">
</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("FinalFileId")) %>' ToolTip="附件查看"></asp:LinkButton>
@ -86,6 +100,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="800px" Height="320px">

View File

@ -9,6 +9,22 @@ namespace FineUIPro.Web.Comprehensive
{
public partial class FinalFile : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@ -19,28 +35,66 @@ namespace FineUIPro.Web.Comprehensive
{
if (!IsPostBack)
{
GetButtonPower();
BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.CurrUser.LoginProjectId, true);
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))
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
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;
sdrpUnitId.Enabled = false;
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
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>
public void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT FinalFileId
, a.ProjectId
, 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
where a.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 a.UnitId=@UnitId";
listStr.Add(new SqlParameter("@UnitId", sdrpUnitId.SelectedValue));
@ -215,7 +269,7 @@ namespace FineUIPro.Web.Comprehensive
{
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.Contains(BLL.Const.BtnAdd))

View File

@ -41,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="NCRManagement.aspx.cs" Inherits="FineUIPro.Web.Comprehensive.NCRManagement" %>
<%@ 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="NCR管理" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="NCRManagementId" AllowCellEditing="true" EnableColumnLines="true"
@ -82,7 +96,7 @@
<f:RenderField ColumnID="ResponsibleMan" DataField="ResponsibleMan" FieldType="String" HeaderText="责任人" TextAlign="Center"
HeaderTextAlign="Center" Width="110px">
</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("NCRManagementId")) %>' ToolTip="附件查看"></asp:LinkButton>
@ -106,6 +120,8 @@
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="NCR管理" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="900px" Height="530px">

View File

@ -10,6 +10,22 @@ namespace FineUIPro.Web.Comprehensive
{
public partial class NCRManagement : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@ -20,14 +36,52 @@ 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.drpProfessionalId, 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();
}
public void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"select NCRManagementId, ProjectId, SendUnit, NCRCode, Contents, IssuedDate, ReceiveUnit,Status,
ClosedDate, CompleteDate, ResponsibleMan, AttachUrl, ImplementationFrontState,
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
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.SendUnit=@UnitId";
@ -271,7 +325,7 @@ namespace FineUIPro.Web.Comprehensive
{
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.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>
/// 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="PressurePipe.aspx.cs" Inherits="FineUIPro.Web.Comprehensive.PressurePipe" %>
<%@ 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="PressurePipeId" AllowCellEditing="true" EnableColumnLines="true"
@ -62,7 +76,7 @@
<f:RenderField ColumnID="IssuedReportNumber" DataField="IssuedReportNumber" FieldType="String" HeaderText="已出具监检报告条数" TextAlign="Center"
HeaderTextAlign="Center" Width="180px">
</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("PressurePipeId")) %>' ToolTip="附件查看"></asp:LinkButton>
@ -86,6 +100,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="320px">

View File

@ -11,6 +11,20 @@ namespace FineUIPro.Web.Comprehensive
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 主键
/// </summary>
public string PressurePipeId
@ -36,24 +50,61 @@ 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 PressurePipeId, EstimateNumber, ActualNumber, PackageNumber, Status,
CompletePackageNumber, PressurePipeNumber, IssuedReportNumber, CompileMan,U.UnitName
from Comprehensive_PressurePipe C
left join Base_Unit U on C.UnitId=U.UnitId
where C.Projctid = @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";
@ -204,7 +255,7 @@ namespace FineUIPro.Web.Comprehensive
{
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.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>
/// 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

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

View File

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

View File

@ -1,5 +1,7 @@
<%@ 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>
<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="SpecialEquipmentId" AllowCellEditing="true" EnableColumnLines="true"
@ -61,7 +75,7 @@
<f:RenderField ColumnID="MonitoringReportNumber" DataField="MonitoringReportNumber" FieldType="String" HeaderText="监检报告数量" TextAlign="Center"
HeaderTextAlign="Center" Width="160px">
</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("SpecialEquipmentId")) %>' ToolTip="附件查看"></asp:LinkButton>
@ -85,6 +99,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="800px" Height="320px">

View File

@ -9,6 +9,22 @@ namespace FineUIPro.Web.Comprehensive
{
public partial class SpecialEquipment :PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@ -19,18 +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();
}
BLL.SpecialEquipmentService.InitSpecialEquipmentDropDownList(this.drpEquipmentId, true, 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 C.SpecialEquipmentId, ProjectId,C.EquipmentId, SunNumber, Status,
InformNumber, SubmitDataNumber, MonitoringReportNumber, CompileMan,U.UnitName,eq.SpecialEquipmentName
from Comprehensive_SpecialEquipment C
@ -38,7 +91,7 @@ namespace FineUIPro.Web.Comprehensive
left join Base_SpecialEquipment eq on eq.SpecialEquipmentId = C.EquipmentId
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";
@ -194,7 +247,7 @@ namespace FineUIPro.Web.Comprehensive
{
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.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>
/// 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="TrainingRecords.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.TrainingRecords" %>
<%@ 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="TrainingRecordsId" AllowCellEditing="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="TrainingRecordsId" AllowSorting="true"
@ -82,6 +96,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="800px" Height="500px">

View File

@ -1,19 +1,31 @@
using BLL;
using RestSharp.Extensions;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.CQMS.Comprehensive
{
public partial class TrainingRecords : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@ -24,17 +36,50 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
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);
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>
public void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT C.TrainingRecordsId,
C.ProjectId,
C.TrainingContents,
@ -50,7 +95,7 @@ namespace FineUIPro.Web.CQMS.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 (drpCNProfessionalId.SelectedValue != BLL.Const._Null)
{
strSql += " AND C.CNProfessionalId=@CNProfessionalId";
@ -213,6 +258,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="e"></param>
protected void btnOut_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string rootPath = Server.MapPath("~/");
string initTemplatePath = Const.CQMS_TrainingRecordsTemplateUrl;
string uploadfilepath = string.Empty;
@ -220,7 +270,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
uploadfilepath = rootPath + initTemplatePath;
var lists = (from x in Funs.DB.Comprehensive_TrainingRecords
where x.ProjectId == this.CurrUser.LoginProjectId
where x.ProjectId == this.ProjectId
select x);
if (drpCNProfessionalId.SelectedValue != BLL.Const._Null)
{
@ -233,7 +283,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
lists = lists.OrderBy(x => x.RemarkCode);
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") + "");
File.Copy(uploadfilepath, newUrl);
// 第一步:读取文件流
@ -342,7 +392,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
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.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>
/// form1 控件。
@ -39,6 +41,42 @@ namespace FineUIPro.Web.CQMS.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

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

View File

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