當前位置: 首頁>>代碼示例>>C#>>正文


C# SqlParameterHelper.ExecuteReader方法代碼示例

本文整理匯總了C#中mojoPortal.Data.SqlParameterHelper.ExecuteReader方法的典型用法代碼示例。如果您正苦於以下問題:C# SqlParameterHelper.ExecuteReader方法的具體用法?C# SqlParameterHelper.ExecuteReader怎麽用?C# SqlParameterHelper.ExecuteReader使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在mojoPortal.Data.SqlParameterHelper的用法示例。


在下文中一共展示了SqlParameterHelper.ExecuteReader方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: GetActivePolls

 public static IDataReader GetActivePolls(Guid siteGuid)
 {
     SqlParameterHelper sph = new SqlParameterHelper(ConnectionString.GetReadConnectionString(), "mp_Polls_SelectActive", 2);
     sph.DefineSqlParameter("@SiteGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, siteGuid);
     sph.DefineSqlParameter("@CurrentTime", SqlDbType.DateTime, ParameterDirection.Input, DateTime.UtcNow);
     return sph.ExecuteReader();
 }
開發者ID:saiesh86,項目名稱:TravelBlog,代碼行數:7,代碼來源:DBPoll.cs

示例2: GetAllByPage

        public static IDataReader GetAllByPage(Guid pageQuestionGuid)
        {
            SqlParameterHelper sph = new SqlParameterHelper(ConnectionString.GetReadConnectionString(), "mp_SurveyQuestions_SelectAllByPage", 1);
            sph.DefineSqlParameter("@PageGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, pageQuestionGuid);

            return sph.ExecuteReader();
        }
開發者ID:saiesh86,項目名稱:TravelBlog,代碼行數:7,代碼來源:DBQuestion.cs

示例3: GetByCode

 /// <summary>
 /// Gets an IDataReader with one row from the mp_GeoZone table.
 /// </summary>
 /// <param name="guid"> guid </param>
 public static IDataReader GetByCode(Guid countryGuid, string code)
 {
     SqlParameterHelper sph = new SqlParameterHelper(ConnectionString.GetReadConnectionString(), "mp_GeoZone_SelectByCode", 2);
     sph.DefineSqlParameter("@CountryGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, countryGuid);
     sph.DefineSqlParameter("@Code", SqlDbType.NVarChar, 255, ParameterDirection.Input, code);
     return sph.ExecuteReader();
 }
開發者ID:joedavis01,項目名稱:mojoportal,代碼行數:11,代碼來源:DBGeoZone.cs

示例4: Find

 public static IDataReader Find(string loginProvider, string providerKey)
 {
     SqlParameterHelper sph = new SqlParameterHelper(ConnectionString.GetReadConnectionString(), "mp_UserLogins_Find", 2);
     sph.DefineSqlParameter("@LoginProvider", SqlDbType.NVarChar, 128, ParameterDirection.Input, loginProvider);
     sph.DefineSqlParameter("@ProviderKey", SqlDbType.NVarChar, 128, ParameterDirection.Input, providerKey);
     return sph.ExecuteReader();
 }
開發者ID:joedavis01,項目名稱:mojoportal,代碼行數:7,代碼來源:DBUserLogins.cs

示例5: GetByName

 public static IDataReader GetByName(int siteId, string roleName)
 {
     SqlParameterHelper sph = new SqlParameterHelper(ConnectionString.GetReadConnectionString(), "mp_Roles_SelectOneByName", 2);
     sph.DefineSqlParameter("@SiteID", SqlDbType.Int, ParameterDirection.Input, siteId);
     sph.DefineSqlParameter("@RoleName", SqlDbType.NVarChar, 50, ParameterDirection.Input, roleName);
     return sph.ExecuteReader();
 }
開發者ID:saiesh86,項目名稱:TravelBlog,代碼行數:7,代碼來源:dbRoles.cs

示例6: GetOne

 /// <summary>
 /// Gets an IDataReader with one row from the mp_SurveyQuestionAnswers table.
 /// </summary>
 /// <param name="answerGuid"> answerGuid </param>
 public static IDataReader GetOne(Guid responseGuid, Guid questionGuid)
 {
     SqlParameterHelper sph = new SqlParameterHelper(ConnectionString.GetReadConnectionString(), "mp_SurveyQuestionAnswers_SelectOne", 2);
     sph.DefineSqlParameter("@ResponseGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, responseGuid);
     sph.DefineSqlParameter("@QuestionGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, questionGuid);
     return sph.ExecuteReader();
 }
開發者ID:joedavis01,項目名稱:mojoportal,代碼行數:11,代碼來源:DBQuestionAnswer.cs

示例7: Get

        public static IDataReader Get(int projectId, int blockId, int workId, int groupId, int itemId, int subItemId)
        {
            StringBuilder sb = new StringBuilder();
            string prefix = DBHelper.Instance.TablePrefix;

            sb.Append("SELECT s.IdProyecto ProjectId, ");
            sb.Append("s.IdBloque BlockId, ");
            sb.Append("s.IdObra WorkId, ");
            sb.Append("s.IdGrupo GroupId, ");
            sb.Append("s.IdItem ItemId, ");
            sb.Append("s.Id SubItemId, ");
            sb.Append("s.Nombre Name,");
            sb.Append("s.Cantidad Quantity ");
            sb.AppendFormat("FROM {0}SubItem s ", prefix);
            sb.AppendFormat("WHERE s.IdProyecto={0} ", projectId);
            sb.AppendFormat("AND s.IdBloque={0} ", blockId);
            sb.AppendFormat("AND s.IdObra={0} ", workId);
            sb.AppendFormat("AND s.IdGrupo={0} ", groupId);
            sb.AppendFormat("AND s.IdItem={0} ", itemId);
            sb.AppendFormat("AND s.Id={0} ", subItemId);

            SqlParameterHelper sph = new SqlParameterHelper(DBHelper.Instance.ConnectionString, sb.ToString(), CommandType.Text, 0);

            return sph.ExecuteReader();
        }
開發者ID:BackupTheBerlios,項目名稱:buildingmonitor-svn,代碼行數:25,代碼來源:DBSubItem.cs

示例8: GetSpecificSettingAllModulesWithTheDefinition

 /// <summary>
 /// Gets an IDataReader with all rows in the mp_Currency table.
 /// </summary>
 public static IDataReader GetSpecificSettingAllModulesWithTheDefinition(string srcPath, string settingName)
 {
     SqlParameterHelper sph = new SqlParameterHelper(GetConnectionString(), "mp_ModulePagePath_SelectByControlSrcPathSnippet", 2);
     sph.DefineSqlParameter("@FeaturePath", SqlDbType.UniqueIdentifier, ParameterDirection.Input, srcPath);
     sph.DefineSqlParameter("@SettingName", SqlDbType.NVarChar, ParameterDirection.Input, settingName);
     return sph.ExecuteReader();
 }
開發者ID:vzrus,項目名稱:YAF-and-MojoPortal-Add-Ons,代碼行數:10,代碼來源:DBActiveDiscussions.cs

示例9: Get

        public static IDataReader Get(int projectId, int blockId)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("SELECT Nombre Name ");
            sb.AppendFormat("FROM {0}Bloque ", DBHelper.Instance.TablePrefix);
            sb.AppendFormat("WHERE IdProyecto={0} AND Id={1}", projectId, blockId);

            SqlParameterHelper sph = new SqlParameterHelper(DBHelper.Instance.ConnectionString, sb.ToString(), CommandType.Text, 0);

            return sph.ExecuteReader();
        }
開發者ID:BackupTheBerlios,項目名稱:buildingmonitor-svn,代碼行數:12,代碼來源:DBBlock.cs

示例10: GetAll

        //public static IDataReader Get(int projectId, int blockId, int workId, int groupId)
        //{
        //    string prefix = DBHelper.Instance.TablePrefix;
        //    StringBuilder sb = new StringBuilder();
        //    sb.Append("SELECT g.Id GroupId,");
        //    sb.Append("l.Nombre Name ");
        //    sb.AppendFormat("FROM {0}Grupo g INNER JOIN {0}ListaGrupo l ON g.IdListaGrupo=l.Id ", prefix);
        //    sb.AppendFormat("WHERE g.IdProyecto={0} ", projectId);
        //    sb.AppendFormat("AND g.IdBloque={0} ", blockId);
        //    sb.AppendFormat("AND g.IdObra={0} ", workId);
        //    sb.AppendFormat("AND g.Id={0}", groupId);
        //    SqlParameterHelper sph = new SqlParameterHelper(DBHelper.Instance.ConnectionString, sb.ToString(), CommandType.Text, 0);
        //    return sph.ExecuteReader();
        //}
        public static IDataReader GetAll()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("SELECT * ");
            sb.AppendFormat("FROM uListaGrupo ");
            sb.Append("ORDER BY Nombre");

            SqlParameterHelper sph = new SqlParameterHelper(DBHelper.Instance.ConnectionString, sb.ToString(), CommandType.Text, 0);

            return sph.ExecuteReader();
        }
開發者ID:BackupTheBerlios,項目名稱:buildingmonitor-svn,代碼行數:26,代碼來源:DBListGroup.cs

示例11: GetAll

        public static IDataReader GetAll()
        {
            SqlParameterHelper sph = new SqlParameterHelper(DBHelper.Instance.ConnectionString,
                "SELECT Id AS ProjectId," +
                "Nombre AS Name," +
                "FechaCreacion AS DateCreated," +
                "FechaModificacion AS DateModified," +
                "Usuario AS CreatedBy," +
                "UsuarioModificador AS ModifiedBy " +
                "FROM uProyecto " +
                "ORDER BY Nombre",
                CommandType.Text, 0);

            return sph.ExecuteReader();
        }
開發者ID:BackupTheBerlios,項目名稱:buildingmonitor-svn,代碼行數:15,代碼來源:DBProject.cs

示例12: GetAll

        public static IDataReader GetAll(int projectId, int blockId)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("SELECT Id AS WorkId,");
            sb.Append("Nombre AS Name ");
            sb.AppendFormat("FROM {0}Obra ", DBHelper.Instance.TablePrefix);
            sb.AppendFormat("WHERE IdProyecto={0} AND ", projectId);
            sb.AppendFormat("IdBloque={0} ", blockId);
            sb.Append("ORDER BY Nombre");

            SqlParameterHelper sph = new SqlParameterHelper(DBHelper.Instance.ConnectionString, sb.ToString(), CommandType.Text, 0);

            return sph.ExecuteReader();
        }
開發者ID:BackupTheBerlios,項目名稱:buildingmonitor-svn,代碼行數:15,代碼來源:DBWork.cs

示例13: GetAll

        public static IDataReader GetAll(int projectId, int blockId, int workId)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("SELECT g.Id AS GroupId,");
            sb.Append("l.Nombre AS Name ");
            sb.AppendFormat("FROM {0}Grupo g INNER JOIN {0}ListaGrupo l ON g.IdListaGrupo=l.Id ", DBHelper.Instance.TablePrefix);
            sb.AppendFormat("WHERE g.IdProyecto={0} AND ", projectId);
            sb.AppendFormat("g.IdBloque={0} AND ", blockId);
            sb.AppendFormat("g.IdObra={0} ", workId);
            sb.Append("ORDER BY l.Nombre");

            SqlParameterHelper sph = new SqlParameterHelper(DBHelper.Instance.ConnectionString, sb.ToString(), CommandType.Text, 0);

            return sph.ExecuteReader();
        }
開發者ID:BackupTheBerlios,項目名稱:buildingmonitor-svn,代碼行數:16,代碼來源:DBGroup.cs

示例14: Get

        public static IDataReader Get(int projectId)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("SELECT Id AS ProjectId,");
            sb.Append("Nombre AS Name,");
            sb.Append("FechaCreacion AS DateCreated,");
            sb.Append("FechaModificacion AS DateModified,");
            sb.Append("Usuario AS CreatedBy,");
            sb.Append("UsuarioModificador AS ModifiedBy ");
            sb.AppendFormat("FROM {0}Proyecto ", DBHelper.Instance.TablePrefix);
            sb.AppendFormat("WHERE Id={0}", projectId);

            SqlParameterHelper sph = new SqlParameterHelper(DBHelper.Instance.ConnectionString, sb.ToString(), CommandType.Text, 0);

            return sph.ExecuteReader();
        }
