public void GetAllServiceTypes() { var result = _service.GetAll(); var count = result.Count(); Assert.AreEqual(2, count); }
public ActionResult Index2(int id = -1) { if (id == -1) { id = 1; } ViewBag.ID = id; ViewBag.Services = ServiceTypeService.GetAll(); return(View()); }
// // GET: /AdminService/ public ActionResult List() { var model = ServiceTypeService.GetAll(); if (TempData["Error"] != null) { ViewBag.Error = TempData["Error"]; } return(View(model)); }
public static IEnumerable <SelectListItem> FillddlServiceType() { var service = new ServiceTypeService(); var leaveTypes = service.GetAll(); var listitems = leaveTypes.Select(x => new SelectListItem { Text = x.ServiceName, Value = x.Id.ToString() }); return(listitems); }
public DashboardModel GetPosts2ByCurrentUser() { var model = new DashboardModel() { Labels = new List <string>(), Datas = new List <int>() }; if (HttpUtil.UserProfile == null) { return(model); } var list = PostService.GetAllByUserId(HttpUtil.UserProfile.ID); var services = ServiceTypeService.GetAll(); foreach (var s in services) { model.Labels.Add(s.Name); model.Datas.Add(list.Count(l => l.ServiceID == s.ID)); } return(model); }
public static IEnumerable<SelectListItem> FillddlServiceType() { var service = new ServiceTypeService(); var leaveTypes = service.GetAll(); var listitems = leaveTypes.Select(x => new SelectListItem { Text = x.ServiceName, Value = x.Id.ToString() }); return listitems; }
// GET: ServiceTypes public ActionResult Index() { var servicetype = Service.GetAll(); return(View(servicetype)); }
public ActionResult <List <ServiceTypeDto> > GetServiceTypes() { return(_service.GetAll()); }
public List <Service> GetAllServices() { return(ServiceTypeService.GetAll()); }