Exemple #1
0
        private void btnDangnhap_Click(object sender, EventArgs e)
        {
            UserVO        user    = new UserVO(this.txtUser.Text, this.txtMatkhau.Text, "", "");
            StringBuilder builder = new StringBuilder();

            builder.Append("dangnhap#");
            builder.Append(user.UserName1);
            builder.Append("*");
            builder.Append(user.PassWord1);
            builder.Append("*");
            connect.Bw.Write(builder.ToString());
            connect.Bw.Flush();
            string str = connect.Br.ReadString();

            if (str == "False")
            {
                MessageBox.Show("Tài khoản không tồn tại");
            }
            else
            {
                frmXacnhan frm = new frmXacnhan(this);
                frm.ShowDialog();
                if (check)
                {
                    connect.UserID = Int32.Parse(str);
                    this.Close();
                    frmCAmanager frmManager = new frmCAmanager(connect);
                    frmManager.Show();
                }
            }
        }
Exemple #2
0
 public frmCapmoi(Connect frm, frmCAmanager frm2)
 {
     InitializeComponent();
     this.connect = frm;
     this.caMana  = frm2;
 }