示例#1
0
        public ActionResult Index()
        {
            var data  = _settingBLL.GetSetting();
            var model = new SettingModel();

            model.Details           = Mapper.Map <List <SettingItem> >(data);
            model.MainMenu          = _mainMenu;
            model.CurrentLogin      = CurrentUser;
            model.CurrentPageAccess = CurrentPageAccess;
            return(View(model));
        }
示例#2
0
        public PriceListItem listdata(PriceListItem model)
        {
            var listvehicleType = _settingBLL.GetSetting().Select(x => new { x.SettingGroup, x.SettingName, x.SettingValue }).ToList().Where(x => x.SettingGroup == "VEHICLE_TYPE").Distinct().OrderBy(x => x.SettingValue);

            model.VehicleTypeList = new SelectList(listvehicleType, "SettingName", "SettingValue");

            var listvehicleUsage = _settingBLL.GetSetting().Select(x => new { x.SettingGroup, x.SettingName, x.SettingValue }).ToList().Where(x => x.SettingGroup == "VEHICLE_USAGE_BENEFIT").Distinct().OrderBy(x => x.SettingValue);

            model.VehicleUsageList = new SelectList(listvehicleUsage, "SettingName", "SettingValue");
            return(model);
        }
示例#3
0
        public ActionResult ReportGs()
        {
            var model = new GsModel();
            var data  = _gsBLL.GetGsReport(new RptGsInput());

            model.Details           = Mapper.Map <List <GsItem> >(data);
            model.MainMenu          = Enums.MenuList.RptGs;
            model.CurrentLogin      = CurrentUser;
            model.CurrentPageAccess = CurrentPageAccess;


            var settingList = _settingBLL.GetSetting().Where(x => x.SettingGroup.StartsWith("VEHICLE_USAGE")).Select(x => new { x.SettingName, x.SettingValue }).ToList();

            model.VehicleUsageList = new SelectList(settingList, "SettingName", "SettingValue");
            return(View(model));
        }
示例#4
0
        public ActionResult Index()
        {
            var model = new CostObModel();

            model.SearchView.Year = DateTime.Now.Year;
            var VehicleTypeList     = _settingBLL.GetSetting().Where(x => x.IsActive && x.SettingGroup == EnumHelper.GetDescription(Enums.SettingGroup.VehicleType)).Select(x => new { x.SettingName }).Distinct().ToList();
            var FunctionList        = _functionGroupBll.GetGroupCenter().Where(x => x.IsActive).Select(x => new { x.FunctionName }).Distinct().ToList();
            var LocationMappingList = _locationMappingBLL.GetLocationMapping().Where(x => x.IsActive).Select(x => new { x.Region }).Distinct().ToList();

            model.SearchView.VehicleTypeList = new SelectList(VehicleTypeList, "SettingName", "SettingName");
            model.SearchView.FunctionList    = new SelectList(FunctionList, "FunctionName", "FunctionName");
            model.SearchView.RegionalList    = new SelectList(LocationMappingList, "Region", "Region");

            var filter = new CostObParamInput();

            filter.Year = DateTime.Now.Year;

            var data = _costObBLL.GetByFilter(filter);

            model.Details           = Mapper.Map <List <CostObItem> >(data);
            model.MainMenu          = _mainMenu;
            model.CurrentLogin      = CurrentUser;
            model.CurrentPageAccess = CurrentPageAccess;
            foreach (CostObItem item in model.Details)
            {
                item.MonthS = this.SetMonthToString(item.Month == null ? 0:item.Month.Value);
            }
            return(View(model));
        }
