Exemplo n.º 1
0
        public static DbSearchEntity ItemSelect(DbSearchEntity dbSearchEntity)
        {
            DbSearchDBEntity dbParm = (dbSearchEntity.DbSearchDBEntity.Count > 0) ? dbSearchEntity.DbSearchDBEntity[0] : new DbSearchDBEntity();

            if (String.IsNullOrEmpty(dbParm.SqlContent))
            {
                return dbSearchEntity;
            }

            dbSearchEntity.QueryResult = HotelVp.Common.DBUtility.DbHelperOra.Query(dbParm.SqlContent,true);
            return dbSearchEntity;
        }
Exemplo n.º 2
0
        public static DbSearchEntity ItemSqlSelect(DbSearchEntity dbSearchEntity)
        {
            DbSearchDBEntity dbParm = (dbSearchEntity.DbSearchDBEntity.Count > 0) ? dbSearchEntity.DbSearchDBEntity[0] : new DbSearchDBEntity();

            if (String.IsNullOrEmpty(dbParm.SqlContent))
            {
                return dbSearchEntity;
            }

            DataCommand cmd = DataCommandManager.CreateCustomDataCommand("CMS", CommandType.Text, dbParm.SqlContent);
            dbSearchEntity.QueryResult = cmd.ExecuteDataSet();
            return dbSearchEntity;
        }
Exemplo n.º 3
0
        public static DbSearchEntity ItemSqlSelect(DbSearchEntity dbsearchEntity)
        {
            dbsearchEntity.LogMessages.MsgType = MessageType.INFO;
            dbsearchEntity.LogMessages.Content = _nameSpaceClass + "ItemSqlSelect";
            LoggerHelper.LogWriter(dbsearchEntity.LogMessages);

            try
            {
                return DbSearchDA.ItemSqlSelect(dbsearchEntity);
            }
            catch (Exception ex)
            {
                dbsearchEntity.LogMessages.MsgType = MessageType.ERROR;
                dbsearchEntity.LogMessages.Content = _nameSpaceClass + "ItemSqlSelect  Error: " + ex.Message;
                LoggerHelper.LogWriter(dbsearchEntity.LogMessages);
                throw ex;
            }
        }
Exemplo n.º 4
0
        public static DbSearchEntity TableColumsSelect(DbSearchEntity dbSearchEntity)
        {
            OracleParameter[] parm ={
                                    new OracleParameter("TABLENM",OracleType.VarChar)
                                };
            DbSearchDBEntity dbParm = (dbSearchEntity.DbSearchDBEntity.Count > 0) ? dbSearchEntity.DbSearchDBEntity[0] : new DbSearchDBEntity();

            if (String.IsNullOrEmpty(dbParm.TableID))
            {
                return dbSearchEntity;
            }
            else
            {
                parm[0].Value = dbParm.TableID;
            }

            //string strSQL = HotelVp.Common.DBUtility.XmlSqlAnalyze.GotSqlTextFromXml("DbSearch", "t_lm_b_dbsearch_tablecolums");
            //strSQL = String.Format(strSQL, dbParm.TableID);
            //dbSearchEntity.QueryResult = HotelVp.Common.DBUtility.DbHelperOra.Query(strSQL);
            dbSearchEntity.QueryResult = HotelVp.Common.DBUtility.DbManager.Query("DbSearch", "t_lm_b_dbsearch_tablecolums",true, parm);
            return dbSearchEntity;
        }
Exemplo n.º 5
0
 public static DbSearchEntity SqlMenuSelectFromCMS(DbSearchEntity dbSearchEntity)
 {
     DataCommand cmd = DataCommandManager.GetDataCommand("SelectSqlMenuSelectFromCMS");
      dbSearchEntity.QueryResult = cmd.ExecuteDataSet();
      return dbSearchEntity;
 }
Exemplo n.º 6
0
 public static DbSearchEntity MenuSelect(DbSearchEntity dbSearchEntity)
 {
     dbSearchEntity.QueryResult = HotelVp.Common.DBUtility.DbManager.Query("DbSearch", "t_lm_b_dbsearch_table", true);
     return dbSearchEntity;
 }