当前位置: 首页>>代码示例>>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;未经允许,请勿转载。