Пример #1
0
        public ActionResult UserStatusChange()
        {
            userlogin objuserlogin = new userlogin();

            if (Request.QueryString["status"] == "not active")
            {
                objuserlogin.loginid = int.Parse(Request.QueryString["lid"]);
                objadminmodel.ChangeUserStatus(objuserlogin, "active");
            }
            if (Request.QueryString["status"] == "active")
            {
                objuserlogin.loginid = int.Parse(Request.QueryString["lid"]);
                objadminmodel.ChangeUserStatus(objuserlogin, "blocked");
            }
            if (Request.QueryString["status"] == "blocked")
            {
                objuserlogin.loginid = int.Parse(Request.QueryString["lid"]);
                objadminmodel.ChangeUserStatus(objuserlogin, "active");
            }
            ViewBag.users = objadminmodel.GetUserList();
            return(View("~/Views/Admin/UsersList.cshtml"));
        }