Ejemplo n.º 1
0
        public void GetAllServiceTypes()
        {
            var result = _service.GetAll();
            var count  = result.Count();

            Assert.AreEqual(2, count);
        }
Ejemplo n.º 2
0
        public ActionResult Index2(int id = -1)
        {
            if (id == -1)
            {
                id = 1;
            }

            ViewBag.ID       = id;
            ViewBag.Services = ServiceTypeService.GetAll();
            return(View());
        }
Ejemplo n.º 3
0
        //
        // GET: /AdminService/
        public ActionResult List()
        {
            var model = ServiceTypeService.GetAll();

            if (TempData["Error"] != null)
            {
                ViewBag.Error = TempData["Error"];
            }

            return(View(model));
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
        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;
        }
Ejemplo n.º 7
0
        // GET: ServiceTypes
        public ActionResult Index()
        {
            var servicetype = Service.GetAll();

            return(View(servicetype));
        }
 public ActionResult <List <ServiceTypeDto> > GetServiceTypes()
 {
     return(_service.GetAll());
 }
Ejemplo n.º 9
0
 public List <Service> GetAllServices()
 {
     return(ServiceTypeService.GetAll());
 }