Esempio n. 1
0
 public ActionResult DeleteChartOfAccount(POSAccount.Contract.ChartOfAccount item)
 {
     if (ModelState.IsValid)
     {
         try
         {
             var result = new POSAccount.BusinessFactory.ChartOfAccountBO().DeleteChartOfAccount(item);
         }
         catch (Exception ex)
         {
             TempData["TempExMsg"] = ex.Message;
         }
     }
     return(RedirectToAction("ChartOfAccountMaster", "MasterData", new { branchID = item.BranchID, _accountCode = "" }));
 }
Esempio n. 2
0
        public ChartOfAccount ChartOfAccountData(string accountCode)
        {
            var coaItem = new POSAccount.Contract.ChartOfAccount();

            if (accountCode != null && accountCode.Length > 0)
            {
                coaItem = new POSAccount.BusinessFactory.ChartOfAccountBO().GetChartOfAccount(new Contract.ChartOfAccount {
                    AccountCode = accountCode, BranchID = Utility.SsnBranch
                });
            }

            coaItem.CurrencyCodeList = Utility.GetCurrencyItemList();
            coaItem.AccountGroupList = Utility.GetAccountGroupItemList(Convert.ToInt16((Session["BranchId"]))).Where(x => x.Value != accountCode).ToList();
            coaItem.DebitCreditList  = Utility.GetLookupItemList("DebitCredit");

            return(coaItem);
        }
Esempio n. 3
0
        public ActionResult UpdateChartOfAccount(POSAccount.Contract.ChartOfAccount item)
        {
            if (ModelState.IsValid)
            {
                if (item.BranchID == 0)
                {
                    item.BranchID = Utility.SsnBranch;
                }
                if (item == null)
                {
                    return(new HttpStatusCodeResult(System.Net.HttpStatusCode.BadRequest));
                }

                item.CreatedBy  = Utility.DEFAULTUSER;
                item.ModifiedBy = Utility.DEFAULTUSER;

                var result = new POSAccount.BusinessFactory.ChartOfAccountBO().SaveChartOfAccount(item);
            }
            return(RedirectToAction("ChartOfAccountMaster", "MasterData"));
        }