protected void ModifyEmpInfo() { string cell_phone = this.txtCellPhone.Text; string emp_email = this.txtEmail.Text; MicroBSC.Integration.COM.Biz.Biz_Com_Emp_Info bizEmpInfo = new MicroBSC.Integration.COM.Biz.Biz_Com_Emp_Info(); bool result = bizEmpInfo.Modify_Emp_Info(gUserInfo.Emp_Ref_ID, emp_email, cell_phone, gUserInfo.Emp_Ref_ID); if (result) { this.ltrScript.Text += JSHelper.GetAlertScript("변경된 정보를 저장하였습니다."); } else { this.ltrScript.Text += JSHelper.GetAlertScript("정보를 저장하는 도중 오류가 발생했습니다."); } }
protected void loginbtn_Click(object sender, ImageClickEventArgs e) { string bscAuth = ConfigurationManager.AppSettings["BSC.Authentication"].ToString(); string domainName = ConfigurationManager.AppSettings["Domain.Name"].ToString(); SitePrincipal newUser = null; string en_use_yn = WebUtility.GetConfig("ENCRYPTION_USE_YN").ToUpper(); string encryption_oneway_mode = WebUtility.GetConfig("ENCRYPTION_ONEWAY_MODE").ToUpper(); string encPasswd; if (en_use_yn.Equals("Y")) { encPasswd = FormsAuthentication.HashPasswordForStoringInConfigFile(txtPasswd.Text, encryption_oneway_mode); } else { encPasswd = txtPasswd.Text; } if (bscAuth.Equals("Forms")) // 폼 인증 { newUser = SitePrincipal.ValidateLogin(txtLoginID.Text, encPasswd); } else if (bscAuth.Equals("Windows")) // 윈도우 인증 & 폼인증 { if (WindowAuthentication.ValidateLogin(txtLoginID.Text, encPasswd, domainName, Context)) { newUser = new SitePrincipal(txtLoginID.Text); } } if (newUser == null) { MicroBSC.Integration.COM.Biz.Biz_Com_Emp_Info bizEmpInfo = new MicroBSC.Integration.COM.Biz.Biz_Com_Emp_Info(); string emp_ref_id = bizEmpInfo.Get_Emp_Ref_Id(txtLoginID.Text); if (emp_ref_id.Length == 0) { //ID가 없음 this.ltrScript.Text = JSHelper.GetAlertScript("ID가 존재하지 않습니다."); txtLoginID.Focus(); } else { //비번이 틀림 this.ltrScript.Text = JSHelper.GetAlertScript("비밀번호가 틀렸습니다."); txtPasswd.Focus(); } } else { Context.User = newUser; SaveUserID(txtLoginID.Text, true); // 쿠키 저장 여부 //login.SetUserLogs(txtUserID.Text, Request.ServerVariables["REMOTE_ADDR"].ToString(), Request.ServerVariables["HTTP_USER_AGENT"].ToString(), Session.SessionID); SiteIdentity gUserInfo = (SiteIdentity)Context.User.Identity; //MicroBSC.Integration.CTL.Dac.Dac_Ctl_Common log = new MicroBSC.Integration.CTL.Dac.Dac_Ctl_Common(); //log.InsertConnectLog(Session.SessionID, gUserInfo.Emp_Ref_ID, gUserInfo.LoginID, gUserInfo.Emp_Name, Request.UserHostAddress, "BSC"); MicroBSC.Integration.CTL.Biz.Biz_Ctl_Common objCtlCommon = new MicroBSC.Integration.CTL.Biz.Biz_Ctl_Common(); objCtlCommon.AddConnectLog(Session.SessionID, gUserInfo.Emp_Ref_ID, gUserInfo.LoginID, gUserInfo.Emp_Name, Request.UserHostAddress, "BSC"); FormsAuthentication.RedirectFromLoginPage(txtLoginID.Text, false); Response.Redirect("Main.aspx"); //if (Request["ReturnUrl"] != null) //{ // //Response.Cookies["GSBNPortalWeb"].Expires = DateTime.Today.AddDays(-1); // //Response.Cookies["GSBNPortalWeb"].Value = null; // FormsAuthentication.RedirectFromLoginPage(txtLoginID.Text, false); // Response.Redirect("../index.aspx?" + "ReturnUrl=" + Request["ReturnUrl"]); //} //else //{ // FormsAuthentication.RedirectFromLoginPage(txtLoginID.Text, false); //} } }