Exemple #1
0
        private void btnLogIn_Click(object sender, EventArgs e)
        {
            if (txtID.Text.Trim().Length < 1 || txtPwd.Text.Trim().Length < 1)
            {
                MessageBox.Show("제대로 입력해 주세요");
            }
            LogInDB db    = new LogInDB();
            LogIn   logIn = db.LogIn(txtID.Text.Trim(), txtPwd.Text.Trim());

            db.Dispose();

            if (logIn == null)
            {
                MessageBox.Show("회원 정보가 없습니다. 다시 확인하여 주십시오.");
            }
            else
            {
                if (logIn.ID == "admin")
                {
                    MessageBox.Show($"개발자 로그인");
                    frmMain frm = new frmMain(logIn);
                    frm.Show();
                }
                else
                {
                    MessageBox.Show($"로그인 성공");
                    frmMain frm = new frmMain(logIn);
                    frm.Show();
                }
            }
        }
Exemple #2
0
        private void frmSearchID_Load(object sender, EventArgs e)
        {
            LogInDB   db = new LogInDB();
            DataTable dt = db.Category("Job");

            db.Dispose();

            DataRow dr = dt.NewRow();

            dr["Code"] = "";
            dr["Name"] = "선택";
            dt.Rows.InsertAt(dr, 0);
            dt.AcceptChanges();

            cbJob.DisplayMember = "Name";
            cbJob.ValueMember   = "Code";
            cbJob.DataSource    = dt;
        }