public ActionResult Prospect_Destroy([DataSourceRequest] DataSourceRequest request, Person _person) { _person.UpdatedBy = CurrentUser.NameIdentifierInt64; _person.UpdatedDate = DateTime.Now; var result = _PersonBAL.Person_DeleteBAL(_person); //if (result == -1) //{ // //if() // //_objPersonContactBAL.PersonEmailAddress_DeleteBAL(); //} //var resultData = new[] { _person }; return(Json(new object[0].ToDataSourceResult(request, ModelState))); // return Json(resultData.AsQueryable().ToDataSourceResult(request, ModelState)); }
public ActionResult Person_Destroy([DataSourceRequest] DataSourceRequest request, Person _person) { if (_UserBAL.DeletePerson_CheckBAL(new ClassTrainerMapping { PersonID = _person.ID }) > 0) { //ModelState.AddModelError(lr.UserEmailAlreadyExist, lr.UserEmailAlreadyExist); return(Json(lr.UserEmailAlreadyExist, JsonRequestBehavior.AllowGet)); } else { _person.UpdatedBy = CurrentUser.NameIdentifierInt64; _person.UpdatedDate = DateTime.Now; var result = _PersonBAL.Person_DeleteBAL(_person); return(Json(new object[0].ToDataSourceResult(request, ModelState))); } }
public ActionResult Prospect_Destroy([DataSourceRequest] DataSourceRequest request, Person _person) { if (_PersonBAL.ManageCourse_Assigned(_person.ID) > 0) { ModelState.AddModelError(lr.PersonPhoneNumber, lr.PersonPhoneDuplication); } else { _person.UpdatedBy = CurrentUser.NameIdentifierInt64; _person.UpdatedDate = DateTime.Now; var result = _PersonBAL.Person_DeleteBAL(_person); //if (result == -1) //{ // //if() // //_objPersonContactBAL.PersonEmailAddress_DeleteBAL(); //} //var resultData = new[] { _person }; } return(Json(new object[0].ToDataSourceResult(request, ModelState))); // return Json(resultData.AsQueryable().ToDataSourceResult(request, ModelState)); }