示例#1
0
        public IActionResult VerifyMaterial(long ixMaterial, string sMaterial)
        {
            string validationResponse = "";

            if (!_materialsService.VerifyMaterialUnique(ixMaterial, sMaterial))
            {
                validationResponse = $"Material {sMaterial} already exists.";
            }
            if (validationResponse != "")
            {
                return(Json(validationResponse));
            }
            else
            {
                return(Json(true));
            }
        }