public ActionResult BillType() { //var model = new BillType(); //{ // model.BillType1 = "Credit Card"; // model.Customers.Add(new Customer()); //}; using (var db = new SemplestEntities()) { try { if (db.BillTypes.Count() > 0) return View(db.BillTypes.ToList()); else return View(); } catch { return View(); } } //return View(); }
public ActionResult Create(Phone ph) { try { using (var db = new SemplestEntities()) { db.Phones.Add(ph); db.SaveChanges(); } return RedirectToAction("Index"); } catch { return View(); } }
public ActionResult Create(BillType billtype) { try { using (var db = new SemplestEntities()) { db.BillTypes.Add(billtype); db.SaveChanges(); } return RedirectToAction("BillType"); } catch { return View(); } }