Beispiel #1
0
        public ActionResult <CustomFieldAddViewModel> AddCustomField(CustomFieldAddViewModel customFieldAddViewModel)
        {
            CustomFieldAddViewModel customFieldAdd = new CustomFieldAddViewModel();

            try
            {
                if (customFieldAddViewModel.customFields.SchoolId > 0)
                {
                    customFieldAdd = _customFieldService.SaveCustomField(customFieldAddViewModel);
                }
                else
                {
                    customFieldAdd._token      = customFieldAddViewModel._token;
                    customFieldAdd._tenantName = customFieldAddViewModel._tenantName;
                    customFieldAdd._failure    = true;
                    customFieldAdd._message    = "Please enter valid school id";
                }
            }
            catch (Exception es)
            {
                customFieldAdd._failure = true;
                customFieldAdd._message = es.Message;
            }
            return(customFieldAdd);
        }