public static SearchViewData Create(Staff staff) { return(new PersonSearchViewData { Description = staff.FullName(), Id = staff.Id.ToString(), SearchType = (int)SearchTypeEnum.Persons, ShortPersonInfo = StaffViewData.Create(staff) }); }
public static LunchCountGridViewData Create(LunchCountGrid lunchCountGrid) { return(new LunchCountGridViewData { Students = StudentLunchCountViewData.Create(lunchCountGrid.Students), Staffs = StaffViewData.Create(lunchCountGrid.Staffs), MealItems = MealItemViewData.Create(lunchCountGrid.MealItems), Date = lunchCountGrid.Date, ClassId = lunchCountGrid.ClassId, IncludeGuest = lunchCountGrid.IncludeGuest }); }
public ActionResult Schedule(int personId) { var staff = SchoolLocator.StaffService.GetStaff(personId); return(Json(PrepareScheduleData(StaffViewData.Create(staff)))); }