Ejemplo n.º 1
0
 public ActionResult Delete(string id)
 {
     SqlHelper hp = new SqlHelper();
     hp.execsql("delete from dep where id=" + id);
     return RedirectToAction("Department", "Admin", null);
 }
Ejemplo n.º 2
0
        public ActionResult Edit(department model)
        {
            SqlHelper hp = new SqlHelper();
            hp.execsql("update dep set cname='" + model.departmentName + "' where id=" + model.id);
            //return View(model);

            return RedirectToAction("Department", "Admin", null);
        }