Exemplo n.º 1
0
        // Login/Account : 로그인 시도
        public ActionResult Account()
        {
            string id  = Request.Form["ID"];
            string pwd = Request.Form["Password"];

            Biz_Common.BizUser biz = new Biz_Common.BizUser();
            DataTable          dt  = biz.SP_USER_LOGIN(id, pwd);

            // 로그인 성공
            if (dt.Rows.Count == 1)
            {
                this.Session["USER"]     = dt.Rows[0]["USERID"];
                this.Session["USERNAME"] = dt.Rows[0]["USERNAME"];
                this.FillUserInfo(dt);

                //dt.Dispose();

                if (dt.Rows[0]["USERID"].ToString() == "admin")
                {
                    return(Redirect("~/Home/Index"));
                }
                else
                {
                    return(Redirect("~/IndividualSite/Index"));
                }
            }

            // 로그인 실패
            else
            {
                dt.Dispose();
                return(Index(id));
            }
        }
Exemplo n.º 2
0
        public ActionResult SignupEvent()
        {
            string id  = Request.Form["SignupID"];
            string pwd = Request.Form["SignupPassword"];

            Biz_Common.BizUser biz = new Biz_Common.BizUser();
            biz.SP_USER_Signup(id, pwd);


            return(Redirect("~/Login/index"));
        }