public static IEnumerable<SelectListItem> FillddlDesignation()
        {
            var service = new DesignationService();
            var designation = service.GetAll();
            var listitems = designation.Select(x =>

                new SelectListItem
                {
                    Text = x.DesignationName,
                    Value = x.Id.ToString()
                });
            return listitems;
        }
Exemple #2
0
        public static IEnumerable <SelectListItem> FillddlDesignation()
        {
            var service     = new DesignationService();
            var designation = service.GetAll();
            var listitems   = designation.Select(x =>

                                                 new SelectListItem
            {
                Text  = x.DesignationName,
                Value = x.Id.ToString()
            });

            return(listitems);
        }
        // GET: Designation
        public ActionResult Index()
        {
            var employees = Service.GetAll();

            return(View(employees));
        }