Example #1
0
        public void ThemMavach()
        {
            DataTable _dt = new DataTable();

            Dto_user      = new DTO_User();
            Dto_user.User = txtU.Text.Trim();
            Dto_user.Pass = txtP.Text.Trim();
            _dt           = _db.DangNhap(ref err, Dto_user);
            if (_dt.Rows.Count > 0)
            {
                if (_dt.Rows[0]["ErrCode"].ToString() == "0")
                {
                    cls_Main._username = _dt.Rows[0]["ErrUser"].ToString();
                    this.Hide();
                    Form1 frmain = new Form1();
                    frmain.ShowDialog();
                }
            }
        }