Esempio n. 1
0
        public string GetNewChange(string change_id = "%")
        {
            New_Change newchange   = new New_Change(change_id);
            string     Json_String = "{" + JsonMaker.GetJSON(newchange) + "}";

            Logger.LogAction(((JObject)JsonConvert.DeserializeObject(Json_String)).ToString(), "JSON_Gets");
            return(Json_String);
        }
Esempio n. 2
0
        public string GetPCR(string pcr_id = "%")
        {
            Utilities.UseRequiredFields = true;
            StringBuilder Pcr_Json = new StringBuilder();

            Pcr pcr = new Pcr(pcr_id);

            Pcr_Json.Append(JsonMaker.GetJSON(pcr) + System.Environment.NewLine);

            Dispatch Dispatch = new Dispatch(pcr.pcr_dispatch_id);

            Pcr_Json.Append("," + JsonMaker.GetJSON(Dispatch) + System.Environment.NewLine);

            List <Members> MembersList = Utilities.GetClassList <Members>("pcr_members", pcr_id, "pcr_id");

            Pcr_Json.Append("," + JsonMaker.GetJSONFromList(MembersList, Prefix: "pcr_members") + System.Environment.NewLine);

            Demographic Demographic = new Demographic(pcr.pcr_demographic_id);

            Pcr_Json.Append("," + JsonMaker.GetJSON(Demographic) + System.Environment.NewLine);

            Assessment Assessment = new Assessment(pcr.pcr_assessment_id);

            Pcr_Json.Append("," + JsonMaker.GetJSON(Assessment) + System.Environment.NewLine);

            Narrative_Notes Narrative_Notes = new Narrative_Notes(pcr.pcr_narrative_notes_id);

            Pcr_Json.Append("," + JsonMaker.GetJSON(Narrative_Notes) + System.Environment.NewLine);

            Rma Rma = new Rma(pcr.pcr_rma_id);

            Pcr_Json.Append("," + JsonMaker.GetJSON(Rma) + System.Environment.NewLine);

            Apcf Apcf = new Apcf(pcr.pcr_apcf_id);

            Pcr_Json.Append("," + JsonMaker.GetJSON(Apcf) + System.Environment.NewLine);

            Disposition Disposition = new Disposition(pcr.pcr_disposition_id);

            Pcr_Json.Append("," + JsonMaker.GetJSON(Disposition) + System.Environment.NewLine);

            Ems_run Ems_Run = new Ems_run(pcr.ems_run);

            Pcr_Json.Append("," + JsonMaker.GetJSON(Ems_Run) + System.Environment.NewLine);

            Narcotic Narcotic = new Narcotic(pcr.pcr_narcotics_id);

            Pcr_Json.Append("," + JsonMaker.GetJSON(Narcotic) + System.Environment.NewLine);

            PCR.Authorization Authorization = new PCR.Authorization(pcr.pcr_authorization_id);
            Pcr_Json.Append("," + JsonMaker.GetJSON(Authorization));

            string         SelectQuery = "(SELECT a.* FROM pcr_buttons a inner join all_buttons b on a.button_id = b.id inner join sections c on b.section_id = c.id) buttons";
            List <Buttons> ButtonsList = Utilities.GetClassList <Buttons>(SelectQuery, pcr_id, "pcr_id");

            Pcr_Json.Append("," + JsonMaker.GetJSONFromList(ButtonsList, Prefix: "pcr_buttons") + System.Environment.NewLine);

            SelectQuery = "(SELECT a.* FROM pcr_inputs a inner join all_buttons b on a.input_id = b.id inner join sections c on b.section_id = c.id) inputs";
            List <Inputs> InputsList = Utilities.GetClassList <Inputs>(SelectQuery, pcr_id, "pcr_id");

            Pcr_Json.Append("," + JsonMaker.GetJSONFromList(InputsList, Prefix: "pcr_inputs") + System.Environment.NewLine);

            Pcr_Json.Insert(0, "{");
            Pcr_Json.Append("}");
            Logger.LogAction(((JObject)JsonConvert.DeserializeObject(Pcr_Json.ToString())).ToString(), "JSON_Gets");
            return(Pcr_Json.ToString());
        }