private void formWarehouseManagement_Load(object sender, EventArgs e) { XuLy.getWarehouses(cbbSourceWarehouse); XuLy.getWarehouses(cbbDestinationWarehouse); XuLy.getPartByWarehouse((int)cbbSourceWarehouse.SelectedValue, cbbPartName); XuLy.getBatchNumberByPart((int)cbbPartName.SelectedValue, cbbBatchNumber); if (!XuLy.getRequirementBatch((int)cbbPartName.SelectedValue)) { cbbBatchNumber.Enabled = false; } }
private void cbbPartName_SelectedIndexChanged(object sender, EventArgs e) { if (!(cbbPartName.SelectedValue is System.Data.DataRowView)) { XuLy.getBatchNumberByPart((int)cbbPartName.SelectedValue, cbbBatchNumber); if (!XuLy.getRequirementBatch((int)cbbPartName.SelectedValue)) { cbbBatchNumber.Enabled = false; } else { cbbBatchNumber.Enabled = true; } } }