Пример #1
0
        public ActionResult Index()
        {
            var data  = _penaltyLogicBLL.GetPenaltyLogic();
            var model = new PenaltyLogicModel();

            model.Details           = Mapper.Map <List <PenaltyLogicItem> >(data);
            model.MainMenu          = _mainMenu;
            model.CurrentLogin      = CurrentUser;
            model.CurrentPageAccess = CurrentPageAccess;
            return(View(model));
        }
Пример #2
0
        public PenaltyItem listdata(PenaltyItem model)
        {
            var Vehiclelist = new List <SelectListItem>
            {
                new SelectListItem {
                    Text = "BENEFIT", Value = "BENEFIT"
                },
                new SelectListItem {
                    Text = "WTC", Value = "WTC"
                }
            };

            model.VehicleList = new SelectList(Vehiclelist, "Value", "Text");

            var PenaltyLogicDataList = _penaltyLogicBLL.GetPenaltyLogic().Where(x => x.IsActive).Select(x => new { x.MstPenaltyLogicId }).Distinct().ToList();

            model.PenaltyList = new SelectList(PenaltyLogicDataList, "MstPenaltyLogicId", "MstPenaltyLogicId");

            var VendorDataList = _vendorBLL.GetVendor().Where(x => x.IsActive).Select(x => new { x.VendorName, x.MstVendorId }).Distinct().ToList();

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