public IActionResult DeleteInterpretation(string code) { try { int result = InterpretationHelper.DeleteInterpretation(code); APIResponse apiResponse; if (result > 0) { apiResponse = new APIResponse() { status = APIStatus.PASS.ToString(), response = result }; } else { apiResponse = new APIResponse() { status = APIStatus.FAIL.ToString(), response = "Deletion Failed." }; } return(Ok(apiResponse)); } catch (Exception ex) { return(Ok(new APIResponse() { status = APIStatus.FAIL.ToString(), response = ex.Message })); } }
public static List <Interpretation> GetInterpretationList() { try { return(InterpretationHelper.GetInterpretationList()); } catch { throw; } }
public IActionResult GetInterpretationList() { try { var interpretationList = InterpretationHelper.GetInterpretationList(); dynamic expdoObj = new ExpandoObject(); expdoObj.interpretationList = interpretationList; return(Ok(new APIResponse { status = APIStatus.PASS.ToString(), response = expdoObj })); } catch (Exception ex) { return(Ok(new APIResponse() { status = APIStatus.FAIL.ToString(), response = ex.Message })); } }
public IActionResult UpdateInterpretation([FromBody] Interpretation interpretation) { try { if (interpretation == null) { return(Ok(new APIResponse() { status = APIStatus.FAIL.ToString(), response = "Request cannot be null" })); } int rs = InterpretationHelper.UpdateInterpretation(interpretation); APIResponse apiResponse; if (rs > 0) { apiResponse = new APIResponse() { status = APIStatus.PASS.ToString(), response = rs }; } else { apiResponse = new APIResponse() { status = APIStatus.FAIL.ToString(), response = "Updation Failed." }; } return(Ok(apiResponse)); } catch (Exception ex) { return(Ok(new APIResponse() { status = APIStatus.FAIL.ToString(), response = ex.Message })); } }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) => InterpretationHelper.IsNontrivial(value);
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) => InterpretationHelper.IsNontrivial(value) ? Visibility.Visible : Visibility.Collapsed;