Example #1
0
 public ActionResult DepartmentProc(int id, string dname, int pid)
 {
     if (id == 0)
     {
         Department.AddInfo(new Department(dname, pid));
     }
     else
     {
         Department.UpdateInfo(new Department(id, dname, pid));
     }
     return(RedirectToAction("DepartmentManager"));
 }