public static string DeleteItem(string strRQMTSystemDefectID) { Dictionary <string, string> result = new Dictionary <string, string>() { { "saved", "" }, { "ids", "" }, { "error", "" } }; bool exists = false, deleted = false; string ids = string.Empty, errorMsg = string.Empty, tempMsg = string.Empty; try { int rqmtSystemDefectID = 0; int.TryParse(strRQMTSystemDefectID, out rqmtSystemDefectID); deleted = RQMT.RQMTDefectsImpact_Delete(intRQMTSystemDefectID: rqmtSystemDefectID); } catch (Exception ex) { LogUtility.LogException(ex); deleted = false; errorMsg = ex.Message; } result["deleted"] = deleted.ToString(); result["error"] = errorMsg; return(JsonConvert.SerializeObject(result, Newtonsoft.Json.Formatting.None)); }