1、单位数据清理合并功能;

2、单位新增编辑功能调整,补充英文名称等;
3、建筑企业单位资质字典;
This commit is contained in:
2025-09-02 10:48:28 +08:00
parent ce304ec7d9
commit 6ccc14a8be
54 changed files with 3964 additions and 2471 deletions
+100 -90
View File
@@ -9,104 +9,114 @@
.f-grid-row .f-grid-cell-inner {
white-space: normal;
word-break: break-all;
}
}
</style>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" EnableCollapse="true" ShowHeader="false"
runat="server" BoxFlex="1" DataKeyNames="UnitId" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="UnitId" AllowSorting="true" SortField="UnitCode"
SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
PageSize="10" 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="txtUnitName" 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>
<f:Button ID="btnImport" ToolTip="导入" Icon="ApplicationGet" Hidden="true" runat="server"
OnClick="btnImport_Click">
</f:Button>
<f:Button ID="btnDataBase" ToolTip="数据清理" Icon="DatabaseWrench" runat="server" Hidden="true" OnClick="btnDataBase_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="110px" ColumnID="UnitCode" DataField="UnitCode" SortField="UnitCode"
FieldType="String" HeaderText="单位代码" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="240px" ColumnID="UnitName" DataField="UnitName" TextAlign="Left"
SortField="UnitName" FieldType="String" HeaderText="名称" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="UnitTypeName" DataField="UnitTypeName" SortField="UnitTypeName"
FieldType="String" HeaderText="类型" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="250px" ColumnID="Address" DataField="Address"
FieldType="String" HeaderText="地址" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="Telephone" DataField="Telephone"
FieldType="String" HeaderText="电话" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<%-- <f:CheckBoxField Width="75px" RenderAsStaticField="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" EnableCollapse="true" ShowHeader="false"
runat="server" BoxFlex="1" DataKeyNames="UnitId" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="UnitId" AllowSorting="true" SortField="UnitCode"
SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
PageSize="10" 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="txtUnitName" EmptyText="输入单位编码、单位名称、简称"
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="420px" 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>
<f:Button ID="btnImport" ToolTip="导入" Icon="ApplicationGet" Hidden="true" runat="server"
OnClick="btnImport_Click">
</f:Button>
<f:Button ID="btnDataBase" ToolTip="数据清理" Icon="DatabaseWrench" runat="server" Hidden="true" OnClick="btnDataBase_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="110px" ColumnID="UnitCode" DataField="UnitCode" SortField="UnitCode"
FieldType="String" HeaderText="单位代码" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="240px" ColumnID="UnitName" DataField="UnitName" TextAlign="Left"
SortField="UnitName" FieldType="String" HeaderText="单位中文名称" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="240px" ColumnID="UnitEnName" DataField="UnitEnName" TextAlign="Left"
SortField="UnitEnName" FieldType="String" HeaderText="单位英文名称" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="ShortUnitName" DataField="ShortUnitName" TextAlign="Left"
SortField="ShortUnitName" FieldType="String" HeaderText="单位简称" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="UnitTypeName" DataField="UnitTypeName" SortField="UnitTypeName"
FieldType="String" HeaderText="类型" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="160px" ColumnID="CollCropCode" DataField="CollCropCode" SortField="CollCropCode"
FieldType="String" HeaderText="信用代码" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
</f:RenderField>
<f:RenderField Width="250px" ColumnID="Address" DataField="Address"
FieldType="String" HeaderText="地址" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="Telephone" DataField="Telephone"
FieldType="String" HeaderText="电话" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<%-- <f:CheckBoxField Width="75px" RenderAsStaticField="true"
TextAlign="Center" DataField="IsBranch" HeaderText="分公司" />
<f:RenderField Width="230px" ColumnID="supUnitName" DataField="supUnitName" TextAlign="Left"
SortField="supUnitName" FieldType="String" HeaderText="上级单位" HeaderTextAlign="Center">
</f:RenderField>--%>
<f:WindowField ColumnID="SubUnit" Width="70px" WindowID="WindowSubUnit" HeaderText="资质"
Text="详细" ToolTip="资质详细信息" DataTextFormatString="{0}" DataIFrameUrlFields="UnitId"
DataIFrameUrlFormatString="../HSSE/QualityAudit/SubUnitQualityEdit.aspx?UnitId={0}"/>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="设置" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true"
Width="1000px" Height="570px">
</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="1200px" Height="600px">
</f:Window>
<f:Window ID="WindowSubUnit" Title="资质" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true"
Width="1024px" Height="520px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true" Hidden="true"
runat="server" Text="编辑" Icon="Pencil">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true" Hidden="true"
ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server" Text="删除" Icon="Delete">
</f:MenuButton>
</f:Menu>
<f:WindowField ColumnID="SubUnit" Width="70px" WindowID="WindowSubUnit" HeaderText="资质"
Text="详细" ToolTip="资质详细信息" DataTextFormatString="{0}" DataIFrameUrlFields="UnitId"
DataIFrameUrlFormatString="../HSSE/QualityAudit/SubUnitQualityEdit.aspx?UnitId={0}" />
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="单位" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true"
Width="1000px" Height="570px">
</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="1200px" Height="600px">
</f:Window>
<f:Window ID="WindowSubUnit" Title="资质" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true"
Width="1024px" Height="520px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true" Hidden="true"
runat="server" Text="编辑" Icon="Pencil">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true" Hidden="true"
ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server" Text="删除" Icon="Delete">
</f:MenuButton>
</f:Menu>
</form>
<script type="text/jscript">
var menuID = '<%= Menu1.ClientID %>';
+6 -6
View File
@@ -32,7 +32,7 @@ namespace FineUIPro.Web.SysManage
/// </summary>
private void BindGrid()
{
string strSql = @"SELECT Unit.UnitId,Unit.UnitCode,Unit.UnitName,Unit.ProjectRange,Unit.Corporate,Unit.Address,Unit.Telephone,Unit.Fax,Unit.EMail,UnitType.UnitTypeId,UnitType.UnitTypeCode,UnitType.UnitTypeName,Unit.IsBranch,supUnit.UnitName AS supUnitName"
string strSql = @"SELECT Unit.UnitId,Unit.UnitCode,Unit.UnitName,Unit.UnitEnName,Unit.ShortUnitName,Unit.CollCropCode,Unit.ProjectRange,Unit.Corporate,Unit.Address,Unit.Telephone,Unit.Fax,Unit.EMail,UnitType.UnitTypeId,UnitType.UnitTypeCode,UnitType.UnitTypeName,Unit.IsBranch,supUnit.UnitName AS supUnitName"
+ @" From dbo.Base_Unit AS Unit "
+ @" LEFT JOIN Base_UnitType AS UnitType ON UnitType.UnitTypeId=Unit.UnitTypeId"
+ @" LEFT JOIN Base_Unit AS supUnit ON Unit.SupUnitId=supUnit.UnitId"
@@ -40,7 +40,7 @@ namespace FineUIPro.Web.SysManage
List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.txtUnitName.Text.Trim()))
{
strSql += " AND Unit.UnitName LIKE @UnitName";
strSql += " AND (Unit.UnitCode LIKE @UnitName or Unit.UnitName LIKE @UnitName or Unit.UnitEnName LIKE @UnitName or Unit.ShortUnitName LIKE @UnitName)";
listStr.Add(new SqlParameter("@UnitName", "%" + this.txtUnitName.Text.Trim() + "%"));
}
SqlParameter[] parameter = listStr.ToArray();
@@ -93,10 +93,10 @@ namespace FineUIPro.Web.SysManage
}
}
//if (this.CurrUser.UserId == Const.sysglyId || this.CurrUser.UserId == Const.hfnbdId || this.CurrUser.UserId == Const.fuweiId || this.CurrUser.UserId == Const.shenyinhangId)
//{//系统管理员、合肥诺必达、付伟、申银行
this.btnDataBase.Hidden = false;
//}
if (this.CurrUser.UserId == Const.sysglyId || this.CurrUser.UserId == Const.hfnbdId || this.CurrUser.UserId == Const.fuweiId || this.CurrUser.UserId == Const.shenyinhangId)
{//系统管理员、合肥诺必达、付伟、申银行
this.btnDataBase.Hidden = false;
}
}
#endregion
@@ -5,6 +5,13 @@
<head runat="server">
<title>单位清理合并</title>
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.customlabel span {
margin-left: 140px;
color: red;
font-weight: bold;
}
</style>
</head>
<body>
<form id="form1" runat="server">
@@ -14,18 +21,7 @@
<Rows>
<f:FormRow>
<Items>
<f:DropDownList ID="drpUnitId" runat="server" Label="合并后单位" EnableEdit="true" ForceSelection="false" Required="true" ShowRedStar="true">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpMergeUnitId" runat="server" Label="需要合并的单位" EnableEdit="true" ForceSelection="false" Required="true" ShowRedStar="true">
</f:DropDownList>
</Items>
<%--<Items>
<f:DropDownBox runat="server" ID="drpMergeUnitBox" AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Label="需要合并的单位" EmptyText="请从下拉表格中选择需要合并的单位" DataControlID="Grid2"
<f:DropDownBox runat="server" ID="drpUnitBox" AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Label="合并后单位" EmptyText="请从下拉表格中选择合并后的单位" DataControlID="Grid1"
EnableMultiSelect="false" MatchFieldWidth="false" Required="true" ShowRedStar="true">
<PopPanel>
<f:Panel ID="Panel1" runat="server" BodyPadding="10px" Width="820px" Height="420px" Hidden="true"
@@ -35,18 +31,62 @@
<Rows>
<f:FormRow>
<Items>
<f:TwinTriggerBox Width="200px" runat="server" EmptyText="按单位代码、名称查找" ShowLabel="false" ID="ttbPmpProCodeSearch"
ShowTrigger1="false" OnTrigger1Click="ttbPmpProCodeSearch_Trigger1Click" OnTrigger2Click="ttbPmpProCodeSearch_Trigger2Click" Trigger1Icon="Clear" Trigger2Icon="Search">
<f:TwinTriggerBox Width="200px" runat="server" EmptyText="按单位代码、名称查找" ShowLabel="false" ID="ttbUnitNameCodeSearch"
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" ShowTrigger1="false" OnTrigger1Click="ttbUnitNameCodeSearch_Trigger1Click" OnTrigger2Click="ttbUnitNameCodeSearch_Trigger2Click" Trigger1Icon="Clear" Trigger2Icon="Search">
</f:TwinTriggerBox>
</Items>
</f:FormRow>
</Rows>
</f:Form>
<f:Grid ID="Grid2" BoxFlex="1" DataKeyNames="Name"
DataIDField="Name" DataTextField="Name" EnableMultiSelect="false"
<f:Grid ID="Grid1" BoxFlex="1" DataKeyNames="UnitId"
DataIDField="UnitId" DataTextField="UnitName" EnableMultiSelect="false"
PageSize="50" ShowBorder="true" ShowHeader="false"
AllowPaging="true" IsDatabasePaging="true" OnPageIndexChange="Grid1_PageIndexChange" runat="server" EnableCheckBoxSelect="true"
AllowSorting="false" SortField="UnitName" SortDirection="ASC"
OnSort="Grid1_Sort">
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="50px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="true">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:BoundField ExpandUnusedSpace="true" Width="120px" DataField="UnitCode" HeaderText="单位代码" />
<f:BoundField ExpandUnusedSpace="true" Width="280px" DataField="UnitName" HeaderText="单位名称" />
<f:BoundField ExpandUnusedSpace="true" Width="180px" DataField="ShortUnitName" HeaderText="单位简称" />
<f:BoundField ExpandUnusedSpace="true" Width="120px" DataField="UnitTypeName" HeaderText="类型" />
</Columns>
</f:Grid>
</Items>
</f:Panel>
</PopPanel>
</f:DropDownBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownBox runat="server" ID="drpMergeUnitBox" Label="需要合并的单位" EmptyText="请从下拉表格中选择需要合并的单位" DataControlID="Grid2"
EnableMultiSelect="true" MatchFieldWidth="false" Required="true" ShowRedStar="true">
<PopPanel>
<f:Panel ID="Panel2" runat="server" BodyPadding="10px" Width="820px" Height="420px" Hidden="true"
ShowBorder="true" ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Form ID="Form3" ShowBorder="False" ShowHeader="False" runat="server">
<Rows>
<f:FormRow>
<Items>
<f:TwinTriggerBox Width="200px" runat="server" EmptyText="按单位编码、名称查找" ShowLabel="false" ID="ttbMergeUnitNameCodeSearch"
AutoPostBack="true" OnTextChanged="MergeTextBox_TextChanged" ShowTrigger1="false" OnTrigger1Click="ttbMergeUnitNameCodeSearch_Trigger1Click" OnTrigger2Click="ttbMergeUnitNameCodeSearch_Trigger2Click" Trigger1Icon="Clear" Trigger2Icon="Search">
</f:TwinTriggerBox>
</Items>
</f:FormRow>
</Rows>
</f:Form>
<f:Grid ID="Grid2" BoxFlex="1" DataKeyNames="UnitId"
DataIDField="UnitId" DataTextField="UnitName" EnableMultiSelect="true"
PageSize="50" ShowBorder="true" ShowHeader="false"
AllowPaging="true" IsDatabasePaging="true" OnPageIndexChange="Grid2_PageIndexChange" runat="server" EnableCheckBoxSelect="true"
AllowSorting="false" SortField="StNum" SortDirection="DESC"
AllowSorting="false" SortField="UnitName" SortDirection="ASC"
OnSort="Grid2_Sort">
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="50px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
@@ -55,16 +95,17 @@
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid2.PageIndex * Grid2.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:BoundField Width="80px" DataField="StNum" HeaderText="项目编号" />
<f:BoundField ExpandUnusedSpace="true" MinWidth="200px" DataField="Name" HeaderText="项目名称" />
<f:BoundField ExpandUnusedSpace="true" MinWidth="200px" DataField="Address" HeaderText="地址" />
<f:BoundField ExpandUnusedSpace="true" Width="120px" DataField="UnitCode" HeaderText="单位编码" />
<f:BoundField ExpandUnusedSpace="true" Width="280px" DataField="UnitName" HeaderText="单位名称" />
<f:BoundField ExpandUnusedSpace="true" Width="180px" DataField="ShortUnitName" HeaderText="单位简称" />
<f:BoundField ExpandUnusedSpace="true" Width="120px" DataField="UnitTypeName" HeaderText="类型" />
</Columns>
</f:Grid>
</Items>
</f:Panel>
</PopPanel>
</f:DropDownBox>
</Items>--%>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
@@ -74,7 +115,22 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:Label ID="Label4" runat="server" Text="请谨慎操作,合并后数据无法恢复!!!"></f:Label>
<f:Label ID="Label2" runat="server" Text="注:" CssClass="customlabel"></f:Label>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Label ID="Label3" runat="server" Text="1、请谨慎操作,合并后数据无法恢复;" CssClass="customlabel"></f:Label>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Label ID="Label4" runat="server" Text="2、建议在系统使用低峰时期合并项目单位数据;" CssClass="customlabel"></f:Label>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Label ID="Label5" runat="server" Text="3、数据合并过程缓慢,请勿关闭此界面,请耐心等待。" CssClass="customlabel"></f:Label>
</Items>
</f:FormRow>
</Rows>
@@ -3,6 +3,11 @@ using System.Linq;
using System.Web.UI.WebControls;
using BLL;
using NPOI.Util;
using System.Collections.Generic;
using System.Data;
using FineUIPro.Web.DataShow;
using System.Data.SqlClient;
using System.Threading;
namespace FineUIPro.Web.SysManage
{
@@ -16,12 +21,170 @@ namespace FineUIPro.Web.SysManage
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
////权限按钮方法
this.GetButtonPower();
//
BLL.UnitService.InitAllUnitDownList(this.drpUnitId, false);
BLL.UnitService.InitAllUnitDownList(this.drpMergeUnitId, false);
BindGrid();
BindGrid2();
}
}
#region
/// <summary>
/// 加载合并后的单位
/// </summary>
private void BindGrid()
{
var list = (from x in Funs.DB.Base_Unit
join y in Funs.DB.Base_UnitType on x.UnitTypeId equals y.UnitTypeId into yGroup
from y in yGroup.DefaultIfEmpty()
orderby x.UnitName descending
select new
{
x.UnitId,
x.UnitCode,
x.UnitName,
x.ShortUnitName,
y.UnitTypeName
}).ToList();
string codeName = ttbUnitNameCodeSearch.Text.Trim();
if (!string.IsNullOrWhiteSpace(codeName))
{
//list = list.Where(x => !string.IsNullOrWhiteSpace(x.UnitCode) && !string.IsNullOrWhiteSpace(x.UnitName)).ToList();
list = list.Where(x => (!string.IsNullOrWhiteSpace(x.UnitCode) && x.UnitCode.Contains(codeName)) || (!string.IsNullOrWhiteSpace(x.UnitName) && x.UnitName.Contains(codeName)) || (!string.IsNullOrWhiteSpace(x.ShortUnitName) && x.ShortUnitName.Contains(codeName))).ToList();
}
// 1.设置总项数(特别注意:数据库分页一定要设置总记录数RecordCount
Grid1.RecordCount = list.Count();
// 2.获取当前分页数据
DataTable table = Funs.LINQToDataTable(list);
// 3.绑定到Grid
//Grid1.DataSource = table;
Grid1.DataSource = this.GetPagedDataTable(Grid1, table);
Grid1.DataBind();
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
protected void Grid1_Sort(object sender, GridSortEventArgs e)
{
BindGrid();
}
protected void ttbUnitNameCodeSearch_Trigger1Click(object sender, EventArgs e)
{
ttbUnitNameCodeSearch.Text = string.Empty;
ttbUnitNameCodeSearch.ShowTrigger1 = false;
BindGrid();
}
protected void ttbUnitNameCodeSearch_Trigger2Click(object sender, EventArgs e)
{
ttbUnitNameCodeSearch.ShowTrigger1 = true;
BindGrid();
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void TextBox_TextChanged(object sender, EventArgs e)
{
BindGrid();
}
#endregion
#region
/// <summary>
/// 加载需要合并的单位
/// </summary>
private void BindGrid2()
{
var list = (from x in Funs.DB.Base_Unit
join y in Funs.DB.Base_UnitType on x.UnitTypeId equals y.UnitTypeId into yGroup
from y in yGroup.DefaultIfEmpty()
where x.UnitId != Const.UnitId_CWCEC && x.UnitId != Const.UnitId_Con
orderby x.UnitName descending
select new
{
x.UnitId,
x.UnitCode,
x.UnitName,
x.ShortUnitName,
y.UnitTypeName
}).ToList();
//string unitId = this.drpUnitId.SelectedValue;
string unitId = this.drpUnitBox.Value;
if (!string.IsNullOrWhiteSpace(unitId))
{
list = list.Where(x => x.UnitId != unitId).ToList();
}
string codeName = ttbMergeUnitNameCodeSearch.Text.Trim();
if (!string.IsNullOrWhiteSpace(codeName))
{
//list = list.Where(x => !string.IsNullOrWhiteSpace(x.UnitCode) && !string.IsNullOrWhiteSpace(x.UnitName)).ToList();
list = list.Where(x => (!string.IsNullOrWhiteSpace(x.UnitCode) && x.UnitCode.Contains(codeName)) || (!string.IsNullOrWhiteSpace(x.UnitName) && x.UnitName.Contains(codeName)) || (!string.IsNullOrWhiteSpace(x.ShortUnitName) && x.ShortUnitName.Contains(codeName))).ToList();
}
// 1.设置总项数(特别注意:数据库分页一定要设置总记录数RecordCount
Grid2.RecordCount = list.Count();
// 2.获取当前分页数据
DataTable table = Funs.LINQToDataTable(list);
// 3.绑定到Grid
//Grid2.DataSource = table;
Grid2.DataSource = this.GetPagedDataTable(Grid2, table);
Grid2.DataBind();
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid2_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid2();
}
protected void Grid2_Sort(object sender, GridSortEventArgs e)
{
BindGrid2();
}
protected void ttbMergeUnitNameCodeSearch_Trigger1Click(object sender, EventArgs e)
{
ttbMergeUnitNameCodeSearch.Text = string.Empty;
ttbMergeUnitNameCodeSearch.ShowTrigger1 = false;
BindGrid2();
}
protected void ttbMergeUnitNameCodeSearch_Trigger2Click(object sender, EventArgs e)
{
ttbMergeUnitNameCodeSearch.ShowTrigger1 = true;
BindGrid2();
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void MergeTextBox_TextChanged(object sender, EventArgs e)
{
BindGrid2();
}
#endregion
/// <summary>
/// 保存按钮
/// </summary>
@@ -29,25 +192,87 @@ namespace FineUIPro.Web.SysManage
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (this.drpUnitId.SelectedValue == Const._Null)
string unitId = string.Empty;
string unitMergeId = string.Empty;
string unitName = string.Empty;
string unitMergeName = string.Empty;
if (!string.IsNullOrWhiteSpace(this.drpUnitBox.Text))
{
unitId = this.drpUnitBox.Value.Trim();
unitName = this.drpUnitBox.Text;
}
else
{
Alert.ShowInParent("请选择合并后单位!", MessageBoxIcon.Warning);
return;
}
if (this.drpMergeUnitId.SelectedValue == Const._Null)
if (!string.IsNullOrWhiteSpace(this.drpMergeUnitBox.Text))
{
Alert.ShowInParent("需要合并的单位!", MessageBoxIcon.Warning);
unitMergeId = this.drpMergeUnitBox.Value.Trim();
unitMergeName = this.drpMergeUnitBox.Text;
if (unitMergeId == unitId)
{
Alert.ShowInParent("两个单位为同一个单位,无需合并!", MessageBoxIcon.Warning);
return;
}
}
else
{
Alert.ShowInParent("请选择需要合并的单位!", MessageBoxIcon.Warning);
return;
}
string unitId = this.drpUnitId.SelectedValue;
string unitMergeId = this.drpMergeUnitId.SelectedValue;
List<string> unitMergeIds = unitMergeId.Split(',').ToList();
unitMergeIds = unitMergeIds.Where(x => x != unitId).ToList();
//db.DataIdMove.DeleteAllOnSubmit();
Model.SGGLDB db = Funs.DB;
var clist = db.DataIdMove.Where(x => x.ColumType == "Unit" && x.NewIds == unitId).ToList();
db.DataIdMove.DeleteAllOnSubmit(clist);
db.SubmitChanges();
List<Model.DataIdMove> list = new List<Model.DataIdMove>();
foreach (var mergeId in unitMergeIds)
{
list.Add(new Model.DataIdMove { OldId = mergeId.Trim(), NewIds = unitId.Trim(), ColumType = "Unit" });
}
db.DataIdMove.InsertAllOnSubmit(list);
db.SubmitChanges();
string strSql = $"exec SP_DataIdMove 'Unit','{unitId}'";
BLL.SQLHelper.ExecutSql(strSql);
//SqlParameter[] parameters = {
// new SqlParameter("@colums", "Unit"),
// new SqlParameter("@returnVal", SqlDbType.Int)
//};
//BLL.SQLHelper.ExecuteNonQueryStoredProcedure("SP_DataIdMove", parameters);
//int succ = BLL.SQLHelper.ExecuteProcedure("SP_DataIdMove", parameters);
//Thread.Sleep(30000); // 等待30秒,30000毫秒等于30秒
string txtRemark = this.txtRemark.Text.Trim();
//BLL.LogService.AddSys_Log(this.CurrUser, unit.UnitCode, unit.UnitId, BLL.Const.UnitMenuId, Const.BtnAdd);
//其他数据表单位数据合并后,删除单位表冗余单位
foreach (var mergeId in unitMergeIds)
{
string uId = mergeId.Trim();
var unit = BLL.UnitService.GetUnitByUnitId(uId);
if (unit != null)
{
UnitService.DeleteUnitById(uId);
string op = $"单位合并清理后,{Const.BtnDelete};备注:{txtRemark}";
LogService.AddSys_Log(this.CurrUser, unit.UnitCode, unit.UnitId, Const.UnitMenuId, op);
}
}
db.DataIdMove.DeleteAllOnSubmit(list);
db.SubmitChanges();
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
#region
/// <summary>
+121 -4
View File
@@ -42,22 +42,112 @@ namespace FineUIPro.Web.SysManage
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// drpUnitId 控件。
/// drpUnitBox 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnitId;
protected global::FineUIPro.DropDownBox drpUnitBox;
/// <summary>
/// drpMergeUnitId 控件。
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpMergeUnitId;
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Form2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form Form2;
/// <summary>
/// ttbUnitNameCodeSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TwinTriggerBox ttbUnitNameCodeSearch;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label1;
/// <summary>
/// drpMergeUnitBox 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownBox drpMergeUnitBox;
/// <summary>
/// Panel2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel2;
/// <summary>
/// Form3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form Form3;
/// <summary>
/// ttbMergeUnitNameCodeSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TwinTriggerBox ttbMergeUnitNameCodeSearch;
/// <summary>
/// Grid2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid2;
/// <summary>
/// lblPageIndex 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblPageIndex;
/// <summary>
/// txtRemark 控件。
@@ -68,6 +158,24 @@ namespace FineUIPro.Web.SysManage
/// </remarks>
protected global::FineUIPro.TextArea txtRemark;
/// <summary>
/// Label2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label2;
/// <summary>
/// Label3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label3;
/// <summary>
/// Label4 控件。
/// </summary>
@@ -77,6 +185,15 @@ namespace FineUIPro.Web.SysManage
/// </remarks>
protected global::FineUIPro.Label Label4;
/// <summary>
/// Label5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label5;
/// <summary>
/// Toolbar1 控件。
/// </summary>
+111 -110
View File
@@ -8,116 +8,117 @@
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true" LabelWidth="140px"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtUnitCode" runat="server" Label="代码" Required="true"
MaxLength="100" ShowRedStar="true" FocusOnPageLoad="true" >
</f:TextBox>
<f:TextBox ID="txtUnitName" runat="server" Label="名称" Required="true"
MaxLength="200" ShowRedStar="true" >
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="ddlUnitTypeId" runat="server" Label="类型" EnableEdit="true"
ForceSelection="false">
</f:DropDownList>
<f:TextBox ID="txtCorporate" runat="server" Label="法人代表" MaxLength="100">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtTelephone" runat="server" Label="电话" MaxLength="20">
</f:TextBox>
<f:TextBox ID="txtEMail" runat="server" Label="邮箱" MaxLength="200">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtFax" runat="server" Label="传真" MaxLength="20">
</f:TextBox>
<f:TextBox ID="txtAddress" runat="server" Label="地址" MaxLength="500">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:RadioButtonList runat="server" ID="rblIsBranch" Label="分公司">
<f:RadioItem Value="true" Text="是" />
<f:RadioItem Value="false" Text="否" Selected="true" />
</f:RadioButtonList>
<f:TextBox ID="txtShortUnitName" runat="server" Label="单位简称" Required="true"
MaxLength="6" ShowRedStar="true" >
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:RadioButtonList runat="server" ID="rblIsChina" Label="是否中国企业">
<f:RadioItem Value="Y" Text="是" Selected="true"/>
<f:RadioItem Value="N" Text="否" />
</f:RadioButtonList>
<f:TextBox ID="txtCollCropCode" runat="server" Label="社会统一信用代码"
MaxLength="50" ShowRedStar="true" >
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtLinkName" runat="server" Label="联系人姓名"
MaxLength="50" >
</f:TextBox>
<f:DropDownList ID="drpIdcardType" runat="server" Label="联系人证件类型" EnableEdit="true"
>
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtIdcardNumber" runat="server" Label="联系人证件号"
MaxLength="50" >
</f:TextBox>
<f:TextBox ID="txtLinkMobile" runat="server" Label="联系人电话"
MaxLength="50" >
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtProjectRange" runat="server" Height="100px" Label="工程范围" MaxLength="1000">
</f:TextArea>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:RadioButtonList runat="server" ID="rblCollCropStatus" Label="是否黑名单企业">
<f:RadioItem Value="Y" Text="是" />
<f:RadioItem Value="N" Text="否" Selected="true" />
</f:RadioButtonList>
<f:Label runat="server"></f:Label>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" 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" AutoSizePanelID="SimpleForm1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true" LabelWidth="140px"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtUnitCode" runat="server" Label="单位代码" Required="true" EmptyText="4位大写字母"
MaxLength="100" ShowRedStar="true" FocusOnPageLoad="true">
</f:TextBox>
<f:TextBox ID="txtCollCropCode" runat="server" Label="社会统一信用代码" MaxLength="50">
<%--ShowRedStar="true" Required="true" --%>
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtUnitName" runat="server" Label="中文名称" Required="true" EmptyText="请输入单位中文名称"
MaxLength="200" ShowRedStar="true">
</f:TextBox>
<f:TextBox ID="txtShortUnitName" runat="server" Label="单位简称" Required="true" EmptyText="请输入单位简称(6个字以内)"
MaxLength="6" ShowRedStar="true">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtUnitEnName" runat="server" Label="英文名称" Required="true" EmptyText="请输入单位英文名称(支持中文拼音)"
MaxLength="200" ShowRedStar="true">
</f:TextBox>
<f:DropDownList ID="ddlUnitTypeId" runat="server" Label="类型" EnableEdit="true" ShowRedStar="true" Required="true"
ForceSelection="false">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtTelephone" runat="server" Label="电话" MaxLength="20">
</f:TextBox>
<f:TextBox ID="txtEMail" runat="server" Label="邮箱" MaxLength="200">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtFax" runat="server" Label="传真" MaxLength="20">
</f:TextBox>
<f:TextBox ID="txtAddress" runat="server" Label="地址" MaxLength="500">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:RadioButtonList runat="server" ID="rblIsBranch" Label="分公司">
<f:RadioItem Value="true" Text="是" />
<f:RadioItem Value="false" Text="否" Selected="true" />
</f:RadioButtonList>
<f:TextBox ID="txtCorporate" runat="server" Label="法人代表" MaxLength="100">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:RadioButtonList runat="server" ID="rblIsChina" Label="是否中国企业">
<f:RadioItem Value="Y" Text="是" Selected="true" />
<f:RadioItem Value="N" Text="否" />
</f:RadioButtonList>
<f:RadioButtonList runat="server" ID="rblCollCropStatus" Label="是否黑名单企业">
<f:RadioItem Value="Y" Text="是" />
<f:RadioItem Value="N" Text="否" Selected="true" />
</f:RadioButtonList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtLinkName" runat="server" Label="联系人姓名"
MaxLength="50">
</f:TextBox>
<f:DropDownList ID="drpIdcardType" runat="server" Label="联系人证件类型" EnableEdit="true">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtIdcardNumber" runat="server" Label="联系人证件号"
MaxLength="50">
</f:TextBox>
<f:TextBox ID="txtLinkMobile" runat="server" Label="联系人电话"
MaxLength="50">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtProjectRange" runat="server" Height="100px" Label="工程范围" MaxLength="1000">
</f:TextArea>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" 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>
+17 -8
View File
@@ -40,6 +40,7 @@ namespace FineUIPro.Web.SysManage
{
this.txtUnitCode.Text = unit.UnitCode;
this.txtUnitName.Text = unit.UnitName;
this.txtUnitEnName.Text = unit.UnitEnName;
if (!string.IsNullOrEmpty(unit.UnitTypeId))
{
this.ddlUnitTypeId.SelectedValue = unit.UnitTypeId;
@@ -85,7 +86,12 @@ namespace FineUIPro.Web.SysManage
{
if (BLL.UnitService.IsExitUnitByUnitName(this.UnitId, this.txtUnitName.Text.Trim()))
{
Alert.ShowInTop("单位名称已存在!", MessageBoxIcon.Warning);
Alert.ShowInTop("单位中文名称已存在!", MessageBoxIcon.Warning);
return;
}
if (BLL.UnitService.IsExitUnitByUnitEnName(this.UnitId, this.txtUnitEnName.Text.Trim()))
{
Alert.ShowInTop("单位英文名称已存在!", MessageBoxIcon.Warning);
return;
}
if (BLL.UnitService.IsExitUnitByUnitName(this.UnitId, this.txtUnitCode.Text.Trim()))
@@ -93,19 +99,22 @@ namespace FineUIPro.Web.SysManage
Alert.ShowInTop("单位代码已存在!", MessageBoxIcon.Warning);
return;
}
//单位类型下拉框
string unitTypeId = this.ddlUnitTypeId.SelectedValue;
if (unitTypeId == null || this.ddlUnitTypeId.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("请选择单位类型!", MessageBoxIcon.Warning);
return;
}
Model.Base_Unit unit = new Model.Base_Unit
{
UnitCode = this.txtUnitCode.Text.Trim(),
UnitName = this.txtUnitName.Text.Trim()
UnitName = this.txtUnitName.Text.Trim(),
UnitEnName = this.txtUnitEnName.Text.TrimStart().TrimEnd()
};
unit.IsBranch = Convert.ToBoolean(this.rblIsBranch.SelectedValue);
////单位类型下拉框
if (this.ddlUnitTypeId.SelectedValue != BLL.Const._Null)
{
unit.UnitTypeId = this.ddlUnitTypeId.SelectedValue;
}
unit.UnitTypeId = this.ddlUnitTypeId.SelectedValue;
unit.Corporate = this.txtCorporate.Text.Trim();
unit.Address = this.txtAddress.Text.Trim();
unit.Telephone = this.txtTelephone.Text.Trim();
+129 -118
View File
@@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.SysManage {
public partial class UnitEdit {
namespace FineUIPro.Web.SysManage
{
public partial class UnitEdit
{
/// <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>
/// txtUnitCode 控件。
/// </summary>
@@ -47,97 +49,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtUnitCode;
/// <summary>
/// txtUnitName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtUnitName;
/// <summary>
/// ddlUnitTypeId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlUnitTypeId;
/// <summary>
/// txtCorporate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCorporate;
/// <summary>
/// txtTelephone 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTelephone;
/// <summary>
/// txtEMail 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEMail;
/// <summary>
/// txtFax 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtFax;
/// <summary>
/// txtAddress 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtAddress;
/// <summary>
/// rblIsBranch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rblIsBranch;
/// <summary>
/// txtShortUnitName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtShortUnitName;
/// <summary>
/// rblIsChina 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rblIsChina;
/// <summary>
/// txtCollCropCode 控件。
/// </summary>
@@ -146,52 +58,106 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCollCropCode;
/// <summary>
/// txtLinkName 控件。
/// txtUnitName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtLinkName;
protected global::FineUIPro.TextBox txtUnitName;
/// <summary>
/// drpIdcardType 控件。
/// txtShortUnitName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpIdcardType;
protected global::FineUIPro.TextBox txtShortUnitName;
/// <summary>
/// txtIdcardNumber 控件。
/// txtUnitEnName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtIdcardNumber;
protected global::FineUIPro.TextBox txtUnitEnName;
/// <summary>
/// txtLinkMobile 控件。
/// ddlUnitTypeId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtLinkMobile;
protected global::FineUIPro.DropDownList ddlUnitTypeId;
/// <summary>
/// txtProjectRange 控件。
/// txtTelephone 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtProjectRange;
protected global::FineUIPro.TextBox txtTelephone;
/// <summary>
/// txtEMail 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEMail;
/// <summary>
/// txtFax 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtFax;
/// <summary>
/// txtAddress 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtAddress;
/// <summary>
/// rblIsBranch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rblIsBranch;
/// <summary>
/// txtCorporate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCorporate;
/// <summary>
/// rblIsChina 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rblIsChina;
/// <summary>
/// rblCollCropStatus 控件。
/// </summary>
@@ -200,7 +166,52 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rblCollCropStatus;
/// <summary>
/// txtLinkName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtLinkName;
/// <summary>
/// drpIdcardType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpIdcardType;
/// <summary>
/// txtIdcardNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtIdcardNumber;
/// <summary>
/// txtLinkMobile 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtLinkMobile;
/// <summary>
/// txtProjectRange 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtProjectRange;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@@ -209,7 +220,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnSave 控件。
/// </summary>
@@ -218,7 +229,7 @@ namespace FineUIPro.Web.SysManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnClose 控件。
/// </summary>