Exemple #1
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            string   maHD    = txtMaHD.Text;
            string   maKH    = cboKhachHang.SelectedValue.ToString();
            int      csCu    = int.Parse(txtCSCu.Text);
            DateTime ngayCu  = dtpNgayCu.Value;
            int      csMoi   = int.Parse(txtCSMoi.Text);
            DateTime ngayMoi = dtpNgay.Value;

            HoaDon hd = new HoaDon(maHD, maKH, csCu, ngayCu, csMoi, ngayMoi);

            HoaDonBUL hdBUL = new HoaDonBUL();

            if (hdBUL.ThemHoaDon(hd))
            {
                MessageBox.Show("Thêm bản ghi thành công!");
            }
            else
            {
                MessageBox.Show("Thêm bản ghi thất bại!");
            }
            ResetFields();
        }
Exemple #2
0
        private void pictureBox1_Click(object sender, EventArgs e)
        {
            //tao hoa don moi set chua thanh toan

            if (kiemTraBan(txtTenBan1.Text) == true)
            {
                DateTime ngayLap  = DateTime.Now.Date;
                String   nhanVien = tenNhanVien;
                String   khacHang = "";

                float  tongTien  = 0;
                String trangThai = "Chưa Thanh Toán";
                String maBan     = txtTenBan1.Text;
                String maHoaDon  = bus_hoaDon.taoMa();
                HoaDon hoadon    = new HoaDon(maHoaDon, ngayLap, tongTien, nhanVien, maBan, trangThai);
                bus_hoaDon.themHoaDon(hoadon);
            }


            this.Close();
            SELLECT_MENNU form = new SELLECT_MENNU(1, tenNhanVien);

            form.Show();
        }
Exemple #3
0
 public frmThemKhachHang(HoaDon h)
 {
     InitializeComponent();
     hd = h;
 }
Exemple #4
0
        private void hóaĐơnToolStripMenuItem_Click(object sender, EventArgs e)
        {
            HoaDon hd = new HoaDon();

            hd.Show();
        }
Exemple #5
0
        private void mntsHoaDon_Click(object sender, EventArgs e)
        {
            HoaDon hd = new HoaDon();

            hd.Show();
        }
Exemple #6
0
 public frmKhachHang(HoaDon hd)
 {
     InitializeComponent();
     HD = hd;
 }