コード例 #1
0
 public ActionResult Edit(CommunicationRecord model)
 {
     try
     {
         work.CommunicationRecord.Update(model);
         work.Save();
         return(Json(new { success = true }));
     }
     catch (Exception ex)
     {
         return(Json(new { success = false, msg = ex.Message }));
     }
 }
コード例 #2
0
 public ActionResult Add(CommunicationRecord model)
 {
     try
     {
         model.Student = work.Student.GetEntityById(Convert.ToInt32(Request.Params["Student"]));
         work.CommunicationRecord.Insert(model);
         work.Save();
         return(Json(new { success = true }));
     }
     catch (Exception e)
     {
         return(Json(new { success = false, msg = e.Message }));
     }
 }