/// <summary> /// 解冻帐号 /// </summary> /// <param name="DealerAccount">帐号表</param> /// <param name="ThawReason">解冻原因</param> /// <param name="mess"></param> /// <returns></returns> public bool ThawAccount(UM_DealerAccount DealerAccount, UM_ThawReason ThawReason, out string mess) { mess = string.Empty; CT_Counter T = GetCounterByUserID((int)DealerAccount.UserID); List <FindAccountEntity> l = new List <FindAccountEntity>(); if (T == null) { mess = "GL-0227:交易员对应的柜台不存在!"; //写调试信息 LogHelper.WriteDebug(mess); return(false); } try { FindAccountEntity FindAccountEntity = new FindAccountEntity(); FindAccountEntity.AccountType = (int)DealerAccount.AccountTypeID; FindAccountEntity.UserID = DealerAccount.UserID.ToString(); l.Add(FindAccountEntity); if (!ServiceIn.AccountManageServiceProxy.GetInstance().ThawAccount(T, l, out mess)) { mess = "GL-0228:调用柜台解冻帐号方法ThawAccount()失败!" + mess; //写调试信息 LogHelper.WriteDebug(mess); return(false); } } catch (VTException Ex) { mess = Ex.ToString(); //写错误日志 return(false); } try { StaticDalClass.DealerAccountDAL.Update(DealerAccount); StaticDalClass.ThawReasonDAL.Add(ThawReason); } catch (Exception ex) { ServiceIn.AccountManageServiceProxy.GetInstance().FreezeAccount(T, l, out mess); string errCode = "GL-0229"; string errMsg = "冻结帐号方法FreezeAccount()异常!" + ex.Message; VTException vte = new VTException(errCode, errMsg, ex); LogHelper.WriteError(vte.ToString(), vte.InnerException); mess = vte.ToString(); return(false); } return(true); }
/// <summary> /// 解冻按纽事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_UnFreeze_Click(object sender, EventArgs e) { string mess; try { string AccountID = this.txt_Account.Text.Trim(); if (!string.IsNullOrEmpty(AccountID)) { UM_DealerAccount DealerAccount = DealerAccountBLL.GetModel(string.Format(AccountID)); if (DealerAccount.UserID == int.Parse(this.txt_TranscationID.Text.Trim()) && DealerAccount.IsDo == false) { DealerAccount.IsDo = true; UM_ThawReason ThawReason = new UM_ThawReason(); ThawReason.DealerAccoutID = DealerAccount.DealerAccoutID; ThawReason.ThawReason = this.txt_Reason.Text.Trim(); ThawReason.ThawReasonTime = System.DateTime.Now; ManagementCenter.BLL.UserManage.TransactionManage tm = new ManagementCenter.BLL.UserManage.TransactionManage(); if (!tm.ThawAccount(DealerAccount, ThawReason, out mess)) { ShowMessageBox.ShowInformation(mess); return; } InitAccountListByUserID(DealerAccount.UserID, ViewAccount.FocusedRowHandle); } } } catch (Exception ex) { string errCode = "GL-0356"; string errMsg = "解冻失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), ex); ShowMessageBox.ShowInformation(exception.ToString()); return; } }