Exemplo n.º 1
0
        public ActionResult Create(tbl_User_Registration obj)
        {
            try
            {
                db.Sp_Userregistration_Insert(obj.FirstName, obj.LastName, obj.MiddleName, obj.EmailID, obj.Password, obj.Gender, obj.MobileNumber, obj.CountryName, obj.StateName, obj.CityName, obj.Address1, obj.Address2, obj.IsActive);
                // TODO: Add insert logic here

                return(RedirectToAction("List"));
            }
            catch
            {
                return(View());
            }
        }
Exemplo n.º 2
0
        public ActionResult Edit(int id, tbl_User_Registration obj)
        {
            try
            {
                // TODO: Add update logic here
                db.Sp_Userregistration_Update(obj.UserID, obj.FirstName, obj.LastName, obj.MiddleName, obj.EmailID, obj.Password, obj.Gender, obj.MobileNumber, obj.CountryName, obj.StateName, obj.CityName, obj.Address1, obj.Address2, obj.IsActive);

                return(RedirectToAction("List"));
            }
            catch
            {
                return(View());
            }
        }
Exemplo n.º 3
0
        public ActionResult Login(tbl_User_Registration obj)
        {
            List <tbl_User_Registration> UserInfo = db.tbl_User_Registration.Where(x => x.EmailID == obj.EmailID && x.Password == obj.Password).ToList();

            Session["EmailID"] = obj.EmailID;
            if (UserInfo.Count > 0)
            {
                Session["UserInfo"] = UserInfo as List <tbl_User_Registration>;
                return(RedirectToAction("Categorieslist", "UCategories"));
            }
            else
            {
                ViewBag.LoginError = "User Email and password entered wrong.";
                return(View());
            }
        }