예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            CxC60 cxC60 = db.CxC60.Find(id);

            db.CxC60.Remove(cxC60);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "Id,Id_User,DateP,DateLimit,Id_LatePayment,status,TotalAmount")] CxC60 cxC60)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cxC60).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(cxC60));
 }
예제 #3
0
        public ActionResult Create([Bind(Include = "Id,Id_User,DateP,DateLimit,Id_LatePayment,status,TotalAmount")] CxC60 cxC60)
        {
            if (ModelState.IsValid)
            {
                db.CxC60.Add(cxC60);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(cxC60));
        }
예제 #4
0
        // GET: CxC60/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CxC60 cxC60 = db.CxC60.Find(id);

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