Example #1
0
        public ActionResult StateListGridView()
        {
            statesMasterService = new StateServiceClient();
            EntityDtos <StateDto> stateDto = statesMasterService.FindAll();

            ViewData["StateList"] = stateDto.Entities;
            return(PartialView("StateListGridView", ViewData["StateList"]));
        }
Example #2
0
 public ActionResult StateList()
 {
     try
     {
         statesMasterService = new StateServiceClient();
         EntityDtos <StateDto> stateDto = statesMasterService.FindAll();
         ViewData["StateList"] = stateDto.Entities;
     }
     catch (Exception ex)
     {
         return(View("ErrorPage"));
     }
     finally
     {
         if (statesMasterService != null)
         {
             statesMasterService.Close();
         }
     }
     return(View("StateList", ViewData["StateList"]));
 }