Example #1
0
        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 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;
     }
 }
Example #3
0
 private void formPurchase_Order_Load(object sender, EventArgs e)
 {
     XuLy.getSuppliers(cbbSuppliers);
     XuLy.getWarehouses(cbbWarehouse);
     XuLy.getParts(cbbPartName);
 }
 private void formInventoryReport_Load(object sender, EventArgs e)
 {
     XuLy.getWarehouses(cbbWareHouse);
 }