public ActionResult ManageCategory_Create([DataSourceRequest] DataSourceRequest request, CRM_CourseCategoryMapping _mapping, long oid) { if (ModelState.IsValid) { _mapping.PersonID = oid; if (_PersonBAL.ManageCourseCategory_DuplicationCheckBAL(_mapping) > 0) { ModelState.AddModelError(lr.DubliocationHappen, lr.DubliocationHappen); } else { _mapping.CreatedBy = CurrentUser.NameIdentifierInt64; _mapping.CreatedOn = DateTime.Now; _mapping.ID = _PersonBAL.ManageCategory_CreateBAL(_mapping); } } var resultData = new[] { _mapping }; return(Json(resultData.ToDataSourceResult(request, ModelState))); }