Exemplo n.º 1
0
        public JsonResult GetPenaltyLogicById(int penaltyLogicId)
        {
            string PenaltyLogic = "";

            PenaltyLogic = _penaltyLogicBLL.GetPenaltyLogicById(penaltyLogicId) == null ? "" : _penaltyLogicBLL.GetPenaltyLogicById(penaltyLogicId).PenaltyLogic;

            return(Json(PenaltyLogic, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
0
        public ActionResult Edit(int MstPenaltyLogicId)
        {
            var data      = _penaltyLogicBLL.GetPenaltyLogicById(MstPenaltyLogicId);
            var model     = Mapper.Map <PenaltyLogicItem>(data);
            var Kolomlist = new List <SelectListItem>
            {
                new SelectListItem {
                    Text = "End Contract", Value = "MST_FLEET.END_CONTRACT"
                },
                new SelectListItem {
                    Text = "Effective Date", Value = "TRA_CTF.EFFECTIVE_DATE"
                },
                new SelectListItem {
                    Text = "HMS Installment", Value = "MST_FLEET.MONTHLY_HMS_INSTALLMENT"
                },
                new SelectListItem {
                    Text = "Number", Value = "Number"
                }
            };

            model.KolomList = new SelectList(Kolomlist, "Value", "Text");
            var Operatorlist = new List <SelectListItem>
            {
                new SelectListItem {
                    Text = "+", Value = "+"
                },
                new SelectListItem {
                    Text = "-", Value = "-"
                },
                new SelectListItem {
                    Text = "/", Value = "/"
                },
                new SelectListItem {
                    Text = "*", Value = "*"
                },
                new SelectListItem {
                    Text = "(", Value = "("
                },
                new SelectListItem {
                    Text = ")", Value = ")"
                }
            };

            model.OperatorList = new SelectList(Operatorlist, "Value", "Text");
            var VendorList = _vendorBLL.GetVendor();

            model.VendorList = new SelectList(VendorList, "MstVendorId", "VendorName");

            model.KolomList = new SelectList(Kolomlist, "Value", "Text");
            var VehicleTypeList = new List <SelectListItem>
            {
                new SelectListItem {
                    Text = "WTC", Value = "BENEFIT"
                },
                new SelectListItem {
                    Text = "BENEFIT", Value = "BENEFIT"
                }
            };

            model.VehicleTypeList = new SelectList(VehicleTypeList, "Value", "Text");
            model.MainMenu        = _mainMenu;
            model.CurrentLogin    = CurrentUser;
            model.ChangesLogs     = GetChangesHistory((int)Enums.MenuList.MasterPenaltyLogic, MstPenaltyLogicId);
            return(View(model));
        }