예제 #1
0
        public string READQuery(Hashtable pHT, bool pAll, bool pOrderBy, string[] pOrderColumns, bool pASC)
        {
            //Start to create the query
            StringBuilder vReadQuery = new StringBuilder("SELECT ");

            vReadQuery = CRUDHelper.BuildREADQuery(pHT, vReadQuery, pAll);
            if (pOrderBy)//Adding Order By
            {
                vReadQuery.Append(CRUDHelper.CreateOrderBy(pOrderColumns));
                if (pASC)
                {
                    vReadQuery.Append(" ASC ");
                }
                else
                {
                    vReadQuery.Append(" DESC ");
                }
            }
            return(vReadQuery.ToString());
        }