コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            TenantLeaseInfo tenantLeaseInfo = db.TenantLeaseInfoes.Find(id);

            db.TenantLeaseInfoes.Remove(tenantLeaseInfo);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "TenantLeaseID,Tenant,LeaseAmount,SquareFootage,ProRataPercentage,PricePerSquareFoot,Notes,NNN,Deposit,LeaseStart,LeaseEnd,RentCommencement,Admin_Fee,ActiveLease")] TenantLeaseInfo tenantLeaseInfo)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tenantLeaseInfo).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tenantLeaseInfo));
 }
コード例 #3
0
        // GET: TenantLeaseInfoes/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TenantLeaseInfo tenantLeaseInfo = db.TenantLeaseInfoes.Find(id);

            if (tenantLeaseInfo == null)
            {
                return(HttpNotFound());
            }
            return(View(tenantLeaseInfo));
        }