Ejemplo n.º 1
0
 public ActionResult Add()
 {
     ViewData["IsFirstRequest"] = 1;
     Models.LoanAddVM _model = new Models.LoanAddVM();
     SetDefaultModel(ref _model);
     return(View(_model));
 }
Ejemplo n.º 2
0
 public ActionResult Add(Models.LoanAddVM model)
 {
     if (ModelState.IsValid)
     {
         model.ClientID = ClientID;
         int _loanID = _loanService.Add(Infrastructure.BOVMMapper.Map <Models.LoanAddVM, BO.LoanAddBO>(model));
         return(RedirectToAction("Update", new { LoanID = _loanID }));
     }
     SetDefaultModel(ref model);
     return(View(model));
 }
Ejemplo n.º 3
0
        private void SetDefaultModel(ref Models.LoanAddVM loanAdd)
        {
            var _borrowerList = _loanService.GetBorrowerList(ClientID, 4);

            loanAdd.BorrowerList = new SelectList(_borrowerList, "BuyerID", "BuyerName");
        }
Ejemplo n.º 4
0
 public ActionResult Update(Models.LoanAddVM model)
 {
     return(Add(model));
 }