/// <summary> /// 자동로그인!!!! /// </summary> private void AutoLogin() { CallQuery callQuery = new CallQuery(); DataSet dsResult = callQuery.S_CO_USR_LGN_SIN(Properties.Settings.Default.ID, Properties.Settings.Default.PW); DataRow LoginData = dsResult.Tables[0].Rows[0]; if (LoginData["SUCCESS_YN"].Equals("Y")) { MainViewModel.LoginUser = (S_CO_USR_LGN_SIN)StaticUtils.DataRowToClass(new S_CO_USR_LGN_SIN(), LoginData); LoginText = Properties.Resources.LOGOUT_TEXT; IsLogin = true; UserName = LoginUser.USER_NM; UserNumber = LoginUser.USER_NO; } else { MessageBox.Show("로그인 정보 변경됐당 다시 로그인해랑"); } }
private void Login(object param) { CallQuery callQuery = new CallQuery(); DataSet dsResult = callQuery.S_CO_USR_LGN_SIN(LoginID, Password); DataRow LoginData = dsResult.Tables[0].Rows[0]; if (LoginData["SUCCESS_YN"].Equals("Y")) { MainViewModel.LoginUser = (S_CO_USR_LGN_SIN)StaticUtils.DataRowToClass(new S_CO_USR_LGN_SIN(), LoginData); if (bAutoLogin) { Properties.Settings.Default.ID = LoginID; Properties.Settings.Default.PW = Password; } else { Properties.Settings.Default.ID = ""; Properties.Settings.Default.PW = ""; } if (bAutoIDSave) { Properties.Settings.Default.ID = LoginID; } else { Properties.Settings.Default.ID = ""; } Properties.Settings.Default.Save(); StaticUtils.loginWindow.DialogResult = true; StaticUtils.CloseLoginWindow(); } else { MessageBox.Show("로그인 안됐당"); } }