示例#1
0
        public ContentResult UserRegistation(RegistationDo model)//bool IsAuthantication
        {
            string message = string.Empty;

            if (ModelState.IsValid)
            {
                var  Emailtoken = ConfirmAccount(model);
                bool flag       = false;
                RegistationController registationController = new RegistationController();
                flag = registationController.AddUserRedistation(model);

                if (flag == true)
                {
                    return(Content("User Insert SucessFully"));
                }
                else
                {
                    return(Content("Email Id Is Already Exist"));
                }
            }
            return(Content("Error"));
            // }
            //  return View();
            // return Json(new { Resut = "ok", Record = registationDo }, JsonRequestBehavior.AllowGet);
        }
示例#2
0
        public ActionResult AllRegistation()
        {
            RegistationController registationController = new RegistationController();
            RegistationDoList     memberdo = registationController.AllUser();

            return(View(memberdo));
        }
        public JsonResult RoleByUser(int RoleId)
        {
            RegistationController RegistationController = new RegistationController();
            RegistationDoList     registationDo         = RegistationController.RolebyUserId(RoleId);

            return(Json(new { Responses = registationDo }, JsonRequestBehavior.AllowGet));
        }
示例#4
0
        public ActionResult UpdateUsers(RegistationDo registationDo)
        {
            RegistationController EmpRepo = new RegistationController();

            EmpRepo.UpdateRegistation(registationDo);//.Single(mem => mem.UserId == Id);
            return(RedirectToAction("AllUser", "Account"));
        }
示例#5
0
        public ActionResult EditUsers(int Id)
        {
            RegistationController EmpRepo       = new RegistationController();
            RegistationDo         registationDo = EmpRepo.UserbyUserId(Id);

            return(View(registationDo));
        }
示例#6
0
 public ActionResult Edit(int Id)
 {
     if (ModelState.IsValid)
     {
         RegistationController RegistationController = new RegistationController();
         RegistationDo         registationDo         = RegistationController.UserbyUserId(Id);
         return(View(registationDo));
     }
     return(View());
 }
示例#7
0
        public ActionResult LogOn(LogOnModel model, string returnUrl)
        {
            RegistationDo user = new RegistationDo();

            Session["LOGGED_User"] = user;
            if (model.UserName != null)
            {
                if (model.Password != null)
                {
                    RegistationController registationController = new RegistationController();
                    // user = RegistationController.UserbyUserId(model.UserName);
                    var LoginType = registationController.UserIdbyPassword(model.UserName, model.Password, model.CompanyName);
                    if (LoginType.Password == model.Password && LoginType.UserName == model.UserName)
                    {
                        //FormsAuthentication.SetAuthCookie(LoginType.UserName,false);
                        Session["LOGGED_USER"]         = LoginType;
                        Session["LOGGED_User_NAME"]    = LoginType.UserName;
                        Session["LOGGED_MEMBER_EMAIL"] = LoginType.Email;
                        Session["LOGGED_UserId"]       = LoginType.Userid;
                        Session["LOGGED_ROLE"]         = LoginType.Role;
                        Session["LOGGED_Company"]      = LoginType.Company;
                        Session["LOGGED_Connectiondb"] = LoginType.Connectiondb;
                        if (LoginType.UserName == "Shivanks")
                        {
                            return(RedirectToAction("DashBoard", "Account"));
                        }
                        //  return RedirectToAction("DashboardWorkFlow", "Dashboard", new { area = "Admin" });
                        //  return Redirect("Dashboard/DashboardWorkFlow");
                        return(RedirectToAction("DashboardWorkFlow", "Dashboard"));
                    }
                    else
                    {
                        ModelState.AddModelError("", "");
                    }
                }
            }
            else
            {
                ModelState.AddModelError("", "");
            }

            return(View());
        }