Exemplo n.º 1
0
        public ActionResult ManageConfiguration_Create([DataSourceRequest] DataSourceRequest request, CRMHowHeard _objlogmap)
        {
            if (ModelState.IsValid)
            {
                var  _manageconfiguration = _objSaleBAL.ManageConfiguration_GetAllBAL(CurrentUser.CompanyID, "");
                bool flage = false;
                foreach (var x in _manageconfiguration)
                {
                    if (x.Name == _objlogmap.Name)
                    {
                        flage = true;
                        break;
                    }
                }
                if (flage)
                {
                    ModelState.AddModelError(lr.DubliocationHappen, lr.CRMConfigrationAllreadyExists);
                }
                else
                {
                    _objlogmap.CreatedBy      = CurrentUser.NameIdentifierInt64;
                    _objlogmap.CreatedDate    = DateTime.Now;
                    _objlogmap.OrganizationID = CurrentUser.CompanyID;


                    _objlogmap.ID = _objSaleBAL.ManageConfiguration_CreateBAL(_objlogmap);
                }
            }
            var resultData = new[] { _objlogmap };

            return(Json(resultData.ToDataSourceResult(request, ModelState)));
        }
Exemplo n.º 2
0
        public ActionResult ManageConfiguration_Create([DataSourceRequest] DataSourceRequest request, CRMHowHeard _objlogmap)
        {
            if (ModelState.IsValid)
            {
                _objlogmap.CreatedBy      = CurrentUser.NameIdentifierInt64;
                _objlogmap.CreatedDate    = DateTime.Now;
                _objlogmap.OrganizationID = CurrentUser.CompanyID;


                _objlogmap.ID = _objSaleBAL.ManageConfiguration_CreateBAL(_objlogmap);
                //}
            }
            var resultData = new[] { _objlogmap };

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