public IActionResult SaveCustomLabel(CustomLabelModel customLabelModel) { var customLabel = customLabelModel.Id > 0 ? _customLabelService.Get(customLabelModel.Id) : new CustomLabel(); if (customLabel == null) { return(NotFound()); } customLabel.Text = customLabelModel.Text; customLabel.Type = customLabelModel.LabelType; _customLabelService.InsertOrUpdate(customLabel); return(R.Success.Result); }