private void simpleButton1_KeyPress(object sender, KeyPressEventArgs e) { if ((Keys)e.KeyChar == Keys.Enter) { string user = txtuserName.Text.ToString(); string pass = txtPassWord.Text.ToString(); Console.WriteLine(user + " " + pass); int login = BUS_QuanLyTaiKhoan.KiemTraLogin(user, pass); if (login == 0) { taiKhoan = BUS_QuanLyTaiKhoan.GetTaiKhoan(user, pass); nhanVien = BUS_NhanVien.GetNhanVien(taiKhoan.Cmnd); this.Hide(); frmTrangChuQuanLy f = new frmTrangChuQuanLy(taiKhoan, nhanVien); f.Show(); } else if (login == 1) { MessageBox.Show("Tên user không chính xác", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Error); } else if (login == 2) { MessageBox.Show("Mật khẩu không chính xác", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { MessageBox.Show("Tài khoản đã bị block bởi admin"); } } }
public MuaHang(DTO_ThongTinTaiKhoan tk, DTO_NhanVienQuanLy nv) { InitializeComponent(); this.taiKhoan = tk; this.nhanVien = nv; Load(); }
private void simpleButton1_Click(object sender, EventArgs e) { string user = txtuserName.Text.ToString(); string pass = txtPassWord.Text.ToString(); Console.WriteLine(user + " " + pass); int login = BUS_QuanLyTaiKhoan.KiemTraLogin(user, pass); if (login == 0) { taiKhoan = BUS_QuanLyTaiKhoan.GetTaiKhoan(user, pass); nhanVien = BUS_NhanVien.GetNhanVien(taiKhoan.Cmnd); this.Hide(); TrangChuQuanLy f = new TrangChuQuanLy(taiKhoan, nhanVien); f.Show(); } else if (login == 1) { MessageBox.Show("Tên user không chính xác"); } else if (login == 2) { MessageBox.Show("Mật khẩu không chính xác"); } else { MessageBox.Show("Tài khoản đã bị block bởi admin"); } }
public PhieuXuat(DataTable Tb, DTO_ThongTinTaiKhoan tk, DTO_NhanVienQuanLy nv) { InitializeComponent(); this.tb = Tb; taiKhoan = tk; nhanVien = nv; Load(); }
public MoRongDaiLy(DTO_ThongTinTaiKhoan tk,DTO_NhanVienQuanLy nv) { InitializeComponent(); this.taiKhoan = tk; this.nhanVien = nv; ThemLoaiDaiLy q = new ThemLoaiDaiLy(taiKhoan, nhanVien); pnlMoRong.Controls.Clear(); pnlMoRong.Controls.Add(q); q.Show(); }
public frmTrangChuQuanLy(DTO_ThongTinTaiKhoan tk, DTO_NhanVienQuanLy nv) { InitializeComponent(); //this.FormBorderStyle = FormBorderStyle.None; this.WindowState = FormWindowState.Maximized; btnBack.Visible = false; rbTrangChu.AutoHideEmptyItems = true; taiKhoan = tk; nhanVien = nv; }
public Admin(DTO_ThongTinTaiKhoan tk, DTO_NhanVienQuanLy nv) { InitializeComponent(); this.taiKhoan = tk; this.nhanVien = nv; DoiMatKhau mk = new DoiMatKhau(taiKhoan, nhanVien); pnlAmin.Controls.Clear(); pnlAmin.Controls.Add(mk); mk.Show(); }
public static DTO_ThongTinTaiKhoan GetTaiKhoan(string user, string pass) { string query = "select* from ThongTinTaiKhoan where UserName = '******' and Pass = '******'"; DataTable dt = ResultQuery.GetTableResult(conn, query); DataRow r = dt.Rows[0]; string cmnd = r["CMND"].ToString(); int phanQuyen = (int)r["PhanQuyen"]; int trangThai = (int)r["PhanQuyen"]; DTO_ThongTinTaiKhoan tk = new DTO_ThongTinTaiKhoan(user, pass, cmnd, phanQuyen, trangThai); return(tk); }
public QuanLyDaiLy(DTO_ThongTinTaiKhoan tk, DTO_NhanVienQuanLy nv) { InitializeComponent(); taiKhoan = tk; nhanVien = nv; tb.Columns.Add("IdDL", typeof(int)); tb.Columns.Add("IdLoaiDL", typeof(int)); tb.Columns.Add("IdQuan", typeof(int)); tb.Columns.Add("Tên đại lý", typeof(string)); tb.Columns.Add("Loại đại lý", typeof(string)); tb.Columns.Add("Số điện thoại", typeof(string)); tb.Columns.Add("Quận", typeof(string)); tb.Columns.Add("Ngày tiếp nhận", typeof(string)); tb.Columns.Add("Người tiếp nhận", typeof(string)); tb.Columns.Add("Tiền nợ", typeof(string)); tb.Columns.Add("Địa chỉ", typeof(string)); Load(); }
public DangKyTaiKhoancs(DTO_ThongTinTaiKhoan tk, DTO_NhanVienQuanLy nv) { InitializeComponent(); this.taiKhoan = tk; this.nhanVien = nv; }
public QuanLyMatHang(DTO_ThongTinTaiKhoan tk, DTO_NhanVienQuanLy nv) { InitializeComponent(); Load(); }