private IEnumerable <SubPracticeModel> GetSubPractices(int practiceID, int pageNo)
        {
            IEnumerable <SubPracticeDto>   subPractices = subPracticeService.GetAllByPracticeID(practiceID, RecordsPerPage, pageNo);
            IEnumerable <SubPracticeModel> uiPractices  = Mapper.Map <IEnumerable <SubPracticeDto>, IEnumerable <SubPracticeModel> >(subPractices);

            return(uiPractices);
        }
Ejemplo n.º 2
0
        private List <SelectListItem> GetSubPractices(int practiceID)
        {
            IEnumerable <SubPracticeDto> subPracticeList = subPracticeService.GetAllByPracticeID(practiceID);
            List <SelectListItem>        ddList          = (from c in subPracticeList
                                                            orderby c.SubPracticeName
                                                            select new SelectListItem
            {
                Text = c.SubPracticeName,
                Value = c.SubPracticeID.ToString()
            }).ToList();

            ViewBag.SubPracticeListItems = ddList;
            return(ddList);
        }
        public JsonResult SubPracticeList(int id)
        {
            IEnumerable <SubPracticeDto> subPracticeList = subPracticeService.GetAllByPracticeID(id);
            List <SelectListItem>        ddList          = (from c in subPracticeList
                                                            orderby c.SubPracticeName
                                                            select new SelectListItem
            {
                Text = c.SubPracticeName,
                Value = c.SubPracticeID.ToString()
            }).ToList();

            ddList.Insert(0, new SelectListItem
            {
                Text  = "Please Select",
                Value = "0",
            });
            return(Json(ddList));
        }