// bill btn click info bundel public async Task <ActionResult> BundelBill(int id) { BundelsDb bundel = await db.Bundels.FirstOrDefaultAsync(f => f.Id == id); if (bundel != null) { return(PartialView(bundel)); } else { return(RedirectToAction("Index")); } }
//bundel label // bill btn click info bundel public async Task <ActionResult> BundelLabel(int id) { BundelsDb bundel = await db.Bundels.Include(l => l.BundelProducts).FirstOrDefaultAsync(f => f.Id == id); if (bundel != null) { ViewBag.set = db.Settings.FirstOrDefault(); return(PartialView(bundel)); } else { return(RedirectToAction("Index")); } }
public ActionResult Create(PostCreateBundel bundel)//balans emeliyyati da yazilmalidi { if (ModelState.IsValid) { BundelsDb bundelDb = new BundelsDb(); bundel.ViewFromDb(bundelDb); bundelDb.OrderStatusId = 2; db.Bundels.Add(bundelDb); db.SaveChanges(); if (bundel.orderId != null && bundel.orderId.Length > 0) { foreach (var i in bundel.orderId) { BundelAddOrder.AddOrder(i, bundelDb.Id, db); } } db.SaveChanges(); } return(RedirectToAction("Index")); }