コード例 #1
0
ファイル: Tag_Calender.cs プロジェクト: Ohneul/TagCalender
        private void Login_btn_Click(object sender, EventArgs e)
        {
            int    colect = 0;
            string id     = "";

            sqlconn.Open();
            MySqlCommand    sqlcmd = new MySqlCommand("SELECT id, pw FROM member;", sqlconn);
            MySqlDataReader sqldr  = sqlcmd.ExecuteReader();

            while (sqldr.Read() == true)
            {
                if (sqldr[0].ToString().Equals(ID_txt.Text) && sqldr[1].ToString().Equals(PW_txt.Text))
                {
                    colect = 1;
                    id     = sqldr[0].ToString();
                    break;
                }
            }
            sqlconn.Close();
            if (colect == 1)
            {
                ID_txt.ForeColor    = Color.Silver;
                ID_txt.Text         = "아이디";
                PW_txt.ForeColor    = Color.Silver;
                PW_txt.PasswordChar = '\0';
                PW_txt.Text         = "비밀번호";
                Login_Panel.Visible = false;
                this.Hide();
                Calender Cld = new Calender(this, id);
                Cld.label10.Text = "[ " + id + " ]";
                Cld.Show();
            }
            else
            {
                MessageBox.Show("아이디 또는 비밀번호를 다시 확인하세요.", "경고");
                PW_txt.Text = "";
                PW_txt.Focus();
            }
        }
コード例 #2
0
 public InfoUpdate(Calender Cdr)
 {
     InitializeComponent();
     Cl = Cdr;
 }