protected void LbSaveClick(object sender, EventArgs e) { if (!string.IsNullOrEmpty(RCB_FilialeId.SelectedValue)) { FilialeId = new Guid(RCB_FilialeId.SelectedValue); } else { RAM.Alert("请选择公司!"); return; } if (!string.IsNullOrEmpty(RCB_BranchId.SelectedValue)) { BranchId = new Guid(RCB_BranchId.SelectedValue); } else { RAM.Alert("请选择部门!"); return; } if (!string.IsNullOrEmpty(RCB_PositionId.SelectedValue)) { PositionId = new Guid(RCB_PositionId.SelectedValue); } else { RAM.Alert("请选择职务!"); return; } if (BankAccountsId == Guid.Empty) { RAM.Alert("请选择左边的银行!"); return; } //Start Modify by liucaijun at 2011-January-30th if (_bankAccountsWrite.GetPersonnelBankAccountsList(BankAccountsId, FilialeId, BranchId, PositionId).BankAccountsId == Guid.Empty) { try { _bankAccountsWrite.AddBankPersion(BankAccountsId, FilialeId, BranchId, PositionId); rgdGrid.DataSource = GetDataSource(FilialeId, BranchId, PositionId, BankAccountsId, FilialeBankId); rgdGrid.Rebind(); } catch (Exception ex) { RAM.Alert("权限增加失败!" + ex.Message); } } else { RAM.Alert("该用户已经拥有此权限,请勿重复添加!"); } //End }