public void Delete(int Id) { Sales_Totals_by_Amount cust = db.Sales_Totals_by_Amounts.Find(Id); db.Sales_Totals_by_Amounts.Remove(cust); Save(); }
public ActionResult Edit(Sales_Totals_by_Amount s) { if (!ModelState.IsValid) { return(View()); } try { bll.salesamt.Update(s); TempData["msg"] = "Edited Successfully"; } catch (Exception ex) { TempData["msg"] = "Edit failed" + ex.ToString(); } return(RedirectToAction("Index")); }
public ActionResult Create(Sales_Totals_by_Amount s) { if (!ModelState.IsValid) { return(View()); } try { bll.salesamt.Insert(s); TempData["msg"] = "Created successfully"; } catch (Exception ex) { TempData["msg"] = "couldn't create" + ex.ToString(); } return(RedirectToAction("Index")); }
public void Update(Sales_Totals_by_Amount cust) { db.Update(cust); }
public void Insert(Sales_Totals_by_Amount cust) { db.Insert(cust); }
public void Update(Sales_Totals_by_Amount cust) { db.Entry(cust).State = EntityState.Modified; Save(); }
public void Insert(Sales_Totals_by_Amount cust) { db.Sales_Totals_by_Amounts.Add(cust); Save(); }
public static Sales_Totals_by_Amount CreateSales_Totals_by_Amount(int orderID, string companyName) { Sales_Totals_by_Amount sales_Totals_by_Amount = new Sales_Totals_by_Amount(); sales_Totals_by_Amount.OrderID = orderID; sales_Totals_by_Amount.CompanyName = companyName; return sales_Totals_by_Amount; }
public void AddToSales_Totals_by_Amounts(Sales_Totals_by_Amount sales_Totals_by_Amount) { base.AddObject("Sales_Totals_by_Amounts", sales_Totals_by_Amount); }