示例#1
0
 public ActionResult Edit([Bind(Include = "id,Name")] PaymantNames PaymantNames)
 {
     if (ModelState.IsValid)
     {
         db.Update(PaymantNames);
         return(RedirectToAction("Index"));
     }
     return(View(PaymantNames));
 }
示例#2
0
        public ActionResult Delete(int id = 0)
        {
            PaymantNames user = db.GetById(id);

            if (user == null)
            {
                return(HttpNotFound());
            }
            return(View(user));
        }
示例#3
0
        public ActionResult Create([Bind(Include = "Name")] PaymantNames PaymantNames)
        {
            if (ModelState.IsValid)
            {
                db.Add(PaymantNames);
                return(RedirectToAction("Index"));
            }

            return(View(PaymantNames));
        }
示例#4
0
        public ActionResult Details(int id = 0)
        {
            PaymantNames PaymantNames = db.GetById(id);

            if (PaymantNames == null)
            {
                return(HttpNotFound());
            }
            return(View(PaymantNames));
        }
示例#5
0
 public void Update(PaymantNames entity)
 {
     rep.Update(entity);
 }
示例#6
0
 public PaymantNames Add(PaymantNames entity)
 {
     return(rep.Add(entity));
 }