人员管理补充公司级树

This commit is contained in:
夏菊 2025-04-08 18:30:09 +08:00
parent 5a6796f656
commit a37909b608
14 changed files with 312 additions and 149 deletions

View File

@ -33,11 +33,11 @@ namespace FineUIPro.Web.Door
{ {
this.ProjectId = Request.Params["projectId"]; this.ProjectId = Request.Params["projectId"];
} }
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId; this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId; this.ucTree.ProjectId = this.ProjectId;
Funs.DropDownPageSize(this.ddlPageSize); Funs.DropDownPageSize(this.ddlPageSize);
UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, true); WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, true);
this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
@ -48,11 +48,15 @@ namespace FineUIPro.Web.Door
} }
} }
} }
private void InitDropDownList()
{
UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
}
protected void changeTree(object sender, EventArgs e) protected void changeTree(object sender, EventArgs e)
{ {
this.ProjectId = this.ucTree.ProjectId; this.ProjectId = this.ucTree.ProjectId;
UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true); this.InitDropDownList();
WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, true);
this.GetPersonStatistic(); this.GetPersonStatistic();
} }
/// <summary> /// <summary>

View File

@ -35,11 +35,10 @@ namespace FineUIPro.Web.Door
{ {
this.ProjectId = Request.Params["projectId"]; this.ProjectId = Request.Params["projectId"];
} }
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId; this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId; this.ucTree.ProjectId = this.ProjectId;
Funs.DropDownPageSize(this.ddlPageSize); Funs.DropDownPageSize(this.ddlPageSize);
UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue) if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
@ -57,9 +56,14 @@ namespace FineUIPro.Web.Door
protected void changeTree(object sender, EventArgs e) protected void changeTree(object sender, EventArgs e)
{ {
this.ProjectId = this.ucTree.ProjectId; this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
this.GetPersonStatistic(); this.GetPersonStatistic();
} }
private void InitDropDownList()
{
UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
}
#region #region
/// <summary> /// <summary>
@ -240,7 +244,7 @@ namespace FineUIPro.Web.Door
{ {
if (registrationId != null) if (registrationId != null)
{ {
var registration = (from x in Funs.DB.T_d_facerecord where x.NewID == registrationId select x).FirstOrDefault(); var registration = (from x in Funs.DB.T_d_facerecord where x.NewID == registrationId.ToString() select x).FirstOrDefault();
// registration.Des1 = "FileUpload/Registration/20247/2024-07/638556302997373049_QQ截图20220817171229_-_副本.png"; // registration.Des1 = "FileUpload/Registration/20247/2024-07/638556302997373049_QQ截图20220817171229_-_副本.png";
if (registration != null) if (registration != null)
{ {

View File

@ -33,11 +33,11 @@ namespace FineUIPro.Web.Door
{ {
this.ProjectId = Request.Params["projectId"]; this.ProjectId = Request.Params["projectId"];
} }
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId; this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId; this.ucTree.ProjectId = this.ProjectId;
Funs.DropDownPageSize(this.ddlPageSize); Funs.DropDownPageSize(this.ddlPageSize);
UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, true); WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, true);
this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
@ -49,11 +49,14 @@ namespace FineUIPro.Web.Door
} }
} }
} }
private void InitDropDownList()
{
UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
}
protected void changeTree(object sender, EventArgs e) protected void changeTree(object sender, EventArgs e)
{ {
this.ProjectId = this.ucTree.ProjectId; this.ProjectId = this.ucTree.ProjectId;
UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true); this.InitDropDownList();
WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, true);
this.GetPersonStatistic(); this.GetPersonStatistic();
} }
/// <summary> /// <summary>

View File

