public ActionResult GetUserDetails(SortingPagingInfo info)
        {
            StringBuilder objStringBuilderError = new StringBuilder();
            try
            {
                if (Session["UserName"] != null)
                {
                    IEnumerable<UsersModel> lstUserDetails;
                    using (JetstreamClient objMainServiceClient = new JetstreamClient())
                    {
                        lstUserDetails = objMainServiceClient.GetFilterUserModelList(info.SearchText);
                    }
                    lstUserDetails = ApplySorting(info, lstUserDetails).Take(Constants.PagingPageSize);

                    ViewBag.SortingPagingInfo = info;
                    return View("UserDetails", lstUserDetails);
                }
                else
                {
                    return RedirectToAction("UserLogin", "Login");
                }
            }
            catch (FaultException<ServiceData> fex)
            {
                objStringBuilderError.AppendLine("In method : GetUserDetails(SortingPagingInfo info) :: UserController");
                objStringBuilderError.AppendFormat("ErrorMessage::{0} {1}", fex.Detail.ErrorMessage, Environment.NewLine);
                objStringBuilderError.AppendFormat("ErrorDetails::{0} {1}", Environment.NewLine, fex.Detail.ErrorDetails);
                SaveLogger.SaveLoggerError(objStringBuilderError.ToString());
                return View("Error");
            }
            catch (Exception ex)
            {
                objStringBuilderError.AppendLine("In method : GetUserDetails(SortingPagingInfo info) :: UserController");
                objStringBuilderError.AppendFormat("ErrorMessage::{0} {1}", ex.Message, Environment.NewLine);
                objStringBuilderError.AppendFormat("ErrorDetails::{0} {1}", Environment.NewLine, ex.ToString());

                SaveLogger.SaveLoggerError(objStringBuilderError.ToString());
                return View("Error");
            }
        }
 /// <summary>
 ///  Method to get the user list
 /// </summary>
 /// <param name="searchText"></param>
 /// <param name="pageIndex"></param>
 /// <param name="pageSize"></param>
 /// <param name="sortField"></param>
 /// <param name="sortDirection"></param>
 /// <returns></returns>
 public JsonResult GetUsersList(string searchText, int pageIndex, int pageSize, string sortField, string sortDirection)
 {
     List<UsersModel> usersModels;
     using (JetstreamClient objMainServiceClient = new JetstreamClient())
     {
         var userList = objMainServiceClient.GetFilterUserModelList(searchText);
         SortingPagingInfo info = new SortingPagingInfo
         {
             SortField = sortField,
             SortDirection = sortDirection,
         };
         usersModels = ApplySorting(info, userList).Skip(pageIndex * pageSize).Take(pageSize).ToList();
     }
     return Json(new { usersModels }, JsonRequestBehavior.AllowGet);
 }
        /// <summary>
        /// Get user detail
        /// </summary>
        /// <returns></returns>
        public ActionResult GetUserDetails()
        {
            StringBuilder objStringBuilderError = new StringBuilder();
            try
            {
                if (Session["UserName"] != null)
                {
                    IEnumerable<UsersModel> lstUserDetails;
                    using (JetstreamClient objMainServiceClient = new JetstreamClient())
                    {
                        lstUserDetails = objMainServiceClient.GetFilterUserModelList(string.Empty);
                    }

                    SortingPagingInfo info = new SortingPagingInfo
                    {
                        SortField = Enums.UserSortField.FirstName.ToString(),
                        SortDirection = Constants.Ascending,
                    };

                    lstUserDetails = lstUserDetails.OrderBy(x => x.FirstName).Take(Constants.PagingPageSize);
                    ViewBag.SortingPagingInfo = info;
                    return View("UserDetails", lstUserDetails);
                }
                else
                {
                    return RedirectToAction("UserLogin", "Login");
                }
            }
            catch (FaultException<ServiceData> fex)
            {
                objStringBuilderError.AppendLine("In method : GetUserDetails() :: UserController");
                objStringBuilderError.AppendFormat("ErrorMessage::{0} {1}", fex.Detail.ErrorMessage, Environment.NewLine);
                objStringBuilderError.AppendFormat("ErrorDetails::{0} {1}", Environment.NewLine, fex.Detail.ErrorDetails);
                SaveLogger.SaveLoggerError(objStringBuilderError.ToString());
                return View("Error");
            }
            catch (Exception ex)
            {
                objStringBuilderError.AppendLine("In method : GetUserDetails() :: UserController");
                objStringBuilderError.AppendFormat("ErrorMessage::{0} {1}", ex.Message, Environment.NewLine);
                objStringBuilderError.AppendFormat("ErrorDetails::{0} {1}", Environment.NewLine, ex.ToString());

                SaveLogger.SaveLoggerError(objStringBuilderError.ToString());
                return View("Error");
            }
        }