public ActionResult EditUser(int userId)
        {
            StringBuilder objStringBuilderError = new StringBuilder();
            try
            {
                if (Session["UserName"] != null)
                {
                    UsersModel userMl;
                    using (JetstreamClient objMainServiceClient = new JetstreamClient())
                    {
                        userMl = objMainServiceClient.GetUserModelListByUserId(userId);
                    }
                    var statusList = Enum.GetValues(typeof(Enums.Status)).Cast<object>().ToDictionary(item => Convert.ToBoolean(Enum.Parse(typeof(Enums.Status), item.ToString())), item => Enum.GetName(typeof(Enums.Status), item));
                    ViewBag.StatusModelList = new SelectList(statusList.OrderBy(x => x.Value), "Key", "Value");

                    ViewBag.Name = userMl.FirstName + " " + userMl.LastName;
                    return View("EditUser", userMl);
                }
                else
                {
                    return RedirectToAction("UserLogin", "Login");
                }
            }
            catch (FaultException<ServiceData> fex)
            {
                objStringBuilderError.AppendLine("In method : EditUser(int userId) :: 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 : EditUser(int userId) :: 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");
            }
        }
        public ActionResult SetupPassword(string userIdEncode, string strKey)
        {
            StringBuilder objStringBuilderError = new StringBuilder();
            try
            {
                if (userIdEncode != null)
                {
                    int userId = Convert.ToInt32(CryptoManager.Decrypt(userIdEncode, true));
                    UsersModel objUser;
                    using (JetstreamClient objMainServiceClient = new JetstreamClient())
                    {
                        objUser = objMainServiceClient.GetUserModelListByUserId(userId);
                    }
                    if (objUser != null)
                    {
                        if (string.Equals(strKey, JetstreamResource.ResetPasswordCommand))
                        {
                            objUser.Password = null;
                            return View("SetupPassword", objUser);
                        }
                        else if (string.Equals(strKey, JetstreamResource.SetupPasswordCommand))
                        {
                            if (!string.IsNullOrEmpty(objUser.Password))
                            {
                                Success(JetstreamResource.PasswordSetup, true);
                                return View("UserLogin");
                            }
                            else
                            {
                                return View("SetupPassword", objUser);
                            }
                        }
                    }
                    return View("UserLogin");
                }
                else
                {
                    return View("UserLogin");
                }
            }
            catch (FaultException<ServiceData> fex)
            {
                objStringBuilderError.AppendLine("In method : SetupPassword(string userIdEncode, string strKey) :: LoginController");
                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 : SetupPassword(string userIdEncode, string strKey) :: LoginController");
                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>
        /// Delete user
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        public ActionResult DeleteUser(int userId)
        {
            StringBuilder objStringBuilderError = new StringBuilder();
            try
            {
                if (Session["UserName"] != null)
                {
                    UsersModel userML;
                    using (JetstreamClient objMainServiceClient = new JetstreamClient())
                    {
                        userML = objMainServiceClient.GetUserModelListByUserId(userId);
                        objMainServiceClient.DeleteUserDetails(userId);
                    }
                    UpdatePasses(userML);
                    Success(JetstreamResource.UserDeleteMessage, true);
                    return RedirectToAction("GetUserDetails");
                }
                else
                {
                    return RedirectToAction("UserLogin", "Login");
                }
            }
            catch (FaultException<ServiceData> fex)
            {
                objStringBuilderError.AppendLine("In method : DeleteUser(int userId) :: 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 : DeleteUser(int userId) :: 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");
            }
        }