Beispiel #1
0
 public ActionResult EditTableRowDelete(Int32 Materialid)
 {
     using (materialCtl db = new materialCtl()){
         db.delete(Materialid);
         return(RedirectToAction("EditTable"));
     }
 }
Beispiel #2
0
 public ActionResult Delete(Int32 Materialid)
 {
     using (materialCtl db = new materialCtl()){
         db.delete(Materialid);
         return(RedirectToAction("Index"));
     }
 }
Beispiel #3
0
 public ActionResult EditTableRowsDelete(string records)
 {
     using (materialCtl db = new materialCtl()){
         foreach (string id in records.Trim(',').Split(','))
         {
             if (!string.IsNullOrEmpty(id.Trim()))
             {
                 db.delete(Convert.ToInt32(id));
             }
         }
         return(View());
     }
 }