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 })); } }
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 })); } }