public ActionResult Edit(int Id) { MakePaymentModel model = new MakePaymentModel(); model = ser.GetMakePaymentDetail(Id); model.CashGivenToDate = TimeFormat.DateFormat(model.CashGivenToDepositDate.ToString()); model.ChequeDate = TimeFormat.DateFormat(model.ChequeIssueDate.ToString()); model.DraftDate = TimeFormat.DateFormat(model.DraftDepositDate.ToString()); model.CashDate = TimeFormat.DateFormat(model.CashDepositDate.ToString()); model.BankTransferDate = TimeFormat.DateFormat(model.BankTransferDepositDate.ToString()); model.RTGSDate = TimeFormat.DateFormat(model.RTGSDepositDate.ToString()); ViewData["Bank"] = new SelectList(ser.AllBank(), "BankId", "BankName"); ViewData["BankBranch"] = new SelectList(ser.AllBankBranch(model.BankId), "BankBranchId", "BranchName"); ViewData["ChequeDrawnOnBank"] = new SelectList(ser.GetBank(), "BankId", "BankName"); model.ChequeCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.DraftCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.CashCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.BankTransferCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.RTGSCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.CashGivenToCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.SalesAgentList = ser.GetAllGetSalesAgentList(); model.AgentList = new CreditLimitProvider().GetAllAgentList(); return(View(model)); }
public ActionResult MakePayment(MakePaymentBindingModel makePaymentModel) { int userId = this.User.GetUserId(); if (!this.ModelState.IsValid) { makePaymentModel.AccountsSelectList = this.PrepareAccountsSelectList(userId); return(this.View(makePaymentModel)); } MakePaymentModel makePayment = new MakePaymentModel(makePaymentModel.AccountId, userId, makePaymentModel.PaymentIBAN, makePaymentModel.PaymentAmount, makePaymentModel.PaymentReason, DateTime.Now); string makePaymentResult = this.paymentManager.MakePayment(makePayment); if (string.IsNullOrEmpty(makePaymentResult)) { this.TempData.AddSuccessMessage(MessageConstants.MakePaymentSuccess); } else { this.TempData.AddErrorMessage(makePaymentResult); } return(this.RedirectToAction(nameof(PaymentsController.Index))); }
public ActionResult Details(int id) { MakePaymentModel model = new MakePaymentModel(); model = ser.GetMakePaymentDetail(id); return(View(model)); }
public ActionResult Detail(int id) { MakePaymentModel model = new MakePaymentModel(); model = ser.GetBranchDistributroPaymentDetail(id); return(View(model)); }
public ActionResult Index() { var ts = SessionStore.GetTravelSession(); MakePaymentModel model = new MakePaymentModel(); model.AgentCashDepositsList = ser.GetBranchDistributorCashDepositsList(); return(View(model)); }
public ActionResult Index() { var ts = (TravelSession)Session["TravelPortalSessionInfo"]; MakePaymentModel model = new MakePaymentModel(); model.AgentCashDepositsList = ser.GetAgentCashDepositsList(); return(View(model)); }
public ActionResult Edit(int Id, MakePaymentModel model) { var ts = SessionStore.GetTravelSession();; model.AgentId = ts.LoginTypeId; model.UpdatedBy = ts.AppUserId; model.UpdatedDate = DateTime.UtcNow; model.CreatedBy = ts.AppUserId; model.DepositId = Id; MakePaymentModel m = new MakePaymentModel(); ViewData["Bank"] = new SelectList(ser.AllBank(), "BankId", "BankName"); ViewData["BankBranch"] = new SelectList(ser.AllBankBranch(model.BankId), "BankBranchId", "BranchName"); ViewData["ChequeDrawnOnBank"] = new SelectList(ser.GetBank(), "BankId", "BankName"); model.SalesAgentList = ser.GetAllGetSalesAgentList(); m = ser.GetBranchDistributroPaymentDetail(Id); model.flag = "DistributorMakePayment"; if (model.rdbPaymentMode.ToString() == "Cash") { model.PaymentModeId = 1; ser.BranchCashEdit(model); } if (model.rdbPaymentMode.ToString() == "Cheque") { model.PaymentModeId = 2; ser.BranchChequeEdit(model); } if (model.rdbPaymentMode.ToString() == "Draft") { model.PaymentModeId = 3; ser.BranchDraftEdit(model); } if (model.rdbPaymentMode.ToString() == "BankTransfer") { model.PaymentModeId = 4; ser.BranchBankTransferEdit(model); } if (model.rdbPaymentMode.ToString() == "RTGS") { model.PaymentModeId = 5; ser.BranchRTGSEdit(model); } if (model.rdbPaymentMode.ToString() == "CashGivenTo") { model.PaymentModeId = 6; ser.BranchCashGivenToEdit(model); } return(RedirectToAction("Index")); }
public ActionResult Index(int?AgentId, string AgencyName) { MakePaymentModel model = new MakePaymentModel(); if (AgencyName != null) { string SearchText = AgencyName.ToString().Trim(); model.AgentCashDepositsList = ser.GetAgentCashDepositsList().Where(xx => xx.AgencyName.Contains(SearchText)).ToList(); return(View(model)); } return(View(model)); }
public ActionResult Create(MakePaymentModel model) { var ts = (TravelSession)Session["TravelPortalSessionInfo"]; ViewData["Bank"] = new SelectList(ser.AllBank(), "BankId", "BankName"); ViewData["BankBranch"] = new SelectList(ser.AllBankBranch(model.BankId), "BankBranchId", "BranchName"); ViewData["ChequeDrawnOnBank"] = new SelectList(ser.GetBank(), "BankId", "BankName"); model.SalesAgentList = ser.GetAllGetSalesAgentList(); model.AgentList = new CreditLimitProvider().GetAllBranchDistributorList(ts.LoginTypeId); model.CreatedBy = ts.AppUserId; if (model.rdbPaymentMode.ToString() == "Cash") { model.PaymentModeId = 1; int depositid = ser.BranchCashAdd(model); ser.ApproveUnapprovedBranchDistributorMakePayment(depositid, model.CreatedBy); } if (model.rdbPaymentMode.ToString() == "Cheque") { model.PaymentModeId = 2; int depositid = ser.BranchChequeAdd(model); ser.ApproveUnapprovedBranchDistributorMakePayment(depositid, model.CreatedBy); } if (model.rdbPaymentMode.ToString() == "Draft") { model.PaymentModeId = 3; int depositid = ser.BranchDraftAdd(model); ser.ApproveUnapprovedBranchDistributorMakePayment(depositid, model.CreatedBy); } if (model.rdbPaymentMode.ToString() == "BankTransfer") { model.PaymentModeId = 4; int depositid = ser.BranchBankTransferAdd(model); ser.ApproveUnapprovedBranchDistributorMakePayment(depositid, model.CreatedBy); } if (model.rdbPaymentMode.ToString() == "RTGS") { model.PaymentModeId = 5; int depositid = ser.BranchRTGSAdd(model); ser.ApproveUnapprovedBranchDistributorMakePayment(depositid, model.CreatedBy); } if (model.rdbPaymentMode.ToString() == "CashGivenTo") { model.PaymentModeId = 6; int depositid = ser.BranchCashGivenToAdd(model); ser.ApproveUnapprovedBranchDistributorMakePayment(depositid, model.CreatedBy); } return(RedirectToAction("Index")); }
public ActionResult Index(int?AgentId, string DistributorName) { MakePaymentModel model = new MakePaymentModel(); var ts = SessionStore.GetTravelSession(); if (DistributorName != null) { string SearchText = DistributorName.ToString().Trim(); model.AgentCashDepositsList = ser.GetBranchDistributorCashDepositsList().Where(xx => xx.AgencyName.Contains(SearchText)).ToList(); return(View(model)); } return(View(model)); }
public ActionResult MakePaymentAjax(MakePaymentModel model) { try { int subagentId = model.SubagentId > 0 ? model.SubagentId : 0; int userId = model.SubagentId > 0 ? Auth.User.UserId : -model.SubagentId; new ContractsProvider().MakePayment(model.ContractId, Misc.ToDouble(model.Amount), userId, subagentId, Auth.User.UserId, model.ReceiptNo ?? ""); return(Json(new { Success = true, Message = "", })); } catch (Exception ex) { return(Json(new { Success = false, ex.Message })); } }
public ActionResult Delete(int Id) { var ts = (TravelSession)Session["TravelPortalSessionInfo"]; try { MakePaymentModel model = new MakePaymentModel(); model.DeletedBy = ts.AppUserId; ser.MakeBranchDistributorPaymentDelete(Id, model.DeletedBy); } catch (Exception ex) { } return(RedirectToAction("Index")); }
public async Task <IHttpActionResult> MakePayment([FromBody] MakePaymentModel model) { try { var response = await PayrollCore.MakePayment(model.OrderId, model.ClientId).ConfigureAwait(false); return(Ok(response)); } catch (Exception e) { LogHelper.LogException <PayrollController>(e); return(Ok(ResponseFactory.CreateResponse(false, ResponseCode.Error))); } }
public ActionResult Index() { var ts = SessionStore.GetTravelSession();; MakePaymentModel model = new MakePaymentModel(); model.AgentId = ts.LoginTypeId; model.ChequeList = ser.GetChequeList(model.AgentId); model.DraftList = ser.GetDraftList(model.AgentId); model.CashList = ser.GetCashList(model.AgentId); model.BankTransferList = ser.GetBankTransferList(model.AgentId); model.RTGSList = ser.GetRTGSList(model.AgentId); model.CashGivenToList = ser.GetCashGivenToList(model.AgentId); model.CreditList = ser.GetCreditRequestList(model.AgentId); return(View(model)); }
public bool MakePayment(MakePaymentModel makePayment) { int recordsInserted = this.ExecuteNonQuery( @"INSERT INTO Payments (AccountId, UserId, PaymentIBAN, PaymentAmount, PaymentReason, StatusId, PaymentDate) VALUES (@accountId, @userId, @paymentIban, @paymentAmount, @paymentReason, 1, @paymentDate)", new Dictionary <string, object> { { "@accountId", makePayment.AccountId }, { "@userId", makePayment.UserId }, { "@paymentIban", makePayment.PaymentIBAN }, { "@paymentAmount", makePayment.PaymentAmount }, { "@paymentReason", makePayment.PaymentReason }, { "@paymentDate", makePayment.PaymentDate } }); return(recordsInserted > 0); }
public ActionResult Create(MakePaymentModel model) { ViewData["Bank"] = new SelectList(ser.AllBank(), "BankId", "BankName"); ViewData["BankBranch"] = new SelectList(ser.AllBankBranch(model.BankId), "BankBranchId", "BranchName"); ViewData["ChequeDrawnOnBank"] = new SelectList(ser.GetBank(), "BankId", "BankName"); model.SalesAgentList = ser.GetAllGetSalesAgentList(); model.AgentList = new CreditLimitProvider().GetAllAgentList(); var ts = (TravelSession)Session["TravelPortalSessionInfo"]; model.CreatedBy = ts.AppUserId; if (model.rdbPaymentMode.ToString() == "Cash") { model.PaymentModeId = 1; ser.CashAdd(model); } if (model.rdbPaymentMode.ToString() == "Cheque") { model.PaymentModeId = 2; ser.ChequeAdd(model); } if (model.rdbPaymentMode.ToString() == "Draft") { model.PaymentModeId = 3; ser.DraftAdd(model); } if (model.rdbPaymentMode.ToString() == "BankTransfer") { model.PaymentModeId = 4; ser.BankTransferAdd(model); } if (model.rdbPaymentMode.ToString() == "RTGS") { model.PaymentModeId = 5; ser.RTGSAdd(model); } if (model.rdbPaymentMode.ToString() == "CashGivenTo") { model.PaymentModeId = 6; ser.CashGivenToAdd(model); } return(RedirectToAction("Index")); }
public ActionResult Create() { MakePaymentModel model = new MakePaymentModel(); ViewData["Bank"] = new SelectList(ser.AllBank(), "BankId", "BankName"); ViewData["BankBranch"] = new SelectList(ser.AllBankBranch(model.BankId), "BankBranchId", "BranchName"); ViewData["ChequeDrawnOnBank"] = new SelectList(ser.GetBank(), "BankId", "BankName"); model.CreditRequestCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.ChequeCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.DraftCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.CashCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.BankTransferCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.RTGSCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.CashGivenToCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.SalesAgentList = ser.GetAllGetSalesAgentList(); return(View(model)); }
public ActionResult Create() { var ts = SessionStore.GetTravelSession(); MakePaymentModel model = new MakePaymentModel(); ViewData["Bank"] = new SelectList(ser.AllBank(), "BankId", "BankName"); ViewData["BankBranch"] = new SelectList(ser.AllBankBranch(model.BankId), "BankBranchId", "BranchName"); ViewData["ChequeDrawnOnBank"] = new SelectList(ser.GetBank(), "BankId", "BankName"); model.ChequeCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.DraftCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.CashCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.BankTransferCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.RTGSCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.CashGivenToCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.SalesAgentList = ser.GetAllGetSalesAgentList(); model.AgentList = new CreditLimitProvider().GetAllBranchDistributorList(ts.LoginTypeId); return(View(model)); }
public string MakePayment(MakePaymentModel makePayment) { using (this.paymentRepository) { using (this.accountRepository) { bool isAccountExisting = this.accountRepository.IsAccountExisting(makePayment.AccountId); if (!isAccountExisting) { return(MessageConstants.AccountNotFoundError); } } bool makePaymentResult = this.paymentRepository.MakePayment(makePayment); if (!makePaymentResult) { return(MessageConstants.MakePaymentError); } return(string.Empty); } }
public ActionResult Create(MakePaymentModel model) { ViewData["Bank"] = new SelectList(ser.AllBank(), "BankId", "BankName"); ViewData["BankBranch"] = new SelectList(ser.AllBankBranch(model.BankId), "BankBranchId", "BranchName"); ViewData["ChequeDrawnOnBank"] = new SelectList(ser.GetBank(), "BankId", "BankName"); model.SalesAgentList = ser.GetAllGetSalesAgentList(); var ts = SessionStore.GetTravelSession();; model.AgentId = ts.LoginTypeId; model.CreatedBy = ts.AppUserId; model.flag = "DistributorMakePayment"; if (model.rdbPaymentMode.ToString() == "Cheque") { model.PaymentModeId = 2; string chequedrawnonbankname = ser.GetBankName(model.ChequeDrawnonBank); model.ChequeDrawnonBankName = chequedrawnonbankname; string chequebankname = ser.GetBankName(model.ChequeBankId); model.ChequeBankName = chequebankname; string chequebranchname = ser.GetBankBranchName(model.ChequeBankBranchId); model.ChequeBranchName = chequebranchname; ser.BranchChequeAdd(model); } if (model.rdbPaymentMode.ToString() == "Draft") { model.PaymentModeId = 3; string draftbankname = ser.GetBankName(model.DraftBankId); model.DraftBankName = draftbankname; string draftbankbranchname = ser.GetBankBranchName(model.DraftBankBranchId); model.DraftBranchName = draftbankbranchname; ser.BranchDraftAdd(model); } if (model.rdbPaymentMode.ToString() == "Cash") { model.PaymentModeId = 1; string cashbankname = ser.GetBankName(model.CashBankId); model.CashBankName = cashbankname; string cashbankbranchname = ser.GetBankBranchName(model.DraftBankBranchId); model.CashBranchName = cashbankbranchname; ser.BranchCashAdd(model); } if (model.rdbPaymentMode.ToString() == "BankTransfer") { model.PaymentModeId = 4; string banktransferbankname = ser.GetBankName(model.BankTransferBankId); model.BankTransferBankName = banktransferbankname; string banktransferbranchname = ser.GetBankBranchName(model.BankTransferBankBranchId); model.BankTransferBranchName = banktransferbranchname; ser.BranchBankTransferAdd(model); } if (model.rdbPaymentMode.ToString() == "RTGS") { model.PaymentModeId = 5; string RTGSbankname = ser.GetBankName(model.RTGSBankId); model.RTSSBankName = RTGSbankname; string RTGSbranchname = ser.GetBankBranchName(model.RTGSBankBranchId); model.RTGSBranchName = RTGSbranchname; ser.BranchRTGSAdd(model); } if (model.rdbPaymentMode.ToString() == "CashGivenTo") { model.PaymentModeId = 6; ser.BranchCashGivenToAdd(model); } if (model.rdbPaymentMode.ToString() == "CreditRequest") { model.PaymentModeId = 7; ser.BranchCreditRequest(model, ts.AppUserId); } return(RedirectToAction("Index")); }
public ActionResult Edit(int Id, MakePaymentModel model) { var ts = (TravelSession)Session["TravelPortalSessionInfo"]; model.DepositId = Id; model.UpdatedBy = ts.AppUserId; MakePaymentModel m = new MakePaymentModel(); ViewData["Bank"] = new SelectList(ser.AllBank(), "BankId", "BankName"); ViewData["BankBranch"] = new SelectList(ser.AllBankBranch(model.BankId), "BankBranchId", "BranchName"); ViewData["ChequeDrawnOnBank"] = new SelectList(ser.GetBank(), "BankId", "BankName"); model.SalesAgentList = ser.GetAllGetSalesAgentList(); model.AgentList = new CreditLimitProvider().GetAllAgentList(); model.ChequeCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.DraftCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.CashCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.BankTransferCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.RTGSCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); model.CashGivenToCurrencyList = new SelectList(ser.GetCurrenciesList(), "Value", "Text"); m = ser.GetMakePaymentDetail(Id); try { if (model.rdbPaymentMode.ToString() == "Cash") { model.PaymentModeId = 1; ser.CashEdit(model); ser.ApproveUnapproveMakePayment((int)Id, model.UpdatedBy); } if (model.rdbPaymentMode.ToString() == "Cheque") { model.PaymentModeId = 2; ser.ChequeEdit(model); ser.ApproveUnapproveMakePayment((int)Id, model.UpdatedBy); } if (model.rdbPaymentMode.ToString() == "Draft") { model.PaymentModeId = 3; ser.DraftEdit(model); ser.ApproveUnapproveMakePayment((int)Id, model.UpdatedBy); } if (model.rdbPaymentMode.ToString() == "BankTransfer") { model.PaymentModeId = 4; ser.BankTransferEdit(model); ser.ApproveUnapproveMakePayment((int)Id, model.UpdatedBy); } if (model.rdbPaymentMode.ToString() == "RTGS") { model.PaymentModeId = 5; ser.RTGSEdit(model); ser.ApproveUnapproveMakePayment((int)Id, model.UpdatedBy); } if (model.rdbPaymentMode.ToString() == "CashGivenTo") { model.PaymentModeId = 6; ser.CashGivenToEdit(model); ser.ApproveUnapproveMakePayment((int)Id, model.UpdatedBy); } return(RedirectToAction("Index")); } catch (Exception ex) { TempData["ActionResponse"] = ex.Message; return(RedirectToAction("Edit", new { @Id = Id })); } }