private void EditInventoryManagement_Load(object sender, EventArgs e) { XuLy.getTransactionTypes(cbbTransactionType); XuLy.getSuppliers(cbbSuppliers); XuLy.getWarehouses(cbbSourceWarehouse); XuLy.getWarehouses(cbbDestinationWarehouse); XuLy.getParts(cbbPartName); InventoryManagementView viewOld = Program.oldEdit; cbbTransactionType.SelectedValue = viewOld.TransactionTypeID; if (viewOld.TransactionTypeID == 1) { cbbSuppliers.SelectedValue = viewOld.SupplierID; cbbSourceWarehouse.Enabled = false; cbbSourceWarehouse.SelectedIndex = -1; } else { cbbSourceWarehouse.SelectedValue = viewOld.SourceWarehouseID; cbbSuppliers.Enabled = false; cbbSuppliers.SelectedIndex = -1; } cbbDestinationWarehouse.SelectedValue = viewOld.DestinationWarehouseID; cbbPartName.SelectedValue = viewOld.PartID; dtpDate.Value = viewOld.Date; txtAmount.Text = viewOld.Amount.ToString(); txtBatchNumber.Text = viewOld.BatchNumber; }
private void formPurchase_Order_Load(object sender, EventArgs e) { XuLy.getSuppliers(cbbSuppliers); XuLy.getWarehouses(cbbWarehouse); XuLy.getParts(cbbPartName); }