public ActionResult PublicHoliday(int Id) { publicHolidayCounty model = new publicHolidayCounty(); if (Id > 0) { model = _holidayNAbsenceMethod.getCountryData(Id); } return(PartialView("_partialPublicHolidayCountry", model)); }
public publicHolidayCounty getCountryData(int Id) { publicHolidayCounty model = new publicHolidayCounty(); var countryData = getCountryById(Id); model.Id = countryData.Id; model.Name = countryData.Name; foreach (var item in getHolidayListByCountryId(Id)) { publicHolidayCountyList holidayModel = new publicHolidayCountyList(); holidayModel.Id = item.Id; holidayModel.Name = item.Name; holidayModel.Date = String.Format("{0:dd-MM-yyy}", item.Date); model.holidayList.Add(holidayModel); } return(model); }