public ActionResult Create([DataSourceRequest]DataSourceRequest request, ViewModelType model) { var databaseModel = model.GetEntityModel(); model.Id = (int)this.BaseCreate(databaseModel); this.UpdateAuditInfoValues(model, databaseModel); return this.GridOperation(request, model); }
public ActionResult Destroy([DataSourceRequest] DataSourceRequest request, ViewModelType model) { var contest = this.Data.ContestCategories.GetById(model.Id.Value); this.CascadeDeleteCategories(contest); return(this.Json(this.ModelState.ToDataSourceResult())); }
public ActionResult Update([DataSourceRequest] DataSourceRequest request, ViewModelType model) { var entity = this.GetById(model.Id) as DatabaseModelType; this.BaseUpdate(model.GetEntityModel(entity)); this.UpdateAuditInfoValues(model, entity); return(this.GridOperation(request, model)); }
public ActionResult Create([DataSourceRequest] DataSourceRequest request, ViewModelType model) { var databaseModel = model.GetEntityModel(); model.Id = (int)this.BaseCreate(databaseModel); this.UpdateAuditInfoValues(model, databaseModel); return(this.GridOperation(request, model)); }
public ActionResult Update([DataSourceRequest]DataSourceRequest request, ViewModelType model) { var entity = this.GetById(model.Id) as DatabaseModelType; this.BaseUpdate(model.GetEntityModel(entity)); this.UpdateAuditInfoValues(model, entity); return this.GridOperation(request, model); }
public ActionResult Destroy([DataSourceRequest]DataSourceRequest request, ViewModelType model) { var contest = this.Data.ContestCategories.GetById(model.Id.Value); this.CascadeDeleteCategories(contest); return this.Json(this.ModelState.ToDataSourceResult()); }
public ActionResult Update([DataSourceRequest]DataSourceRequest request, ModelType model) { return this.BaseUpdate(request, model.ToEntity); }
public ActionResult Create([DataSourceRequest]DataSourceRequest request, ViewModelType model) { this.BaseCreate(model.GetEntityModel()); return this.GridOperation(request, model); }