@ -33,11 +33,10 @@ namespace FineUIPro.Web.Door
{ {
this.ProjectId = Request.Params["projectId"]; this.ProjectId = Request.Params["projectId"];
} }
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId; this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId; this.ucTree.ProjectId = this.ProjectId;
Funs.DropDownPageSize(this.ddlPageSize); Funs.DropDownPageSize(this.ddlPageSize);
UnitService.InitUnitDownList(this.drpUnit, this.ProjectId, true);
Funs.FineUIPleaseSelect(this.drpWorkTeam); Funs.FineUIPleaseSelect(this.drpWorkTeam);
WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, true); WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, true);
@ -55,12 +54,14 @@ namespace FineUIPro.Web.Door
} }
} }
} }
private void InitDropDownList()
{
UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
}
protected void changeTree(object sender, EventArgs e) protected void changeTree(object sender, EventArgs e)
{ {
this.ProjectId = this.ucTree.ProjectId; this.ProjectId = this.ucTree.ProjectId;
UnitService.InitUnitDownList(this.drpUnit, this.ProjectId, true); this.InitDropDownList();
Funs.FineUIPleaseSelect(this.drpWorkTeam);
WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, true);
this.GetPersonStatistic(); this.GetPersonStatistic();
} }
/// <summary> /// <summary>

View File

@ -35,9 +35,10 @@ namespace FineUIPro.Web.Door
{ {
this.ProjectId = Request.Params["projectId"]; this.ProjectId = Request.Params["projectId"];
} }
this.InitDropDownList();
WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, false);
this.ucTree.UnitId = this.CurrUser.UnitId; this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId; this.ucTree.ProjectId = this.ProjectId;
UnitService.InitUnitDownList(this.drpUnit, this.ProjectId, true);
this.txtDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); this.txtDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
Search(); Search();
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
@ -47,11 +48,14 @@ namespace FineUIPro.Web.Door
} }
} }
} }
private void InitDropDownList()
{
UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
}
protected void changeTree(object sender, EventArgs e) protected void changeTree(object sender, EventArgs e)
{ {
this.ProjectId = this.ucTree.ProjectId; this.ProjectId = this.ucTree.ProjectId;
UnitService.InitUnitDownList(this.drpUnit, this.ProjectId, false); this.InitDropDownList();
WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, false);
} }
#region #region

View File

