修改HSE费用计划公司级不能显示的问题
This commit is contained in:
parent
fd322d4c7f
commit
59725e1f29
|
|
@ -1,5 +1,6 @@
|
||||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Expense.aspx.cs" Inherits="FineUIPro.Web.HSSE.CostGoods.Expense" %>
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Expense.aspx.cs" Inherits="FineUIPro.Web.HSSE.CostGoods.Expense" %>
|
||||||
|
|
||||||
|
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head runat="server">
|
<head runat="server">
|
||||||
|
|
@ -9,7 +10,19 @@
|
||||||
<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">
|
||||||
|
<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" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||||
<Items>
|
<Items>
|
||||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="安全费用计划" EnableCollapse="true"
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="安全费用计划" EnableCollapse="true"
|
||||||
|
|
@ -33,7 +46,7 @@
|
||||||
</Toolbars>
|
</Toolbars>
|
||||||
<Columns>
|
<Columns>
|
||||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
|
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
|
||||||
TextAlign="Center" />
|
TextAlign="Center"/>
|
||||||
<f:RenderField Width="90px" ColumnID="ExpenseCode" DataField="ExpenseCode" SortField="ExpenseCode"
|
<f:RenderField Width="90px" ColumnID="ExpenseCode" DataField="ExpenseCode" SortField="ExpenseCode"
|
||||||
FieldType="String" HeaderText="编号" HeaderTextAlign="Center" TextAlign="Left">
|
FieldType="String" HeaderText="编号" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
|
|
@ -58,7 +71,7 @@
|
||||||
HeaderTextAlign="Center" />--%>
|
HeaderTextAlign="Center" />--%>
|
||||||
</Columns>
|
</Columns>
|
||||||
<Listeners>
|
<Listeners>
|
||||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu"/>
|
||||||
</Listeners>
|
</Listeners>
|
||||||
<PageItems>
|
<PageItems>
|
||||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||||
|
|
@ -72,6 +85,9 @@
|
||||||
</f:Grid>
|
</f:Grid>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
|
|
||||||
<f:Window ID="Window1" Title="安全费用计划" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
<f:Window ID="Window1" Title="安全费用计划" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1100px"
|
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1100px"
|
||||||
Height="560px">
|
Height="560px">
|
||||||
|
|
|
||||||
|
|
@ -37,13 +37,21 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
Funs.DropDownPageSize(this.ddlPageSize);
|
Funs.DropDownPageSize(this.ddlPageSize);
|
||||||
////权限按钮方法
|
|
||||||
this.GetButtonPower();
|
|
||||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||||
{
|
{
|
||||||
this.ProjectId = Request.Params["projectId"];
|
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.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
|
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
|
||||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||||
{
|
{
|
||||||
|
|
@ -60,11 +68,32 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 公司级树加载
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void changeTree(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.ProjectId = this.ucTree.ProjectId;
|
||||||
|
// this.GetButtonPower();
|
||||||
|
// if (string.IsNullOrEmpty(this.ProjectId))
|
||||||
|
// {
|
||||||
|
// btnNew.Hidden = true;
|
||||||
|
// }
|
||||||
|
this.BindGrid();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 绑定数据
|
/// 绑定数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void BindGrid()
|
private void BindGrid()
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrEmpty(this.ProjectId))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
string strSql = @" SELECT Expense.ExpenseId, "
|
string strSql = @" SELECT Expense.ExpenseId, "
|
||||||
+ @" Expense.ProjectId,"
|
+ @" Expense.ProjectId,"
|
||||||
+ @" CodeRecords.Code AS ExpenseCode,"
|
+ @" CodeRecords.Code AS ExpenseCode,"
|
||||||
|
|
@ -90,7 +119,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||||
}
|
}
|
||||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||||
{
|
{
|
||||||
|
|
@ -239,7 +268,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectExpenseMenuId);
|
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectExpenseMenuId);
|
||||||
if (buttonList.Count() > 0)
|
if (buttonList.Count() > 0)
|
||||||
{
|
{
|
||||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,12 @@
|
||||||
// </自动生成>
|
// </自动生成>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace FineUIPro.Web.HSSE.CostGoods {
|
namespace FineUIPro.Web.HSSE.CostGoods
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
public partial class Expense {
|
public partial class Expense
|
||||||
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// form1 控件。
|
/// form1 控件。
|
||||||
|
|
@ -39,6 +41,33 @@ namespace FineUIPro.Web.HSSE.CostGoods {
|
||||||
/// </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>
|
/// <summary>
|
||||||
/// Grid1 控件。
|
/// Grid1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue