Esempio n. 1
0
        public void BindData()
        {
            DB.Cloud cloud   = new DB.Cloud();
            int      nReturn = cloud.ServicePointLogin(strEmail, Lib.Util.EncryptText(strPass));

            //if (nReturn == 1)
            if (cloud.dsReturn.Tables[0].Rows.Count > 0)
            {
                DataRow dr_UserInfo = Lib.ConvertingProc.dataTableNull(cloud.dsReturn.Tables[0]).Rows[0];
                Lib.Util.RemoveCookie(Response, "Email");
                Lib.Util.RemoveCookie(Response, "MemberNum");
                Lib.Util.RemoveCookie(Response, "MemberName");
                Lib.Util.RemoveCookie(Response, "CompanyNum");
                Lib.Util.RemoveCookie(Response, "CompanyName");
                Lib.Util.RemoveCookie(Response, "Grade");
                Lib.Util.RemoveCookie(Response, "Authorize");
                Lib.Util.RemoveCookie(Response, "ReDirectExpire");
                Lib.Util.SetCookieValue(Response, "Email", strEmail);
                Lib.Util.SetCookieValue(Response, "MemberNum", dr_UserInfo["MemberNum"].ToString());
                Lib.Util.SetCookieValue(Response, "MemberName", dr_UserInfo["MemberName"].ToString());
                Lib.Util.SetCookieValue(Response, "CompanyNum", dr_UserInfo["CompanyNum"].ToString());
                Lib.Util.SetCookieValue(Response, "CompanyName", dr_UserInfo["CompanyName"].ToString());
                Lib.Util.SetCookieValue(Response, "Grade", dr_UserInfo["Grade"].ToString());
                Lib.Util.SetCookieValue(Response, "Authorize", dr_UserInfo["Grade"].ToString());
                Lib.Util.SetCookieValue(Response, "ReDirectExpire", "true", DateTime.Now.AddMinutes(1));

                Response.Redirect(Server.UrlDecode(strReturnUrl));
            }
            else
            {
                lblError.Text = "이메일과 비밀번호를 확인해주세요!";
            }
        }