public ActionResult AddSubSubSubAccount(SubSubSubAccount account)
 {
     try
     {
         var user = (ViewUser)Session["user"];
         account.UserId = user.UserId;
         account.SubSubSubAccountType = "Y";
         bool result = _iAccountsManager.AddSubSubSubAccount(account);
         //if (result)
         //{
         //    return RedirectToAction("SubSubSubAccountList");
         //}
         List <AccountHead> accountHeads = _iAccountsManager.GetAllChartOfAccountList().ToList();
         ViewBag.AccountHeadCode      = new SelectList(accountHeads, "AccountHeadCode", "AccountHeadName");
         ViewBag.SubAccountCode       = new SelectList(new List <SubAccount>(), "SubAccountCode", "SubAccountName");
         ViewBag.SubSubAccountCode    = new SelectList(new List <SubSubAccount>(), "SubSubAccountCode", "SubSubAccountName");
         ViewBag.SubSubSubAccountCode = new SelectList(new List <SubSubSubAccount>(), "SubSubSubAccountCode", "SubSubSubAccountName");
         return(RedirectToAction("AddSubSubSubAccount"));
     }
     catch (Exception exception)
     {
         Log.WriteErrorLog(exception);
         return(PartialView("_ErrorPartial", exception));
     }
 }
示例#2
0
        public bool AddSubSubSubAccount(SubSubSubAccount account)
        {
            int maxAccountNo = _iAccountGateway.GetMaxSubSubSubAccountNoBySubSubAccountCode(account.SubSubAccountCode);

            account.SubSubSubAccountCode = account.SubSubAccountCode + (maxAccountNo + 1);
            int rowAffected = _iAccountGateway.AddSubSubSubAccount(account);

            return(rowAffected > 0);
        }