Exemplo n.º 1
0
 private void AddProduct_Load(object sender, EventArgs e)
 {
     try
     {
         Guid categoryId = CategoryRepo.getCategoryId(cmbCategory.Text);
         if (categoryId != null)
         {
             this.CategoryId = categoryId;
         }
         Guid SubcategoryId = SubCategoryRepo.getSubCategoryId(cmbSubCategory.Text);
         if (SubcategoryId != null)
         {
             this.subcategory = SubcategoryId;
         }
         Guid SupplierId = SupplierRepo.getSupplierId(cmbSupplier.Text);
         if (SupplierId != null)
         {
             this.supplier = SupplierId;
         }
         Guid WarehouseId = WarehouseRepo.getWarehouseId(cmbWarehouse.Text);
         if (WarehouseId != null)
         {
             this.warehouse = WarehouseId;
         }
         Guid statusId = StatusRepo.getStatusId(cmbStatus.Text);
         if (statusId != null)
         {
             this.status = statusId;
         }
         Guid StoreId = StoreRepo.getStoreId(cmbStore.Text);
         if (StoreId != null)
         {
             this.store = StoreId;
         }
         Guid id = UnitOfMeasurementRepo.retrieveId(cmbUnitOfMeasurement.Text);
         if (id != null)
         {
             this.unitOfMeasurementId = id;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemplo n.º 2
0
 private void cmbStore_SelectedIndexChanged(object sender, EventArgs e)
 {
     this.store = StoreRepo.getStoreId(cmbStore.Text);
 }