示例#5
0
        public ActionResult Index()
        {
            var model = new RptPOModel();
            //model.SearchView.PeriodFrom = Convert.ToDateTime("2013-07-15");
            //model.SearchView.PeriodTo = Convert.ToDateTime("2018-07-14");
            //model.SearchView.MonthFrom = 11;
            //model.SearchView.MonthTo = 12;
            //model.SearchView.PoliceNumber = "L1976HS";
            var input = Mapper.Map <RptPoByParamInput>(model.SearchView);
            var data  = _rptPoBLL.GetRptPo(input);

            model.MainMenu     = _mainMenu;
            model.TitleForm    = "PO Report";
            model.TitleExport  = "ExportPO";
            model.CurrentLogin = CurrentUser;
            var settingData = _settingBLL.GetSetting();

            model.RptPOItem = Mapper.Map <List <RptPOItem> >(data);

            var listEmployee = _fleetBLL.GetFleet().Select(x => new { x.EmployeeName }).Distinct().OrderBy(x => x.EmployeeName).ToList();
            var listCost     = _fleetBLL.GetFleet().Select(x => new { x.CostCenter }).Distinct().OrderBy(x => x.CostCenter).ToList();
            var listSM       = _fleetBLL.GetFleet().Select(x => new { x.SupplyMethod }).Distinct().OrderBy(x => x.SupplyMethod).ToList();

            model.SearchView.EmployeeNameList = new SelectList(listEmployee, "EmployeeName", "EmployeeName");
            model.SearchView.CostCenterList   = new SelectList(listCost, "CostCenter", "CostCenter");
            model.SearchView.SupplyMethodList = new SelectList(listSM, "SupplyMethod", "SupplyMethod");

            return(View(model));
        }
        public VehicleOverallReportModel Initial(VehicleOverallReportModel model)
        {
            var settingData = _settingBLL.GetSetting();
            var listStatus  = new Dictionary <bool, string> {
                { true, "Active" }, { false, "InActive" }
            };
            var listVehType   = settingData.Where(x => x.SettingGroup == EnumHelper.GetDescription(Enums.SettingGroup.VehicleType) && x.IsActive).Select(x => new { x.SettingValue }).ToList();
            var listSupMethod = settingData.Where(x => x.SettingGroup == EnumHelper.GetDescription(Enums.SettingGroup.SupplyMethod) && x.IsActive).Select(x => new { x.SettingValue }).ToList();
            var listRegional  = _locationMappingBLL.GetLocationMapping().Where(x => x.IsActive).Select(x => new { x.Region }).Distinct().ToList();
            var listBodyType  = settingData.Where(x => x.SettingGroup == EnumHelper.GetDescription(Enums.SettingGroup.BodyType) && x.IsActive).Select(x => new { x.SettingValue }).ToList();
            var listVendor    = _vendorBLL.GetVendor().Where(x => x.IsActive).Select(x => new { x.VendorName }).Distinct().ToList();
            var listCity      = _locationMappingBLL.GetLocationMapping().Where(x => x.IsActive).Select(x => new { x.Location }).Distinct().ToList();

            model.SearchView.StatusList       = new SelectList(listStatus, "Key", "Value");
            model.SearchView.VehicleTypeList  = new SelectList(listVehType, "SettingValue", "SettingValue");
            model.SearchView.SupplyMethodList = new SelectList(listSupMethod, "SettingValue", "SettingValue");
            model.SearchView.RegionalList     = new SelectList(listRegional, "Region", "Region");
            model.SearchView.BodyTypeList     = new SelectList(listBodyType, "SettingValue", "SettingValue");;
            model.SearchView.VendorList       = new SelectList(listVendor, "VendorName", "VendorName");
            model.SearchView.CityList         = new SelectList(listCity, "Location", "Location");
            model.SearchView.FromDate         = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1);
            model.SearchView.ToDate           = DateTime.Today;
            model.MainMenu     = _mainMenu;
            model.CurrentLogin = CurrentUser;

            return(model);
        }
