public ActionResult DeleteTrialIncomeArticle([DataSourceRequest] DataSourceRequest request, TrialIncomeArticle article) { if (article != null) { DataProvider.Delete(article); } return Json(new[] { article }.ToDataSourceResult(request, ModelState)); }
public ActionResult AddTrialIncomeArticle([DataSourceRequest] DataSourceRequest request, TrialIncomeArticle article) { if (article != null && ModelState.IsValid) { DataProvider.Add(article); } return Json(new[] { article }.ToDataSourceResult(request, ModelState)); }