public ActionResult SaveBankProfile(NetStock.Contract.Bank bank) { try { bank.CreatedBy = Utility.DEFAULTUSER; bank.ModifiedBy = Utility.DEFAULTUSER; bank.Status = Utility.DEFAULTSTATUS; if (bank.BankAddress.AddressId == 0 || bank.BankAddress.AddressId == null) { bank.BankAddress.AddressType = "Bank"; bank.BankAddress.SeqNo = 1; bank.BankAddress.AddressLinkID = bank.BankCode; } var result = new NetStock.BusinessFactory.BankBO().SaveBank(bank); } catch (Exception ex) { ModelState.AddModelError("Error", ex.Message); } //return RedirectToAction("BankProfile");// "Bank details Saved."; return(Json(new { success = true, Message = "Bank Profile saved successfully." })); }
public JsonResult GetDebtorOutStandingDocuments(string debtorCode, string bankCode, string matchDocumentNo) { var cbreceiptsetoffdetails = new NetStock.DataFactory.CBReceiptSetOffDetailDAL().GetDebtorOutStandingDocuments(debtorCode, matchDocumentNo); var bankaccount = new NetStock.BusinessFactory.BankBO().GetBank(new Bank { BankCode = bankCode }).BankAccount; var debtorAccount = new NetStock.BusinessFactory.DebtorBO().GetDebtor(new Debtor { DebtorCode = debtorCode }).DebtorAccount; /* Debit Credit Account start */ var debitCreditObj = Utility.GetAccountType(debtorAccount); var creditorDC = debitCreditObj != null ? (!string.IsNullOrWhiteSpace(debitCreditObj.DebitCredit) ? debitCreditObj.DebitCredit : "DEBIT") : "DEBIT"; debitCreditObj = Utility.GetAccountType(bankaccount); var bankDC = debitCreditObj != null ? (!string.IsNullOrWhiteSpace(debitCreditObj.DebitCredit) ? debitCreditObj.DebitCredit : "DEBIT") : "DEBIT"; /* Debit Credit Account end */ return(Json(new { SetOffDetailsData = cbreceiptsetoffdetails, DebtorAccount = debtorAccount, BankAccount = bankaccount, CreditorDebitCredit = creditorDC, bankDebitCredit = bankDC }, JsonRequestBehavior.AllowGet)); }
public ActionResult BankProfileList() { var lstbanks = new NetStock.BusinessFactory.BankBO().GetList(); //HttpContext.Session["OrderItems"] = null; return(View("BankProfileList", lstbanks)); }
public JsonResult GetBankAccount(string bankcode) { var bankAccount = new NetStock.BusinessFactory.BankBO().GetBank(new Bank { BankCode = bankcode }).BankAccount; var debitCreditObj = Utility.GetAccountType(bankAccount); string accountType = debitCreditObj != null ? (!string.IsNullOrWhiteSpace(debitCreditObj.DebitCredit) ? debitCreditObj.DebitCredit : "DEBIT") : "DEBIT"; return(Json(new { bankAccount = bankAccount, accountType = accountType }, JsonRequestBehavior.AllowGet)); }
public ActionResult GetBankReconDetails(BankReconVm Obj) { try { var branchID = Convert.ToInt16(Session["BranchId"]); //var endDtUtc = Obj.endDate.ToUniversalTime().ThaiTime(); var bankReconDetails = new NetStock.BusinessFactory.BankBO().GetBankReconciliationList(branchID, Obj.bankCode, Obj.startDate.ToUniversalTime().ThaiTime(), Obj.endDate.ToUniversalTime().ThaiTime()); return(PartialView("_BankReconDetails", bankReconDetails)); } catch (Exception ex) { return(Json(ex.Message + " >> " + ex.InnerException.Message.ToString())); } }
public ActionResult BankProfile(string bankCode) { Bank bankprofile = null; var bankBo = new NetStock.BusinessFactory.BankBO(); if (bankCode == Utility.NEWRECORD) { bankprofile = new Bank(); } else { bankprofile = new NetStock.BusinessFactory.BankBO().GetBank(new Bank { BankCode = bankCode }); } bankprofile.BankAccountList = Utility.GetAccountGroupItemList(Utility.SsnBranch); bankprofile.CurrencyList = Utility.GetCurrencyItemList(); bankprofile.CountryList = Utility.GetCountryList(); return(View("BankProfile", bankprofile)); }