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); } } /// /// 保存按钮 /// /// /// 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 获取按钮权限 /// /// 获取按钮权限 /// /// /// 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 } }