コード例 #1
0
 public IActionResult addVendor(TblVendor tv)
 {
     //var t = ourdbCntxt.TblVendor.Find(tv.vendorId);
     ourdbCntxt.TblVendor.Add(tv);
     ourdbCntxt.SaveChanges();
     return(RedirectToAction(nameof(VendorsController.viewAllVendors)));
 }
コード例 #2
0
 public IActionResult SaleItem(TblSales ts)
 {
     ourdbcontxt.TblSales.Add(ts);
     ourdbcontxt.SaveChanges();
     return(RedirectToAction(nameof(SalesController.SaleHistory)));
 }
コード例 #3
0
 public IActionResult addCustomer(TblCustomer tc)
 {
     ourdbcontxt.TblCustomer.Add(tc);
     ourdbcontxt.SaveChanges();
     return(RedirectToAction(nameof(CustomerController.viewAllCustomers)));
 }
コード例 #4
0
 public IActionResult addItem(TblItem ti)
 {
     ourdbcontxt.TblItem.Add(ti);
     ourdbcontxt.SaveChanges();
     return(RedirectToAction(nameof(itemsController.viewAllItems)));
 }
コード例 #5
0
 public IActionResult register(tblUser tr)
 {
     mydbCntxt.tblUser.Add(tr);
     mydbCntxt.SaveChanges();
     return(RedirectToAction(nameof(RegistrationController.viewAllUsers)));
 }
コード例 #6
0
 public IActionResult purchaseNewQuantity(TblPurchase tp)
 {
     ourdbcontxt.TblPurchase.Add(tp);
     ourdbcontxt.SaveChanges();
     return(RedirectToAction(nameof(PurchaseController.purchaseHistory)));
 }
コード例 #7
0
 public IActionResult catagories(TblCatagories tc)
 {
     dbContet.TblCatagories.Add(tc);
     dbContet.SaveChanges();
     return(RedirectToAction(nameof(CatagoriesController.viewAllCatagories)));
 }