開發者ID:BackupTheBerlios,項目名稱:buildingmonitor-svn,代碼行數:17,代碼來源:DBProject.cs

示例15: Get

        public static IDataReader Get(int projectId, int blockId, int workId, int groupId, int itemId)
        {
            string prefix = DBHelper.Instance.TablePrefix;
            StringBuilder sb = new StringBuilder();

            sb.Append("SELECT i.Id ItemId,");
            sb.Append("l.Nombre Name ");
            sb.AppendFormat("FROM {0}Item i INNER JOIN {0}ListaItem l ON i.IdListaItem=l.Id ", prefix);
            sb.AppendFormat("WHERE i.IdProyecto={0} ", projectId);
            sb.AppendFormat("AND i.IdBloque={0} ", blockId);
            sb.AppendFormat("AND i.IdObra={0} ", workId);
            sb.AppendFormat("AND i.IdGrupo={0} ", groupId);
            sb.AppendFormat("AND i.Id={0}", itemId);

            SqlParameterHelper sph = new SqlParameterHelper(DBHelper.Instance.ConnectionString, sb.ToString(), CommandType.Text, 0);

            return sph.ExecuteReader();
        }
開發者ID:BackupTheBerlios,項目名稱:buildingmonitor-svn,代碼行數:18,代碼來源:DBItem.cs


注:本文中的mojoPortal.Data.SqlParameterHelper.ExecuteReader方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。