1、用户导入;

2、用户角色支持多个;
3、单位资质;
This commit is contained in:
2025-09-28 17:30:03 +08:00
parent 229b9ef4d9
commit 802f8cde54
29 changed files with 2250 additions and 1628 deletions
@@ -0,0 +1,114 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Qualification.aspx.cs" Inherits="FineUIPro.Web.BaseInfo.Qualification" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>建筑业企业资质</title>
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
</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" EnableAjax="false" ShowHeader="false" Title="建筑业企业资质" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="QualificationId" AllowCellEditing="true" ForceFit="true"
ClicksToEdit="2" DataIDField="QualificationId" AllowSorting="true" SortField="QualificationCode"
SortDirection="ASC" EnableColumnLines="true"
AllowPaging="true" IsDatabasePaging="true" PageSize="20"
EnableRowDoubleClickEvent="true" AllowFilters="true" EnableTextSelection="True" OnRowDoubleClick="Grid1_RowDoubleClick" OnPageIndexChange="Grid1_PageIndexChange">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox ID="txtQualificationCode" runat="server" Label="资质编号、名称" Width="300px" LabelWidth="140px" AutoPostBack="true" OnTextChanged="TextBox_TextChanged" LabelAlign="Right">
</f:TextBox>
<f:DropDownList ID="ddlQualificationType" runat="server" Label="资质类型" LabelWidth="110px" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
<f:ListItem Value="" Text=" - 请选择 - "></f:ListItem>
<f:ListItem Value="施工总承包" Text="施工总承包"></f:ListItem>
<f:ListItem Value="专业承包" Text="专业承包"></f:ListItem>
<f:ListItem Value="劳务分包" Text="劳务分包"></f:ListItem>
</f:DropDownList>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnSearch" Icon="SystemSearch"
EnablePostBack="true" runat="server" OnClick="btnSearch_Click">
</f:Button>
<f:Button ID="btnNew" Icon="Add" EnablePostBack="true" Hidden="true"
runat="server">
</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 Width="120px" ColumnID="QualificationCode" DataField="QualificationCode"
SortField="QualificationCode" FieldType="String" HeaderText="资质编号" TextAlign="center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="QualificationName" DataField="QualificationName"
SortField="QualificationName" FieldType="String" HeaderText="资质名称" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="QualificationType" DataField="QualificationType"
SortField="QualificationType" FieldType="String" HeaderText="资质类型" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="Remark" DataField="Remark"
SortField="Remark" FieldType="String" HeaderText="备注" TextAlign="Center"
HeaderTextAlign="Center">
</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:ListItem Text="20" Value="20" />
<f:ListItem Text="50" Value="50" />
<f:ListItem Text="100" Value="100" />
<f:ListItem Text="所有行" Value="100000" />
</f:DropDownList>
<f:ToolbarFill runat="server">
</f:ToolbarFill>
</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" OnClose="Window1_Close"
Width="700px" Height="400px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<Items>
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Hidden="true" Text="修改" Icon="Pencil"
OnClick="btnMenuModify_Click">
</f:MenuButton>
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Hidden="true" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?"
OnClick="btnMenuDel_Click">
</f:MenuButton>
</Items>
</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;
}
</script>
</body>
</html>
@@ -0,0 +1,171 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
namespace FineUIPro.Web.BaseInfo
{
public partial class Qualification : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GetButtonPower();
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
BindGrid();
btnNew.OnClientClick = Window1.GetShowReference("QualificationEdit.aspx") + "return false;";
}
}
/// <summary>
/// 绑定数据
/// </summary>
public void BindGrid()
{
DataTable tb = BindData();
Grid1.RecordCount = tb.Rows.Count;
tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
protected DataTable BindData()
{
string strSql = @"select QualificationId,QualificationCode,QualificationName,QualificationType,Remark
from [dbo].[Base_Qualification]
where 1=1 ";
List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.txtQualificationCode.Text.Trim()))
{
strSql += " AND (QualificationCode like @QualificationCode OR QualificationName like @QualificationCode)";
listStr.Add(new SqlParameter("@QualificationCode", "%" + this.txtQualificationCode.Text.Trim() + "%"));
}
if (this.ddlQualificationType.SelectedValue != null && !string.IsNullOrEmpty(this.ddlQualificationType.SelectedValue.Trim()))
{
strSql += " AND QualificationType = @QualificationType";
listStr.Add(new SqlParameter("@QualificationType", this.ddlQualificationType.SelectedValue.Trim()));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
return tb;
}
#region
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void TextBox_TextChanged(object sender, EventArgs e)
{
this.BindGrid();
}
#endregion
protected void btnMenuModify_Click(object sender, EventArgs e)
{
EditData();
}
protected void btnMenuDel_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length > 0)
{
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
BLL.QualificationService.DeleteQualificationById(rowID);
}
BindGrid();
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
}
}
/// <summary>
/// 编辑数据方法
/// </summary>
private void EditData()
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QualificationEdit.aspx?QualificationId={0}", Grid1.SelectedRowID, "编辑 - ")));
}
#region
/// <summary>
/// 获取按钮权限
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
{
if (Request.Params["value"] == "0")
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.QualificationMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))
{
this.btnNew.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnModify))
{
this.btnMenuModify.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnDelete))
{
this.btnMenuDel.Hidden = false;
}
}
}
#endregion
protected void btnSearch_Click(object sender, EventArgs e)
{
BindGrid();
}
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
EditData();
}
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
BindGrid();
}
}
}
+170
View File
@@ -0,0 +1,170 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.BaseInfo
{
public partial class Qualification
{
/// <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>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtQualificationCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtQualificationCode;
/// <summary>
/// ddlQualificationType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlQualificationType;
/// <summary>
/// btnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// btnNew 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// lblPageIndex 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblPageIndex;
/// <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>
/// btnMenuModify 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuModify;
/// <summary>
/// btnMenuDel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDel;
}
}
@@ -0,0 +1,60 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualificationEdit.aspx.cs" Inherits="FineUIPro.Web.BaseInfo.QualificationEdit" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>施工专业</title>
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow runat="server">
<Items>
<f:TextBox ID="txtQualificationCode" runat="server" Label="资质编号" Required="true" MaxLength="70" ShowRedStar="true" LabelWidth="110px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow runat="server">
<Items>
<f:TextBox ID="txtQualificationName" runat="server" Label="资质名称" Required="true" MaxLength="70" ShowRedStar="true" LabelWidth="110px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow runat="server">
<Items>
<f:DropDownList ID="ddlQualificationType" runat="server" Label="资质类型" LabelWidth="110px" Required="true" ShowRedStar="true" AutoSelectFirstItem="true">
<f:ListItem Value="施工总承包" Text="施工总承包"></f:ListItem>
<f:ListItem Value="专业承包" Text="专业承包"></f:ListItem>
<f:ListItem Value="劳务分包" Text="劳务分包"></f:ListItem>
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtRemark" runat="server" LabelWidth="110px" Height="100px" Label="备注" MaxLength="1000">
</f:TextArea>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:HiddenField ID="hdCheckerId" runat="server">
</f:HiddenField>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1" OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false"
runat="server" Icon="SystemClose">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
</form>
</body>
</html>
@@ -0,0 +1,63 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.BaseInfo
{
public partial class QualificationEdit : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
string QualificationId = Request.Params["QualificationId"];
if (!string.IsNullOrEmpty(QualificationId))
{
Model.Base_Qualification model = BLL.QualificationService.GetQualificationById(QualificationId);
if (model != null)
{
this.txtQualificationCode.Text = model.QualificationCode;
this.txtQualificationName.Text = model.QualificationName;
this.ddlQualificationType.SelectedValue = model.QualificationType;
this.txtRemark.Text = model.Remark;
}
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
SaveData(true);
}
private void SaveData(bool b)
{
string QualificationId = Request.Params["QualificationId"];
Model.Base_Qualification model = new Model.Base_Qualification();
model.QualificationCode = this.txtQualificationCode.Text.Trim();
model.QualificationName = this.txtQualificationName.Text.Trim();
model.QualificationType = this.ddlQualificationType.SelectedValue.Trim();
model.Remark = this.txtRemark.Text.Trim();
if (!string.IsNullOrEmpty(QualificationId))
{
model.QualificationId = QualificationId;
BLL.QualificationService.UpdateQualification(model);
}
else
{
model.QualificationId = SQLHelper.GetNewID(typeof(Model.Base_Qualification));
BLL.QualificationService.AddQualification(model);
}
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
}
}
@@ -0,0 +1,116 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.BaseInfo
{
public partial class QualificationEdit
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtQualificationCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtQualificationCode;
/// <summary>
/// txtQualificationName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtQualificationName;
/// <summary>
/// ddlQualificationType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlQualificationType;
/// <summary>
/// txtRemark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtRemark;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// hdCheckerId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdCheckerId;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
}
}
+16
View File
@@ -246,6 +246,8 @@
<Content Include="BaseInfo\EmployeeSubgroup.aspx" />
<Content Include="BaseInfo\GoodsCategory.aspx" />
<Content Include="BaseInfo\EmployeeCategory.aspx" />
<Content Include="BaseInfo\Qualification.aspx" />
<Content Include="BaseInfo\QualificationEdit.aspx" />
<Content Include="BaseInfo\RiskLevelEdit.aspx" />
<Content Include="BaseInfo\RiskLevel.aspx" />
<Content Include="BaseInfo\HazardRegisterTypes.aspx" />
@@ -7787,6 +7789,20 @@
<Compile Include="BaseInfo\EmployeeCategory.aspx.designer.cs">
<DependentUpon>EmployeeCategory.aspx</DependentUpon>
</Compile>
<Compile Include="BaseInfo\Qualification.aspx.cs">
<DependentUpon>Qualification.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="BaseInfo\Qualification.aspx.designer.cs">
<DependentUpon>Qualification.aspx</DependentUpon>
</Compile>
<Compile Include="BaseInfo\QualificationEdit.aspx.cs">
<DependentUpon>QualificationEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="BaseInfo\QualificationEdit.aspx.designer.cs">
<DependentUpon>QualificationEdit.aspx</DependentUpon>
</Compile>
<Compile Include="BaseInfo\RiskLevelEdit.aspx.cs">
<DependentUpon>RiskLevelEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -10,207 +10,216 @@
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1"/>
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" Title="分包商资质" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" EnableTableStyle="false">
<Rows>
<f:FormRow>
<Items>
<f:Label ID="txtUnitName" runat="server" Label="分包单位" LabelAlign="Right" LabelWidth="120px">
</f:Label>
<f:Label ID="txtTelephone" runat="server" Label="联系电话" LabelAlign="Right" >
</f:Label>
<f:Label ID="txtEmail" runat="server" Label="电子邮箱" LabelAlign="Right" >
</f:Label>
</Items>
</f:FormRow>
<f:FormRow >
<Items>
<f:TextBox ID="txtSubUnitQualityName" runat="server" Label="资质" LabelAlign="Right" LabelWidth="120px"
MaxLength="100">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="25% 25% 30% 20%">
<Items>
<f:TextBox ID="txtBusinessLicense" runat="server" Label="营业执照" LabelAlign="Right" LabelWidth="120px"
MaxLength="50">
</f:TextBox>
<f:DatePicker ID="txtBL_EnableDate" runat="server" Label="营业执照有效期" LabelAlign="Right"
EnableEdit="true" LabelWidth="120px">
</f:DatePicker>
<f:FileUpload runat="server" ID="btnBL_ScanUrl" EmptyText="请选择附件" OnFileSelected="btnBL_ScanUrl_Click"
AutoPostBack="true" Label="营业执照扫描件" LabelWidth="120px">
</f:FileUpload>
<f:ContentPanel ID="cpBL" runat="server" ShowHeader="false" ShowBorder="false" Title="营业执照扫描件">
<table>
<tr style="height: 28px">
<td align="left">
<div id="divBL_ScanUrl" runat="server">
</div>
</td>
</tr>
</table>
</f:ContentPanel>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="25% 25% 30% 20%" runat="server" Hidden="true">
<Items>
<f:TextBox ID="txtOrganCode" runat="server" Label="机构代码" LabelAlign="Right" MaxLength="50" LabelWidth="120px">
</f:TextBox>
<f:DatePicker ID="txtO_EnableDate" runat="server" Label="机构代码有效期" LabelAlign="Right"
EnableEdit="true" LabelWidth="120px">
</f:DatePicker>
<f:FileUpload runat="server" ID="btnO_ScanUrl" EmptyText="请选择附件" OnFileSelected="btnO_ScanUrl_Click"
AutoPostBack="true" Label="机构代码扫描件" LabelWidth="120px">
</f:FileUpload>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" ShowBorder="false"
Title="机构代码扫描件">
<table>
<tr style="height: 28px">
<td align="left">
<div id="divO_ScanUrl" runat="server">
</div>
</td>
</tr>
</table>
</f:ContentPanel>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="25% 25% 30% 20%">
<Items>
<f:TextBox ID="txtCertificate" runat="server" Label="资质证书" LabelAlign="Right" MaxLength="50" LabelWidth="120px">
</f:TextBox>
<f:DatePicker ID="txtC_EnableDate" runat="server" Label="资质证书有效期" LabelAlign="Right"
EnableEdit="true" LabelWidth="120px">
</f:DatePicker>
<f:FileUpload runat="server" ID="btnC_ScanUrl" EmptyText="请选择附件" OnFileSelected="btnC_ScanUrl_Click"
AutoPostBack="true" Label="资质证书扫描件" LabelWidth="120px">
</f:FileUpload>
<f:ContentPanel ID="ContentPanel2" runat="server" ShowHeader="false" ShowBorder="false"
Title="资质证书扫描件">
<table>
<tr style="height: 28px">
<td align="left">
<div id="divC_ScanUrl" runat="server">
</div>
</td>
</tr>
</table>
</f:ContentPanel>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="25% 25% 30% 20%">
<Items>
<f:TextBox ID="txtQualityLicense" runat="server" Label="质量体系</br>认证证书" LabelAlign="Right"
MaxLength="50" LabelWidth="120px">
</f:TextBox>
<f:DatePicker ID="txtQL_EnableDate" runat="server" Label="质量--有效期" LabelAlign="Right"
EnableEdit="true" LabelWidth="120px">
</f:DatePicker>
<f:FileUpload runat="server" ID="btnQL_ScanUrl" EmptyText="请选择附件" OnFileSelected="btnQL_ScanUrl_Click"
AutoPostBack="true" Label="质量--扫描件" LabelWidth="120px">
</f:FileUpload>
<f:ContentPanel ID="ContentPanel3" runat="server" ShowHeader="false" ShowBorder="false"
Title="质量--扫描件">
<table>
<tr style="height: 28px">
<td align="left">
<div id="divQL_ScanUrl" runat="server">
</div>
</td>
</tr>
</table>
</f:ContentPanel>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="25% 25% 30% 20%">
<Items>
<f:TextBox ID="txtHSELicense" runat="server" Label="HSE体系认证</br>证书(环保)" LabelAlign="Right"
MaxLength="50" LabelWidth="120px">
</f:TextBox>
<f:DatePicker ID="txtH_EnableDate" runat="server" Label="有效期" LabelAlign="Right"
EnableEdit="true" LabelWidth="120px">
</f:DatePicker>
<f:FileUpload runat="server" ID="btnH_ScanUrl" EmptyText="请选择附件" OnFileSelected="btnH_ScanUrl_Click"
AutoPostBack="true" Label="扫描件" LabelWidth="120px">
</f:FileUpload>
<f:ContentPanel ID="ContentPanel4" runat="server" ShowHeader="false" ShowBorder="false"
Title="扫描件">
<table>
<tr style="height: 28px">
<td align="left">
<div id="divH_ScanUrl" runat="server">
</div>
</td>
</tr>
</table>
</f:ContentPanel>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="25% 25% 30% 20%">
<Items>
<f:TextBox ID="txtHSELicense2" runat="server" Label="HSE体系认证</br>证书(职业健康)" LabelAlign="Right"
MaxLength="50" LabelWidth="120px">
</f:TextBox>
<f:DatePicker ID="txtH_EnableDate2" runat="server" Label="有效期" LabelAlign="Right"
EnableEdit="true" LabelWidth="120px">
</f:DatePicker>
<f:FileUpload runat="server" ID="btnH_ScanUrl2" EmptyText="请选择附件" OnFileSelected="btnH_ScanUrl2_Click"
AutoPostBack="true" Label="扫描件" LabelWidth="120px">
</f:FileUpload>
<f:ContentPanel ID="ContentPanel6" runat="server" ShowHeader="false" ShowBorder="false"
Title="扫描件">
<table>
<tr style="height: 28px">
<td align="left">
<div id="divH_ScanUrl2" runat="server">
</div>
</td>
</tr>
</table>
</f:ContentPanel>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="25% 25% 30% 20%">
<Items>
<f:TextBox ID="txtSecurityLicense" runat="server" Label="安全生产许可证" LabelAlign="Right"
MaxLength="50" LabelWidth="120px">
</f:TextBox>
<f:DatePicker ID="txtSL_EnableDate" runat="server" Label="有效期" LabelAlign="Right"
EnableEdit="true" LabelWidth="120px">
</f:DatePicker>
<f:FileUpload runat="server" ID="btnSL_ScanUrl" EmptyText="请选择附件" OnFileSelected="btnSL_ScanUrl_Click"
AutoPostBack="true" Label="扫描件" LabelWidth="120px">
</f:FileUpload>
<f:ContentPanel ID="ContentPanel5" runat="server" ShowHeader="false" ShowBorder="false"
Title="安全生产许可证扫描件">
<table>
<tr style="height: 28px">
<td align="left">
<div id="divSL_ScanUrl" runat="server">
</div>
</td>
</tr>
</table>
</f:ContentPanel>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1" Hidden="true"
OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" Title="分包商资质" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" EnableTableStyle="false">
<Rows>
<f:FormRow>
<Items>
<f:Label ID="txtUnitName" runat="server" Label="分包单位" LabelAlign="Right" LabelWidth="120px">
</f:Label>
<f:Label ID="txtTelephone" runat="server" Label="联系电话" LabelAlign="Right">
</f:Label>
<f:Label ID="txtEmail" runat="server" Label="电子邮箱" LabelAlign="Right">
</f:Label>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownBox runat="server" ID="drpUnitQualityBox" Label="资质" LabelWidth="120px" DataControlID="radUnitQuality" EnableMultiSelect="true">
<PopPanel>
<f:SimpleForm ID="SimpleForm2" BodyPadding="10px" runat="server" AutoScroll="true"
ShowBorder="true" ShowHeader="false" Hidden="true">
<Items>
<%--<f:Label ID="Label1" runat="server" Text="请选择单位资质"></f:Label>--%>
<f:CheckBoxList ID="radUnitQuality" ColumnNumber="3" runat="server">
</f:CheckBoxList>
</Items>
</f:SimpleForm>
</PopPanel>
</f:DropDownBox>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="25% 25% 30% 20%">
<Items>
<f:TextBox ID="txtBusinessLicense" runat="server" Label="营业执照" LabelAlign="Right" LabelWidth="120px"
MaxLength="50">
</f:TextBox>
<f:DatePicker ID="txtBL_EnableDate" runat="server" Label="营业执照有效期" LabelAlign="Right"
EnableEdit="true" LabelWidth="120px">
</f:DatePicker>
<f:FileUpload runat="server" ID="btnBL_ScanUrl" EmptyText="请选择附件" OnFileSelected="btnBL_ScanUrl_Click"
AutoPostBack="true" Label="营业执照扫描件" LabelWidth="120px">
</f:FileUpload>
<f:ContentPanel ID="cpBL" runat="server" ShowHeader="false" ShowBorder="false" Title="营业执照扫描件">
<table>
<tr style="height: 28px">
<td align="left">
<div id="divBL_ScanUrl" runat="server">
</div>
</td>
</tr>
</table>
</f:ContentPanel>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="25% 25% 30% 20%" runat="server" Hidden="true">
<Items>
<f:TextBox ID="txtOrganCode" runat="server" Label="机构代码" LabelAlign="Right" MaxLength="50" LabelWidth="120px">
</f:TextBox>
<f:DatePicker ID="txtO_EnableDate" runat="server" Label="机构代码有效期" LabelAlign="Right"
EnableEdit="true" LabelWidth="120px">
</f:DatePicker>
<f:FileUpload runat="server" ID="btnO_ScanUrl" EmptyText="请选择附件" OnFileSelected="btnO_ScanUrl_Click"
AutoPostBack="true" Label="机构代码扫描件" LabelWidth="120px">
</f:FileUpload>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" ShowBorder="false"
Title="机构代码扫描件">
<table>
<tr style="height: 28px">
<td align="left">
<div id="divO_ScanUrl" runat="server">
</div>
</td>
</tr>
</table>
</f:ContentPanel>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="25% 25% 30% 20%">
<Items>
<f:TextBox ID="txtCertificate" runat="server" Label="资质证书" LabelAlign="Right" MaxLength="50" LabelWidth="120px">
</f:TextBox>
<f:DatePicker ID="txtC_EnableDate" runat="server" Label="资质证书有效期" LabelAlign="Right"
EnableEdit="true" LabelWidth="120px">
</f:DatePicker>
<f:FileUpload runat="server" ID="btnC_ScanUrl" EmptyText="请选择附件" OnFileSelected="btnC_ScanUrl_Click"
AutoPostBack="true" Label="资质证书扫描件" LabelWidth="120px">
</f:FileUpload>
<f:ContentPanel ID="ContentPanel2" runat="server" ShowHeader="false" ShowBorder="false"
Title="资质证书扫描件">
<table>
<tr style="height: 28px">
<td align="left">
<div id="divC_ScanUrl" runat="server">
</div>
</td>
</tr>
</table>
</f:ContentPanel>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="25% 25% 30% 20%">
<Items>
<f:TextBox ID="txtQualityLicense" runat="server" Label="质量体系</br>认证证书" LabelAlign="Right"
MaxLength="50" LabelWidth="120px">
</f:TextBox>
<f:DatePicker ID="txtQL_EnableDate" runat="server" Label="质量--有效期" LabelAlign="Right"
EnableEdit="true" LabelWidth="120px">
</f:DatePicker>
<f:FileUpload runat="server" ID="btnQL_ScanUrl" EmptyText="请选择附件" OnFileSelected="btnQL_ScanUrl_Click"
AutoPostBack="true" Label="质量--扫描件" LabelWidth="120px">
</f:FileUpload>
<f:ContentPanel ID="ContentPanel3" runat="server" ShowHeader="false" ShowBorder="false"
Title="质量--扫描件">
<table>
<tr style="height: 28px">
<td align="left">
<div id="divQL_ScanUrl" runat="server">
</div>
</td>
</tr>
</table>
</f:ContentPanel>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="25% 25% 30% 20%">
<Items>
<f:TextBox ID="txtHSELicense" runat="server" Label="HSE体系认证</br>证书(环保)" LabelAlign="Right"
MaxLength="50" LabelWidth="120px">
</f:TextBox>
<f:DatePicker ID="txtH_EnableDate" runat="server" Label="有效期" LabelAlign="Right"
EnableEdit="true" LabelWidth="120px">
</f:DatePicker>
<f:FileUpload runat="server" ID="btnH_ScanUrl" EmptyText="请选择附件" OnFileSelected="btnH_ScanUrl_Click"
AutoPostBack="true" Label="扫描件" LabelWidth="120px">
</f:FileUpload>
<f:ContentPanel ID="ContentPanel4" runat="server" ShowHeader="false" ShowBorder="false"
Title="扫描件">
<table>
<tr style="height: 28px">
<td align="left">
<div id="divH_ScanUrl" runat="server">
</div>
</td>
</tr>
</table>
</f:ContentPanel>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="25% 25% 30% 20%">
<Items>
<f:TextBox ID="txtHSELicense2" runat="server" Label="HSE体系认证</br>证书(职业健康)" LabelAlign="Right"
MaxLength="50" LabelWidth="120px">
</f:TextBox>
<f:DatePicker ID="txtH_EnableDate2" runat="server" Label="有效期" LabelAlign="Right"
EnableEdit="true" LabelWidth="120px">
</f:DatePicker>
<f:FileUpload runat="server" ID="btnH_ScanUrl2" EmptyText="请选择附件" OnFileSelected="btnH_ScanUrl2_Click"
AutoPostBack="true" Label="扫描件" LabelWidth="120px">
</f:FileUpload>
<f:ContentPanel ID="ContentPanel6" runat="server" ShowHeader="false" ShowBorder="false"
Title="扫描件">
<table>
<tr style="height: 28px">
<td align="left">
<div id="divH_ScanUrl2" runat="server">
</div>
</td>
</tr>
</table>
</f:ContentPanel>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="25% 25% 30% 20%">
<Items>
<f:TextBox ID="txtSecurityLicense" runat="server" Label="安全生产许可证" LabelAlign="Right"
MaxLength="50" LabelWidth="120px">
</f:TextBox>
<f:DatePicker ID="txtSL_EnableDate" runat="server" Label="有效期" LabelAlign="Right"
EnableEdit="true" LabelWidth="120px">
</f:DatePicker>
<f:FileUpload runat="server" ID="btnSL_ScanUrl" EmptyText="请选择附件" OnFileSelected="btnSL_ScanUrl_Click"
AutoPostBack="true" Label="扫描件" LabelWidth="120px">
</f:FileUpload>
<f:ContentPanel ID="ContentPanel5" runat="server" ShowHeader="false" ShowBorder="false"
Title="安全生产许可证扫描件">
<table>
<tr style="height: 28px">
<td align="left">
<div id="divSL_ScanUrl" runat="server">
</div>
</td>
</tr>
</table>
</f:ContentPanel>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1" Hidden="true"
OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
</form>
</body>
</html>
@@ -153,9 +153,10 @@ namespace FineUIPro.Web.HSSE.QualityAudit
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
this.UnitId = Request.Params["UnitId"];
if (!string.IsNullOrEmpty(this.UnitId))
{
InitDropDownList();
var unit = BLL.UnitService.GetUnitByUnitId(this.UnitId);
if (unit != null)
{
@@ -166,9 +167,14 @@ namespace FineUIPro.Web.HSSE.QualityAudit
var subUnitQuality = BLL.SubUnitQualityService.GetSubUnitQualityByUnitId(this.UnitId);
if (subUnitQuality != null)
{
this.SubUnitQualityId = subUnitQuality.SubUnitQualityId;
this.txtSubUnitQualityName.Text = subUnitQuality.SubUnitQualityName;
this.txtBusinessLicense.Text = subUnitQuality.SubUnitQualityName;
this.SubUnitQualityId = subUnitQuality.SubUnitQualityId;
if (!string.IsNullOrWhiteSpace(subUnitQuality.QualityId))
{
this.drpUnitQualityBox.Value = subUnitQuality.QualityId;
this.radUnitQuality.SelectedValueArray = subUnitQuality.QualityId.Split(',');
}
this.txtBusinessLicense.Text = subUnitQuality.BusinessLicense;
this.txtBL_EnableDate.Text = string.Format("{0:yyyy-MM-dd}", subUnitQuality.BL_EnableDate);
this.BL_ScanUrl = subUnitQuality.BL_ScanUrl;
this.divBL_ScanUrl.InnerHtml = BLL.UploadAttachmentService.ShowAttachment("../../", this.BL_ScanUrl);
@@ -184,7 +190,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit
this.txtQL_EnableDate.Text = string.Format("{0:yyyy-MM-dd}", subUnitQuality.QL_EnableDate);
this.QL_ScanUrl = subUnitQuality.QL_ScanUrl;
this.divQL_ScanUrl.InnerHtml = BLL.UploadAttachmentService.ShowAttachment("../../", this.QL_ScanUrl);
this.txtHSELicense.Text = subUnitQuality.HSELicense;
this.txtH_EnableDate.Text = string.Format("{0:yyyy-MM-dd}", subUnitQuality.H_EnableDate);
this.H_ScanUrl = subUnitQuality.H_ScanUrl;
@@ -194,17 +200,31 @@ namespace FineUIPro.Web.HSSE.QualityAudit
this.txtH_EnableDate2.Text = string.Format("{0:yyyy-MM-dd}", subUnitQuality.H_EnableDate2);
this.H_ScanUrl2 = subUnitQuality.H_ScanUrl2;
this.divH_ScanUrl2.InnerHtml = BLL.UploadAttachmentService.ShowAttachment("../../", this.H_ScanUrl2);
this.txtSecurityLicense.Text = subUnitQuality.SecurityLicense;
this.txtSL_EnableDate.Text = string.Format("{0:yyyy-MM-dd}", subUnitQuality.SL_EnableDate);
this.SL_ScanUrl = subUnitQuality.SL_ScanUrl;
this.divSL_ScanUrl.InnerHtml = BLL.UploadAttachmentService.ShowAttachment("../../", this.SL_ScanUrl);
}
this.GetButtonPower();
}
}
}
/// <summary>
/// 初始化下拉框
/// </summary>
private void InitDropDownList()
{
var qualifications = Funs.DB.Base_Qualification.OrderBy(x => x.QualificationCode);
this.radUnitQuality.DataTextField = "QualificationName";
this.radUnitQuality.DataValueField = "QualificationId";
this.radUnitQuality.DataSource = qualifications;
this.radUnitQuality.DataBind();
}
#endregion
#region
@@ -344,7 +364,6 @@ namespace FineUIPro.Web.HSSE.QualityAudit
Model.QualityAudit_SubUnitQuality subUnitQuality = new Model.QualityAudit_SubUnitQuality
{
UnitId = this.UnitId,
SubUnitQualityName = this.txtSubUnitQualityName.Text.Trim(),
BusinessLicense = this.txtBusinessLicense.Text.Trim(),
BL_EnableDate = Funs.GetNewDateTime(this.txtBL_EnableDate.Text.Trim()),
BL_ScanUrl = this.BL_ScanUrl,
@@ -369,6 +388,24 @@ namespace FineUIPro.Web.HSSE.QualityAudit
CompileMan = this.CurrUser.UserId,
CompileDate = DateTime.Now
};
if (this.radUnitQuality.SelectedItemArray.Count() > 0)
{
string qids = string.Empty;
string qNames = string.Empty;
foreach (var item in this.radUnitQuality.SelectedItemArray)
{
qids += item.Value + ",";
qNames += item.Text + ",";
}
if (!string.IsNullOrEmpty(qids))
{
qids = qids.Substring(0, qids.LastIndexOf(","));
qNames = qNames.Substring(0, qNames.LastIndexOf(","));
}
subUnitQuality.QualityId = qids;
subUnitQuality.SubUnitQualityName = qNames;
}
if (!string.IsNullOrEmpty(this.SubUnitQualityId))
{
subUnitQuality.SubUnitQualityId = this.SubUnitQualityId;
@@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HSSE.QualityAudit {
public partial class SubUnitQualityEdit {
namespace FineUIPro.Web.HSSE.QualityAudit
{
public partial class SubUnitQualityEdit
{
/// <summary>
/// form1 控件。
/// </summary>
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtUnitName 控件。
/// </summary>
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtUnitName;
/// <summary>
/// txtTelephone 控件。
/// </summary>
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtTelephone;
/// <summary>
/// txtEmail 控件。
/// </summary>
@@ -65,16 +67,34 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtEmail;
/// <summary>
/// txtSubUnitQualityName 控件。
/// drpUnitQualityBox 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSubUnitQualityName;
protected global::FineUIPro.DropDownBox drpUnitQualityBox;
/// <summary>
/// SimpleForm2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.SimpleForm SimpleForm2;
/// <summary>
/// radUnitQuality 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList radUnitQuality;
/// <summary>
/// txtBusinessLicense 控件。
/// </summary>
@@ -83,7 +103,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtBusinessLicense;
/// <summary>
/// txtBL_EnableDate 控件。
/// </summary>
@@ -92,7 +112,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtBL_EnableDate;
/// <summary>
/// btnBL_ScanUrl 控件。
/// </summary>
@@ -101,7 +121,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload btnBL_ScanUrl;
/// <summary>
/// cpBL 控件。
/// </summary>
@@ -110,7 +130,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel cpBL;
/// <summary>
/// divBL_ScanUrl 控件。
/// </summary>
@@ -119,7 +139,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divBL_ScanUrl;
/// <summary>
/// txtOrganCode 控件。
/// </summary>
@@ -128,7 +148,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtOrganCode;
/// <summary>
/// txtO_EnableDate 控件。
/// </summary>
@@ -137,7 +157,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtO_EnableDate;
/// <summary>
/// btnO_ScanUrl 控件。
/// </summary>
@@ -146,7 +166,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload btnO_ScanUrl;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
@@ -155,7 +175,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// divO_ScanUrl 控件。
/// </summary>
@@ -164,7 +184,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divO_ScanUrl;
/// <summary>
/// txtCertificate 控件。
/// </summary>
@@ -173,7 +193,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCertificate;
/// <summary>
/// txtC_EnableDate 控件。
/// </summary>
@@ -182,7 +202,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtC_EnableDate;
/// <summary>
/// btnC_ScanUrl 控件。
/// </summary>
@@ -191,7 +211,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload btnC_ScanUrl;
/// <summary>
/// ContentPanel2 控件。
/// </summary>
@@ -200,7 +220,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel2;
/// <summary>
/// divC_ScanUrl 控件。
/// </summary>
@@ -209,7 +229,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divC_ScanUrl;
/// <summary>
/// txtQualityLicense 控件。
/// </summary>
@@ -218,7 +238,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtQualityLicense;
/// <summary>
/// txtQL_EnableDate 控件。
/// </summary>
@@ -227,7 +247,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtQL_EnableDate;
/// <summary>
/// btnQL_ScanUrl 控件。
/// </summary>
@@ -236,7 +256,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload btnQL_ScanUrl;
/// <summary>
/// ContentPanel3 控件。
/// </summary>
@@ -245,7 +265,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel3;
/// <summary>
/// divQL_ScanUrl 控件。
/// </summary>
@@ -254,7 +274,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divQL_ScanUrl;
/// <summary>
/// txtHSELicense 控件。
/// </summary>
@@ -263,7 +283,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtHSELicense;
/// <summary>
/// txtH_EnableDate 控件。
/// </summary>
@@ -272,7 +292,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtH_EnableDate;
/// <summary>
/// btnH_ScanUrl 控件。
/// </summary>
@@ -281,7 +301,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload btnH_ScanUrl;
/// <summary>
/// ContentPanel4 控件。
/// </summary>
@@ -290,7 +310,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel4;
/// <summary>
/// divH_ScanUrl 控件。
/// </summary>
@@ -299,7 +319,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divH_ScanUrl;
/// <summary>
/// txtHSELicense2 控件。
/// </summary>
@@ -308,7 +328,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtHSELicense2;
/// <summary>
/// txtH_EnableDate2 控件。
/// </summary>
@@ -317,7 +337,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtH_EnableDate2;
/// <summary>
/// btnH_ScanUrl2 控件。
/// </summary>
@@ -326,7 +346,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload btnH_ScanUrl2;
/// <summary>
/// ContentPanel6 控件。
/// </summary>
@@ -335,7 +355,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel6;
/// <summary>
/// divH_ScanUrl2 控件。
/// </summary>
@@ -344,7 +364,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divH_ScanUrl2;
/// <summary>
/// txtSecurityLicense 控件。
/// </summary>
@@ -353,7 +373,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSecurityLicense;
/// <summary>
/// txtSL_EnableDate 控件。
/// </summary>
@@ -362,7 +382,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtSL_EnableDate;
/// <summary>
/// btnSL_ScanUrl 控件。
/// </summary>
@@ -371,7 +391,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload btnSL_ScanUrl;
/// <summary>
/// ContentPanel5 控件。
/// </summary>
@@ -380,7 +400,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel5;
/// <summary>
/// divSL_ScanUrl 控件。
/// </summary>
@@ -389,7 +409,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divSL_ScanUrl;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@@ -398,7 +418,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -407,7 +427,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnSave 控件。
/// </summary>
@@ -416,7 +436,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnClose 控件。
/// </summary>
+79 -74
View File
@@ -4,86 +4,91 @@
<html>
<head runat="server">
<title>角色管理</title>
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
</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" DataKeyNames="RoleId" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="RoleId" AllowSorting="true" SortField="RoleCode"
SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
<Items>
<f:TextBox runat="server" Label="名称" ID="txtRoleName" EmptyText="输入查询条件"
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px">
</f:TextBox>
<f:TextBox runat="server" Label="类型" ID="txtRoleTypeName" EmptyText="输入查询条件"
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px">
</f:TextBox>
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server" Hidden ="true">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center" TextAlign="Center"/>
<f:RenderField Width="100px" ColumnID="RoleCode" DataField="RoleCode"
SortField="RoleCode" FieldType="String" HeaderText="编码" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="RoleName" DataField="RoleName" EnableFilter="true"
SortField="RoleName" FieldType="String" HeaderText="名称" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="IsOfficeName" DataField="IsOfficeName" EnableFilter="true"
SortField="IsOfficeName" FieldType="String" HeaderText="类型" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<%-- <f:RenderField Width="90px" ColumnID="RoleType" DataField="RoleType" EnableFilter="true"
<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" DataKeyNames="RoleId" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="RoleId" AllowSorting="true" SortField="RoleCode"
SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
<Items>
<f:TextBox runat="server" Label="名称" ID="txtRoleName" EmptyText="输入查询条件"
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px">
</f:TextBox>
<%--<f:TextBox runat="server" Label="类型" ID="txtRoleTypeName" EmptyText="输入查询条件"
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px">
</f:TextBox>--%>
<f:DropDownList ID="dpRoleType" runat="server" Label="类型" LabelAlign="Right" EnableEdit="true" LabelWidth="80px" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
<f:ListItem Text="-请选择-" Value="" />
<f:ListItem Text="本部角色" Value="1" />
<f:ListItem Text="项目角色" Value="0" />
</f:DropDownList>
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server" Hidden="true">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center" TextAlign="Center" />
<f:RenderField Width="100px" ColumnID="RoleCode" DataField="RoleCode"
SortField="RoleCode" FieldType="String" HeaderText="编码" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="RoleName" DataField="RoleName" EnableFilter="true"
SortField="RoleName" FieldType="String" HeaderText="名称" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="IsOfficeName" DataField="IsOfficeName" EnableFilter="true"
SortField="IsOfficeName" FieldType="String" HeaderText="类型" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<%-- <f:RenderField Width="90px" ColumnID="RoleType" DataField="RoleType" EnableFilter="true"
SortField="RoleType" FieldType="String" HeaderText="级别" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>--%>
<f:CheckBoxField Width="100px" RenderAsStaticField="true" TextAlign="Center" DataField="IsSystemBuilt" HeaderText="内置" />
<f:CheckBoxField Width="80px" RenderAsStaticField="true" TextAlign="Center" DataField="IsAuditFlow" HeaderText="参与审批" />
<f:RenderField ColumnID="Def" DataField="Def" SortField="Def" FieldType="String" Width="150px"
HeaderText="备注" HeaderTextAlign="Center" TextAlign="Left" >
</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="Self" EnableResize="false" runat="server" IsModal="true"
Width="700px" Height="400px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
runat="server" Text="编辑" Hidden ="true" Icon="Pencil">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true" Icon="Delete"
ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server" Text="删除" Hidden ="true">
</f:MenuButton>
</f:Menu>
<f:CheckBoxField Width="100px" RenderAsStaticField="true" TextAlign="Center" DataField="IsSystemBuilt" HeaderText="内置" />
<f:CheckBoxField Width="80px" RenderAsStaticField="true" TextAlign="Center" DataField="IsAuditFlow" HeaderText="参与审批" />
<f:RenderField ColumnID="Def" DataField="Def" SortField="Def" FieldType="String" Width="150px"
HeaderText="备注" HeaderTextAlign="Center" TextAlign="Left">
</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="Self" EnableResize="false" runat="server" IsModal="true"
Width="700px" Height="400px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
runat="server" Text="编辑" Hidden="true" Icon="Pencil">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true" Icon="Delete"
ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server" Text="删除" Hidden="true">
</f:MenuButton>
</f:Menu>
</form>
<script type="text/jscript">
var menuID = '<%= Menu1.ClientID %>';
+15 -9
View File
@@ -15,7 +15,7 @@
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
{
if (!IsPostBack)
{
////权限按钮方法
@@ -39,14 +39,20 @@
{
string strSql = @"SELECT Roles.RoleId,Roles.RoleName,Roles.RoleCode,Roles.Def,Roles.IsSystemBuilt,IsAuditFlow"
+ @" ,(CASE WHEN IsOffice=1 THEN '本部角色' ELSE '项目角色' END) AS IsOfficeName"
+ @" FROM dbo.Sys_Role AS Roles "
+ @" FROM dbo.Sys_Role AS Roles "
+ @" WHERE 1=1 ";
List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.txtRoleName.Text.Trim()))
{
strSql += " AND RoleName LIKE @RoleName";
listStr.Add(new SqlParameter("@RoleName", "%" + this.txtRoleName.Text.Trim() + "%"));
}
}
var roleType = this.dpRoleType.SelectedValue;
if (!string.IsNullOrWhiteSpace(roleType))
{
strSql += " AND IsOffice = @RoleType";
listStr.Add(new SqlParameter("@RoleType", roleType));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@@ -55,7 +61,7 @@
Grid1.DataSource = table;
Grid1.DataBind();
}
#region
/// <summary>
/// 右键删除事件
@@ -84,7 +90,7 @@
{
BLL.LogService.AddSys_Log(this.CurrUser, roles.RoleCode, roles.RoleId, Const.RoleMenuId, Const.BtnDelete);
BLL.RoleService.DeleteRole(rowID);
}
}
}
@@ -102,7 +108,7 @@
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
{
BindGrid();
}
@@ -160,7 +166,7 @@
}
string Id = Grid1.SelectedRowID;
var roles = BLL.RoleService.GetRoleByRoleId(Id);
if (roles != null && (!roles.IsSystemBuilt.HasValue || roles.IsSystemBuilt == false || this.CurrUser.UserId == BLL.Const.sysglyId ))
if (roles != null && (!roles.IsSystemBuilt.HasValue || roles.IsSystemBuilt == false || this.CurrUser.UserId == BLL.Const.sysglyId))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("RoleListEdit.aspx?roleId={0}", Id, "编辑 - ")));
}
@@ -188,7 +194,7 @@
}
if (buttonList.Contains(BLL.Const.BtnModify))
{
this.btnMenuEdit.Hidden = false;
this.btnMenuEdit.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnDelete))
{
@@ -222,7 +228,7 @@
{
content = "该角色已在【用户信息】中使用,不能删除!";
}
if (string.IsNullOrEmpty(content))
{
return true;
+24 -22
View File
@@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.SysManage {
public partial class RoleList {
namespace FineUIPro.Web.SysManage
{
public partial class RoleList
{
/// <summary>
/// form1 控件。
/// </summary>
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// txtRoleName 控件。
/// </summary>
@@ -65,16 +67,16 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtRoleName;
/// <summary>
/// txtRoleTypeName 控件。
/// dpRoleType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtRoleTypeName;
protected global::FineUIPro.DropDownList dpRoleType;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -83,7 +85,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnNew 控件。
/// </summary>
@@ -92,7 +94,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@@ -101,7 +103,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@@ -110,7 +112,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@@ -119,7 +121,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
@@ -128,7 +130,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Menu1 控件。
/// </summary>
@@ -137,7 +139,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
@@ -146,7 +148,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
+73 -108
View File
@@ -7,8 +7,7 @@
<title>导入人员信息</title>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<style>
.f-grid-row .f-grid-cell-inner
{
.f-grid-row .f-grid-cell-inner {
white-space: normal;
word-break: break-all;
}
@@ -16,112 +15,78 @@
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" OnCustomEvent="PageManager1_CustomEvent" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" ToolTip="审核" ValidateForms="SimpleForm1"
OnClick="btnAudit_Click">
</f:Button>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1"
OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载模板" OnClick="btnDownLoad_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Rows>
<f:FormRow>
<Items>
<f:FileUpload runat="server" ID="fuAttachUrl" EmptyText="选择要导入的文件" Label="选择要导入的文件"
LabelWidth="150px">
</f:FileUpload>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true" runat="server"
EnableColumnLines="true" BoxFlex="1" DataKeyNames="RCount" AllowCellEditing="true"
ClicksToEdit="2" DataIDField="RCount" AllowSorting="true" SortField="RCount"
PageSize="50" Height="360px">
<Columns>
<f:TemplateField Width="55px" HeaderText="序号">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="80px" ColumnID="RCount" DataField="RCount" FieldType="Int"
HeaderText="行号" HeaderTextAlign="Center" TextAlign="Right">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="UserCode" DataField="UserCode" FieldType="String"
HeaderText="用户编号" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="80px" ColumnID="UserName" DataField="UserName"
SortField="UserName" FieldType="String" HeaderText="人员姓名" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="80px" ColumnID="Account" DataField="Account"
SortField="Account" FieldType="String" HeaderText="账号" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="220px" ColumnID="UnitName" DataField="UnitName" FieldType="String"
HeaderText="单位" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="DepartName" DataField="DepartName" FieldType="String"
HeaderText="部门" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="RoleName" DataField="RoleName" FieldType="String"
HeaderText="角色" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="IdentityCard" DataField="IdentityCard" SortField="IdentityCard"
FieldType="String" HeaderText="身份证号" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="Telephone" DataField="Telephone" SortField="Telephone"
FieldType="String" HeaderText="手机号码" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:CheckBoxField Width="60px" SortField="IsPost" RenderAsStaticField="true" DataField="IsPost"
HeaderText="在岗" HeaderTextAlign="Center" TextAlign="Left">
</f:CheckBoxField>
<f:CheckBoxField Width="60px" SortField="IsOffice" RenderAsStaticField="true" DataField="IsOffice"
HeaderText="本部" HeaderTextAlign="Center" TextAlign="Left">
</f:CheckBoxField>
<f:RenderField Width="80px" ColumnID="MainCNProfessionalName" DataField="MainCNProfessionalName" FieldType="String"
HeaderText="主专业" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="ViceCNProfessionalName" DataField="ViceCNProfessionalName" FieldType="String"
HeaderText="副专业" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
</Columns>
</f:Grid>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:HiddenField ID="hdFileName" runat="server">
</f:HiddenField>
<f:HiddenField ID="hdCheckResult" runat="server">
</f:HiddenField>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Label ID="lblBottom" runat="server" Text="说明:1 人员信息导入模板为.xls后缀的EXCEL文件,黑体字为必填项。2 身份证号码必须为15或18位,所属单位、角色等必须与基础信息中对应类型的名称一致,否则无法导入。3 如需修改已有人员信息,请到系统中修改。4 数据审核后,点击“保存”,即可完成人员信息导入。">
</f:Label>
</Items>
</f:FormRow>
</Rows>
</f:Form>
<f:Window ID="Window1" Title="审核人员信息" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="false"
CloseAction="HidePostBack" Width="900px" Height="600px">
</f:Window>
<f:Window ID="Window2" Title="导入人员信息" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" OnClose="Window2_Close" IsModal="false"
CloseAction="HidePostBack" Width="900px" Height="600px">
</f:Window>
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" OnCustomEvent="PageManager1_CustomEvent" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" ToolTip="审核" ValidateForms="SimpleForm1"
OnClick="btnAudit_Click">
</f:Button>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1"
OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载模板" OnClick="btnDownLoad_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Rows>
<f:FormRow>
<Items>
<f:FileUpload runat="server" ID="fuAttachUrl" EmptyText="选择要导入的文件" Label="选择要导入的文件"
LabelWidth="150px">
</f:FileUpload>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Grid ID="gvErrorInfo" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="导入人员信息" EnableCollapse="true"
runat="server" BoxFlex="1" AllowCellEditing="true" ClicksToEdit="2" AllowSorting="true"
SortDirection="DESC" EnableColumnLines="true" ForceFit="true" AllowPaging="false" IsDatabasePaging="false" PageSize="10"
EnableRowDoubleClickEvent="true" AllowFilters="true" EnableTextSelection="True" Height="400">
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="40px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lblPageIndex" runat="server" Text='<%# gvErrorInfo.PageIndex * gvErrorInfo.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:BoundField DataField="Row" HeaderText="错误行号" Width="50px">
</f:BoundField>
<f:BoundField DataField="Column" HeaderText="错误列" Width="100px">
</f:BoundField>
<f:BoundField DataField="Reason" HeaderText="错误类型" MinWidth="220px">
</f:BoundField>
</Columns>
</f:Grid>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:HiddenField ID="hdFileName" runat="server">
</f:HiddenField>
<f:HiddenField ID="hdCheckResult" runat="server">
</f:HiddenField>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Label ID="lblBottom" runat="server" Text="说明:1 人员信息导入模板为.xls后缀的EXCEL文件,有填充色项为必填项。2 身份证号码必须为15或18位,所属单位、角色等必须与基础信息中对应类型的名称一致,否则无法导入。3 如需修改已有人员信息,请到系统中修改。4 数据审核后,点击“保存”,即可完成人员信息导入。">
</f:Label>
</Items>
</f:FormRow>
</Rows>
</f:Form>
<f:Window ID="Window1" Title="审核人员信息" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="false"
CloseAction="HidePostBack" Width="900px" Height="600px">
</f:Window>
<%--<f:Window ID="Window2" Title="导入人员信息" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" OnClose="Window2_Close" IsModal="false"
CloseAction="HidePostBack" Width="900px" Height="600px">
</f:Window>--%>
</form>
</body>
</html>
+132 -69
View File
@@ -6,6 +6,8 @@ using System.IO;
using System.Linq;
using System.Web.UI;
using BLL;
using FineUIPro.Web.HSSE.PostTraining;
using Model;
namespace FineUIPro.Web.SysManage
{
@@ -22,10 +24,17 @@ namespace FineUIPro.Web.SysManage
/// </summary>
public static List<Model.View_Sys_User> userViews = new List<Model.View_Sys_User>();
///// <summary>
///// 错误集合
///// </summary>
//public static string errorInfos = string.Empty;
/// <summary>
/// 错误集合
/// </summary>
public static string errorInfos = string.Empty;
public static List<Model.ErrorInfo> errorInfos = new List<Model.ErrorInfo>();
#endregion
#region
@@ -44,7 +53,11 @@ namespace FineUIPro.Web.SysManage
{
userViews.Clear();
}
errorInfos = string.Empty;
if (errorInfos != null)
{
errorInfos.Clear();
}
//errorInfos = string.Empty;
}
}
#endregion
@@ -74,10 +87,14 @@ namespace FineUIPro.Web.SysManage
{
userViews.Clear();
}
if (!string.IsNullOrEmpty(errorInfos))
if (errorInfos != null)
{
errorInfos = string.Empty;
errorInfos.Clear();
}
//if (!string.IsNullOrWhiteSpace(errorInfos))
//{
// errorInfos = string.Empty;
//}
string rootPath = Server.MapPath("~/");
string initFullPath = rootPath + initPath;
if (!Directory.Exists(initFullPath))
@@ -159,6 +176,7 @@ namespace FineUIPro.Web.SysManage
ir = pds.Rows.Count;
if (pds != null && ir > 0)
{
var users = from x in Funs.DB.View_Sys_User select x;
var units = from x in Funs.DB.Base_Unit select x;
var roles = from x in Funs.DB.Sys_Role select x;
var departs = from x in Funs.DB.Base_Depart select x;
@@ -183,22 +201,44 @@ namespace FineUIPro.Web.SysManage
ViceCNProfessionalName = pds.Rows[i][11].ToString().Trim()
};
if (string.IsNullOrEmpty(newSysUser.UserName))
if (string.IsNullOrWhiteSpace(newSysUser.UserCode))
{
result += "第" + (i + 2).ToString() + "行," + "人员姓名" + "," + "此项为必填项!" + "|";
errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "员工编号", Reason = "此项为必填项!" });
}
if (string.IsNullOrEmpty(newSysUser.Account))
else
{
result += "第" + (i + 2).ToString() + "行," + "登录账号" + "," + "此项为必填项!" + "|";
//判断人员编号是否存在
bool isexist = users.Where(x => x.UserCode == newSysUser.UserCode).Any();
if (isexist)
{
errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "员工编号", Reason = $"已存在编号为[{newSysUser.UserCode}]的人员!" });
}
}
if (!string.IsNullOrWhiteSpace(newSysUser.IdentityCard))
{
//判断人员编号是否存在
bool isexist = users.Where(x => x.IdentityCard == newSysUser.IdentityCard).Any();
if (isexist)
{
errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "身份证号", Reason = $"已存在身份证号为[{newSysUser.IdentityCard}]的人员!" });
}
}
if (string.IsNullOrWhiteSpace(newSysUser.UserName))
{
errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "人员姓名", Reason = "此项为必填项!" });
}
if (string.IsNullOrWhiteSpace(newSysUser.Account))
{
errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "登录账号", Reason = "此项为必填项!" });
}
string unitName = newSysUser.UnitName;
if (!string.IsNullOrEmpty(unitName))
if (!string.IsNullOrWhiteSpace(unitName))
{
var unit = units.FirstOrDefault(e => e.UnitName == unitName);
if (unit == null)
{
result += "第" + (i + 2).ToString() + "行," + "单位" + "," + "[" + unitName + "]不在单位表中!" + "|";
errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "单位", Reason = $"[{unitName}]不在单位表中!" });
}
else
{
@@ -208,52 +248,78 @@ namespace FineUIPro.Web.SysManage
}
else
{
result += "第" + (i + 2).ToString() + "行," + "单位" + "," + "此项为必填项!" + "|";
errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "单位", Reason = "此项为必填项!" });
}
string departName = newSysUser.DepartName;
if (!string.IsNullOrEmpty(departName))
if (!string.IsNullOrWhiteSpace(departName))
{
var depart = departs.FirstOrDefault(e => e.DepartName == departName);
if (depart == null)
{
result += "第" + (i + 2).ToString() + "行," + "部门" + "," + "[" + departName + "]不在部门表中!" + "|";
errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "部门", Reason = $"[{departName}]不在部门表中!" });
}
else
{
newSysUser.DepartId = depart.DepartId;
}
}
else
{
result += "第" + (i + 2).ToString() + "行," + "部门" + "," + "此项为必填项!" + "|";
errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "部门", Reason = "此项为必填项!" });
}
string roleName = newSysUser.RoleName;
var role = roles.FirstOrDefault(e => e.RoleName == roleName);
if (role == null)
string roleIds = string.Empty;
string roleNames = string.Empty;
if (!string.IsNullOrWhiteSpace(roleName))
{
result += "第" + (i + 2).ToString() + "行," + "角色" + "," + "[" + roleName + "]错误!" + "|";
}
else
{
newSysUser.RoleId = role.RoleId;
newSysUser.RoleName = role.RoleName;
var roleNameList = roleName.Split(',');
string errRoleName = string.Empty;
foreach (var rol in roleNameList)
{
var role = roles.FirstOrDefault(e => e.RoleName == rol);
if (role == null)
{
errRoleName = !string.IsNullOrWhiteSpace(errRoleName) ? $"{errRoleName},{rol}" : rol;
}
else
{
roleIds = !string.IsNullOrWhiteSpace(roleIds) ? $"{roleIds},{role.RoleId}" : role.RoleId;
roleNames = !string.IsNullOrWhiteSpace(roleNames) ? $"{roleNames},{role.RoleName}" : role.RoleName;
}
}
if (!string.IsNullOrWhiteSpace(errRoleName))
{
errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "角色", Reason = $"[{errRoleName}]不在角色表中!" });
}
}
newSysUser.RoleId = roleIds;
newSysUser.RoleName = roleNames;
//var role = roles.FirstOrDefault(e => e.RoleName == roleName);
//if (role == null)
//{
// result += "第" + (i + 2).ToString() + "行," + "角色" + "," + "[" + roleName + "]错误!" + "|";
//}
//else
//{
// newSysUser.RoleId = role.RoleId;
// newSysUser.RoleName = role.RoleName;
//}
if (!newSysUser.IsPost.HasValue)
{
result += "第" + (i + 2).ToString() + "行," + "在岗" + "," + "此项为必填项!" + "|";
errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "在岗", Reason = "此项为必填项!" });
}
string mainCNProfessionalName = newSysUser.MainCNProfessionalName;
if (!string.IsNullOrEmpty(mainCNProfessionalName))
if (!string.IsNullOrWhiteSpace(mainCNProfessionalName))
{
var cNProfessional = cNProfessionals.FirstOrDefault(e => e.ProfessionalName == mainCNProfessionalName);
if (cNProfessional == null)
{
result += "第" + (i + 2).ToString() + "行," + "主专业" + "," + "[" + mainCNProfessionalName + "]不在专业表中!" + "|";
errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "主专业", Reason = $"[{mainCNProfessionalName}]不在专业表中!" });
}
else
{
@@ -262,20 +328,22 @@ namespace FineUIPro.Web.SysManage
}
string viceCNProfessionalName = newSysUser.ViceCNProfessionalName;
if (!string.IsNullOrEmpty(viceCNProfessionalName))
if (!string.IsNullOrWhiteSpace(viceCNProfessionalName))
{
string viceCNProfessionalId = string.Empty;
bool hasErr = false;
string[] strs = viceCNProfessionalName.Split('');
string errViceCNProfessionalName = string.Empty;
foreach (var item in strs)
{
if (!string.IsNullOrEmpty(item))
if (!string.IsNullOrWhiteSpace(item))
{
var cNProfessional = cNProfessionals.FirstOrDefault(e => e.ProfessionalName == item);
if (cNProfessional == null)
{
hasErr = true;
result += "第" + (i + 2).ToString() + "行," + "副专业" + "," + "[" + item + "]不在专业表中!" + "|";
//result += "第" + (i + 2).ToString() + "行," + "副专业" + "," + "[" + item + "]不在专业表中!" + "|";
errViceCNProfessionalName = !string.IsNullOrWhiteSpace(errViceCNProfessionalName) ? $"{errViceCNProfessionalName},{item}" : item;
}
else
{
@@ -283,7 +351,11 @@ namespace FineUIPro.Web.SysManage
}
}
}
if (!string.IsNullOrEmpty(viceCNProfessionalId))
if (!string.IsNullOrWhiteSpace(errViceCNProfessionalName))
{
errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "副专业", Reason = $"[{errViceCNProfessionalName}]不在专业表中!" });
}
if (!string.IsNullOrWhiteSpace(viceCNProfessionalId))
{
viceCNProfessionalId = viceCNProfessionalId.Substring(0, viceCNProfessionalId.Length - 1);
}
@@ -296,31 +368,22 @@ namespace FineUIPro.Web.SysManage
///加入用户视图
userViews.Add(newSysUser);
}
if (!string.IsNullOrEmpty(result))
if (errorInfos.Any())
{
userViews.Clear();
result = result.Substring(0, result.LastIndexOf("|"));
errorInfos = result;
Alert alert = new Alert
{
Message = result,
Target = Target.Self
};
alert.Show();
this.gvErrorInfo.DataSource = errorInfos;
this.gvErrorInfo.DataBind();
}
else
{
errorInfos = string.Empty;
if (userViews.Count > 0)
errorInfos.Clear();
if (!userViews.Any())
{
this.Grid1.Hidden = false;
this.Grid1.DataSource = userViews;
this.Grid1.DataBind();
Alert.ShowInTop("审核完成,请点击保存!", MessageBoxIcon.Success);
Alert.ShowInTop("导入数据为空!", MessageBoxIcon.Warning);
}
else
{
Alert.ShowInTop("导入数据为空", MessageBoxIcon.Warning);
ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);
}
}
}
@@ -341,7 +404,7 @@ namespace FineUIPro.Web.SysManage
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(errorInfos))
if (!errorInfos.Any())
{
int a = userViews.Count();
int insertCount = 0;
@@ -354,19 +417,19 @@ namespace FineUIPro.Web.SysManage
UserName = userViews[i].UserName,
Account = userViews[i].Account,
UnitId = userViews[i].UnitId,
DepartId=userViews[i].DepartId,
DepartId = userViews[i].DepartId,
RoleId = userViews[i].RoleId,
IdentityCard = userViews[i].IdentityCard,
Telephone = userViews[i].Telephone,
IsPost = userViews[i].IsPost,
IsOffice = userViews[i].IsOffice,
MainCNProfessionalId=userViews[i].MainCNProfessionalId,
ViceCNProfessionalId=userViews[i].ViceCNProfessionalId,
MainCNProfessionalId = userViews[i].MainCNProfessionalId,
ViceCNProfessionalId = userViews[i].ViceCNProfessionalId,
};
var getUser = Funs.DB.Sys_User.FirstOrDefault(x => x.Account == userViews[i].Account);
if (getUser == null)
{
newUser.Password = Funs.EncryptionPassword(Const.Password);
newUser.Password = Funs.EncryptionPassword(Const.Password);
newUser.RawPassword = Const.Password;
BLL.UserService.AddUser(newUser);
insertCount++;
@@ -396,24 +459,24 @@ namespace FineUIPro.Web.SysManage
#endregion
#region
/// <summary>
/// 关闭导入弹出窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window2_Close(object sender, WindowCloseEventArgs e)
{
if (Session["sysUsers"] != null)
{
userViews = Session["sysUsers"] as List<Model.View_Sys_User>;
}
if (userViews.Count > 0)
{
this.Grid1.Hidden = false;
this.Grid1.DataSource = userViews;
this.Grid1.DataBind();
}
}
///// <summary>
///// 关闭导入弹出窗口
///// </summary>
///// <param name="sender"></param>
///// <param name="e"></param>
//protected void Window2_Close(object sender, WindowCloseEventArgs e)
//{
// if (Session["sysUsers"] != null)
// {
// userViews = Session["sysUsers"] as List<Model.View_Sys_User>;
// }
// if (userViews.Count > 0)
// {
// this.Grid1.Hidden = false;
// this.Grid1.DataSource = userViews;
// this.Grid1.DataBind();
// }
//}
#endregion
+24 -31
View File
@@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.SysManage {
public partial class UserIn {
namespace FineUIPro.Web.SysManage
{
public partial class UserIn
{
/// <summary>
/// form1 控件。
/// </summary>
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// btnAudit 控件。
/// </summary>
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAudit;
/// <summary>
/// btnSave 控件。
/// </summary>
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnDownLoad 控件。
/// </summary>
@@ -74,7 +76,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDownLoad;
/// <summary>
/// fuAttachUrl 控件。
/// </summary>
@@ -83,25 +85,25 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload fuAttachUrl;
/// <summary>
/// Grid1 控件。
/// gvErrorInfo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
protected global::FineUIPro.Grid gvErrorInfo;
/// <summary>
/// Label2 控件。
/// lblPageIndex 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label2;
protected global::System.Web.UI.WebControls.Label lblPageIndex;
/// <summary>
/// hdFileName 控件。
/// </summary>
@@ -110,7 +112,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdFileName;
/// <summary>
/// hdCheckResult 控件。
/// </summary>
@@ -119,7 +121,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdCheckResult;
/// <summary>
/// lblBottom 控件。
/// </summary>
@@ -128,7 +130,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lblBottom;
/// <summary>
/// Window1 控件。
/// </summary>
@@ -137,14 +139,5 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Window2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
}
}
+12 -12
View File
@@ -22,7 +22,7 @@
runat="server" BoxFlex="1" DataKeyNames="UserId" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="UserId" AllowSorting="true" SortField="UnitName,UserCode" ForceFit="true"
SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableRowDoubleClickEvent="true"
PageSize="15" OnPageIndexChange="Grid1_PageIndexChange" EnableRowDoubleClickEvent="true"
OnRowDoubleClick="Grid1_RowDoubleClick" Width="980px" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
@@ -56,40 +56,40 @@
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="45px" HeaderTextAlign="Center"
TextAlign="Center" />
<f:RenderField Width="100px" ColumnID="UserCode" DataField="UserCode" SortField="UserCode"
<f:RenderField Width="90px" ColumnID="UserCode" DataField="UserCode" SortField="UserCode"
FieldType="String" HeaderText="员工编号" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="UserName" DataField="UserName" SortField="UserName"
<f:RenderField Width="120px" ColumnID="UserName" DataField="UserName" SortField="UserName"
FieldType="String" HeaderText="姓名" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="230px" ColumnID="UnitName" DataField="UnitName" SortField="UnitName"
FieldType="String" HeaderText="单位名称" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="UnitCode" DataField="UnitCode" SortField="UnitCode"
<%--<f:RenderField Width="100px" ColumnID="UnitCode" DataField="UnitCode" SortField="UnitCode"
FieldType="String" HeaderText="单位编号" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>--%>
<f:RenderField Width="220px" ColumnID="UnitName" DataField="UnitName" SortField="UnitName"
FieldType="String" HeaderText="单位名称" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="DepartName" DataField="DepartName" SortField="DepartName"
FieldType="String" HeaderText="部门" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="110px" ColumnID="Account" DataField="Account" SortField="Account"
<f:RenderField Width="100px" ColumnID="Account" DataField="Account" SortField="Account"
FieldType="String" HeaderText="账号" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<%-- <f:RenderField Width="120px" ColumnID="IdentityCard" DataField="IdentityCard" SortField="IdentityCard"
FieldType="String" HeaderText="身份证号码" HeaderTextAlign="Center" TextAlign="Right" Hidden="true">
</f:RenderField>--%>
<f:RenderField Width="150px" ColumnID="RoleName" DataField="RoleName" SortField="RoleName"
<f:RenderField Width="230px" ColumnID="RoleName" DataField="RoleName" SortField="RoleName"
FieldType="String" HeaderText="本部角色" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="Telephone" DataField="Telephone" SortField="Telephone"
FieldType="String" HeaderText="手机号码" HeaderTextAlign="Center" TextAlign="Right" Hidden="true">
</f:RenderField>
<f:CheckBoxField Width="60px" SortField="IsPost" RenderAsStaticField="true" DataField="IsPost"
<f:CheckBoxField Width="50px" SortField="IsPost" RenderAsStaticField="true" DataField="IsPost"
HeaderText="在岗" HeaderTextAlign="Center" TextAlign="Center">
</f:CheckBoxField>
<%-- <f:CheckBoxField Width="50px" SortField="IsOffice" RenderAsStaticField="true" DataField="IsOffice"
HeaderText="本部" HeaderTextAlign="Center" TextAlign="Center">
</f:CheckBoxField>--%>
<f:TemplateField Width="200px" ColumnID="UserId" HeaderText="参与项目" TextAlign="Left">
<f:TemplateField Width="180px" ColumnID="UserId" HeaderText="参与项目" TextAlign="Left">
<ItemTemplate>
<asp:LinkButton ID="lbtnPro" runat="server" Text='<%# ConvertProject(Eval("UserId")) %>' OnClick="lbtnPro_Click"></asp:LinkButton>
</ItemTemplate>
@@ -116,7 +116,7 @@
</f:Window>
<f:Window ID="Window2" Title="导入人员信息" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" OnClose="Window2_Close" IsModal="false"
CloseAction="HidePostBack" Width="1000px" Height="560px">
CloseAction="HidePostBack" Width="1000px" Height="620px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
+99 -99
View File
@@ -1,18 +1,18 @@
namespace FineUIPro.Web.SysManage
{
using System;
using System.Collections.Generic;
using System.Data;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using BLL;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
using System.Collections;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
using System.Collections;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
public partial class UserList : PageBase
{
public partial class UserList : PageBase
{
/// <summary>
/// 加载页面
/// </summary>
@@ -44,13 +44,13 @@
/// </summary>
private void BindGrid()
{
string strSql = @"SELECT Users.UserId,Users.Account,Users.UserCode,Users.Password,Users.UserName,Depart.DepartName,Users.RoleId,Users.UnitId,Users.IsPost,CASE WHEN Users.IsPost=1 THEN '是' ELSE '否' END AS IsPostName,Users.IdentityCard,Users.Telephone,Users.IsOffice,UnitCode,"
+ @"Roles.RoleName,Unit.UnitName,Unit.UnitCode"
+ @" From dbo.Sys_User AS Users"
+ @" LEFT JOIN Sys_Role AS Roles ON Roles.RoleId=Users.RoleId"
+ @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Users.UnitId"
+ @" LEFT JOIN Base_Depart AS Depart ON Depart.DepartId=Users.DepartId"
+ @" WHERE Users.UserId !='" + Const.sysglyId + "' AND Users.UserId !='" + Const.hfnbdId + "' AND Users.UserId !='" + Const.sedinId + "'";
string strSql = $@"SELECT Users.UserId,Users.Account,Users.UserCode,Users.Password,Users.UserName,Depart.DepartName,Users.RoleId,Users.UnitId,Users.IsPost,CASE WHEN Users.IsPost=1 THEN '是' ELSE '否' END AS IsPostName,Users.IdentityCard,Users.Telephone,Users.IsOffice,UnitCode,Unit.UnitName,Unit.UnitCode
,RoleName= STUFF(( SELECT ',' + RoleName FROM dbo.Sys_Role where PATINDEX('%,' + RTRIM(RoleId) + ',%',',' +Users.RoleId + ',')>0 FOR XML PATH('')), 1, 1,'')
From dbo.Sys_User AS Users
LEFT JOIN Sys_Role AS Roles ON Roles.RoleId=Users.RoleId
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Users.UnitId
LEFT JOIN Base_Depart AS Depart ON Depart.DepartId=Users.DepartId
WHERE Users.UserId !='{Const.sysglyId}' AND Users.UserId !='{Const.hfnbdId}'";
List<SqlParameter> listStr = new List<SqlParameter>();
//strSql += " AND Users.UnitId = @ThisUnitId";
//listStr.Add(new SqlParameter("@ThisUnitId", Const.UnitId_CWCEC));
@@ -328,94 +328,94 @@
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnImport1_Click(object sender, EventArgs e)
{
//同步项目
int total = 10;
int pageSize = 100;
int pageIndex = 0;
while (pageSize * pageIndex <= total)
{
string pushContent = string.Empty;
var dictTypeCode = new
{
criteria = new { _expr = new[] { new { _property = "isusedcode", _value = "0", _op = "=" } } },
pageSize = pageSize,
pageIndex = pageIndex
};
Hashtable newToken = new Hashtable
{
{ "userName", "nuobida_construction" },
{ "password", "nuobida@2023" },
{ "ClientId", "com.tcc.pm.sggl" },
{ "OperationCode", "com.tcc.dm.mdm.ee.basicinfo" }
};
pushContent = JsonConvert.SerializeObject(dictTypeCode);
string returndata = APIGetHttpService.OutsideHttp("https://esb.china-tcc.com:9090/com/tcc/dm/mdm/TCC_TM_EE_BASIC_INFO", "POST", "application/json;charset=utf-8", newToken, pushContent);
if (!string.IsNullOrEmpty(returndata))
{
JObject obj = JObject.Parse(returndata);
total = int.Parse(obj["total"].ToString());
string datas = obj["datas"].ToString();
JArray arr = JArray.Parse(datas);
foreach (var item in arr)
{
string full_name = item["full_name"].ToString();
string genderCode = item["gender_code"].ToString();
string idcard = item["idcard"].ToString();
string data_source_code = item["data_source_code"].ToString();
string hrp_personnel_unique_id = item["hrp_personnel_unique_id"].ToString();
string cellphone = item["cellphone"].ToString();
string domainAccount = item["domain_account"].ToString();
if (!string.IsNullOrEmpty(idcard))
{
var sysUser = Funs.DB.Sys_User.FirstOrDefault(x => x.IdentityCard == idcard );
if (sysUser != null)
{
sysUser.UserName = full_name;
sysUser.Telephone = cellphone;
sysUser.DomainAccount = domainAccount;
sysUser.Sex = genderCode;
{
//同步项目
int total = 10;
int pageSize = 100;
int pageIndex = 0;
while (pageSize * pageIndex <= total)
{
string pushContent = string.Empty;
var dictTypeCode = new
{
criteria = new { _expr = new[] { new { _property = "isusedcode", _value = "0", _op = "=" } } },
pageSize = pageSize,
pageIndex = pageIndex
};
Hashtable newToken = new Hashtable
{
{ "userName", "nuobida_construction" },
{ "password", "nuobida@2023" },
{ "ClientId", "com.tcc.pm.sggl" },
{ "OperationCode", "com.tcc.dm.mdm.ee.basicinfo" }
};
pushContent = JsonConvert.SerializeObject(dictTypeCode);
string returndata = APIGetHttpService.OutsideHttp("https://esb.china-tcc.com:9090/com/tcc/dm/mdm/TCC_TM_EE_BASIC_INFO", "POST", "application/json;charset=utf-8", newToken, pushContent);
if (!string.IsNullOrEmpty(returndata))
{
JObject obj = JObject.Parse(returndata);
total = int.Parse(obj["total"].ToString());
string datas = obj["datas"].ToString();
JArray arr = JArray.Parse(datas);
foreach (var item in arr)
{
string full_name = item["full_name"].ToString();
string genderCode = item["gender_code"].ToString();
string idcard = item["idcard"].ToString();
string data_source_code = item["data_source_code"].ToString();
string hrp_personnel_unique_id = item["hrp_personnel_unique_id"].ToString();
string cellphone = item["cellphone"].ToString();
string domainAccount = item["domain_account"].ToString();
//sysUser.DataSource = "数据同步";
Funs.DB.SubmitChanges();
}
else
{
sysUser = new Model.Sys_User
{
UserId = SQLHelper.GetNewID(),
};
sysUser.UnitId = BLL.Const.UnitId_XJYJ;
sysUser.UserCode = domainAccount;
sysUser.UserName = full_name;
sysUser.Telephone = cellphone;
sysUser.IdentityCard = idcard;
sysUser.Account = domainAccount;
sysUser.DomainAccount = domainAccount;
sysUser.Password = Funs.EncryptionPassword(BLL.Const.Password);
sysUser.RawPassword = BLL.Const.Password;
sysUser.IsPost = true;
sysUser.DataSource = "数据同步";
Funs.DB.Sys_User.InsertOnSubmit(sysUser);
Funs.DB.SubmitChanges();
}
}
}
if (!string.IsNullOrEmpty(idcard))
{
var sysUser = Funs.DB.Sys_User.FirstOrDefault(x => x.IdentityCard == idcard);
if (sysUser != null)
{
sysUser.UserName = full_name;
sysUser.Telephone = cellphone;
sysUser.DomainAccount = domainAccount;
sysUser.Sex = genderCode;
}
pageIndex++;
}
//sysUser.DataSource = "数据同步";
Funs.DB.SubmitChanges();
}
else
{
sysUser = new Model.Sys_User
{
UserId = SQLHelper.GetNewID(),
};
sysUser.UnitId = BLL.Const.UnitId_XJYJ;
sysUser.UserCode = domainAccount;
sysUser.UserName = full_name;
sysUser.Telephone = cellphone;
sysUser.IdentityCard = idcard;
sysUser.Account = domainAccount;
sysUser.DomainAccount = domainAccount;
sysUser.Password = Funs.EncryptionPassword(BLL.Const.Password);
sysUser.RawPassword = BLL.Const.Password;
sysUser.IsPost = true;
sysUser.DataSource = "数据同步";
Funs.DB.Sys_User.InsertOnSubmit(sysUser);
Funs.DB.SubmitChanges();
}
}
}
BindGrid();
}
}
pageIndex++;
}
/// <summary>
/// 关闭导入弹出窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window2_Close(object sender, WindowCloseEventArgs e)
BindGrid();
}
/// <summary>
/// 关闭导入弹出窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window2_Close(object sender, WindowCloseEventArgs e)
{
BindGrid();
}
+26 -26
View File
@@ -14,19 +14,19 @@
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtUserCode" runat="server" Label="员工编号" MaxLength="20" LabelWidth="90px">
<f:TextBox ID="txtUserCode" runat="server" Label="员工编号" MaxLength="20" LabelWidth="90px">
</f:TextBox>
<f:TextBox ID="txtUserName" runat="server" Label="姓名" Required="true" ShowRedStar="true" MaxLength="20"
FocusOnPageLoad="true" LabelWidth="90px">
</f:TextBox>
<f:TextBox ID="txtAccount" runat="server" Label="登录账号" Required="true" ShowRedStar="true" MaxLength="50"
LabelWidth="90px">
<f:TextBox ID="txtAccount" runat="server" Label="登录账号" Required="true" ShowRedStar="true" MaxLength="50"
LabelWidth="90px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpUnit" runat="server" Label="单位" EnableEdit="true" ForceSelection="false"
<f:DropDownList ID="drpUnit" runat="server" Label="单位" EnableEdit="true" ForceSelection="false"
Required="true" ShowRedStar="true" LabelWidth="90px">
</f:DropDownList>
<f:TextBox ID="txtIdentityCard" runat="server" Label="身份证号" MaxLength="50" ShowRedStar="true" Required="true"
@@ -37,50 +37,50 @@
</Items>
</f:FormRow>
<f:FormRow runat="server" ID="trServer">
<Items>
<Items>
<f:DropDownList ID="drpDepart" runat="server" Label="部门" ShowRedStar="true" Required="true"
EnableEdit="true" ForceSelection="false" LabelWidth="90px">
</f:DropDownList>
<f:DropDownList ID="drpIsOffice" runat="server" Label="本部人员"
<f:DropDownList ID="drpIsOffice" runat="server" Label="本部人员"
EnableEdit="true" ForceSelection="false" LabelWidth="90px">
</f:DropDownList>
<f:DropDownList ID="drpRole" runat="server" Label="本部角色" EnableEdit="true" ForceSelection="false" LabelWidth="90px">
<f:DropDownList ID="drpRole" runat="server" Label="本部角色" EmptyText="请选择" AutoSelectFirstItem="false" EnableCheckBoxSelect="true" EnableEdit="true" EnableMultiSelect="true" ForceSelection="false" LabelWidth="90px">
</f:DropDownList>
</Items>
</f:FormRow>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpIsPost" runat="server" Label="在岗" EnableEdit="true" ForceSelection="false"
<f:DropDownList ID="drpIsPost" runat="server" Label="在岗" EnableEdit="true" ForceSelection="false"
Required="true" ShowRedStar="true" LabelWidth="90px">
</f:DropDownList>
<f:Image ID="Image2" ImageUrl="~/res/images/Signature0.png" runat="server" ImageHeight="35px" ImageWidth="90px"
BoxFlex="1" Label="签名" LabelWidth="90px">
</f:Image>
<f:FileUpload runat="server" ID="fileSignature" EmptyText="请选择"
OnFileSelected="btnSignature_Click" AutoPostBack="true" Width="150px" LabelWidth="90px">
</f:FileUpload>
<f:Image ID="Image2" ImageUrl="~/res/images/Signature0.png" runat="server" ImageHeight="35px" ImageWidth="90px"
BoxFlex="1" Label="签名" LabelWidth="90px">
</f:Image>
<f:FileUpload runat="server" ID="fileSignature" EmptyText="请选择"
OnFileSelected="btnSignature_Click" AutoPostBack="true" Width="150px" LabelWidth="90px">
</f:FileUpload>
</Items>
</f:FormRow>
</f:FormRow>
<f:FormRow runat="server">
<Items>
<f:DropDownList ID="drpMainCNProfessional" runat="server" Label="主专业" EnableEdit="true" LabelWidth="90px">
<Items>
<f:DropDownList ID="drpMainCNProfessional" runat="server" Label="主专业" EnableEdit="true" LabelWidth="90px">
</f:DropDownList>
<f:DropDownList ID="drpViceCNProfessional" runat="server" Label="副专业" EnableEdit="true"
EnableMultiSelect="true" MaxLength="500" EnableCheckBoxSelect="true">
</f:DropDownList>
<f:DropDownList ID="drpViceCNProfessional" runat="server" Label="副专业" EnableEdit="true"
EnableMultiSelect="true" MaxLength="500" EnableCheckBoxSelect="true">
</f:DropDownList>
<f:RadioButtonList runat="server" ID="rblHomePageType" Label="首页加载">
<f:RadioItem Text="施工管理" Value="1" Selected="true" />
<f:RadioItem Text="QHSE" Value="2" />
</f:RadioButtonList>
</Items>
</f:FormRow>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnArrowRefresh" Text="重置密码" Icon="ArrowRefresh" ConfirmText="确定恢复当前用户原始密码?" OnClick="btnArrowRefresh_Click"
runat="server" Hidden="true">
</f:Button>
<f:Button ID="btnArrowRefresh" Text="重置密码" Icon="ArrowRefresh" ConfirmText="确定恢复当前用户原始密码?" OnClick="btnArrowRefresh_Click"
runat="server" Hidden="true">
</f:Button>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1" Hidden="true"
OnClick="btnSave_Click">
@@ -90,7 +90,7 @@
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
</f:Form>
<f:Window ID="Window1" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="500px">
@@ -5,6 +5,7 @@ using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using FineUIPro.Web.ProjectData;
namespace FineUIPro.Web.SysManage
{
@@ -78,7 +79,7 @@ namespace FineUIPro.Web.SysManage
DepartService.InitDepartDropDownList(this.drpDepart, true);
CNProfessionalService.InitCNProfessionalDownList(this.drpMainCNProfessional, true);
CNProfessionalService.InitCNProfessionalDownList(this.drpViceCNProfessional, true);
if (!string.IsNullOrEmpty(this.UnitId))
if (!string.IsNullOrWhiteSpace(this.UnitId))
{
this.drpIsOffice.SelectedValue = "False";
}
@@ -88,22 +89,22 @@ namespace FineUIPro.Web.SysManage
this.drpUnit.Enabled = false;
}
///角色下拉框
BLL.RoleService.InitRoleDropDownList(this.drpRole, string.Empty, true, true);
if (!string.IsNullOrEmpty(this.UserId))
BLL.RoleService.InitRoleDropDownList(this.drpRole, string.Empty, true, false);
if (!string.IsNullOrWhiteSpace(this.UserId))
{
var user = BLL.UserService.GetUserByUserId(this.UserId);
if (user != null)
{
if (!string.IsNullOrEmpty(user.UnitId))
if (!string.IsNullOrWhiteSpace(user.UnitId))
{
this.drpUnit.SelectedValue = user.UnitId;
}
this.txtUserCode.Text = user.UserCode;
this.txtUserName.Text = user.UserName;
this.txtAccount.Text = user.Account;
if (!string.IsNullOrEmpty(user.RoleId))
if (!string.IsNullOrWhiteSpace(user.RoleId))
{
this.drpRole.SelectedValue = user.RoleId;
this.drpRole.SelectedValueArray = user.RoleId.Split(',');
}
if (user.IsPost.HasValue)
{
@@ -119,21 +120,21 @@ namespace FineUIPro.Web.SysManage
this.drpIsOffice.SelectedValue = "False";
}
this.txtIdentityCard.Text = user.IdentityCard;
if (!string.IsNullOrEmpty(user.SignatureUrl))
if (!string.IsNullOrWhiteSpace(user.SignatureUrl))
{
this.SignatureUrl = user.SignatureUrl;
this.Image2.ImageUrl = "~/" + this.SignatureUrl;
}
this.drpDepart.SelectedValue = user.DepartId;
if (!string.IsNullOrEmpty(user.MainCNProfessionalId))
if (!string.IsNullOrWhiteSpace(user.MainCNProfessionalId))
{
this.drpMainCNProfessional.SelectedValue = user.MainCNProfessionalId;
}
if (!string.IsNullOrEmpty(user.ViceCNProfessionalId))
if (!string.IsNullOrWhiteSpace(user.ViceCNProfessionalId))
{
this.drpViceCNProfessional.SelectedValueArray = user.ViceCNProfessionalId.Split(',');
}
if (!string.IsNullOrEmpty(user.HomePageType))
if (!string.IsNullOrWhiteSpace(user.HomePageType))
{
this.rblHomePageType.SelectedValue = user.HomePageType;
}
@@ -174,7 +175,7 @@ namespace FineUIPro.Web.SysManage
Alert.ShowInParent("输入的账号已存在!", MessageBoxIcon.Warning);
return;
}
if (!string.IsNullOrEmpty(this.txtUserCode.Text))
if (!string.IsNullOrWhiteSpace(this.txtUserCode.Text))
{
var q2 = Funs.DB.Sys_User.FirstOrDefault(x => x.UserCode == this.txtUserCode.Text.Trim() && (x.UserId != this.UserId || (this.UserId == null && x.UserId != null)));
if (q2 != null)
@@ -184,7 +185,7 @@ namespace FineUIPro.Web.SysManage
}
}
if (!string.IsNullOrEmpty(this.txtIdentityCard.Text) && BLL.UserService.IsExistUserIdentityCard(this.UserId, this.txtIdentityCard.Text.Trim()) == true)
if (!string.IsNullOrWhiteSpace(this.txtIdentityCard.Text) && BLL.UserService.IsExistUserIdentityCard(this.UserId, this.txtIdentityCard.Text.Trim()) == true)
{
Alert.ShowInParent("输入的身份证号码已存在!", MessageBoxIcon.Warning);
return;
@@ -206,9 +207,26 @@ namespace FineUIPro.Web.SysManage
{
newUser.UnitId = this.CurrUser.UnitId;
}
if (this.drpRole.SelectedValue != Const._Null)
//if (!string.IsNullOrWhiteSpace(this.drpRole.SelectedValue))
//{
// newUser.RoleId = this.drpRole.SelectedValue;
//}
///角色
string roleIds = string.Empty;
foreach (var item in this.drpRole.SelectedValueArray)
{
newUser.RoleId = this.drpRole.SelectedValue;
var role = BLL.RoleService.GetRoleByRoleId(item);
if (role != null)
{
if (string.IsNullOrWhiteSpace(newUser.RoleId))
{
newUser.RoleId = role.RoleId;
}
else
{
newUser.RoleId += "," + role.RoleId;
}
}
}
if (this.drpDepart.SelectedValue != Const._Null)
{
@@ -227,7 +245,7 @@ namespace FineUIPro.Web.SysManage
var cn = BLL.CNProfessionalService.GetCNProfessional(item);
if (cn != null)
{
if (string.IsNullOrEmpty(newUser.ViceCNProfessionalId))
if (string.IsNullOrWhiteSpace(newUser.ViceCNProfessionalId))
{
newUser.ViceCNProfessionalId = cn.CNProfessionalId;
}
@@ -238,11 +256,11 @@ namespace FineUIPro.Web.SysManage
}
}
newUser.HomePageType = this.rblHomePageType.SelectedValue;
if (string.IsNullOrEmpty(this.UserId))
if (string.IsNullOrWhiteSpace(this.UserId))
{
newUser.RawPassword = UserService.getInitialPassword(newUser.UnitId, newUser.IdentityCard); ;
newUser.Password = Funs.EncryptionPassword(newUser.RawPassword);
newUser.UserId = SQLHelper.GetNewID(typeof(Model.Sys_User));
newUser.DataSources = this.CurrUser.LoginProjectId;
UserService.AddUser(newUser);
@@ -265,7 +283,7 @@ namespace FineUIPro.Web.SysManage
/// <returns></returns>
private void GetButtonPower()
{
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
if (!string.IsNullOrWhiteSpace(this.CurrUser.LoginProjectId))
{
this.btnSave.Hidden = false;
}
@@ -331,7 +349,7 @@ namespace FineUIPro.Web.SysManage
/// <param name="e"></param>
protected void btnArrowRefresh_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.UserId))
if (!string.IsNullOrWhiteSpace(this.UserId))
{
BLL.UserService.UpdatePassword(this.UserId);
ShowNotify("密码已重置为原始密码!", MessageBoxIcon.Success);