@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TaskNotice.aspx.cs" Inherits="FineUIPro.Web.HSSE.EduTrain.TaskNotice" %> <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TaskNotice.aspx.cs" Inherits="FineUIPro.Web.HSSE.EduTrain.TaskNotice" %>
<%@ 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,23 +11,38 @@
</head> </head>
<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="Panel2" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" <f:Panel ID="Panel2" 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="TaskNoticeId" EnableColumnLines="true" DataIDField="TaskNoticeId" AllowSorting="true" EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
SortField="TrainStartDate" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true" ForceFit="true" ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" <Items>
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" <f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
EnableTextSelection="True" EnableSummary="true" SummaryPosition="Flow"> BodyPadding="0px">
<Toolbars> <uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
<f:Toolbar ID="Toolbar2" Position="Top" runat="server"> </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:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" MinHeight="700px"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items> <Items>
<f:DropDownList ID="drpTrainType" runat="server" Label="培训类别" Width="210px" LabelWidth="80px" LabelAlign="Right" <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="培训记录" EnableCollapse="true"
AutoPostBack="true" OnSelectedIndexChanged="Text_TextChanged"> runat="server" BoxFlex="1" DataKeyNames="TaskNoticeId" EnableColumnLines="true" DataIDField="TaskNoticeId" AllowSorting="true"
</f:DropDownList> SortField="TrainStartDate" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true" ForceFit="true"
<%-- <f:DropDownList ID="drpUnitId" runat="server" Label="单位" AutoPostBack="true" OnSelectedIndexChanged="Text_TextChanged" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"
EnableTextSelection="True" EnableSummary="true" SummaryPosition="Flow">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
<Items>
<f:DropDownList ID="drpTrainType" runat="server" Label="培训类别" Width="210px" LabelWidth="80px" LabelAlign="Right"
AutoPostBack="true" OnSelectedIndexChanged="Text_TextChanged">
</f:DropDownList>
<%-- <f:DropDownList ID="drpUnitId" runat="server" Label="单位" AutoPostBack="true" OnSelectedIndexChanged="Text_TextChanged"
LabelAlign="Right" LabelWidth="50px" Width="260px"> LabelAlign="Right" LabelWidth="50px" Width="260px">
</f:DropDownList> </f:DropDownList>
<f:DatePicker ID="txtStartDate" runat="server" Label="日期" Width="160px" LabelWidth="60px" LabelAlign="Right" <f:DatePicker ID="txtStartDate" runat="server" Label="日期" Width="160px" LabelWidth="60px" LabelAlign="Right"
@ -35,69 +52,73 @@
</f:Label> </f:Label>
<f:DatePicker ID="txtEndDate" runat="server" Width="100px" AutoPostBack="true" OnTextChanged="Text_TextChanged"> <f:DatePicker ID="txtEndDate" runat="server" Width="100px" AutoPostBack="true" OnTextChanged="Text_TextChanged">
</f:DatePicker>--%> </f:DatePicker>--%>
<f:ToolbarFill ID="ToolbarFill1" runat="server"> <f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill> </f:ToolbarFill>
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" runat="server" Hidden="true" OnClick="btnNew_Click" Text="新增"> <f:Button ID="btnNew" ToolTip="新增" Icon="Add" runat="server" Hidden="true" OnClick="btnNew_Click" Text="新增">
</f:Button> </f:Button>
</Items> </Items>
</f:Toolbar> </f:Toolbar>
</Toolbars> </Toolbars>
<Columns> <Columns>
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center" <f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
TextAlign="Center"> TextAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label> <asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>
<%--<f:RenderField Width="120px" ColumnID="TrainingCode" DataField="TrainingCode" SortField="TrainingCode" <%--<f:RenderField Width="120px" ColumnID="TrainingCode" DataField="TrainingCode" SortField="TrainingCode"
FieldType="String" HeaderText="培训编号" HeaderTextAlign="Center" TextAlign="Left"> FieldType="String" HeaderText="培训编号" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>--%> </f:RenderField>--%>
<f:RenderField Width="150px" ColumnID="TrainTitle" DataField="TrainTitle" SortField="TrainTitle" <f:RenderField Width="150px" ColumnID="TrainTitle" DataField="TrainTitle" SortField="TrainTitle"
FieldType="String" HeaderText="标题" HeaderTextAlign="Center" TextAlign="Left"> FieldType="String" HeaderText="标题" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField> </f:RenderField>
<f:RenderField Width="110px" ColumnID="TrainTypeName" DataField="TrainTypeName" SortField="TrainTypeName" <f:RenderField Width="110px" ColumnID="TrainTypeName" DataField="TrainTypeName" SortField="TrainTypeName"
FieldType="String" HeaderText="培训类型" HeaderTextAlign="Center" TextAlign="Left"> FieldType="String" HeaderText="培训类型" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField> </f:RenderField>
<f:RenderField Width="65px" ColumnID="TeachHour" DataField="TeachHour" SortField="TeachHour" <f:RenderField Width="65px" ColumnID="TeachHour" DataField="TeachHour" SortField="TeachHour"
FieldType="Float" HeaderText="学时" HeaderTextAlign="Center" TextAlign="Center"> FieldType="Float" HeaderText="学时" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField> </f:RenderField>
<f:RenderField Width="65px" ColumnID="DayOfWeek" DataField="DayOfWeek" SortField="DayOfWeek" <f:RenderField Width="65px" ColumnID="DayOfWeek" DataField="DayOfWeek" SortField="DayOfWeek"
FieldType="Float" HeaderText="周几" HeaderTextAlign="Center" TextAlign="Center"> FieldType="Float" HeaderText="周几" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField> </f:RenderField>
<f:RenderField Width="65px" ColumnID="WeekOfMonth" DataField="WeekOfMonth" SortField="WeekOfMonth" <f:RenderField Width="65px" ColumnID="WeekOfMonth" DataField="WeekOfMonth" SortField="WeekOfMonth"
FieldType="Float" HeaderText="每月第几周" HeaderTextAlign="Center" TextAlign="Center"> FieldType="Float" HeaderText="每月第几周" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField> </f:RenderField>
<f:TemplateField ColumnID="tfTeachMan" Width="65px" HeaderText="授课人" HeaderTextAlign="Center" <f:TemplateField ColumnID="tfTeachMan" Width="65px" HeaderText="授课人" HeaderTextAlign="Center"
TextAlign="left"> TextAlign="left">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblTeachMan" runat="server" Text='<%# ConvertUserName(Eval("TeachMan")) %>'></asp:Label> <asp:Label ID="lblTeachMan" runat="server" Text='<%# ConvertUserName(Eval("TeachMan")) %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>
<f:RenderField Width="100px" ColumnID="TrainStartDate" DataField="TrainStartDate" <f:RenderField Width="100px" ColumnID="TrainStartDate" DataField="TrainStartDate"
SortField="TrainStartDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" SortField="TrainStartDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
HeaderText="编制日期" HeaderTextAlign="Center" TextAlign="Center"> HeaderText="编制日期" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField> </f:RenderField>
<f:TemplateField ColumnID="State" Width="65px" HeaderText="状态" HeaderTextAlign="Center" <f:TemplateField ColumnID="State" Width="65px" HeaderText="状态" HeaderTextAlign="Center"
TextAlign="left"> TextAlign="left">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# ConvertState(Eval("State")) %>'></asp:Label> <asp:Label ID="Label1" runat="server" Text='<%# ConvertState(Eval("State")) %>'></asp:Label>
</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:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> <f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator> </f:ToolbarSeparator>
<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"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged"> OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList> </f:DropDownList>
</PageItems> </PageItems>
</f:Grid> </f:Grid>
</Items>
</f:Panel>
</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"
@ -112,7 +133,7 @@
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true" <f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
runat="server" Icon="Pencil" Hidden="true" Text="编辑"> runat="server" Icon="Pencil" Hidden="true" Text="编辑">
</f:MenuButton> </f:MenuButton>
<f:MenuButton ID="btnMenuAddNew" OnClick="btnMenuAddNew_Click" EnablePostBack="true" <f:MenuButton ID="btnMenuAddNew" OnClick="btnMenuAddNew_Click" EnablePostBack="true"
runat="server" Icon="Pencil" Hidden="true" Text="生成新计划"> runat="server" Icon="Pencil" Hidden="true" Text="生成新计划">
</f:MenuButton> </f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true" <f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"

