public int ManageHowHeard_DeleteBAL(CRMHowHeardMapping _mapping) { return(DAL.ManageHowHeard_DeleteDAL(_mapping)); }
public long ManageHowHeard_CreateBAL(CRMHowHeardMapping _mapping) { return(DAL.ManageHowHeard_CreateDAL(_mapping)); }
public ActionResult ManageHowHeard_Destroy([DataSourceRequest] DataSourceRequest request, CRMHowHeardMapping _objPhoneNumbers) { if (ModelState.IsValid) { _objPhoneNumbers.UpdatedBy = CurrentUser.NameIdentifierInt64; _objPhoneNumbers.UpdatedOn = DateTime.Now; var results = _PersonBAL.ManageHowHeard_DeleteBAL(_objPhoneNumbers); if (results == -1) { ModelState.AddModelError(lr.ErrorServerError, lr.ResourceUpdateValidationError); } } var resultData = new[] { _objPhoneNumbers }; return(Json(resultData.AsQueryable().ToDataSourceResult(request, ModelState))); }
public ActionResult ManageHowHeard_Update([DataSourceRequest] DataSourceRequest request, CRMHowHeardMapping _objPhoneNumbers) { if (ModelState.IsValid) { //if (_objPersonContactBAL.PersonPhoneNumbers_DuplicationCheckBAL(_objPhoneNumbers, Convert.ToInt64(pid)) > 0) //{ // ModelState.AddModelError(lr.PersonPhoneNumber, lr.PersonPhoneDuplication); //} // else // { var _Phone = _PersonBAL.ManageHowHeard_GetAllBAL(Convert.ToInt64(_objPhoneNumbers.PersonID)); bool flage = false; foreach (var x in _Phone) { if (_objPhoneNumbers.HowHeardID == x.HowHeardID) { flage = true; break; } } if (flage) { ModelState.AddModelError(lr.ErrorServerError, lr.ResourceUpdateValidationError); } else { _objPhoneNumbers.UpdatedBy = CurrentUser.NameIdentifierInt64; _objPhoneNumbers.UpdatedOn = DateTime.Now; var result = _PersonBAL.ManageHowHeard_UpdateBAL(_objPhoneNumbers); if (result == -1) { ModelState.AddModelError(lr.ErrorServerError, lr.ResourceUpdateValidationError); } } } var resultData = new[] { _objPhoneNumbers }; return(Json(resultData.AsQueryable().ToDataSourceResult(request, ModelState))); }
public ActionResult ManageHowHeard_Create([DataSourceRequest] DataSourceRequest request, CRMHowHeardMapping _mapping, long oid) { if (ModelState.IsValid) { var _Phone = _PersonBAL.ManageHowHeard_GetAllBAL(Convert.ToInt64(oid)); bool flage = false; foreach (var x in _Phone) { if (_mapping.HowHeardID == x.HowHeardID) { flage = true; break; } } if (flage) { ModelState.AddModelError(lr.ErrorServerError, lr.ResourceUpdateValidationError); } else { _mapping.PersonID = oid; _mapping.CreatedBy = CurrentUser.NameIdentifierInt64; _mapping.CreatedOn = DateTime.Now; _mapping.ID = _PersonBAL.ManageHowHeard_CreateBAL(_mapping); } } var resultData = new[] { _mapping }; return(Json(resultData.ToDataSourceResult(request, ModelState))); }
public ActionResult ManageHowHeard_Create([DataSourceRequest] DataSourceRequest request, CRMHowHeardMapping _mapping, long oid) { if (ModelState.IsValid) { _mapping.PersonID = oid; _mapping.CreatedBy = CurrentUser.NameIdentifierInt64; _mapping.CreatedOn = DateTime.Now; _mapping.ID = _PersonBAL.ManageHowHeard_CreateBAL(_mapping); } var resultData = new[] { _mapping }; return(Json(resultData.ToDataSourceResult(request, ModelState))); }