public IEnumerable <ProductsGroup> GetGemachProductsGroupsByGemachId(int gemachid) { Gemach gemach = gemaches.Find(g => g.GemachId == gemachid); IEnumerable <ProductsGroup> retVal = gemach.GemachProductsGroups; return(retVal); }
public IEnumerable <GemachManager> GetGemachManagersByGemachId(int gemachid) { Gemach gemach = gemaches.Find(g => g.GemachId == gemachid); IEnumerable <GemachManager> retVal = gemach.GemachManagers; return(retVal); }
public GemachManager GetGemachManagerByGemachIdAndManagerId(int gemachid, int managerid) { Gemach gemach = gemaches.Find(g => g.GemachId == gemachid); GemachManager retVal = gemach.GemachManagers.Find(gc => gc.GemachManagerId == managerid); return(retVal); }
public Customer GetGemachCustomerByGemachIdAndCustomerId(int gemachid, int customerid) { Gemach gemach = gemaches.Find(g => g.GemachId == gemachid); Customer retVal = gemach.GemachCustomers.Find(gc => gc.CustomerId == customerid); return(retVal); }
public async Task <IActionResult> Edit(int id, [Bind("ID,Category,Name,Description,City,Community,OwnerFirstName,OwnerLastName,PhoneNumber")] Gemach gemach) { if (id != gemach.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(gemach); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!GemachExists(gemach.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(gemach)); }
public Product GetGemachProductsGroupProductByGemachIdAndProductsGroupIdAndProductId(int gemachid, int productsgroupid, int productid) { Gemach gemach = gemaches.Find(g => g.GemachId == gemachid); ProductsGroup productsGroup = gemach.GemachProductsGroups.Find(gpg => gpg.ProductsGroupId == productsgroupid); Product retVal = productsGroup.ProductGroupProducts.Find(gpgp => gpgp.ProductId == productid); return(retVal); }
public IEnumerable <Product> GetGemachProductsGroupsProductsByGemachIdAndProductsGroup(int gemachid, int productsgroupid) { Gemach gemach = gemaches.Find(g => g.GemachId == gemachid); ProductsGroup productsGroup = gemach.GemachProductsGroups.Find(gpg => gpg.ProductsGroupId == productsgroupid); IEnumerable <Product> retVal = productsGroup.ProductGroupProducts; return(retVal); }
public async Task <IActionResult> Create([Bind("ID,Category,Name,Description,City,Community,OwnerFirstName,OwnerLastName,PhoneNumber")] Gemach gemach) { if (ModelState.IsValid) { _context.Add(gemach); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(gemach)); }