public FBuy(int maPhieuNhap, Staff nhanVien, FMain mainForm) { InitializeComponent(); CauHinhHienThi(); _MaPhieuNhap = maPhieuNhap; _NhanVien = nhanVien; _CTPhieuNhap = TaoBangCTPN(); _MainForm = mainForm; LoadTatCa(); }
public FSell(int maHoaDon, Staff nhanVien, FMain mainForm) { InitializeComponent(); CauHinhHienThi(); _MaHoaDon = maHoaDon; _NhanVien = nhanVien; _CTHoaDon = TaoBangCTHD(); _MainForm = mainForm; LoadTatCa(); }
private void btnLogin_Click(object sender, EventArgs e) { try { Account _account = AccountDAO.Instance.LayTaiKhoanTheoUser(txtUserName.Text); if (_account != null && _account.PassWord == txtPassWord.Text) { FMain _fMain = new FMain(_account); txtPassWord.Text = ""; this.Hide(); _fMain.ShowDialog(); this.Show(); } else { MessageBox.Show("Sai tài khoản hoặc mật khẩu !", "Thông báo"); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Thông báo lỗi"); } }