示例#7
0
        public TraCrfItemViewModel InitialModel(TraCrfItemViewModel model)
        {
            var list          = _employeeBLL.GetEmployee().Where(x => x.IS_ACTIVE && x.GROUP_LEVEL > 0).Select(x => new { x.EMPLOYEE_ID, x.FORMAL_NAME }).ToList().OrderBy(x => x.FORMAL_NAME);
            var listReason    = _reasonBLL.GetReason().Where(x => x.DocumentType == (int)Enums.DocumentType.TMP).Select(x => new { x.MstReasonId, x.Reason }).ToList().OrderBy(x => x.Reason);
            var listVehType   = _settingBLL.GetSetting().Where(x => x.SettingGroup == "VEHICLE_TYPE").Select(x => new { x.SettingName, x.SettingValue }).ToList();
            var listVehCat    = _settingBLL.GetSetting().Where(x => x.SettingGroup == "VEHICLE_CATEGORY").Select(x => new { x.SettingName, x.SettingValue }).ToList();
            var listVehUsage  = _settingBLL.GetSetting().Where(x => x.SettingGroup.Contains("VEHICLE_USAGE_BENEFIT")).Select(x => new { x.SettingName, x.SettingValue }).ToList();
            var listSupMethod = _settingBLL.GetSetting().Where(x => x.SettingGroup == "SUPPLY_METHOD").Select(x => new { x.SettingName, x.SettingValue }).ToList();
            var listProject   = _settingBLL.GetSetting().Where(x => x.SettingGroup == "PROJECT").Select(x => new { x.SettingName, x.SettingValue }).ToList();
            var listRelocate  = _settingBLL.GetSetting().Where(x => x.SettingGroup == "RELOCATION_TYPE").Select(x => new { x.SettingName, x.SettingValue }).ToList();
            var listLocation  = _employeeBLL.GetCityLocation();



            model.EmployeeList     = new SelectList(list, "EMPLOYEE_ID", "FORMAL_NAME");
            model.LocationList     = new SelectList(listLocation, "City", "City");
            model.ReasonList       = new SelectList(listReason, "MstReasonId", "Reason");
            model.VehicleTypeList  = new SelectList(listVehType, "SettingName", "SettingValue");
            model.VehicleCatList   = new SelectList(listVehCat, "SettingName", "SettingValue");
            model.VehicleUsageList = new SelectList(listVehUsage, "SettingName", "SettingValue");
            model.SupplyMethodList = new SelectList(listSupMethod, "SettingName", "SettingValue");
            model.ProjectList      = new SelectList(listProject, "SettingName", "SettingValue");
            model.RelocateList     = new SelectList(listRelocate, "SettingName", "SettingValue");

            model.CurrentLogin = CurrentUser;

            model.MainMenu = _mainMenu;

            return(model);
        }
示例#8
0
        public TraCafController(IPageBLL pageBll, ICafBLL cafBLL, IRemarkBLL RemarkBLL,
                                ISettingBLL SettingBLL)
            : base(pageBll, Core.Enums.MenuList.TraCaf)
        {
            //_epafBLL = epafBll;
            _cafBLL    = cafBLL;
            _remarkBLL = RemarkBLL;


            _settingBLL = SettingBLL;
            _mainMenu   = Enums.MenuList.Transaction;

            //_vendorBLL = vendorBLL;
            _settingList = _settingBLL.GetSetting();
        }
        public CarComplaintFormItem listdata(CarComplaintFormItem model, string IdEmployee)
        {
            var listemployeefromdelegation = _delegationBLL.GetDelegation().Select(x => new { dataemployeefrom = x.EmployeeFrom + x.NameEmployeeFrom, x.EmployeeFrom, x.NameEmployeeFrom, x.EmployeeTo, x.NameEmployeeTo, x.DateTo }).ToList().Where(x => x.EmployeeTo == CurrentUser.EMPLOYEE_ID && x.DateTo >= DateTime.Today).OrderBy(x => x.EmployeeFrom);

            model.EmployeeFromDelegationList = new SelectList(listemployeefromdelegation, "EmployeeFrom", "dataemployeefrom");

            var listcomplaintcategory = _complaintcategoryBLL.GetComplaints().Select(x => new { x.MstComplaintCategoryId, x.CategoryName }).ToList().OrderBy(x => x.MstComplaintCategoryId);

            model.ComplaintCategoryList = new SelectList(listcomplaintcategory, "MstComplaintCategoryId", "CategoryName");

            var listsettingvtype = _settingBLL.GetSetting().Select(x => new { x.SettingGroup, x.SettingName, x.SettingValue }).ToList().Where(x => x.SettingGroup == "VEHICLE_TYPE").OrderBy(x => x.SettingValue);

            model.SettingListVType = new SelectList(listsettingvtype, "SettingValue", "SettingName");

            var listsettingvusage = _settingBLL.GetSetting().Select(x => new { x.SettingGroup, x.SettingName, x.SettingValue }).ToList().Where(x => x.SettingGroup == "VEHICLE_USAGE").OrderBy(x => x.SettingValue);

            model.SettingListVUsage = new SelectList(listsettingvusage, "SettingValue", "SettingName");

            var listsettingfleet = _fleetBLL.GetFleet().Select(x => new { x.MstFleetId, x.VehicleType, x.VehicleUsage, x.PoliceNumber, x.EmployeeID, x.EmployeeName, x.Manufacturer, x.Models, x.Series, x.VendorName, x.StartContract, x.EndContract }).ToList().Where(x => x.EmployeeID == IdEmployee).OrderBy(x => x.EmployeeName);

            model.SettingListFleet = new SelectList(listsettingfleet, "PoliceNumber", "PoliceNumber");

            return(model);
        }
