示例#1
0
 public string GetShowUser()
 {
     TempData["LoginId"] = user_Id;
     SuperAdminBLL bll = new SuperAdminBLL();
     return bll.getUserDetais();
 }
示例#2
0
        public ActionResult ChangePassword(FormCollection frm)
        {
            if (Session["loginDetails"] != null)
            {
                TempData["LoginId"] = user_Id;




                if (frm["txtNewPassword"].ToString() == frm["txtReTypePassword"].ToString())
                {

                    SuperAdminBLL bll = new SuperAdminBLL();
                    string re = bll.PasswordExist(user_Id, frm["txtCurrentPassword"].ToString());
                    if (re == "1")
                    {
                        int res = bll.ChangePassword(user_Id, frm["txtReTypePassword"].ToString());
                        if (res > 0)
                        {
                            return RedirectToAction("Index", "Admin");
                            //ViewBag.ChangeMessage = "Password Change Sucessfully";

                        }
                        return View();
                    }
                    else
                    {
                        ViewBag.ChangeMessage = "Incorrect Old Password";
                        return View();
                    }

                }
                else
                {
                    ViewBag.ChangeMessage = "Password doesnot Match ";

                    return View();
                }
            }
            else
            {
                return RedirectToAction("Error");
            }
        }
示例#3
0
        public ActionResult DeleteUser()
        {
            if (Session["loginDetails"] != null)
            {
                TempData["LoginId"] = user_Id;
                SuperAdminBLL bll = new SuperAdminBLL();
                List<string> lst = bll.GetUserID("1");
                List<SelectListItem> slst = new List<SelectListItem>();
                foreach (string item in lst)
                {
                    slst.Add(new SelectListItem { Text = item, Value = item });
                }

                ViewBag.DropDown = new SelectList(lst);
                return View();
            }
            else
            {
                return RedirectToAction("Error");
            }
        }
示例#4
0
 public ActionResult DeleteUser(FormCollection frm)
 {
     if (Session["loginDetails"] != null)
     {
         TempData["LoginId"] = user_Id;
         string user_id = frm["ddluser"].ToString();
         SuperAdminBLL bll = new SuperAdminBLL();
         List<string> lst = bll.GetUserID("2", user_id);
         if (lst.Contains("Delete"))
         {
             return RedirectToAction("DeleteUser");
         }
         return View();
     }
     else
     {
         return RedirectToAction("Error");
     }
 }
示例#5
0
        public ActionResult NewUserRegistration(BLL.User_Details user)
        {
            if (Session["logindetails"] != null)
            {
                TempData["LoginId"] = user_Id;
                SuperAdminBLL bll = new SuperAdminBLL();
                if (ModelState.IsValid)
                {

                    int res = bll.createNewUser(user, user.Role);
                    if (res > 0)
                    {
                        ViewBag.Message = "Sucess";
                    }
                }
                return View();
            }
            else
            {
                return RedirectToAction("Error");
            }
        }