Beispiel #1
0
 public ActionResult AddStaff(string models)
 {
     sd_staff staff = new sd_staff();
     JsonResult result = new JsonResult();
     if (models != null)
     {
         staff = JsonConvert.DeserializeObject<sd_staff>(models);
         staff.addtime = DateTime.Now;
         result.Data = new Staff().Add(staff);
         result.Data = true;
     }
     else
     {
         result.Data = false;
     }
     return result;
 }
Beispiel #2
0
 public ActionResult Update(string models)
 {
     sd_staff model = new sd_staff();
     List<sd_staff> list = new List<sd_staff>();
     if (models != null)
     {
         model = JsonConvert.DeserializeObject<sd_staff>(models);
         model.updatetime = DateTime.Now;
         var t = new Staff().Update(model);
     }
     return Json(list);
 }