View File

@ -12,7 +12,22 @@ namespace FineUIPro.Web.HSSE.EduTrain
{ {
public partial class TaskNotice : PageBase public partial class TaskNotice : PageBase
{ {
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region #region
/// <summary> /// <summary>
@ -25,19 +40,47 @@ namespace FineUIPro.Web.HSSE.EduTrain
if (!IsPostBack) if (!IsPostBack)
{ {
Funs.DropDownPageSize(this.ddlPageSize); Funs.DropDownPageSize(this.ddlPageSize);
////权限按钮方法 this.ProjectId = this.CurrUser.LoginProjectId;
this.GetButtonPower(); 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.CurrUser.LoginProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
this.btnMenuDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!"); this.btnMenuDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!");
this.btnMenuDelete.ConfirmText = String.Format("你确定要删除选中的&nbsp;<b><script>{0}</script></b>&nbsp;行数据吗?", Grid1.GetSelectedCountReference()); this.btnMenuDelete.ConfirmText = String.Format("你确定要删除选中的&nbsp;<b><script>{0}</script></b>&nbsp;行数据吗?", Grid1.GetSelectedCountReference());
//单位 //单位
// BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true); // BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true);
//培训类型 //培训类型
BLL.TrainTypeService.InitTrainTypeDropDownList(this.drpTrainType, true); BLL.TrainTypeService.InitTrainTypeDropDownList(this.drpTrainType, true);
ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格 // 绑定表格
BindGrid(); BindGrid();
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.BindGrid();
this.GetButtonPower();
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
} }
} }
@ -46,8 +89,12 @@ namespace FineUIPro.Web.HSSE.EduTrain
/// </summary> /// </summary>
private void BindGrid() private void BindGrid()
{ {
string projectId = this.CurrUser.LoginProjectId; if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
//string projectId = this.CurrUser.LoginProjectId;
string strSql = @"SELECT task.TaskNoticeId, string strSql = @"SELECT task.TaskNoticeId,
task.TrainTitle, task.TrainTitle,
task.TrainType, task.TrainType,
@ -69,14 +116,14 @@ namespace FineUIPro.Web.HSSE.EduTrain
LEFT JOIN dbo.Sys_User AS users ON users.UserId = task.CreatMan where 1=1 "; LEFT JOIN dbo.Sys_User AS users ON users.UserId = task.CreatMan where 1=1 ";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
strSql += " AND task.ProjectId = @ProjectId"; strSql += " AND task.ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", projectId)); listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (drpTrainType.SelectedValue!=Const._Null) if (drpTrainType.SelectedValue != Const._Null)
{ {
strSql += " AND task.TrainType = @TrainType"; strSql += " AND task.TrainType = @TrainType";
listStr.Add(new SqlParameter("@TrainType", drpTrainType.SelectedValue)); listStr.Add(new SqlParameter("@TrainType", drpTrainType.SelectedValue));
} }
SqlParameter[] parameter = listStr.ToArray(); SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count; Grid1.RecordCount = tb.Rows.Count;
@ -97,7 +144,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
//}; //};
// Grid1.SummaryData = summary; // Grid1.SummaryData = summary;
} }
#endregion #endregion
@ -184,9 +231,9 @@ namespace FineUIPro.Web.HSSE.EduTrain
var model = EduTrain_TaskNoticeService.GetEduTrain_TaskNoticeById(TaskNoticeId); var model = EduTrain_TaskNoticeService.GetEduTrain_TaskNoticeById(TaskNoticeId);
if (model != null) if (model != null)
{ {
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TaskNoticeEdit.aspx?TaskNoticeId={0}", TaskNoticeId, "编辑 - "))); PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TaskNoticeEdit.aspx?TaskNoticeId={0}", TaskNoticeId, "编辑 - ")));
} }
} }
#endregion #endregion
@ -295,7 +342,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
{ {
return; return;
} }
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectTrainRecordMenuId); var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectTrainRecordMenuId);
if (buttonList.Count() > 0) if (buttonList.Count() > 0)
{ {
if (buttonList.Contains(BLL.Const.BtnAdd)) if (buttonList.Contains(BLL.Const.BtnAdd))
@ -361,7 +408,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
return ""; return "";
} }
protected string ConvertUserName(object users) protected string ConvertUserName(object users)
{ {
string userName = string.Empty; string userName = string.Empty;
if (users != null) if (users != null)
@ -399,6 +446,6 @@ namespace FineUIPro.Web.HSSE.EduTrain
} }
#endregion #endregion
} }
} }

