补充公司级树

This commit is contained in:
夏菊 2025-04-11 15:19:17 +08:00
parent 35e0ebb3b9
commit fc7601612a
9 changed files with 635 additions and 319 deletions

View File

@ -1,10 +1,12 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ContactList.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.ContactList" %> <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ContactList.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.ContactList" %>
<%@ 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">
<head runat="server"> <head runat="server">
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" /> <link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>工程联络单管理</title> <title>工程联络单管理</title>
<style type="text/css"> <style type="text/css">
@ -21,6 +23,7 @@
color: Red; color: Red;
font-size: small; font-size: small;
} }
.red { .red {
background-color: red; background-color: red;
} }
@ -56,80 +59,94 @@
<body> <body>
<form id="form1" runat="server"> <form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" /> <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> <Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
BodyPadding="0px">
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="ContactListId" AllowCellEditing="true"
OnRowDataBound="Grid1_RowDataBound"
ClicksToEdit="2" DataIDField="ContactListId" AllowSorting="true" SortField="CreateDate"
SortDirection="DESC" EnableColumnLines="true" OnPageIndexChange="Grid1_PageIndexChange"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" ForceFit="true" OnRowCommand="Grid1_RowCommand"
EnableRowDoubleClickEvent="true" AllowFilters="true" OnRowDoubleClick="Grid1_RowDoubleClick"
EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpProposeUnit" runat="server" Label="单位名称" LabelAlign="Right" EnableEdit="true">
</f:DropDownList>
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="ContactListId" AllowCellEditing="true" <f:ToolbarFill runat="server"></f:ToolbarFill>
OnRowDataBound="Grid1_RowDataBound" <f:Button ID="btnQuery" ToolTip="查询" OnClick="btnQuery_Click" Icon="SystemSearch" EnablePostBack="true" runat="server" Text="查询">
ClicksToEdit="2" DataIDField="ContactListId" AllowSorting="true" SortField="CreateDate" </f:Button>
SortDirection="DESC" EnableColumnLines="true" OnPageIndexChange="Grid1_PageIndexChange" <f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server" Text="新增">
AllowPaging="true" IsDatabasePaging="true" PageSize="10" ForceFit="true" OnRowCommand="Grid1_RowCommand" </f:Button>
EnableRowDoubleClickEvent="true" AllowFilters="true" OnRowDoubleClick="Grid1_RowDoubleClick" </Items>
EnableTextSelection="True"> </f:Toolbar>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left"> </Toolbars>
<Items> <Columns>
<f:DropDownList ID="drpProposeUnit" runat="server" Label="单位名称" LabelAlign="Right" EnableEdit="true"> <f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField ColumnID="UnitName" DataField="UnitName" Width="160px"
SortField="UnitName" FieldType="String" HeaderText="施工单位" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="95px" ColumnID="CreateDate" DataField="CreateDate" SortField="CreateDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="编制日期" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:LinkButtonField HeaderText="附件" ConfirmTarget="Top" Width="60px" CommandName="attchUrl" ColumnID="AttchUrl"
TextAlign="Center" ToolTip="附件" Text="附件" />
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="100000" />
</f:DropDownList> </f:DropDownList>
<f:ToolbarFill runat="server">
</f:ToolbarFill>
</PageItems>
<f:ToolbarFill runat="server"></f:ToolbarFill> </f:Grid>
<f:Button ID="btnQuery" ToolTip="查询" OnClick="btnQuery_Click" Icon="SystemSearch" EnablePostBack="true" runat="server" Text="查询"> </Items>
</f:Button> </f:Panel>
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server" Text="新增">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField ColumnID="UnitName" DataField="UnitName" Width="160px"
SortField="UnitName" FieldType="String" HeaderText="施工单位" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="95px" ColumnID="CreateDate" DataField="CreateDate" SortField="CreateDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="编制日期" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:LinkButtonField HeaderText="附件" ConfirmTarget="Top" Width="60px" CommandName="attchUrl" ColumnID="AttchUrl"
TextAlign="Center" ToolTip="附件" Text="附件" />
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="100000" />
</f:DropDownList>
<f:ToolbarFill runat="server">
</f:ToolbarFill>
</PageItems>
</f:Grid>
</Items> </Items>
</f:Panel> </f:Panel>
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true" <f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px" Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="500px"></f:Window> Height="500px">
</f:Window>
<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="750px" Height="300px"> Width="750px" Height="300px">

