public ActionResult PersonPhone_Create([DataSourceRequest] DataSourceRequest request, string pid, PhoneNumbers _objPhoneNumbers) { if (ModelState.IsValid) { if (_objPersonContactBAL.PersonPhoneNumbers_DuplicationCheckBAL(_objPhoneNumbers, Convert.ToInt64(pid)) > 1) { ModelState.AddModelError(lr.PersonPhoneNumber, lr.PersonPhoneDuplication); } else { _objPhoneNumbers.CreatedBy = CurrentUser.NameIdentifierInt64; _objPhoneNumbers.CreatedDate = DateTime.Now; _objPhoneNumbers.ID = _objPersonContactBAL.PersonPhoneNumbers_CreateBAL(_objPhoneNumbers, Convert.ToInt64(pid)); } } var resultData = new[] { _objPhoneNumbers }; return(Json(resultData.ToDataSourceResult(request, ModelState))); }