public ActionResult db_Update([DataSourceRequest] DataSourceRequest request, TargetGroupViewModel user)
        {
            if (user != null && ModelState.IsValid)
            {
                TargetGroupSerivce.Update(user);
            }

            return(Json(new[] { user }.ToDataSourceResult(request, ModelState)));
        }
 public ActionResult db_Destroy([DataSourceRequest] DataSourceRequest request, TargetGroupViewModel user)
 {
     try
     {
         if (ModelState.IsValid)
         {
             if (user != null)
             {
                 TargetGroupSerivce.Destroy(user);
             }
             return(Json(new[] { user }.ToDataSourceResult(request, ModelState)));
         }
     }
     catch (Exception)
     {
         ModelState.AddModelError("خطأ", "لا يمكن الحذف");
         return(Json(new[] { user }.ToDataSourceResult(request, ModelState)));
     }
     return(Json(new[] { user }.ToDataSourceResult(request, ModelState)));
 }