// // GET: /SetupMemberDependent/ public ActionResult Index() { SetUpMemberShipProvider pro = new SetUpMemberShipProvider(); SetUpMemberShipModel obj = new SetUpMemberShipModel(); obj.lstOfsetSetUpMemberShipModel = pro.Getlist(); foreach (var item in obj.lstOfsetSetUpMemberShipModel) { item.FirstName = item.FirstName + " " + item.MiddleName + " " + item.LastName; } foreach (var item in obj.lstOfsetSetUpMemberShipModel) { using (EHMSEntities ent = new EHMSEntities()) { item.cnt = (from x in ent.SetupMemberDependents where x.SetupMemberID == item.SetupMemberID select x).ToList().Count(); item.cnt = item.MaximumDependent - item.cnt; } } return(View(obj)); }
//public ActionResult Index(int? page) //{ // SetUpMemberShipModel obj = new SetUpMemberShipModel(); // SetUpMemberShipProvider pro = new SetUpMemberShipProvider(); // obj.lstOfsetSetUpMemberShipModel = pro.Getlist(); // var pageNumber = page ?? 1; // var onePageOfProducts = obj.lstOfsetSetUpMemberShipModel.ToPagedList(pageNumber, 25); // ViewBag.OnePageOfProducts = onePageOfProducts; // return View(obj); //} public ActionResult Index(int?page) { SetUpMemberShipModel obj = new SetUpMemberShipModel(); SetUpMemberShipProvider pro = new SetUpMemberShipProvider(); obj.lstOfsetSetUpMemberShipModel = pro.Getlist(); var pageNumber = page ?? 1; //var onePageOfProducts = obj.lstOfsetSetUpMemberShipModel.ToPagedList(pageNumber, 25); //ViewBag.OnePageOfProducts = onePageOfProducts; return(View(obj)); }