Пример #1
0
        private void BTN_LOGIN_Click(object sender, EventArgs e)
        {
            //단말기 초기 Load 시 창 호출하는 경우에는 전문처리
            if (TEXT_ID.Text == null || "".Equals(TEXT_ID.Text.Trim())) // PASSWORD 아무것도 입력 안한 경우에는 return
            {
                MetroMessageBox.Show(this, Constants.CONF_MANAGER.getCustomValue("Message", Constants.SYSTEM_LANGUAGE + "/Login_EnterId"),
                                     "Loigin", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                TEXT_ID.Focus();
                return;
            }

            if (TEXT_PASSWORD.Text == null || "".Equals(TEXT_PASSWORD.Text.Trim())) // PASSWORD 아무것도 입력 안한 경우에는 return
            {
                MetroMessageBox.Show(this, Constants.CONF_MANAGER.getCustomValue("Message", Constants.SYSTEM_LANGUAGE + "/Login_EnterPassword"),
                                     "Loigin", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                TEXT_PASSWORD.Focus();
                return;
            }

            Transaction tran     = new Transaction();
            string      strRsult = tran.Login(TEXT_ID.Text, TEXT_PASSWORD.Text);

            //로그인성공시
            //사용자 정보 가져옴
            if (strRsult.Equals("1") && Constants.CHECK_SERVERDATE.Equals("Y"))
            {
                m_strID       = TEXT_ID.Text;
                m_strPassword = TEXT_PASSWORD.Text;
                this.Close();
            }
            else if (strRsult.Equals("1") && Constants.CHECK_SERVERDATE.Equals("N"))
            {
                //string message = string.Format(Constants.CONF_MANAGER.getCustomValue("Message", Constants.SYSTEM_LANGUAGE + "/LoginErrorMessage"), Environment.NewLine);
                MetroMessageBox.Show(this, "Check your pc's time settings", "Loigin", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            else
            {
                //실패 시
                string message = string.Format(Constants.CONF_MANAGER.getCustomValue("Message", Constants.SYSTEM_LANGUAGE + "/LoginErrorMessage"), Environment.NewLine);
                TEXT_PASSWORD.Text = "";
                MetroMessageBox.Show(this, message,
                                     "Loigin", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
        }
Пример #2
0
 private void PANEL_TEXT_PASSWORD_Click(object sender, EventArgs e)
 {
     TEXT_PASSWORD.Focus();
 }