Ejemplo n.º 1
0
        private void ThemHangHoaForm_Load(object sender, EventArgs e)
        {
            HangHoaDVBUS hangHoaDVBUS = new HangHoaDVBUS();

            cbxLoai.DataSource    = hangHoaDVBUS.LoadDV();
            cbxLoai.DisplayMember = "LoaiHangHoa";
            cbxLoai.ValueMember   = "IDLoaiHangHoa";

            WarehouseBUS warehouseBUS = new WarehouseBUS();

            cbxKho.DataSource    = warehouseBUS.LoadAllData();
            cbxKho.DisplayMember = "Name";
            cbxKho.ValueMember   = "WarehouseID";

            GroupOfGoodsBUS groupOfGoodsBUS = new GroupOfGoodsBUS();

            cbxphanLoai.DataSource    = groupOfGoodsBUS.LoadAllData();
            cbxphanLoai.DisplayMember = "GOGName";
            cbxphanLoai.ValueMember   = "GOGID";

            SupplierBUS supplierBUS = new SupplierBUS();

            cbxNhacungcap.DataSource    = supplierBUS.LoadAllData();
            cbxNhacungcap.DisplayMember = "Name";
            cbxNhacungcap.ValueMember   = "SupplierID";

            UnitBUS unitBUS = new UnitBUS();

            cbxDonvi.DataSource    = unitBUS.LoadAllData();
            cbxDonvi.DisplayMember = "Name";
            cbxDonvi.ValueMember   = "UnitID";
        }
        private void save_Click(object sender, EventArgs e)
        {
            WarehouseInfo warehouseInfo = new WarehouseInfo();

            warehouseInfo.Name             = txtTen.Text;
            warehouseInfo.ManagermentStaff = int.Parse(cbxQL.SelectedValue.ToString());
            warehouseInfo.Contact          = txtLH.Text;
            warehouseInfo.Address          = txtadd.Text;
            warehouseInfo.Status           = txtSTT.Text;
            warehouseInfo.Note             = txtNote.Text;;


            WarehouseBUS warehouseBUS = new WarehouseBUS();

            warehouseBUS.Add(warehouseInfo);
        }
Ejemplo n.º 3
0
        private void BanHangForm_Load(object sender, EventArgs e)
        {
            CustomerBUS customerBUS = new CustomerBUS();

            cbTenKH.DataSource    = customerBUS.LoadAllData();
            cbTenKH.DisplayMember = "Name";
            cbTenKH.ValueMember   = "CustomerID";

            cbTenKH.SelectedValueChanged += CbTenNCC_SelectedValueChanged;

            WarehouseBUS warehouseBUS = new WarehouseBUS();

            cbKhoXuat.DataSource    = warehouseBUS.LoadAllData();
            cbKhoXuat.ValueMember   = "WarehouseID";
            cbKhoXuat.DisplayMember = "Name";
        }
        private void NhapHangForm_Load(object sender, EventArgs e)
        {
            SupplierBUS supplierBUS = new SupplierBUS();

            cbTenNCC.DataSource    = supplierBUS.LoadAllData();
            cbTenNCC.DisplayMember = "Name";
            cbTenNCC.ValueMember   = "SupplierID";

            cbTenNCC.SelectedValueChanged += CbTenNCC_SelectedValueChanged;

            WarehouseBUS warehouseBUS = new WarehouseBUS();

            cbKhoXuat.DataSource    = warehouseBUS.LoadAllData();
            cbKhoXuat.ValueMember   = "WarehouseID";
            cbKhoXuat.DisplayMember = "Name";
        }