public static DBCase GetCaseByID(string id)
        {
            Dictionary <string, string> args = new Dictionary <string, string>();

            args.Add("caseId", id);
            string response = InvokeFunction("getCaseById", args);
            DBCase c        = new DBCase(response);

            c.ParseCase();

            return(c);
        }
        public void LoadCasesSummary()
        {
            Dictionary <string, string> args = new Dictionary <string, string>();

            CaseSummaryList.Clear();

            string func = "listCase";

            if (_CaseSetId != "0")
            {
                args.Add("caseSetId", _CaseSetId);
                func = "getCaseSetById";
            }

            args.Add("currentPage", "1");


            int counter = 1;

            while (true)
            {
                string      response = Elements.InvokeFunction(func, args);
                XmlDocument doc      = new XmlDocument();
                doc.LoadXml(response);
                XmlNodeList list = doc.GetElementsByTagName("case");
                if (list.Count == 0)
                {
                    break;
                }
                foreach (XmlNode node in list)
                {
                    string xml = node.OuterXml;
                    DBCase c   = new DBCase(xml);
                    c.ParseCase();
                    CaseSummaryList.Add(c);
                }
                counter++;
                args["currentPage"] = counter.ToString();
                if (_CaseSetId != "0")
                {
                    break;
                }
                // DEBUG: The Jan 2011 version of elementsDB does not support pagination for case sets
                // However, the specification asserts so, this is a bug.
            }
        }