示例#10
0
 public TraCrfController(IPageBLL pageBll, IEpafBLL epafBll, ITraCrfBLL crfBLL, IRemarkBLL RemarkBLL, IEmployeeBLL EmployeeBLL, IReasonBLL ReasonBLL,
                         ISettingBLL SettingBLL, IFleetBLL FleetBLL, IVendorBLL vendorBLL, ITraCsfBLL csfBLL, ITraTemporaryBLL tempBLL)
     : base(pageBll, Core.Enums.MenuList.TraCrf)
 {
     _epafBLL     = epafBll;
     _CRFBLL      = crfBLL;
     _remarkBLL   = RemarkBLL;
     _employeeBLL = EmployeeBLL;
     _reasonBLL   = ReasonBLL;
     _settingBLL  = SettingBLL;
     _mainMenu    = Enums.MenuList.Transaction;
     _fleetBLL    = FleetBLL;
     //_vendorBLL = vendorBLL;
     _settingList = _settingBLL.GetSetting();
     _csfBLL      = csfBLL;
     _tempBLL     = tempBLL;
 }
示例#11
0
        public ActionResult Index()
        {
            var model  = new RptKpiMonitoringModel();
            var filter = new KpiMonitoringGetByParamInput();

            model.MainMenu     = _mainMenu;
            model.CurrentLogin = CurrentUser;

            var FormTypeList = new Dictionary <string, string> {
                { "CSF", "CSF" }, { "CTF", "CTF" }, { "CRF", "CRF" }
            };
            var VehicleUsageList = _settingBLL.GetSetting().Where(x => x.SettingGroup == "VEHICLE_USAGE_BENEFIT").ToList();
            var BasetownList     = _employeeBLL.GetEmployee().Where(x => x.IS_ACTIVE).Select(x => new { BASETOWN = x.BASETOWN }).Distinct().OrderBy(x => x.BASETOWN).ToList();

            model.SearchView.FormDate = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1);
            model.SearchView.ToDate   = DateTime.Today;

            model.SearchView.FormTypeList     = new SelectList(FormTypeList, "Key", "Value");
            model.SearchView.VehicleUsageList = new SelectList(VehicleUsageList, "SettingName", "SettingName");
            model.SearchView.LocationList     = new SelectList(BasetownList, "BASETOWN", "BASETOWN");

            filter.FromDate = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1);
            filter.ToDate   = DateTime.Today;

            try
            {
                var ListTransactionDto = _kpiMonitoringBLL.GetTransaction(filter);
                var ListTransaction    = Mapper.Map <List <KpiMonitoringItem> >(ListTransactionDto);
                var UserLogin          = GetUserLogin();

                foreach (var item in ListTransaction)
                {
                    var data = GetDateworkflow(item, UserLogin);
                    model.ListTransaction.Add(data);
                }
            }
            catch (Exception exp)
            {
                model.ErrorMessage = exp.Message;
            }

            return(View(model));
        }
示例#12
0
        //
        // GET: /MstFuelOdometer/

        public ActionResult Index()
        {
            var model = new FuelOdometerModel();

            //model.Details = Mapper.Map<List<FuelOdometerItem>>(data);
            model.SearchView = new FuelOdometerSearchView();
            var fleetList        = _fleetBLL.GetFleet().ToList();
            var costCenterList   = _groupCostCenterBLL.GetGroupCenter().ToList();
            var fuelOdometerList = _fuelodometerBLL.GetFuelOdometer().ToList();
            var listVehType      = _settingBLL.GetSetting().Where(x => x.SettingGroup == EnumHelper.GetDescription(Enums.SettingGroup.VehicleType) && x.IsActive).Select(x => new { x.MstSettingId, x.SettingValue }).ToList();

            model.SearchView.PoliceNumberList  = new SelectList(fleetList.Select(x => new { x.PoliceNumber }).Distinct().ToList(), "PoliceNumber", "PoliceNumber");
            model.SearchView.EmployeeNameList  = new SelectList(fleetList.Select(x => new { x.EmployeeName }).Distinct().ToList(), "EmployeeName", "EmployeeName");
            model.SearchView.EmployeeIDList    = new SelectList(fleetList.Select(x => new { x.EmployeeID }).Distinct().ToList(), "EmployeeID", "EmployeeID");
            model.SearchView.CostCenterList    = new SelectList(costCenterList.Select(x => new { x.CostCenter }).Distinct().ToList(), "CostCenter", "CostCenter");
            model.SearchView.EcsRmbTransIdList = new SelectList(fuelOdometerList.Select(x => new { x.EcsRmbTransId }).Distinct().ToList(), "EcsRmbTransId", "EcsRmbTransId");
            model.SearchView.ClaimTypeList     = new SelectList(fuelOdometerList.Select(x => new { x.ClaimType }).Distinct().ToList(), "ClaimType", "ClaimType");
            model.SearchView.VehicleTypeList   = new SelectList(listVehType.Select(x => new { x.SettingValue }).Distinct().ToList(), "SettingValue", "SettingValue");
            model.MainMenu          = _mainMenu;
            model.CurrentLogin      = CurrentUser;
            model.CurrentPageAccess = CurrentPageAccess;
            return(View(model));
        }
