示例#1
0
 public ActionResult Save(List <AutoOvertime> objs)
 {
     try
     {
         // TODO: Add insert logic here
         if (objs != null && objs.Count > 0)
         {
             var deleteObjs = AutoOvertime.GetAll();
             foreach (var d in deleteObjs)
             {
                 d.Delete();
             }
             foreach (var obj in objs)
             {
                 obj.Insert();
             }
         }
         return(new JsonResult()
         {
             Data = ResultModel.SuccessResult()
         });
     }
     catch
     {
         return(new JsonResult()
         {
             Data = ResultModel.FailResult()
         });
     }
 }
示例#2
0
 // GET: AutoOvertime
 public ActionResult Index()
 {
     return(PartialView(AutoOvertime.GetAll()));
 }