public ActionResult Create(LeasingCompany leasingCompany, FormCollection collection) { db.Entry(leasingCompany).State = EntityState.Added; db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(LeasingCompany leasingCompany, FormCollection collection) { ViewBag.LSList1 = new SelectList(db.LeasingCompanyTransportTable, "LSTransportId", "LSTransportTypes"); db.Entry(leasingCompany).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); }
// GET: Carriage/Delete/5 public ActionResult Delete(int id) { LeasingCompany leasingCompany = db.LeasingCompany.Find(id); if (leasingCompany != null) { db.LeasingCompany.Remove(leasingCompany); db.SaveChanges(); } return(RedirectToAction("Index")); }
// GET: Carriage/Edit/5 public ActionResult Edit(int?id) { ViewBag.LSList1 = new SelectList(db.LeasingCompanyTransportTable, "LSTransportId", "LSTransportTypes"); if (id == null) { return(HttpNotFound()); } LeasingCompany leasingCompany = db.LeasingCompany.Find(id); if (leasingCompany != null) { return(View(leasingCompany)); } return(HttpNotFound()); }
public Lease(out Lease lease, IRestResponse response, string authToken, LeasingCompany leasingCompany, string environment, bool verify) { _leasingCompany = leasingCompany; _authToken = authToken; _environment = environment; if (verify) { lease = ParseByPIIResultJson(response); } else { lease = ParseGetByPhoneJson(response); } if (string.IsNullOrWhiteSpace(lease.Name)) { lease = null; } }