示例#13
0
        public ActionResult Index()
        {
            var model = new RptCCFModel();
            var input = Mapper.Map <RptCCFInput>(model.SearchView);
            var data  = _rptCcfBLL.GetRptCcf(input);

            model.MainMenu     = _mainMenu;
            model.TitleForm    = "CCF Report";
            model.TitleExport  = "ExportCCF";
            model.CurrentLogin = CurrentUser;
            var settingData = _settingBLL.GetSetting();

            model.RptCCFItem = Mapper.Map <List <RptCCFItem> >(data);

            var listCategory    = _rptComplaintBLL.GetComplaints().Select(x => new { x.MstComplaintCategoryId, x.CategoryName }).Distinct().OrderBy(x => x.MstComplaintCategoryId).ToList();
            var listCoordinator = _rptCcfBLL.GetRptCcfData().Select(x => new { x.CoordinatorName }).Distinct().OrderBy(x => x.CoordinatorName).ToList();
            var listLocation    = _rptCcfBLL.GetRptCcfData().Select(x => new { x.LocationCity }).Distinct().OrderBy(x => x.LocationCity).ToList();

            model.SearchView.Categorylist    = new SelectList(listCategory, "MstComplaintCategoryId", "CategoryName");
            model.SearchView.Coordinatorlist = new SelectList(listCoordinator, "CoordinatorName", "CoordinatorName");
            model.SearchView.Locationlist    = new SelectList(listLocation, "LocationCity", "LocationCity");

            return(View(model));
        }
示例#14
0
        public VehicleSpectItem initCreate()
        {
            var model = new VehicleSpectItem();
            //var list1 = new List<SelectListItem>
            //{
            //    new SelectListItem { Text = "MPV", Value = "MPV" },
            //    new SelectListItem { Text = "SUV", Value = "SUV" },
            //    new SelectListItem { Text = "Forklift", Value = "Forklift" },
            //    new SelectListItem { Text = "Motorcycle", Value = "Motorcycle" },
            //    new SelectListItem { Text = "Truck", Value = "Truck" }
            //};

            var list1 = _settingBLL.GetSetting().Where(x => x.SettingGroup == "BODY_TYPE" && x.IsActive).ToList();

            model.BodyTypeList = new SelectList(list1, "SettingValue", "SettingValue");

            var list2 = new List <SelectListItem>
            {
                new SelectListItem {
                    Text = "0", Value = "0"
                },
                new SelectListItem {
                    Text = "1", Value = "1"
                },
                new SelectListItem {
                    Text = "2", Value = "2"
                },
                new SelectListItem {
                    Text = "3", Value = "3"
                },
                new SelectListItem {
                    Text = "4", Value = "4"
                }
            };

            model.GroupLevelList = new SelectList(list2, "Value", "Text");

            var list3 = new List <SelectListItem>
            {
                new SelectListItem {
                    Text = "Automatic", Value = "Automatic"
                },
                new SelectListItem {
                    Text = "Manual", Value = "Manual"
                },
            };

            model.TransmissionList = new SelectList(list3, "Value", "Text");

            var list4 = new List <SelectListItem>
            {
                new SelectListItem {
                    Text = "Gasoline", Value = "Gasoline"
                },
                new SelectListItem {
                    Text = "Diesel", Value = "Diesel"
                }
            };

            model.FuelTypeList = new SelectList(list4, "Value", "Text");

            return(model);
        }
