Beispiel #1
0
        private void f_Clear()
        {
            hoadonnhap = new HoaDonNhap_View();
            ls_cthd    = new List <CT_HoaDonNhap_View>();

            txtMaPhieu.Text         = HoaDonNhap_DAL.get_HoaDonNhapMax();
            dateNgayBan.Value       = DateTime.Now;
            cbxTenNCC.SelectedIndex = 0;
            txtTongTien.Text        = "0";
            gridControl1.DataSource = ls_cthd;
            gridControl1.RefreshDataSource();
        }
Beispiel #2
0
        private void InnitVal(string maHD)
        {
            ls_cthd = new List <CT_HoaDonNhap_View>();

            if (maHD.Equals(""))
            {
                isNew                 = true;
                hoadonnhap            = new HoaDonNhap_View();
                hoadonnhap.NhanVien   = Context.getInstance().nv.TenNhanVien;
                hoadonnhap.MaNhanVien = Context.getInstance().nv.MaNhanVien;
                hoadonnhap.MaHoaDon   = HoaDonNhap_DAL.get_HoaDonNhapMax();
                hoadonnhap.NgayLap    = DateTime.Now;
                hoadonnhap.GhiChu     = "";
            }
            else
            {
                isNew      = false;
                hoadonnhap = HoaDonNhap_DAL.get_HoaDonNhap_By_MaHD(maHD);
            }
            setDataLoad();
        }