示例#1
0
        public string READQuery(Hashtable pHT, bool pAll)
        {
            //Start to create the query
            StringBuilder vReadQuery = new StringBuilder("SELECT ");

            vReadQuery = CRUDHelper.BuildREADQuery(pHT, vReadQuery, pAll);

            return(vReadQuery.ToString());
        }
示例#2
0
        public string READQuery(object pModel, bool pAll)
        {
            //Start to create the query
            StringBuilder vReadQuery = new StringBuilder("SELECT ");
            Hashtable     vHT        = CRUDHelper.GetColumnValueCol(pModel);

            vReadQuery = CRUDHelper.BuildREADQuery(vHT, vReadQuery, pAll);

            return(vReadQuery.ToString());
        }
示例#3
0
        public string READQuery(Hashtable pHT, Hashtable pFilteredColumns)
        {
            //Start to create the query
            StringBuilder vReadQuery = new StringBuilder("SELECT ");

            //Build the READ query with PK
            vReadQuery = CRUDHelper.BuildREADQuery(pHT, vReadQuery, false);
            //Adding additional filter
            foreach (DictionaryEntry de in pFilteredColumns)
            {
                vReadQuery.Append(" AND ");
                vReadQuery.Append(de.Key.ToString());
                vReadQuery.Append(" = ");
                vReadQuery.Append(CRUDHelper.GetFormatedColumnValue(de.Value));
            }
            return(vReadQuery.ToString());
        }
示例#4
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());
        }