示例#15
0
        public ActionResult Index()
        {
            try
            {
                var model = new RptFuelModel();
                var input = Mapper.Map <RptFuelByParamInput>(model.SearchView);
                var data  = _rptFuelBLL.GetRptFuel(input);
                model.MainMenu     = _mainMenu;
                model.TitleForm    = "Fuel Report";
                model.TitleExport  = "ExportFuel";
                model.CurrentLogin = CurrentUser;
                var settingData     = _settingBLL.GetSetting();
                var listVehType     = settingData.Where(x => x.SettingGroup == EnumHelper.GetDescription(Enums.SettingGroup.VehicleType) && x.IsActive).Select(x => new { x.SettingValue }).ToList();
                var costCenter      = _fleetBLL.GetFleet().Select(x => new { x.CostCenter }).ToList().Distinct().OrderBy(x => x.CostCenter);
                var function        = _employeeBLL.GetEmployee().Select(x => new { x.DIRECTORATE }).ToList().Distinct().OrderBy(x => x.DIRECTORATE);
                var locationMapping = _locationMappingBLL.GetLocationMapping().Select(x => new { x.Region }).ToList().Distinct().OrderBy(x => x.Region);

                model.SearchView.VehicleTypeList = new SelectList(listVehType, "SettingValue", "SettingValue");
                model.SearchView.CostCenterList  = new SelectList(costCenter, "CostCenter", "CostCenter");
                model.SearchView.FunctionList    = new SelectList(function, "DIRECTORATE", "DIRECTORATE");
                model.SearchView.RegionalList    = new SelectList(locationMapping, "Region", "Region");
                model.RptFuelItem = Mapper.Map <List <RptFuelItem> >(data);

                var dataFuel = _rptFuelBLL.GetRptFuelData();

                foreach (var item in model.RptFuelItem)
                {
                    if (input.MonthFrom == 1)
                    {
                        input.MonthFrom = 12;
                        input.YearFrom  = input.YearFrom - 1;
                    }
                    else
                    {
                        input.MonthFrom = input.MonthFrom - 1;
                    }



                    if (item.Odometer != 0)
                    {
                        var data_temp = dataFuel.Where(x => x.PoliceNumber == item.PoliceNumber && x.ReportMonth == input.MonthFrom && x.ReportYear == input.YearFrom).Select(x => x.Odometer).FirstOrDefault();
                        if (data_temp == 0)
                        {
                            item.Usage = item.Odometer;
                            if (item.Liter != 0)
                            {
                                item.kmlt = Math.Round(item.Usage / item.Liter, 2);
                            }
                        }
                        else
                        {
                            item.Usage = item.Odometer - data_temp;
                            if (item.Liter != 0)
                            {
                                item.kmlt = Math.Round(item.Usage / item.Liter, 2);
                            }
                        }
                    }
                }

                return(View(model));
            }
            catch (Exception exception)
            {
                var model = new RptFuelModel();
                var input = Mapper.Map <RptFuelByParamInput>(model.SearchView);
                var data  = _rptFuelBLL.GetRptFuel(input);
                model.MainMenu     = _mainMenu;
                model.TitleForm    = "Fuel Report";
                model.TitleExport  = "ExportFuel";
                model.CurrentLogin = CurrentUser;
                var settingData     = _settingBLL.GetSetting();
                var listVehType     = settingData.Where(x => x.SettingGroup == EnumHelper.GetDescription(Enums.SettingGroup.VehicleType) && x.IsActive).Select(x => new { x.SettingValue }).ToList();
                var costCenter      = _fleetBLL.GetFleet().Select(x => new { x.CostCenter }).ToList().Distinct().OrderBy(x => x.CostCenter);
                var function        = _employeeBLL.GetEmployee().Select(x => new { x.DIRECTORATE }).ToList().Distinct().OrderBy(x => x.DIRECTORATE);
                var locationMapping = _locationMappingBLL.GetLocationMapping().Select(x => new { x.Region }).ToList().Distinct().OrderBy(x => x.Region);

                model.SearchView.VehicleTypeList = new SelectList(listVehType, "SettingValue", "SettingValue");
                model.SearchView.CostCenterList  = new SelectList(costCenter, "CostCenter", "CostCenter");
                model.SearchView.FunctionList    = new SelectList(function, "DIRECTORATE", "DIRECTORATE");
                model.SearchView.RegionalList    = new SelectList(locationMapping, "Region", "Region");
                model.RptFuelItem = Mapper.Map <List <RptFuelItem> >(data);

                model.ErrorMessage = exception.Message;
                return(View(model));
            }
        }