public ActionResult Add(StudentTeleVisitRecord e) { ActionResult ar = null; try { this.BeforeAddData(e, ref ar); if (ar == null) { this.Service.Add(e); e = this.Service.FindById(e.Id); //ar = this.Json(new AjaxOperationResult { Data = e, Successful = true }); this.AfterAddData(e, ref ar); } } catch (Exception ex) { ar = this.Json(new AjaxOperationResult { Successful = false, Message = ex.Message }); } return ar; }
partial void BeforeShowEditView(StudentTeleVisitRecord e);
partial void BeforeUpdateData(StudentTeleVisitRecord e, ref ActionResult ar);
partial void AfterAddData(StudentTeleVisitRecord e, ref ActionResult ar);
partial void AddRowToGridModel(LigerGridModel m, StudentTeleVisitRecord e);
public void Delete(StudentTeleVisitRecord entity) { this.Repository.Delete(entity); this.Db.Save(); }
public void Add(StudentTeleVisitRecord entity) { this.Repository.Add(entity); this.Db.Save(); }
public void Save(StudentTeleVisitRecord entity) { if(entity.Id==0){ this.Add(entity); }else{ this.Db.Save(); } }