コード例 #1
0
ファイル: ProspectController.cs プロジェクト: waqasBashir/TMS
        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));
        }
コード例 #2
0
ファイル: PeopleController.cs プロジェクト: waqasBashir/TMS
        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)));
            }
        }
コード例 #3
0
        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));
        }