View File

@ -14,27 +14,19 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ {
public partial class ContactList : PageBase public partial class ContactList : PageBase
{ {
#region #region
/// <summary> /// <summary>
/// 获取按钮权限 /// 项目主键
/// </summary> /// </summary>
/// <param name="button"></param> public string ProjectId
/// <returns></returns>
private void GetButtonPower()
{ {
if (Request.Params["value"] == "0") get
{ {
return; return (string)ViewState["ProjectId"];
} }
var buttonList = CommonService.GetAllButtonList(CurrUser.LoginProjectId, CurrUser.UserId, Const.CQMSContactLitMenuId); set
if (buttonList.Count() > 0)
{ {
ViewState["ProjectId"] = value;
if (buttonList.Contains(Const.BtnDelete))
{
btnMenuDel.Hidden = false;
}
} }
} }
#endregion #endregion
@ -42,11 +34,20 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
this.ProjectId = this.CurrUser.LoginProjectId;
GetButtonPower(); if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
//BLL.SolutionTempleteTypeService.InitSolutionTempleteDropDownList(drpSolutionType, true); {
//Funs.FineUIPleaseSelect(drpState); this.ProjectId = Request.Params["projectId"];
UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpProposeUnit, CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true); }
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
btnNew.OnClientClick = Window1.GetShowReference("ContactListEdit.aspx") + "return false;"; btnNew.OnClientClick = Window1.GetShowReference("ContactListEdit.aspx") + "return false;";
if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId) if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId)
@ -63,6 +64,27 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
} }
private void InitDropDownList()
{
UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpProposeUnit, this.ProjectId, BLL.Const.ProjectUnitType_2, 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();
}
protected string ConvertEdition(object edition) protected string ConvertEdition(object edition)
{ {
return string.Format("{0:#0.#}",((int)edition)/10.0); return string.Format("{0:#0.#}",((int)edition)/10.0);
@ -73,9 +95,31 @@ namespace FineUIPro.Web.CQMS.Comprehensive
string id = Grid1.Rows[i].DataKeys[0].ToString(); string id = Grid1.Rows[i].DataKeys[0].ToString();
} }
#region
/// <summary>
/// 获取按钮权限
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
{
if (Request.Params["value"] == "0")
{
return;
}
var buttonList = CommonService.GetAllButtonList(CurrUser.LoginProjectId, CurrUser.UserId, Const.CQMSContactLitMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(Const.BtnDelete))
{
btnMenuDel.Hidden = false;
}
}
}
#endregion
protected DataTable ChecklistData() protected DataTable ChecklistData()
{ {
string strSql = @"SELECT ContactListId string strSql = @"SELECT ContactListId
,ProjectId ,ProjectId
,unit.UnitId ,unit.UnitId
@ -87,7 +131,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
where ProjectId=@ProjectId"; where ProjectId=@ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", CurrUser.LoginProjectId)); listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId) if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId)
{ {
strSql += " AND contact.UnitId='" + this.CurrUser.UnitId+"'"; strSql += " AND contact.UnitId='" + this.CurrUser.UnitId+"'";
@ -136,10 +180,14 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
private void BindGrid() private void BindGrid()
{ {
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
var list = ChecklistData(); var list = ChecklistData();
Grid1.RecordCount = list.Rows.Count; Grid1.RecordCount = list.Rows.Count;
var CNProfessional = CNProfessionalService.GetCNProfessionalItem(); var CNProfessional = CNProfessionalService.GetCNProfessionalItem();
var uniWork = UnitWorkService.GetUnitWorkLists(CurrUser.LoginProjectId); var uniWork = UnitWorkService.GetUnitWorkLists(this.ProjectId);
list = GetFilteredTable(Grid1.FilteredData, list); list = GetFilteredTable(Grid1.FilteredData, list);
var table = GetPagedDataTable(Grid1, list); var table = GetPagedDataTable(Grid1, list);

View File

@ -41,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

@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DesignDetails.aspx.cs" Inherits="FineUIPro.Web.Comprehensive.DesignDetails" %> <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DesignDetails.aspx.cs" Inherits="FineUIPro.Web.Comprehensive.DesignDetails" %>
<%@ 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,85 +11,99 @@
</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> <Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="设计交底管理" EnableCollapse="true" ForceFit="true" <f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
runat="server" BoxFlex="1" DataKeyNames="DesignDetailsId" AllowCellEditing="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="DesignDetailsId" AllowSorting="true" EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
SortField="DesignDetailsCode" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True"> <Items>
<Toolbars> <f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left"> BodyPadding="0px">
<Items> <uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
<f:DropDownList ID="sdrpCNProfessionalId" runat="server" Label="专业" LabelAlign="Right"></f:DropDownList> </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="DesignDetailsId" AllowCellEditing="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="DesignDetailsId" AllowSorting="true"
SortField="DesignDetailsCode" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="sdrpCNProfessionalId" runat="server" Label="专业" LabelAlign="Right"></f:DropDownList>
<f:ToolbarFill runat="server"></f:ToolbarFill> <f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnSearch" Icon="SystemSearch" <f:Button ID="btnSearch" Icon="SystemSearch"
EnablePostBack="true" runat="server" ToolTip="查询" Text="查询"> EnablePostBack="true" runat="server" ToolTip="查询" Text="查询">
</f:Button> </f:Button>
<f:Button ID="btnNew" Icon="Add" EnablePostBack="true" runat="server" OnClick="btnNew_Click" ToolTip="新增" Text="新增" Hidden="true"> <f:Button ID="btnNew" Icon="Add" EnablePostBack="true" runat="server" OnClick="btnNew_Click" ToolTip="新增" Text="新增" Hidden="true">
</f:Button> </f:Button>
</Items> </Items>
</f:Toolbar> </f:Toolbar>
</Toolbars> </Toolbars>
<Columns> <Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"> <f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label> <asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>
<f:RenderField ColumnID="ProfessionalName" DataField="ProfessionalName" FieldType="String" HeaderText="专业" TextAlign="Center" <f:RenderField ColumnID="ProfessionalName" DataField="ProfessionalName" FieldType="String" HeaderText="专业" TextAlign="Center"
HeaderTextAlign="Center" Width="120px"> HeaderTextAlign="Center" Width="120px">
</f:RenderField> </f:RenderField>
<f:RenderField ColumnID="DesignDetailsCode" DataField="DesignDetailsCode" FieldType="String" HeaderText="编号" TextAlign="Center" <f:RenderField ColumnID="DesignDetailsCode" DataField="DesignDetailsCode" FieldType="String" HeaderText="编号" TextAlign="Center"
HeaderTextAlign="Center" Width="160px"> HeaderTextAlign="Center" Width="160px">
</f:RenderField> </f:RenderField>
<f:RenderField ColumnID="DetailsMan" DataField="DetailsMan" FieldType="String" HeaderText="交底人" TextAlign="Center" <f:RenderField ColumnID="DetailsMan" DataField="DetailsMan" FieldType="String" HeaderText="交底人" TextAlign="Center"
HeaderTextAlign="Center" Width="120px"> HeaderTextAlign="Center" Width="120px">
</f:RenderField> </f:RenderField>
<f:RenderField ColumnID="DetailsDate" DataField="DetailsDate" FieldType="Date" Renderer="Date" HeaderText="交底日期" TextAlign="Center" <f:RenderField ColumnID="DetailsDate" DataField="DetailsDate" FieldType="Date" Renderer="Date" HeaderText="交底日期" TextAlign="Center"
HeaderTextAlign="Center" Width="120px"> HeaderTextAlign="Center" Width="120px">
</f:RenderField> </f:RenderField>
<f:TemplateField ColumnID="UnitWorkName" Width="180px" HeaderText="单位工程名称" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true"> <f:TemplateField ColumnID="UnitWorkName" Width="180px" HeaderText="单位工程名称" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# ConvertUnitWork(Eval("UnitWorkId")) %>'></asp:Label> <asp:Label ID="Label2" runat="server" Text='<%# ConvertUnitWork(Eval("UnitWorkId")) %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>
<f:TemplateField ColumnID="UnitName" Width="180px" HeaderText="参加单位" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true"> <f:TemplateField ColumnID="UnitName" Width="180px" HeaderText="参加单位" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# ConvertCarryUnit(Eval("UnitName")) %>'></asp:Label> <asp:Label ID="Label1" runat="server" Text='<%# ConvertCarryUnit(Eval("UnitName")) %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" > <f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left">
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink" <asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
Text='<%# BLL.AttachFileService.GetBtnFileUrl(Eval("DesignDetailsId")) %>' ToolTip="附件查看"></asp:LinkButton> Text='<%# BLL.AttachFileService.GetBtnFileUrl(Eval("DesignDetailsId")) %>' ToolTip="附件查看"></asp:LinkButton>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>
</Columns> </Columns>
<Listeners> <Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" /> <f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners> </Listeners>
<PageItems> <PageItems>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:"> <f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText> </f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"> <f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true">
<f:ListItem Text="10" Value="10" /> <f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" /> <f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" /> <f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" /> <f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="100000" /> <f:ListItem Text="所有行" Value="100000" />
</f:DropDownList> </f:DropDownList>
</PageItems> </PageItems>
</f:Grid> </f:Grid>
</Items>
</f:Panel>
</Items> </Items>
</f:Panel> </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="360px"> Width="900px" Height="360px">
</f:Window> </f:Window>
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" <f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Parent" EnableResize="false" runat="server" EnableMaximize="true" Target="Parent" EnableResize="false" runat="server"
IsModal="true" Width="700px" Height="500px"> IsModal="true" Width="700px" Height="500px">
</f:Window> </f:Window>

View File

@ -8,6 +8,23 @@ namespace FineUIPro.Web.Comprehensive
{ {
public partial class DesignDetails : PageBase public partial class DesignDetails : PageBase
{ {
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region #region
/// <summary> /// <summary>
/// 加载页面 /// 加载页面
@ -18,20 +35,54 @@ 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();
}
public void BindGrid() public void BindGrid()
{ {
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"select DesignDetailsId,DesignDetailsCode, DetailsMan, DetailsDate, UnitWorkId,Status, string strSql = @"select DesignDetailsId,DesignDetailsCode, DetailsMan, DetailsDate, UnitWorkId,Status,
UnitName, AttachUrl, CompileMan, CN.ProfessionalName UnitName, AttachUrl, CompileMan, CN.ProfessionalName
from Comprehensive_DesignDetails C from Comprehensive_DesignDetails C
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";
@ -245,7 +296,7 @@ namespace FineUIPro.Web.Comprehensive
{ {
return; return;
} }
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.DesignDetailsMenuId); var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.DesignDetailsMenuId);
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 DesignDetails { public partial class DesignDetails
{
/// <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="SiteVisaManagement.aspx.cs" Inherits="FineUIPro.Web.Comprehensive.SiteVisaManagement" %> <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SiteVisaManagement.aspx.cs" Inherits="FineUIPro.Web.Comprehensive.SiteVisaManagement" %>
<%@ 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,110 +11,124 @@
</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> <Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="现场签证管理" EnableCollapse="true" <f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
runat="server" BoxFlex="1" DataKeyNames="VisaId" AllowCellEditing="true" EnableColumnLines="true" EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ClicksToEdit="2" DataIDField="VisaId" AllowSorting="true" SortField="VisaCode" ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
SortDirection="DESC" OnSort="Grid1_Sort" <Items>
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" <f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="true"> BodyPadding="0px">
<Toolbars> <uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left"> </f:ContentPanel>
<Items> </Items>
<f:DropDownList ID="sdrpUnitId" runat="server" Label="签证单位" LabelAlign="Right"> </f:Panel>
</f:DropDownList> <f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
<f:DropDownList ID="sdrpCNProfessionalId" runat="server" Label="专业" LabelAlign="Right"></f:DropDownList> Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
<f:DatePicker runat="server" Label="报验日期" ID="txtStarTime" LabelAlign="Right" <Items>
LabelWidth="100px" Width="220px"> <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="现场签证管理" EnableCollapse="true"
</f:DatePicker> runat="server" BoxFlex="1" DataKeyNames="VisaId" AllowCellEditing="true" EnableColumnLines="true"
<f:Label ID="Label1" runat="server" Text="至"> ClicksToEdit="2" DataIDField="VisaId" AllowSorting="true" SortField="VisaCode"
</f:Label> SortDirection="DESC" OnSort="Grid1_Sort"
<f:DatePicker runat="server" ID="txtEndTime" Width="110px"> AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
</f:DatePicker> EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="true">
<Toolbars>
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="sdrpUnitId" runat="server" Label="签证单位" LabelAlign="Right">
</f:DropDownList>
<f:DropDownList ID="sdrpCNProfessionalId" runat="server" Label="专业" LabelAlign="Right"></f:DropDownList>
<f:DatePicker runat="server" Label="报验日期" ID="txtStarTime" LabelAlign="Right"
LabelWidth="100px" Width="220px">
</f:DatePicker>
<f:Label ID="Label1" runat="server" Text="至">
</f:Label>
<f:DatePicker runat="server" ID="txtEndTime" Width="110px">
</f:DatePicker>
<f:ToolbarFill runat="server"></f:ToolbarFill> <f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnSearch" Icon="SystemSearch" <f:Button ID="btnSearch" Icon="SystemSearch"
EnablePostBack="true" runat="server" ToolTip="查询" Text="查询"> EnablePostBack="true" runat="server" ToolTip="查询" Text="查询">
</f:Button> </f:Button>
<f:Button ID="btnNew" Icon="Add" EnablePostBack="true" runat="server" OnClick="btnNew_Click" ToolTip="新增" Text="新增" Hidden="true"> <f:Button ID="btnNew" Icon="Add" EnablePostBack="true" runat="server" OnClick="btnNew_Click" ToolTip="新增" Text="新增" Hidden="true">
</f:Button> </f:Button>
<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true" Text="导入"> <f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true" Text="导入">
</f:Button> </f:Button>
</Items> </Items>
</f:Toolbar> </f:Toolbar>
</Toolbars> </Toolbars>
<Columns> <Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"> <f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label> <asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>
<f:RenderField ColumnID="UnitName" DataField="UnitName" FieldType="String" HeaderText="签证单位" TextAlign="Center" <f:RenderField ColumnID="UnitName" DataField="UnitName" FieldType="String" HeaderText="签证单位" TextAlign="Center"
HeaderTextAlign="Center" Width="160px"> HeaderTextAlign="Center" Width="160px">
</f:RenderField> </f:RenderField>
<f:RenderField ColumnID="VisaCode" DataField="VisaCode" FieldType="String" HeaderText="施工签证单编号" TextAlign="Center" <f:RenderField ColumnID="VisaCode" DataField="VisaCode" FieldType="String" HeaderText="施工签证单编号" TextAlign="Center"
HeaderTextAlign="Center" Width="160px"> HeaderTextAlign="Center" Width="160px">
</f:RenderField> </f:RenderField>
<f:RenderField ColumnID="VisaContent" DataField="VisaContent" FieldType="String" HeaderText="施工签证单内容" TextAlign="Center" <f:RenderField ColumnID="VisaContent" DataField="VisaContent" FieldType="String" HeaderText="施工签证单内容" TextAlign="Center"
HeaderTextAlign="Center" Width="160px"> HeaderTextAlign="Center" Width="160px">
</f:RenderField> </f:RenderField>
<f:RenderField ColumnID="ProcessingState" DataField="ProcessingState" FieldType="String" HeaderText="费用审核状态" TextAlign="Center" <f:RenderField ColumnID="ProcessingState" DataField="ProcessingState" FieldType="String" HeaderText="费用审核状态" TextAlign="Center"
HeaderTextAlign="Center" Width="160px"> HeaderTextAlign="Center" Width="160px">
</f:RenderField> </f:RenderField>
<f:RenderField ColumnID="UnitWorkName" DataField="UnitWorkName" FieldType="String" HeaderText="单位工程" TextAlign="Center" <f:RenderField ColumnID="UnitWorkName" DataField="UnitWorkName" FieldType="String" HeaderText="单位工程" TextAlign="Center"
HeaderTextAlign="Center" Width="160px"> HeaderTextAlign="Center" Width="160px">
</f:RenderField> </f:RenderField>
<f:RenderField ColumnID="ProfessionalName" DataField="ProfessionalName" FieldType="String" HeaderText="专业" TextAlign="Center" <f:RenderField ColumnID="ProfessionalName" DataField="ProfessionalName" FieldType="String" HeaderText="专业" TextAlign="Center"
HeaderTextAlign="Center" Width="120px"> HeaderTextAlign="Center" Width="120px">
</f:RenderField> </f:RenderField>
<f:RenderField ColumnID="VisaDate" DataField="VisaDate" FieldType="Date" Renderer="Date" HeaderText="签证时间" TextAlign="Center" <f:RenderField ColumnID="VisaDate" DataField="VisaDate" FieldType="Date" Renderer="Date" HeaderText="签证时间" TextAlign="Center"
HeaderTextAlign="Center" Width="110px"> HeaderTextAlign="Center" Width="110px">
</f:RenderField> </f:RenderField>
<f:RenderField ColumnID="SignMan" DataField="SignMan" FieldType="String" HeaderText="签证人" TextAlign="Center" <f:RenderField ColumnID="SignMan" DataField="SignMan" FieldType="String" HeaderText="签证人" TextAlign="Center"
HeaderTextAlign="Center" Width="120px"> HeaderTextAlign="Center" Width="120px">
</f:RenderField> </f:RenderField>
<f:RenderField ColumnID="AuditMan" DataField="AuditMan" FieldType="String" HeaderText="审批人" TextAlign="Center" <f:RenderField ColumnID="AuditMan" DataField="AuditMan" FieldType="String" HeaderText="审批人" TextAlign="Center"
HeaderTextAlign="Center" Width="120px"> HeaderTextAlign="Center" Width="120px">
</f:RenderField> </f:RenderField>
<f:RenderField ColumnID="Remark" DataField="Remark" FieldType="String" HeaderText="备注" TextAlign="Center" <f:RenderField ColumnID="Remark" DataField="Remark" FieldType="String" HeaderText="备注" TextAlign="Center"
HeaderTextAlign="Center" Width="120px"> HeaderTextAlign="Center" Width="120px">
</f:RenderField> </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> <ItemTemplate>
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink" <asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
Text='<%# BLL.AttachFileService.GetBtnFileUrl(Eval("VisaId")) %>' ToolTip="附件查看"></asp:LinkButton> Text='<%# BLL.AttachFileService.GetBtnFileUrl(Eval("VisaId")) %>' ToolTip="附件查看"></asp:LinkButton>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>
</Columns> </Columns>
<Listeners> <Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" /> <f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners> </Listeners>
<PageItems> <PageItems>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:"> <f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText> </f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged"> <f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="10" Value="10" /> <f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" /> <f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" /> <f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" /> <f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="100000" /> <f:ListItem Text="所有行" Value="100000" />
</f:DropDownList> </f:DropDownList>
</PageItems> </PageItems>
</f:Grid> </f:Grid>
</Items>
</f:Panel>
</Items> </Items>
</f:Panel> </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="550px"> Width="900px" Height="550px">
</f:Window> </f:Window>
<f:Window ID="Window2" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true" <f:Window ID="Window2" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true" Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
Width="700px" Height="560px"> Width="700px" Height="560px">
</f:Window> </f:Window>
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" <f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Parent" EnableResize="false" runat="server" EnableMaximize="true" Target="Parent" EnableResize="false" runat="server"
IsModal="true" Width="700px" Height="500px"> IsModal="true" Width="700px" Height="500px">
</f:Window> </f:Window>

View File

@ -8,6 +8,23 @@ namespace FineUIPro.Web.Comprehensive
{ {
public partial class SiteVisaManagement : PageBase public partial class SiteVisaManagement : PageBase
{ {
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region #region
/// <summary> /// <summary>
/// 加载页面 /// 加载页面
@ -18,18 +35,57 @@ namespace FineUIPro.Web.Comprehensive
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.CurrUser.LoginProjectId, true); //Funs.DropDownPageSize(this.ddlPageSize);
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.sdrpCNProfessionalId, true); BLL.CNProfessionalService.InitCNProfessionalDownList(this.sdrpCNProfessionalId, true);
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 VisaId,VisaCode, VisaReson, VisaDate, Status, string strSql = @"select VisaId,VisaCode, VisaReson, VisaDate, Status,
EstimatedCost, Confirmation, ConstructionManager, ControlManager, ProcessingState, EstimatedCost, Confirmation, ConstructionManager, ControlManager, ProcessingState,
AccountingExpenses,VisaContent, Remark, U.UnitName,CN.ProfessionalName ,SignMan,AuditMan,unitWork.UnitWorkName AccountingExpenses,VisaContent, Remark, U.UnitName,CN.ProfessionalName ,SignMan,AuditMan,unitWork.UnitWorkName
@ -39,7 +95,7 @@ namespace FineUIPro.Web.Comprehensive
left join WBS_UnitWork as unitWork on unitWork.UnitWorkId = C.UnitWorkId left join WBS_UnitWork as unitWork on unitWork.UnitWorkId = C.UnitWorkId
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";
@ -202,7 +258,7 @@ namespace FineUIPro.Web.Comprehensive
{ {
return; return;
} }
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.SiteVisaManagementMenuId); var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.SiteVisaManagementMenuId);
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 SiteVisaManagement { public partial class SiteVisaManagement
{
/// <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>