69 lines
2.2 KiB
C#
69 lines
2.2 KiB
C#
using System;
|
|
using System.Linq;
|
|
using System.Web.UI.WebControls;
|
|
using BLL;
|
|
using NPOI.Util;
|
|
|
|
namespace FineUIPro.Web.SysManage
|
|
{
|
|
public partial class UnitCleanupMerge : PageBase
|
|
{
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
|
////权限按钮方法
|
|
this.GetButtonPower();
|
|
//
|
|
BLL.UnitService.InitAllUnitDownList(this.drpUnitId, false);
|
|
BLL.UnitService.InitAllUnitDownList(this.drpMergeUnitId, false);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 保存按钮
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnSave_Click(object sender, EventArgs e)
|
|
{
|
|
if (this.drpUnitId.SelectedValue == Const._Null)
|
|
{
|
|
Alert.ShowInParent("请选择合并后单位!", MessageBoxIcon.Warning);
|
|
return;
|
|
}
|
|
if (this.drpMergeUnitId.SelectedValue == Const._Null)
|
|
{
|
|
Alert.ShowInParent("需要合并的单位!", MessageBoxIcon.Warning);
|
|
return;
|
|
}
|
|
|
|
string unitId = this.drpUnitId.SelectedValue;
|
|
string unitMergeId = this.drpMergeUnitId.SelectedValue;
|
|
|
|
string txtRemark = this.txtRemark.Text.Trim();
|
|
//BLL.LogService.AddSys_Log(this.CurrUser, unit.UnitCode, unit.UnitId, BLL.Const.UnitMenuId, Const.BtnAdd);
|
|
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
|
}
|
|
|
|
#region 获取按钮权限
|
|
|
|
/// <summary>
|
|
/// 获取按钮权限
|
|
/// </summary>
|
|
/// <param name="button"></param>
|
|
/// <returns></returns>
|
|
private void GetButtonPower()
|
|
{
|
|
if (this.CurrUser.UserId == Const.sysglyId || this.CurrUser.UserId == Const.hfnbdId || this.CurrUser.UserId == Const.fuweiId || this.CurrUser.UserId == Const.shenyinhangId)
|
|
{//系统管理员、合肥诺必达、付伟、申银行
|
|
this.btnSave.Hidden = false;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|
|
} |