项目人员从系统用户中选择新增
This commit is contained in:
parent
b8c274ca97
commit
fac86ea406
|
|
@ -747,10 +747,15 @@ namespace BLL
|
|||
public const string sysglyId = "AF17168B-87BD-4GLY-1111-F0A0A1158F9B";
|
||||
|
||||
/// <summary>
|
||||
/// 系统管理员ID
|
||||
/// 合肥诺必达管理员ID
|
||||
/// </summary>
|
||||
public const string hfnbdId = "C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0";
|
||||
|
||||
/// <summary>
|
||||
/// 罗菲账号ID
|
||||
/// </summary>
|
||||
public const string luofeiId = "cbebdb72-a304-4a5c-a218-df9ab0f14088";
|
||||
|
||||
/// <summary>
|
||||
/// 公共临时账户ID
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -2289,6 +2289,7 @@
|
|||
<Content Include="HSSE\SitePerson\PersonListEdit.aspx" />
|
||||
<Content Include="HSSE\SitePerson\PersonOut.aspx" />
|
||||
<Content Include="HSSE\SitePerson\PersonUnitList.aspx" />
|
||||
<Content Include="HSSE\SitePerson\PersonAddFromUser.aspx" />
|
||||
<Content Include="HSSE\SitePerson\WorkPostStatistic.aspx" />
|
||||
<Content Include="HSSE\SitePerson\PersonStatistic.aspx" />
|
||||
<Content Include="HSSE\SitePerson\PersonUnitRefresh.aspx" />
|
||||
|
|
@ -15754,6 +15755,13 @@
|
|||
<Compile Include="HSSE\SitePerson\PersonUnitList.aspx.designer.cs">
|
||||
<DependentUpon>PersonUnitList.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\SitePerson\PersonAddFromUser.aspx.cs">
|
||||
<DependentUpon>PersonAddFromUser.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\SitePerson\PersonAddFromUser.aspx.designer.cs">
|
||||
<DependentUpon>PersonAddFromUser.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\SitePerson\WorkPostStatistic.aspx.cs">
|
||||
<DependentUpon>WorkPostStatistic.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,98 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonAddFromUser.aspx.cs" Inherits="FineUIPro.Web.HSSE.SitePerson.PersonAddFromUser" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>用户信息</title>
|
||||
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="用户选择"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" EnableColumnLines="true"
|
||||
DataKeyNames="IdentityCard" AllowCellEditing="true" ClicksToEdit="2" DataIDField="IdentityCard"
|
||||
AllowSorting="true" SortField="UserCode" SortDirection="ASC" OnSort="Grid1_Sort"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="1000000" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True" EnableCheckBoxSelect="true">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnit" runat="server" Label="单位" Width="350px" LabelWidth="60px" EmptyText="请选择项目"
|
||||
EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||
</f:DropDownList>
|
||||
<f:TextBox runat="server" Label="用户名称" ID="txtUserName" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px">
|
||||
</f:TextBox>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnSure" ToolTip="确定按钮" Icon="Accept" runat="server" OnClick="btnSure_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField Width="100px" ColumnID="UserCode" DataField="UserCode" SortField="UserCode" FieldType="String"
|
||||
HeaderText="用户编号">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="160px" ColumnID="UserName" DataField="UserName" SortField="UserName"
|
||||
FieldType="String" HeaderText="用户名称" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" ColumnID="IdentityCard" DataField="IdentityCard" SortField="IdentityCard"
|
||||
FieldType="String" HeaderText="证件号码" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="UnitName" DataField="UnitName" SortField="UnitName"
|
||||
FieldType="String" HeaderText="单位名称" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="RoleName" DataField="RoleName" SortField="RoleName"
|
||||
FieldType="String" HeaderText="角色名称" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
</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:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="用户信息" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1000px"
|
||||
Height="400px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuSure" OnClick="btnSure_Click" EnablePostBack="true" Icon="Accept" runat="server" Text="确定">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,222 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Text;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.SitePerson
|
||||
{
|
||||
public partial class PersonAddFromUser : PageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 定义项
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
this.ProjectId = Request.QueryString["ProjectId"];
|
||||
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
{
|
||||
Grid1.PageSize = this.CurrUser.PageSize.Value;
|
||||
}
|
||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
|
||||
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
|
||||
//if (!string.IsNullOrEmpty(this.CurrUser.UnitId))
|
||||
//{
|
||||
// this.drpUnit.SelectedValue = this.CurrUser.UnitId;
|
||||
//}
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("SELECT Users.UserId,Users.UserCode,Users.UserName,Users.IdentityCard,Unit.UnitName,RoleName=STUFF(( SELECT ',' + RoleName FROM dbo.Sys_Role where PATINDEX('%,' + RTRIM(RoleId) + ',%',',' +Users.RoleId + ',')>0 FOR XML PATH('')), 1, 1,'') ");
|
||||
sb.Append("FROM Sys_User AS Users ");
|
||||
sb.Append("LEFT JOIN Project_ProjectUnit AS ProjectUnit ON Users.UnitId =ProjectUnit.UnitId ");
|
||||
sb.Append("LEFT JOIN Base_Unit AS Unit ON Users.UnitId =Unit.UnitId ");
|
||||
sb.Append("WHERE ProjectUnit.ProjectId =@ProjectId ");
|
||||
sb.Append("AND Users.IdentityCard IS NOT NULL ");
|
||||
sb.Append("AND Users.IdentityCard NOT IN (SELECT IdentityCard FROM SitePerson_Person WHERE ProjectId =ProjectUnit.ProjectId) ");
|
||||
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
if (!string.IsNullOrEmpty(this.drpUnit.SelectedValue) && this.drpUnit.SelectedValue != Const._Null)
|
||||
{
|
||||
sb.Append("AND ProjectUnit.UnitId=@UnitId ");
|
||||
listStr.Add(new SqlParameter("@UnitId", this.drpUnit.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtUserName.Text.Trim()))
|
||||
{
|
||||
sb.Append("AND Users.UserName LIKE @UserName ");
|
||||
listStr.Add(new SqlParameter("@UserName", "%" + this.txtUserName.Text.Trim() + "%"));
|
||||
}
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(sb.ToString(), parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
}
|
||||
|
||||
#region 排序 分页
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
Grid1.SortDirection = e.SortDirection;
|
||||
Grid1.SortField = e.SortField;
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 确定按钮事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSure_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
var ssss = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
this.SaveData(Grid1.DataKeys[rowIndex][0].ToString());
|
||||
}
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
this.SaveData(Grid1.SelectedRowID);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
||||
#region 查询
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 保存数据
|
||||
/// </summary>
|
||||
/// <param name="IdentityCard"></param>
|
||||
private void SaveData(string IdentityCard)
|
||||
{
|
||||
var sitePerson = BLL.PersonService.GetPersonByIdentityCard(this.ProjectId, IdentityCard);
|
||||
if (sitePerson == null)
|
||||
{
|
||||
var user = BLL.UserService.GetUserByIdentityCard(IdentityCard);
|
||||
if (user != null)
|
||||
{
|
||||
Model.SitePerson_Person newPerson = new Model.SitePerson_Person
|
||||
{
|
||||
ProjectId = this.ProjectId,
|
||||
PersonId = SQLHelper.GetNewID(typeof(Model.SitePerson_Person)),
|
||||
UnitId = user.UnitId,
|
||||
IdentityCard = user.IdentityCard,
|
||||
IdcardType = "SHENFEN_ZHENGJIAN",
|
||||
IdcardForever = "N",
|
||||
PersonName = user.UserName,
|
||||
Sex = user.Sex,
|
||||
Telephone = user.Telephone,
|
||||
IsUsed = true,
|
||||
MainCNProfessionalId = user.MainCNProfessionalId,
|
||||
ViceCNProfessionalId = user.ViceCNProfessionalId,
|
||||
IsForeign = false,
|
||||
IsOutside = false,
|
||||
IsSafetyMonitoring = false,
|
||||
};
|
||||
if (!string.IsNullOrWhiteSpace(user.RoleId))
|
||||
{
|
||||
string roleId = user.RoleId.Split(',')[0];
|
||||
var role = RoleService.GetRoleByRoleId(roleId);
|
||||
var workPost = WorkPostService.GetWorkPostByName(role.RoleName);
|
||||
newPerson.WorkPostId = workPost.WorkPostId;
|
||||
}
|
||||
BLL.PersonService.AddPerson(newPerson);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,143 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.SitePerson
|
||||
{
|
||||
|
||||
|
||||
public partial class PersonAddFromUser
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnit;
|
||||
|
||||
/// <summary>
|
||||
/// txtUserName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtUserName;
|
||||
|
||||
/// <summary>
|
||||
/// btnSure 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSure;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuSure 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuSure;
|
||||
}
|
||||
}
|
||||
|
|
@ -99,20 +99,15 @@
|
|||
<f:CheckBox runat="server" ID="ckTrain" Label="未参加培训" LabelAlign="right">
|
||||
</f:CheckBox>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
|
||||
<f:Button ID="btSearch" ToolTip="查询" Icon="SystemSearch" runat="server" OnClick="TextBox_TextChanged"></f:Button>
|
||||
<f:Button ID="btnNew" ToolTip="增加" Icon="Add" runat="server" Hidden="true" OnClick="btnNew_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPersonOut" ToolTip="批量出场" Icon="UserGo" runat="server" Hidden="true" OnClick="btnPersonOut_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" Hidden="true" runat="server" OnClick="btnImport_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
<f:Button ID="btnQR" ToolTip="批量生成二维码" Icon="TableRefresh" runat="server" OnClick="btnQR_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnSelectProducePlan" ToolTip="选择人员生成培训计划" Icon="ShapesManySelect" runat="server" OnClick="btnSelectProducePlan_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnNew" ToolTip="增加" Icon="Add" runat="server" Hidden="true" OnClick="btnNew_Click"></f:Button>
|
||||
<f:Button ID="btnSearchUserAdd" ToolTip="从系统用户中选择" Icon="UserAdd" runat="server" Hidden="true" OnClick="btnSearchUserAdd_Click"></f:Button>
|
||||
<f:Button ID="btnPersonOut" ToolTip="批量出场" Icon="UserGo" runat="server" Hidden="true" OnClick="btnPersonOut_Click"></f:Button>
|
||||
<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" Hidden="true" runat="server" OnClick="btnImport_Click"></f:Button>
|
||||
<f:Button ID="btnOut" ToolTip="导出" Icon="PackageGo" OnClick="btnOut_Click" runat="server" EnableAjax="false" DisableControlBeforePostBack="false"></f:Button>
|
||||
<f:Button ID="btnQR" ToolTip="批量生成二维码" Icon="TableRefresh" runat="server" OnClick="btnQR_Click"></f:Button>
|
||||
<f:Button ID="btnSelectProducePlan" ToolTip="选择人员生成培训计划" Icon="ShapesManySelect" runat="server" OnClick="btnSelectProducePlan_Click"></f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
|
@ -191,6 +186,10 @@
|
|||
Target="Parent" EnableResize="false" runat="server" OnClose="Window3_Close" IsModal="true"
|
||||
Width="800px" Height="550px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window4" Title="从系统用户中选择增加" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window4_Close" IsModal="true"
|
||||
Width="1000px" Height="720px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowPunishRecord" Title="处罚记录" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Parent" EnableResize="false" runat="server" IsModal="true"
|
||||
Width="1300px" Height="520px">
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using BLL;
|
||||
using FineUIPro.Web.DataShow;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
|
|
@ -589,6 +590,36 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region 从系统用户中选择增加
|
||||
/// <summary>
|
||||
/// 从系统用户中选择增加
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSearchUserAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
string projectId = this.CurrUser.LoginProjectId;
|
||||
PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("PersonAddFromUser.aspx?ProjectId={0}", projectId, "编辑 - ")));
|
||||
|
||||
//if (this.tvProjectAndUnit.SelectedNodeID.Contains("|"))
|
||||
//{
|
||||
// string id = this.tvProjectAndUnit.SelectedNodeID;
|
||||
// string[] str = id.Split('|');
|
||||
// if (str.Count() > 1)
|
||||
// {
|
||||
// string unitId = id.Split('|')[0];
|
||||
// string projectId = id.Split('|')[1];
|
||||
// PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("PersonAddFromUser.aspx?ProjectId={0}&UnitId={1}", projectId,unitId, "编辑 - ")));
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Alert.ShowInTop("请选择单位!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 编辑
|
||||
/// <summary>
|
||||
/// 右键编辑事件
|
||||
|
|
@ -718,6 +749,15 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
|||
{
|
||||
BindGrid();
|
||||
}
|
||||
/// <summary>
|
||||
/// 关闭弹出窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window4_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 判断按钮权限
|
||||
|
|
@ -750,6 +790,10 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
|||
this.btnPersonUnit.Hidden = false;
|
||||
}
|
||||
}
|
||||
if (this.CurrUser.UserId == Const.luofeiId || this.CurrUser.UserId == Const.sysglyId || this.CurrUser.UserId == Const.sysglyId)
|
||||
{//罗菲、管理员账号
|
||||
this.btnSearchUserAdd.Hidden = false;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -248,6 +248,15 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// btnSearchUserAdd 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSearchUserAdd;
|
||||
|
||||
/// <summary>
|
||||
/// btnPersonOut 控件。
|
||||
/// </summary>
|
||||
|
|
@ -356,6 +365,15 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window3;
|
||||
|
||||
/// <summary>
|
||||
/// Window4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window4;
|
||||
|
||||
/// <summary>
|
||||
/// WindowPunishRecord 控件。
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue