예제 #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));
 }