Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
 public ActionResult CheckEligibility()
 {
     try
     {
         ViewBag.listMerchant = gc.findAllMerchant();
         return(View());
     }
     catch (Exception ex)
     {
         WebLog.Log(ex.Message.ToString());
         return(null);
     }
 }
Exemplo n.º 4
0
 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);
     }
 }
Exemplo n.º 5
0
 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);
     }
 }