예제 #1
0
        public async Task FillSupplier(bitsContext dbContext, int supplierId)
        {
            SimpleSupplier s = await dbContext.Supplier.Include("SupplierAddress").Where(s => s.SupplierId == supplierId).FirstOrDefaultAsync();

            SupplierId       = s.SupplierId;
            Name             = s.Name;
            Phone            = s.Phone;
            Email            = s.Email;
            ContactFirstName = s.ContactFirstName;
            ContactLastName  = s.ContactLastName;
            ContactPhone     = s.ContactPhone;
            Note             = s.Note;
            Website          = s.Website;

            foreach (SupplierAddress sAddress in s.SupplierAddress)
            {
                int           addressId     = sAddress.AddressId;
                int           addressTypeId = sAddress.AddressTypeId;
                SimpleAddress address       = await dbContext.Address.FindAsync(addressId);

                AddressType aType = await dbContext.AddressType.FindAsync(addressTypeId);

                Addresses.Add(new Address(addressId, address.StreetLine1, address.StreetLine2, address.City,
                                          address.State, address.Zipcode, addressTypeId, aType.Name));
            }
        }
 public void Setup()
 {
     dbContext   = new bitsContext();
     supList     = dbContext.Supplier.OrderBy(s => s.SupplierId).ToList();
     supAddrList = dbContext.SupplierAddress.OrderBy(s => s.SupplierId).ToList();
     addTypeList = dbContext.AddressType.OrderBy(s => s.AddressTypeId).ToList();
     addresses   = dbContext.Address.OrderBy(s => s.AddressId).ToList();
 }
 public void Setup()
 {
     dbContext     = new bitsContext();
     recipeList    = dbContext.Recipe.Where(s => s.RecipeId == 1).ToList();
     recipeIngList = dbContext.RecipeIngredient.Where(s => s.RecipeId == 1).ToList();
     ingList       = dbContext.Ingredient.OrderBy(s => s.IngredientId).ToList();
     ingTypeList   = dbContext.IngredientType.OrderBy(s => s.IngredientTypeId).ToList();
     ingOrderList  = dbContext.IngredientInventoryAddition.OrderBy(s => s.IngredientInventoryAdditionId).ToList();
     supList       = dbContext.Supplier.OrderBy(s => s.SupplierId).ToList();
 }
 public RecipesController(bitsContext context)
 {
     _context = context;
 }
예제 #5
0
 public AdjunctTypesController(bitsContext context)
 {
     _context = context;
 }
예제 #6
0
 public SuppliersController(bitsContext context)
 {
     _context = context;
 }
예제 #7
0
 public HopTypesController(bitsContext context)
 {
     _context = context;
 }
 public IngredientUsedInsController(bitsContext context)
 {
     _context = context;
 }
예제 #9
0
 public AppConfigsController(bitsContext context)
 {
     _context = context;
 }
 public YeastsController(bitsContext context)
 {
     _context = context;
 }
 public InventoryTransactionsController(bitsContext context)
 {
     _context = context;
 }
 public ContainerTypesController(bitsContext context)
 {
     _context = context;
 }
예제 #13
0
 public BarrelsController(bitsContext context)
 {
     _context = context;
 }
 public IngredientTypesController(bitsContext context)
 {
     _context = context;
 }
예제 #15
0
 public IngredientInventoryAdditionsController(bitsContext context)
 {
     _context = context;
 }
 public UnitTypesController(bitsContext context)
 {
     _context = context;
 }
 public BrewContainersController(bitsContext context)
 {
     _context = context;
 }
예제 #18
0
 public ProductContainerSizesController(bitsContext context)
 {
     _context = context;
 }
 public FermentableTypesController(bitsContext context)
 {
     _context = context;
 }
예제 #20
0
 public StylesController(bitsContext context)
 {
     _context = context;
 }
 public ProductContainerInventoriesController(bitsContext context)
 {
     _context = context;
 }
 public AppUsersController(bitsContext context)
 {
     _context = context;
 }
예제 #23
0
 public AccountsController(bitsContext context)
 {
     _context = context;
 }
예제 #24
0
 public AddressesController(bitsContext context)
 {
     _context = context;
 }
예제 #25
0
 public UseDuringsController(bitsContext context)
 {
     _context = context;
 }
 public ProductsController(bitsContext context)
 {
     _context = context;
 }
 public SupplierAddressesController(bitsContext context)
 {
     _context = context;
 }
예제 #28
0
 public MashStepsController(bitsContext context)
 {
     _context = context;
 }
 public ContainerStatusController(bitsContext context)
 {
     _context = context;
 }
 public IngredientInventorySubtractionsController(bitsContext context)
 {
     _context = context;
 }