Ejemplo n.º 1
0
 public ActionResult Add(SchoolContact 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;
 }
Ejemplo n.º 2
0
partial         void BeforeShowEditView(SchoolContact e);
Ejemplo n.º 3
0
partial         void BeforeUpdateData(SchoolContact e, ref ActionResult ar);
Ejemplo n.º 4
0
partial         void AfterAddData(SchoolContact e, ref ActionResult ar);
Ejemplo n.º 5
0
partial         void AfterUpdateData(SchoolContact e, ref ActionResult ar);
Ejemplo n.º 6
0
partial         void AddRowToGridModel(LigerGridModel m, SchoolContact e);
Ejemplo n.º 7
0
 public void Delete(SchoolContact entity)
 {
     this.Repository.Delete(entity);
     this.Db.Save();
 }
Ejemplo n.º 8
0
 public void Add(SchoolContact entity)
 {
     this.Repository.Add(entity);
     this.Db.Save();
 }
Ejemplo n.º 9
0
 public void Update(SchoolContact entity)
 {
     this.Repository.Update(entity);
     this.Db.Save();
 }
Ejemplo n.º 10
0
 public void Save(SchoolContact entity)
 {
     if(entity.Id==0){
         this.Add(entity);
     }else{
         this.Db.Save();
     }
 }