Ejemplo n.º 1
0
        /*
         * ///<summary>This query is run with full privileges.</summary>
         * public static int NonQ(string[] commands) {
         *      DataConnection dcon=new DataConnection();
         *
         *      int rowsChanged=dcon.NonQ(cmd);
         *      return rowsChanged;//I don't think this will be accurate
         * }*/

        ///<summary>This is for multiple queries all concatenated together with ;</summary>
        public static DataSet GetDataSet(string commands)
        {
            DataConnection dcon = new DataConnection();
            //DataTable table=dcon.GetTable(command);
            DataSet retVal = dcon.GetDs(commands);

            //retVal.Tables.Add(table);
            return(retVal);
        }
Ejemplo n.º 2
0
        public static DataSet Refresh()
        {
            string command = "SELECT * FROM covcat ORDER BY covorder;"
                             + "SELECT * FROM covcat WHERE IsHidden = 0 ORDER BY CovOrder";
            DataConnection dcon   = new DataConnection();
            DataSet        retVal = dcon.GetDs(command);

            FillLists(retVal);
            return(retVal);
        }
Ejemplo n.º 3
0
        ///<summary></summary>
        public static DataSet Refresh(int patNum)
        {
            string command = "SELECT * FROM procedurelog WHERE PatNum=" + POut.PInt(patNum);

            //if(!includeDeletedAndNotes){
            command += " AND ProcStatus !=6";         //don't include deleted
            //}
            command += " ORDER BY ProcDate";          //,OldCode
            //notes:

            /*	+";SELECT * FROM procnote WHERE PatNum="+POut.PInt(patNum)
             +" ORDER BY EntryDateTime";*/
            DataConnection dcon = new DataConnection();
            DataSet        ds   = dcon.GetDs(command);

            //add a note column to the proc table.
            //ds.Tables[0].Columns.Add("UserNum");
            //ds.Tables[0].Columns.Add("Note");//,,typeof(string));
            //ds.Tables[0].Columns.Add("SigIsTopaz");//,typeof(string));
            //ds.Tables[0].Columns.Add("Signature");//,typeof(string));

            /*
             * for(int i=0;i<ds.Tables[0].Rows.Count;i++){//loop through each proc
             *      for(int n=ds.Tables[1].Rows.Count-1;n>=0;n--){//loop through each note, backwards.
             *              if(ds.Tables[0].Rows[i]["ProcNum"].ToString() != ds.Tables[1].Rows[n]["ProcNum"].ToString()) {
             *                      continue;
             *              }
             *              //userNum=PIn.PInt(ds.Tables[1].Rows[n]["UserNum"].ToString());
             *              ds.Tables[0].Rows[i]["UserNum"]   =ds.Tables[1].Rows[n]["UserNum"].ToString();
             *              ds.Tables[0].Rows[i]["Note"]      =ds.Tables[1].Rows[n]["Note"].ToString();
             *              ds.Tables[0].Rows[i]["SigIsTopaz"]=ds.Tables[1].Rows[n]["SigIsTopaz"].ToString();
             *              ds.Tables[0].Rows[i]["Signature"] =ds.Tables[1].Rows[n]["Signature"].ToString();
             *              break;//out of note loop.
             *      }
             * }*/
            //ds.Tables.RemoveAt(1);
            return(ds);
        }