Пример #1
0
        public ActionResult ManageScheduledClasses_Update([DataSourceRequest] DataSourceRequest request, CRM_classPersonMapping _objPhoneNumbers)
        {
            if (ModelState.IsValid)
            {
                _objPhoneNumbers.UpdatedOn = DateTime.Now;
                if (_PersonBAL.ManageScheduledClasses_DublicationBAL(_objPhoneNumbers) > 0)
                {
                    ModelState.AddModelError(lr.DubliocationHappen, lr.DubliocationHappen);
                }
                else
                {
                    _objPhoneNumbers.UpdatedBy = CurrentUser.NameIdentifierInt64;
                    _objPhoneNumbers.UpdatedOn = DateTime.Now;
                    var result = _PersonBAL.ManageScheduledClasses_UpdateBAL(_objPhoneNumbers);
                    if (result == -1)
                    {
                        ModelState.AddModelError(lr.ErrorServerError, lr.ResourceUpdateValidationError);
                    }
                }
            }
            var resultData = new[] { _objPhoneNumbers };

            return(Json(resultData.AsQueryable().ToDataSourceResult(request, ModelState)));
        }