public virtual ActionResult Index() { SupervisionPorfolioModel ModelSupervisionPorfolio = new SupervisionPorfolioModel(); var ListCountryDepartment = ClientGenericRepositoty.GetCountryDepartments(Globals.NeutralLanguage); var ListSectorDepartment = ClientGenericRepositoty.GetSectorDepartment(Globals.NeutralLanguage); var ListCountry = ClientGenericRepositoty.GetCountries(Globals.NeutralLanguage); var ListDivision = ClientGenericRepositoty.GetDivisions(Globals.NeutralLanguage); var ListValidationStageSupPlan = ClientGenericRepositoty.GetStatesForSupervisionReport(); var ListESG_Tracking = new Dictionary <bool, string>(); ListESG_Tracking.Add(true, Localization.GetText("Yes")); ListESG_Tracking.Add(false, Localization.GetText("No")); var YearsSupervision = ClientGenericRepositoty.GetMaxAndMinYearSupervisionPlanReport(); var ListYears = new Dictionary <int, int>(); ModelSupervisionPorfolio.StartYear = YearsSupervision["MinYear"]; ModelSupervisionPorfolio.EndYear = YearsSupervision["MaxYear"]; for (int x = ModelSupervisionPorfolio.StartYear; x <= ModelSupervisionPorfolio.EndYear; x++) { ListYears.Add(x, x); } ViewBag.ListCountryDepartment = new MultiSelectList(ListCountryDepartment, "ConvergenceMasterDataId", "Name"); ViewBag.ListSectorDepartment = new MultiSelectList(ListSectorDepartment, "ConvergenceMasterDataId", "Name"); ViewBag.ListCountry = new MultiSelectList(ListCountry, "ConvergenceMasterDataId", "Name"); ViewBag.ListDivision = new MultiSelectList(ListDivision, "ConvergenceMasterDataId", "Name"); ViewBag.ListValidationStageSupPlan = new SelectList(ListValidationStageSupPlan, "ConvergenceMasterDataId", "Name"); ViewBag.ListESG_Tracking = new SelectList(ListESG_Tracking, "Key", "Value"); ViewBag.ListStartYear = new SelectList(ListYears, "Key", "Value"); ViewBag.ListEndYear = new SelectList(ListYears.OrderByDescending(x => x.Key).ToList(), "Key", "Value"); return(View(ModelSupervisionPorfolio)); }
public virtual ActionResult Index() { CountryStatusModel ModelCountryStatus = new CountryStatusModel(); var ListCountryDepartment = ClientGenericRepositoty.GetCountryDepartments(Lang).OrderBy(x => x.Name).ToList(); var ListCountry = ClientGenericRepositoty.GetCountries(Lang).OrderBy(x => x.Name).ToList(); var ListSectorDepartment = ClientGenericRepositoty.GetSectorDepartment(Lang).OrderBy(x => x.Name).ToList(); var ListDivisions = ClientGenericRepositoty.GetDivisions(Lang).OrderBy(x => x.Name).ToList(); var ListPMRCycles = ClientPMRModelRepository.GetAllCyclesSeptemberAndMarchCycles(Lang).OrderByDescending(x => x.PmrCycleId).ToList(); var TempEV_PV = new Dictionary <bool, string>(); TempEV_PV.Add(true, "Original Value"); TempEV_PV.Add(false, "Annual Value"); var TempESGTracking = new Dictionary <bool, string>(); TempESGTracking.Add(true, Localization.GetText("Yes")); TempESGTracking.Add(false, Localization.GetText("No")); ViewBag.ListEV_PV = new SelectList(TempEV_PV, "Key", "Value"); ViewBag.ListESGTracking = new SelectList(TempESGTracking, "Key", "Value"); ViewBag.ListCountryDepartment = new MultiSelectList(ListCountryDepartment, "convergencemasterdataid", "name"); ViewBag.ListCountry = new MultiSelectList(ListCountry, "convergencemasterdataid", "name"); ViewBag.ListSectorDepartment = new MultiSelectList(ListSectorDepartment, "convergencemasterdataid", "name"); ViewBag.ListDivisions = new MultiSelectList(ListDivisions, "convergencemasterdataid", "name"); ViewBag.ListPMRCycles = new MultiSelectList(ListPMRCycles, "PmrCycleId ", "PmrCycleName"); return(View(ModelCountryStatus)); }
public virtual JsonResult GetSupervisionVersionByYear(int OperationId, int Year) { var ListSupervisionPlanYear = ClientGenericRepositoty.GetSupervisionPlanVersionByYear(OperationId, Year); return(new JsonResult() { Data = ListSupervisionPlanYear }); }
public virtual JsonResult FilterDivision(CountryStatusModel ModelCountryStatusModel) { var ListDivision = ClientGenericRepositoty.GetDivisionFilter(Lang, ModelCountryStatusModel.SectorDepartment).OrderBy(x => x.Name).ToList(); return(new JsonResult() { Data = ListDivision }); }
public virtual JsonResult FilterCountrys(CountryStatusModel ModelCountryStatusModel) { var ListCountrys = ClientGenericRepositoty.GetCountriesFilter(Lang, ModelCountryStatusModel.CountryDepartment).OrderBy(x => x.Name).ToList(); return(new JsonResult() { Data = ListCountrys }); }
public virtual JsonResult FilterDivision(SupervisionPorfolioModel ModelSupervisionPorfolio) { var ListDivision = ClientGenericRepositoty.GetDivisionFilter(Globals.NeutralLanguage, ModelSupervisionPorfolio.ListSectorDepartment).OrderBy(x => x.Name).ToList(); return(new JsonResult() { Data = ListDivision }); }
public virtual JsonResult FilterCountrys(SupervisionPorfolioModel ModelSupervisionPorfolio) { var ListCountrys = ClientGenericRepositoty.GetCountriesFilter(Globals.NeutralLanguage, ModelSupervisionPorfolio.ListCountryDepartment).OrderBy(x => x.Name).ToList(); return(new JsonResult() { Data = ListCountrys }); }
public virtual ActionResult Index(SupervisionPorfolioModel ModelSupervisionPorfolio) { var ListCountryDepartment = ClientGenericRepositoty.GetCountryDepartments(Globals.NeutralLanguage); var ListSectorDepartment = ClientGenericRepositoty.GetSectorDepartment(Globals.NeutralLanguage); var ListCountry = ClientGenericRepositoty.GetCountries(Globals.NeutralLanguage); var ListDivision = ClientGenericRepositoty.GetDivisions(Globals.NeutralLanguage); var ListValidationStageSupPlan = ClientGenericRepositoty.GetStatesForSupervisionReport(); var ListESG_Tracking = new Dictionary <bool, string>(); ListESG_Tracking.Add(true, Localization.GetText("Yes")); ListESG_Tracking.Add(false, Localization.GetText("No")); var YearsSupervision = ClientGenericRepositoty.GetMaxAndMinYearSupervisionPlanReport(); var ListYears = new Dictionary <int, int>(); var startYear = YearsSupervision["MinYear"]; var endYear = YearsSupervision["MaxYear"]; for (int x = startYear; x <= endYear; x++) { ListYears.Add(x, x); } ViewBag.ListCountryDepartment = new MultiSelectList(ListCountryDepartment, "ConvergenceMasterDataId", "Name"); ViewBag.ListSectorDepartment = new MultiSelectList(ListSectorDepartment, "ConvergenceMasterDataId", "Name"); ViewBag.ListCountry = new MultiSelectList(ListCountry, "ConvergenceMasterDataId", "Name"); ViewBag.ListDivision = new MultiSelectList(ListDivision, "ConvergenceMasterDataId", "Name"); ViewBag.ListValidationStageSupPlan = new SelectList(ListValidationStageSupPlan, "ConvergenceMasterDataId", "Name"); ViewBag.ListESG_Tracking = new SelectList(ListESG_Tracking, "Key", "Value"); ViewBag.ListStartYear = new SelectList(ListYears, "Key", "Value"); ViewBag.ListEndYear = new SelectList(ListYears.OrderByDescending(x => x.Key).ToList(), "Key", "Value"); string lang = string.Empty; if (!string.IsNullOrEmpty(IDBContext.Current.CurrentLanguage)) { lang = IDBContext.Current.CurrentLanguage.ToUpper(); } else { lang = Globals.NeutralLanguage.ToUpper(); } var SupervisionResults = _ClientGenericRepositoty.GetSupervisionPlanresults(ModelSupervisionPorfolio, lang); ModelSupervisionPorfolio.ListSupervionResults.AddRange(SupervisionResults); return(View(ModelSupervisionPorfolio)); }
public virtual ActionResult Create(string OperationNumber) { var OperationId = ClientGenericRepositoty.GetOperationIDForOperationNumber(OperationNumber); var ListSupervisionPlanOperation = ClienSupervisionPlan.GetYearsForSupervicionPlan(OperationId); SupervisionPlanOperationReport ModelSupervisionPlan; if (ListSupervisionPlanOperation.Any()) { ModelSupervisionPlan = ClientGenericRepositoty.GetSupervisionPlanVersionByYear(OperationId, ListSupervisionPlanOperation[0].Year); } else { ModelSupervisionPlan = new SupervisionPlanOperationReport(); } ViewBag.ListSupervisionPlanOperation = new SelectList(ListSupervisionPlanOperation, "Year", "Year"); return(View(ModelSupervisionPlan)); }