예제 #1
0
        public ActionResult Create(LeasingCompany leasingCompany, FormCollection collection)
        {
            db.Entry(leasingCompany).State = EntityState.Added;
            db.SaveChanges();

            return(RedirectToAction("Index"));
        }
예제 #2
0
 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"));
 }
예제 #3
0
        // 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"));
        }
예제 #4
0
        // 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());
        }
예제 #5
0
 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;
     }
 }