public ActionResult AccountCodeDelete() { try { if (string.IsNullOrEmpty(Request.QueryString["AcctId"].ToString())) { throw new Exception(); } var brandCodeModel = new AccountCodeModel() { AcctId = long.Parse(Request.QueryString["AcctId"].ToString()) }; BusinessResult result = BusinessPortal.Delete(brandCodeModel); if (result.ResultType == 0) { SessionCache.Instance.Remove("AccountCodeList"); return this.ShowMessageResult(BusinessResultMessage.INF_DELETE_SUCCEED, isSucessed: true, btnSureClickScript: "window.parent.location.reload();"); } else if (result.ResultType == -9999) { return this.ShowMessageResult(BusinessResultMessage.INF_DELETE_FAILED, isSucessed: false); } else { return this.ShowMessageResult(result.GetMessage(), isSucessed: false); } } catch (Exception ex) { this.ShowMessage(ex.Message, isSucessed: false); return this.Message(ex.Message); } }
public ActionResult AccountCodeCreate(AccountCodeModel model) { try { if (!ModelState.IsValid) { return View(model); } model.RecordStatus = EnumRecordStatus.ADD.ToString(); BusinessResult result = BusinessPortal.Save(model); if (result.ResultType == 0) { SessionCache.Instance.Remove("AccountCodeList"); this.ShowMessageEx(BusinessResultMessage.INF_SAVE_SUCCEED, isSucessed: true); } else if (result.ResultType == -9999) { if (result.GetMessage().IndexOf("UK_ACCT_CODE") > 0) { this.ShowMessageEx("RECORD CONTAINS DUPLICATE DATA", isSucessed: false); } else { this.ShowMessageEx(BusinessResultMessage.INF_SAVE_FAILED, isSucessed: false); } } else { this.ShowMessageEx(result.GetMessage(), isSucessed: false); } return View(model); } catch (Exception ex) { this.ShowMessage(ex.Message, isSucessed: false); return View(model); } }
public SaveAccountCodeCriteria(AccountCodeModel parent) { m_Parent = parent; }
public DeleteAccountCodeCriteria(AccountCodeModel parent) { m_Parent = parent; }