示例#1
0
 public int ManageHowHeard_DeleteBAL(CRMHowHeardMapping _mapping)
 {
     return(DAL.ManageHowHeard_DeleteDAL(_mapping));
 }
示例#2
0
 public long ManageHowHeard_CreateBAL(CRMHowHeardMapping _mapping)
 {
     return(DAL.ManageHowHeard_CreateDAL(_mapping));
 }
示例#3
0
        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)));
        }
示例#4
0
        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)));
        }
示例#5
0
        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)));
        }
示例#6
0
        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)));
        }