public ActionResult EditCustomerService(LoanViewModel lvm) { try { GLobalClient gc = new GLobalClient(); ViewBag.listMerchant = gc.findAllMerchant(); //lvm.CustomerServices = gc.FindCustomerService(lvm); CustomerService _cs = new CustomerService(); _cs.ID = lvm.CustomerServices.ID; _cs.CustomerID = lvm.CustomerServices.CustomerID; _cs.CustomerIDLabel = lvm.CustomerServices.CustomerIDLabel; _cs.PackageTypeIDLabel = lvm.CustomerServices.PackageTypeIDLabel; _cs.PackageType = lvm.CustomerServices.PackageType; _cs.OtherLabel = lvm.CustomerServices.OtherLabel; _cs.OtherLabelID = lvm.CustomerServices.OtherLabelID; var UpdateCustomerService = DataCreators.UpdateCustomerService(_cs); // return View("AllCustomerService"); return(RedirectToAction("AllCustomerService", "Customer", new { area = "" })); } catch (Exception ex) { WebLog.Log(ex.Message.ToString()); return(null); } }
public ActionResult CreateService(LoanViewModel lvm, FormCollection form) { try { var LoggedInuser = new LogginHelper(); string user = LoggedInuser.LoggedInUser(); if (user != "") { var userid = DataReaders.GetUserIdByEmail(user); GLobalClient gc = new GLobalClient(); ViewBag.listMerchant = gc.findAllMerchant(); lvm.CustomerServices.Customer_FK = userid; lvm.CustomerServices.DateCreated = DateTime.Now; lvm.CustomerServices.ValueDate = DateTime.Now.ToString(); lvm.CustomerServices.Merchant_Fk = Convert.ToInt16(form["ID"]); lvm.CustomerServices.ValueTime = "1"; lvm.CustomerServices.isVissible = 1; lvm.CustomerServices.OtherLabel = "other"; gc.CreateCustomerService(lvm.CustomerServices); TempData["Message"] = "New Service Added"; return(View("CreateService")); } else { return(View("CreateService")); } } catch (Exception ex) { WebLog.Log(ex.Message.ToString()); return(null); } }
public ActionResult CheckEligibility() { try { ViewBag.listMerchant = gc.findAllMerchant(); return(View()); } catch (Exception ex) { WebLog.Log(ex.Message.ToString()); return(null); } }
public ActionResult CreateService() { try { GLobalClient gc = new GLobalClient(); ViewBag.listMerchant = gc.findAllMerchant(); return(View("CreateService")); } catch (Exception ex) { WebLog.Log(ex.Message.ToString()); return(null); } }
public ActionResult EditCustomerService(int id) { try { GLobalClient gc = new GLobalClient(); ViewBag.listMerchant = gc.findAllMerchant(); LoanViewModel lvm = new LoanViewModel(); lvm.CustomerServices = gc.FindCustomerService(id); return(View("EditCustomerService", lvm)); } catch (Exception ex) { WebLog.Log(ex.Message.ToString()); return(null); } }