public UnitOfWork(RestaurantContext context) { _context = context; Adjustments = new AdjustmentRepository(_context); AdjustmentsItems = new AdjustmentItemRepository(_context); Branches = new BranchRepository(_context); Categories = new CategoryRepository(_context); Customers = new CustomerRepository(_context); Deliveries = new DeliveryRepository(_context); DeliveryItems = new DeliveryItemRepository(_context); Divisions = new DivisionRepository(_context); Expirations = new ExpirationRepository(_context); Groups = new GroupRepository(_context); Stocks = new InventoryItemRepository(_context); Locations = new LocationRepository(_context); Units = new MeasurementUnitRepository(_context); Productions = new ProductionRepository(_context); Ingredients = new ProductionItemRepository(_context); Products = new ProductRepository(_context); Purchases = new PurchaseRepository(_context); PurchaseItems = new PurchaseItemRepository(_context); PurchaseOrders = new PurchaseOrderRepository(_context); PurchaseOrderItems = new PurchaseOrderItemRepository(_context); SalesInvoices = new SalesInvoiceRepository(_context); SalesInvoiceItems = new SalesInvoiceItemRepository(_context); Suppliers = new SupplierRepository(_context); Transfers = new TransferRepository(_context); TransferItems = new TransferItemRepository(_context); Wastages = new WastageRepository(_context); WastageItems = new WastageItemRepository(_context); Workers = new WorkerRepository(_context); ItemLocation = new ItemLocationRepository(_context); StockHistory = new StockHistoryRepository(_context); Currencies = new CurrencyRepository(_context); }
void GetMeasurementUnit() { MeasurementUnitRepository m1 = new MeasurementUnitRepository(); DataSet result = m1.ListAll(); cbmeasurementUnit.DataSource = result.Tables[0]; cbmeasurementUnit.DisplayMember = "MeasurementName"; cbmeasurementUnit.ValueMember = "ID"; }
public UnitOfWork(GrowingPlantsContext context) { UserRepository = new UserRepository(context); TreeRepository = new TreeRepository(context); MeasurementUnitRepository = new MeasurementUnitRepository(context); LightRepository = new LightRepository(context); HumidityRepository = new HumidityRepository(context); TemperatureRepository = new TemperatureRepository(context); FavoriteTreeRepository = new FavoriteTreeRepository(context); CountryRepository = new CountryRepository(context); PlantingProcessRepository = new PlantingProcessRepository(context); PlantingEnvironmentRepository = new PlantingEnvironmentRepository(context); ProcessStepRepository = new ProcessStepRepository(context); PlantingActionRepository = new PlantingActionRepository(context); RecurrenceRepository = new RecurrenceRepository(context); NotificationRepository = new NotificationRepository(context); PlantingSpotRepository = new PlantingSpotRepository(context); PlantTypeRepository = new PlantTypeRepository(context); GalleryRepository = new GalleryRepository(context); PictureRepository = new PictureRepository(context); }