public static string SaveRQMTSetOrdering(string order) { var result = WTSPage.CreateDefaultResult(); if (RQMT.RQMTSet_ReorderRQMTs(0, order)) { result["success"] = "true"; } return(WTSPage.SerializeResult(result)); }
public static string PasteRQMTs(int RQMTSetID, string options) { var result = WTSPage.CreateDefaultResult(); string previousCopiedRQMTs = (string)HttpContext.Current.Session["copied.rqmts"]; // RQMTS, SYSIDS, RSRSIDS if (options == null) { options = ""; } bool pasteAttributes = options.IndexOf("attr") != -1; bool pasteDefects = options.IndexOf("def") != -1; bool pasteDescriptions = options.IndexOf("desc") != -1; string pasteOptions = (pasteAttributes ? "attr," : "") + (pasteDefects ? "def," : "") + (pasteDescriptions ? "desc," : ""); if (pasteOptions.Length > 0) { pasteOptions = pasteOptions.Substring(0, pasteOptions.Length - 1); } if (!string.IsNullOrWhiteSpace(previousCopiedRQMTs)) { string[] arr = previousCopiedRQMTs.Split(','); string[] prevRQMTIDs = arr[0].Split('|'); string[] prevRQMTSet_RQMTSystemIDs = arr[2].Split('|'); for (int i = 0; i < prevRQMTIDs.Length; i++) { int RQMTID = Int32.Parse(prevRQMTIDs[i]); int RQMTSet_RQMTSystemID = Int32.Parse(prevRQMTSet_RQMTSystemIDs[i]); RQMT.RQMTSet_AddRQMT(RQMTSetID, RQMTID, null, false, RQMTSet_RQMTSystemID, pasteOptions); } RQMT.RQMTSet_ReorderRQMTs(RQMTSetID, null); // this forces us to reclaim space from previously deleted rqmts result["success"] = "true"; } else // we shouldn't get here; the UI should have disabled the paste button if there is nothing on the clipboard { result["success"] = "true"; } return(WTSPage.SerializeResult(result)); }