private void btnThem_Click(object sender, EventArgs e)
        {
            isInsert = true;
            cmMaKH.ResetText();

            grThongTinHoaDon.Enabled = true;
            btnHuy.Enabled           = true;
            btnLuu.Enabled           = true;
            btnThem.Enabled          = false;
            btnSua.Enabled           = false;

            txtTongTien.ResetText();
            txtThue.ResetText();
            txtGiamGia.ResetText();
            txtTienHang.ResetText();

            txtMaHoaDon.Text = dbHoaDon.SetNewPrimaryKey();
        }
 private void SetMaHoaDon()
 {
     dbHoaDon         = new DBHoaDon();
     txtMaHoaDon.Text = dbHoaDon.SetNewPrimaryKey();
 }
Beispiel #3
0
        private void LuuThongTinHoaDon(string maKH)
        {
            DBHoaDon dbHoaDon = new DBHoaDon();

            dbHoaDon.InsertHoaDon(dbHoaDon.SetNewPrimaryKey(), maKH, ngayLap, tienHang, giamGia, thue, tongTien, nhanVien);
        }