Пример #1
0
        public frmMuaHang()
        {
            InitializeComponent();

            repositoryItemGridLookUpEdit8.DataSource    = PhieuTempBUS.DanhSachHangHienThi();
            repositoryItemGridLookUpEdit8.NullText      = "";
            repositoryItemGridLookUpEdit8.DisplayMember = "MaHang";
            repositoryItemGridLookUpEdit8.ValueMember   = "MaHang";

            repositoryItemGridLookUpEdit9.DataSource    = PhieuTempBUS.DanhSachHangHienThi();
            repositoryItemGridLookUpEdit9.NullText      = "";
            repositoryItemGridLookUpEdit9.DisplayMember = "TenHang";
            repositoryItemGridLookUpEdit9.ValueMember   = "MaHang";

            repositoryItemGridLookUpEdit10.DataSource    = PhieuTempBUS.DanhSachHangHienThi();
            repositoryItemGridLookUpEdit10.NullText      = "";
            repositoryItemGridLookUpEdit10.DisplayMember = "TenDonVi";
            repositoryItemGridLookUpEdit10.ValueMember   = "MaDonVi";

            gridControl2.DataSource = PhieuTempBUS.DanhSach();

            txtNCC.Properties.DataSource        = NhaCungCapBUS.DanhSach();
            txtNCC.Properties.DisplayMember     = "TenNCC";
            txtNCC.Properties.ValueMember       = txtMaNCC.Properties.ValueMember;
            txtNCC.Properties.EditValueChanged += Properties_EditValueChanged;
            txtNCC.Properties.NullText          = "";

            txtMaNCC.Properties.DataSource        = NhaCungCapBUS.DanhSach();
            txtMaNCC.Properties.DisplayMember     = "MaNCC";
            txtMaNCC.Properties.ValueMember       = "MaNCC";
            txtMaNCC.Properties.EditValueChanged += Properties_EditValueChanged1;
            txtMaNCC.Properties.NullText          = "";

            txtPhieu.Text = PhieuNhapHangBUS.LayMaPhieu();

            txtNhanVien.Properties.DataSource    = NhanVienBUS.DanhSach();
            txtNhanVien.Properties.DisplayMember = "Ten";
            txtNhanVien.Properties.ValueMember   = "MaNV";

            txtDieuKhoanTT.Properties.DataSource    = DieuKhoanThanhToanBUS.DanhSach();
            txtDieuKhoanTT.Properties.DisplayMember = "TenDKTT";
            txtDieuKhoanTT.Properties.ValueMember   = "MaDKTT";

            txtHinhThucTT.Properties.DataSource    = HinhThucThanhToanBUS.DanhSach();
            txtHinhThucTT.Properties.DisplayMember = "TenHTTT";
            txtHinhThucTT.Properties.ValueMember   = "MaHTTT";

            txtKho.Properties.DataSource    = KhoHangBUS.DanhSach();
            txtKho.Properties.DisplayMember = "Ten";
            txtKho.Properties.ValueMember   = "MaKho";
        }
Пример #2
0
 private void ClearAllTxt()
 {
     txtMaNCC.Text           = null;
     txtNCC.Text             = null;
     txtDiaChi.Text          = null;
     txtDienThoai.Text       = null;
     txtDieuKhoanTT.Text     = null;
     txtGhiChu.Text          = null;
     txtHinhThucTT.Text      = null;
     txtHoaDonVAT.Text       = null;
     txtKho.Text             = null;
     txtNhanVien.Text        = null;
     txtPhieu.Text           = PhieuNhapHangBUS.LayMaPhieu();
     txtPhieuVietTay.Text    = null;
     Ngay.Text               = null;
     HanTT.Text              = null;
     gridControl2.DataSource = PhieuTempBUS.DanhSach();
 }