コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ClientPaymentStatu clientPaymentStatu = db.ClientPaymentStatus.Find(id);

            db.ClientPaymentStatus.Remove(clientPaymentStatu);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "ClientPaymentStatusID,ClientPaymentStatus")] ClientPaymentStatu clientPaymentStatu)
 {
     if (ModelState.IsValid)
     {
         db.Entry(clientPaymentStatu).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(clientPaymentStatu));
 }
コード例 #3
0
        public ActionResult Create([Bind(Include = "ClientPaymentStatusID,ClientPaymentStatus")] ClientPaymentStatu clientPaymentStatu)
        {
            if (ModelState.IsValid)
            {
                db.ClientPaymentStatus.Add(clientPaymentStatu);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(clientPaymentStatu));
        }
コード例 #4
0
        // GET: ClientPaymentStatus/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ClientPaymentStatu clientPaymentStatu = db.ClientPaymentStatus.Find(id);

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