View File

@ -32,6 +32,51 @@ namespace FineUIPro.Web.HSSE.EduTrain
/// </remarks> /// </remarks>
protected global::FineUIPro.PageManager PageManager1; protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel2;
/// <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>
/// Panel1 控件。 /// Panel1 控件。
/// </summary> /// </summary>

View File

@ -53,6 +53,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
{ {
this.ProjectId = Request.Params["projectId"]; this.ProjectId = Request.Params["projectId"];
} }
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId; this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId; this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
@ -63,12 +64,6 @@ namespace FineUIPro.Web.HSSE.EduTrain
Funs.DropDownPageSize(this.ddlPageSize); Funs.DropDownPageSize(this.ddlPageSize);
this.GetButtonPower(); this.GetButtonPower();
var data = APIBaseInfoService.getWorkPost(CurrUser.ProjectId, null);
this.drpWorkPost.DataValueField = "BaseInfoId";
this.drpWorkPost.DataTextField = "BaseInfoName";
this.drpWorkPost.DataSource = data;
this.drpWorkPost.DataBind();
Funs.FineUIPleaseSelect(drpWorkPost);
ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格 // 绑定表格
BindGrid(); BindGrid();
@ -82,9 +77,20 @@ namespace FineUIPro.Web.HSSE.EduTrain
} }
} }
private void InitDropDownList()
{
var data = APIBaseInfoService.getWorkPost(this.ProjectId, null);
this.drpWorkPost.DataValueField = "BaseInfoId";
this.drpWorkPost.DataTextField = "BaseInfoName";
this.drpWorkPost.DataSource = data;
this.drpWorkPost.DataBind();
Funs.FineUIPleaseSelect(drpWorkPost);
}
protected void changeTree(object sender, EventArgs e) protected void changeTree(object sender, EventArgs e)
{ {
this.ProjectId = this.ucTree.ProjectId; this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
//新增UnitId //新增UnitId
this.UnitId = this.ucTree.UnitId; this.UnitId = this.ucTree.UnitId;
//判断 当有projectId的时候单位id为空 //判断 当有projectId的时候单位id为空

View File

@ -59,6 +59,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
{ {
this.ProjectId = Request.Params["projectId"]; this.ProjectId = Request.Params["projectId"];
} }
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId; this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId; this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
@ -66,14 +67,10 @@ namespace FineUIPro.Web.HSSE.EduTrain
this.panelLeftRegion.Hidden = true; this.panelLeftRegion.Hidden = true;
// this.Grid1.Columns[0].Hidden = true; // this.Grid1.Columns[0].Hidden = true;
} }
Funs.DropDownPageSize(this.ddlPageSize); Funs.DropDownPageSize(this.ddlPageSize);
ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
GetButtonPower(); GetButtonPower();
//单位
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true);
///更新没有结束时间且超时的考试记录 ///更新没有结束时间且超时的考试记录
GetDataService.UpdateTestPlanStates(); GetDataService.UpdateTestPlanStates();
@ -89,10 +86,15 @@ namespace FineUIPro.Web.HSSE.EduTrain
} }
} }
#endregion #endregion
private void InitDropDownList()
{
//单位
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
}
protected void changeTree(object sender, EventArgs e) protected void changeTree(object sender, EventArgs e)
{ {
this.ProjectId = this.ucTree.ProjectId; this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
//新增UnitId //新增UnitId
this.UnitId = this.ucTree.UnitId; this.UnitId = this.ucTree.UnitId;
//判断 当有projectId的时候单位id为空 //判断 当有projectId的时候单位id为空

View File

@ -60,12 +60,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
this.ucTree.ProjectId = this.ProjectId; this.ucTree.ProjectId = this.ProjectId;
//单位 //单位
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true); this.InitDropDownList();
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
this.drpUnitId.Enabled = false;
}
//培训类型 //培训类型
BLL.TrainTypeService.InitTrainTypeDropDownList(this.drpTrainType, true); BLL.TrainTypeService.InitTrainTypeDropDownList(this.drpTrainType, true);
//培训级别; //培训级别;
@ -81,9 +76,21 @@ namespace FineUIPro.Web.HSSE.EduTrain
} }
} }
private void InitDropDownList()
{
//单位
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
this.drpUnitId.Enabled = false;
}
}
protected void changeTree(object sender, EventArgs e) protected void changeTree(object sender, EventArgs e)
{ {
this.ProjectId = this.ucTree.ProjectId; this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
//新增UnitId //新增UnitId
this.UnitId = this.ucTree.UnitId; this.UnitId = this.ucTree.UnitId;
//判断 当有projectId的时候单位id为空 //判断 当有projectId的时候单位id为空

View File

@ -60,12 +60,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
this.ucTree.ProjectId = this.ProjectId; this.ucTree.ProjectId = this.ProjectId;
//单位 //单位
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true); this.InitDropDownList();
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
this.drpUnitId.Enabled = false;
}
//培训类型 //培训类型
BLL.TrainTypeService.InitTrainTypeDropDownList(this.drpTrainType, true); BLL.TrainTypeService.InitTrainTypeDropDownList(this.drpTrainType, true);
//培训级别; //培训级别;
@ -82,9 +77,20 @@ namespace FineUIPro.Web.HSSE.EduTrain
} }
} }
private void InitDropDownList()
{
//单位
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
this.drpUnitId.Enabled = false;
}
}
protected void changeTree(object sender, EventArgs e) protected void changeTree(object sender, EventArgs e)
{ {
this.ProjectId = this.ucTree.ProjectId; this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
//新增UnitId //新增UnitId
this.UnitId = this.ucTree.UnitId; this.UnitId = this.ucTree.UnitId;
//判断 当有projectId的时候单位id为空 //判断 当有projectId的时候单位id为空

View File

@ -74,12 +74,12 @@ namespace FineUIPro.Web.HSSE.EduTrain
this.ucTree.UnitId = this.CurrUser.UnitId; this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId; this.ucTree.ProjectId = this.ProjectId;
Funs.DropDownPageSize(this.ddlPageSize); Funs.DropDownPageSize(this.ddlPageSize);
////权限按钮方法 //////权限按钮方法
this.GetButtonPower(); //this.GetButtonPower();
this.btnMenuDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!"); this.btnMenuDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!");
this.btnMenuDelete.ConfirmText = String.Format("你确定要删除选中的&nbsp;<b><script>{0}</script></b>&nbsp;行数据吗?", Grid1.GetSelectedCountReference()); this.btnMenuDelete.ConfirmText = String.Format("你确定要删除选中的&nbsp;<b><script>{0}</script></b>&nbsp;行数据吗?", Grid1.GetSelectedCountReference());
//单位
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true); this.InitDropDownList();
//培训类型 //培训类型
BLL.TrainTypeService.InitTrainTypeDropDownList(this.drpTrainType, true); BLL.TrainTypeService.InitTrainTypeDropDownList(this.drpTrainType, true);
trainType = Request.Params["trainType"]; trainType = Request.Params["trainType"];
@ -109,6 +109,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
protected void changeTree(object sender, EventArgs e) protected void changeTree(object sender, EventArgs e)
{ {
this.ProjectId = this.ucTree.ProjectId; this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
//新增UnitId //新增UnitId
this.UnitId = this.ucTree.UnitId; this.UnitId = this.ucTree.UnitId;
//判断 当有projectId的时候单位id为空 //判断 当有projectId的时候单位id为空
@ -116,13 +117,20 @@ namespace FineUIPro.Web.HSSE.EduTrain
{ {
this.UnitId = ""; this.UnitId = "";
} }
this.BindGrid(); this.BindGrid();
this.GetButtonPower(); this.GetButtonPower();
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{ {
btnNew.Hidden = true; btnNew.Hidden = true;
} }
} }
private void InitDropDownList()
{
//单位
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
}
/// <summary> /// <summary>
/// 绑定数据 /// 绑定数据
/// </summary> /// </summary>
@ -159,7 +167,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
strSql += " AND TrainRecord.TrainTitle LIKE @TrainTitle"; strSql += " AND TrainRecord.TrainTitle LIKE @TrainTitle";
listStr.Add(new SqlParameter("@TrainTitle", "%" + this.txtName.Text + "%")); listStr.Add(new SqlParameter("@TrainTitle", "%" + this.txtName.Text + "%"));
} }
if (!string.IsNullOrEmpty(this.ProjectId)) if (!string.IsNullOrEmpty(this.ProjectId))
{ {

View File

@ -43,7 +43,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
{ {
this.ProjectId = Request.Params["projectId"]; this.ProjectId = Request.Params["projectId"];
} }
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId; this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId; this.ucTree.ProjectId = this.ProjectId;
////权限按钮方法 ////权限按钮方法
@ -61,23 +61,28 @@ namespace FineUIPro.Web.HSSE.SitePerson
BindGrid(); BindGrid();
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId) ) if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId) )
{ {
UnitService.InitUnitDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
if (ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.CurrUser.LoginProjectId, this.CurrUser.UnitId))
{
this.drpUnit.SelectedValue = this.CurrUser.UnitId;
this.drpUnit.Enabled = false;
}
this.panelLeftRegion.Hidden = true; this.panelLeftRegion.Hidden = true;
////权限按钮方法 ////权限按钮方法
this.GetButtonPower(); this.GetButtonPower();
} }
} }
} }
private void InitDropDownList()
{
//单位
UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
if (ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
this.drpUnit.SelectedValue = this.CurrUser.UnitId;
this.drpUnit.Enabled = false;
}
}
protected void changeTree(object sender, EventArgs e) protected void changeTree(object sender, EventArgs e)
{ {
this.ProjectId = this.ucTree.ProjectId; this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
this.BindGrid(); this.BindGrid();
this.GetButtonPower(); this.GetButtonPower();
} }
#endregion #endregion