当前位置: 首页>>代码示例>>C#>>正文


C# SqlServerUtility.ExecuteSPReader方法代码示例

本文整理汇总了C#中CY.Utility.DBUtility.SqlServerUtility.ExecuteSPReader方法的典型用法代码示例。如果您正苦于以下问题:C# SqlServerUtility.ExecuteSPReader方法的具体用法?C# SqlServerUtility.ExecuteSPReader怎么用?C# SqlServerUtility.ExecuteSPReader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CY.Utility.DBUtility.SqlServerUtility的用法示例。


在下文中一共展示了SqlServerUtility.ExecuteSPReader方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Select

        public Core.Business.OperateSort Select(Guid id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectOperateSort");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.OperateSort operateSort = new Core.Business.OperateSort();

                if (!reader.IsDBNull(0)) operateSort.Id = reader.GetGuid(0);
                if (!reader.IsDBNull(1)) operateSort.OperateSortName = reader.GetString(1);

                reader.Close();
                return operateSort;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:25,代码来源:OperateSortProvider.cs

示例2: Select

        public Core.Business.Role Select(int id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@RoleId", SqlDbType.Int, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectRole");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.Role role = new Core.Business.Role();

                if (!reader.IsDBNull(0)) role.Id = reader.GetInt32(0);
                if (!reader.IsDBNull(1)) role.Description = reader.GetString(1);
                if (!reader.IsDBNull(2)) role.UserCode = reader.GetGuid(2);

                reader.Close();
                return role;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
开发者ID:dalinhuang,项目名称:jxt-zhichengxinda,代码行数:26,代码来源:RoleProvider.cs

示例3: GetAllInstrumentPictureRepository

        public IList<Core.Business.InstrumentPictureRepository> GetAllInstrumentPictureRepository()
        {
            IList<Core.Business.InstrumentPictureRepository> instrumentPictureRepositorylist = new List<Core.Business.InstrumentPictureRepository>();
            SqlServerUtility sql = new SqlServerUtility();

            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectInstrumentPictureRepositoriesAll");

            if(reader != null)
            {
                while(reader.Read())
                {
                    Core.Business.InstrumentPictureRepository instrumentPictureRepository = new Core.Business.InstrumentPictureRepository();

                    if (!reader.IsDBNull(0)) instrumentPictureRepository.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) instrumentPictureRepository.PictureName = reader.GetString(1);
                    if (!reader.IsDBNull(2)) instrumentPictureRepository.InstrumentID = reader.GetGuid(2);
                    if (!reader.IsDBNull(3)) instrumentPictureRepository.PictureSortID = reader.GetGuid(3);
                    if (!reader.IsDBNull(4)) instrumentPictureRepository.PictureOrigin = reader.GetString(4);
                    if (!reader.IsDBNull(5)) instrumentPictureRepository.PictureContent = reader.GetString(5);
                    if (!reader.IsDBNull(6)) instrumentPictureRepository.Remark = reader.GetString(6);
                    if (!reader.IsDBNull(7)) instrumentPictureRepository.DranscriberID = reader.GetGuid(7);
                    if (!reader.IsDBNull(8)) instrumentPictureRepository.DranscribeDate = reader.GetDateTime(8);

                    instrumentPictureRepository.MarkOld();
                    instrumentPictureRepositorylist.Add(instrumentPictureRepository);
                }
                reader.Close();
            }
            return instrumentPictureRepositorylist;
        }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:30,代码来源:InstrumentPictureRepositoryProvider.cs

示例4: Select

        public Core.Business.ObjectStimulatedType Select(int id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.Int, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectObjectStimulatedType");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.ObjectStimulatedType objectStimulatedType = new Core.Business.ObjectStimulatedType();

                if (!reader.IsDBNull(0)) objectStimulatedType.Id = reader.GetInt32(0);
                if (!reader.IsDBNull(1)) objectStimulatedType.Name = reader.GetString(1);
                if (!reader.IsDBNull(2)) objectStimulatedType.Description = reader.GetString(2);

                reader.Close();
                return objectStimulatedType;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:26,代码来源:ObjectStimulatedTypeProvider.cs

示例5: Select

        public Core.Business.Subsidies Select(Guid id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectSubsidy");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.Subsidies subsidies = new Core.Business.Subsidies();

                if (!reader.IsDBNull(0)) subsidies.Id = reader.GetGuid(0);
                if (!reader.IsDBNull(1)) subsidies.Name = reader.GetString(1);
                if (!reader.IsDBNull(2)) subsidies.Des = reader.GetString(2);
                if (!reader.IsDBNull(3)) subsidies.AddPerson = reader.GetString(3);
                if (!reader.IsDBNull(4)) subsidies.AddTime = reader.GetDateTime(4);
                if (!reader.IsDBNull(5)) subsidies.Status = reader.GetInt32(5);

                reader.Close();
                return subsidies;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:29,代码来源:SubsidiesProvider.cs

示例6: Select

        public Core.Business.JointReviewSecondAudit Select(Guid id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectJointReviewSecondAudit");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.JointReviewSecondAudit jointReviewSecondAudit = new Core.Business.JointReviewSecondAudit();

                if (!reader.IsDBNull(0)) jointReviewSecondAudit.Id = reader.GetGuid(0);
                if (!reader.IsDBNull(1)) jointReviewSecondAudit.JointReviewID = reader.GetGuid(1);
                if (!reader.IsDBNull(2)) jointReviewSecondAudit.AuditPerson = reader.GetGuid(2);
                if (!reader.IsDBNull(3)) jointReviewSecondAudit.AuditTime = reader.GetDateTime(3);
                if (!reader.IsDBNull(4)) jointReviewSecondAudit.AuditDes = reader.GetString(4);

                reader.Close();
                return jointReviewSecondAudit;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:28,代码来源:JointReviewSecondAuditProvider.cs

示例7: Select

        public Core.Business.SubCenterPluginList Select(Guid id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectSubCenterPluginList");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.SubCenterPluginList subCenterPluginList = new Core.Business.SubCenterPluginList();

                if (!reader.IsDBNull(0)) subCenterPluginList.Id = reader.GetGuid(0);
                if (!reader.IsDBNull(1)) subCenterPluginList.Name = reader.GetString(1);
                if (!reader.IsDBNull(2)) subCenterPluginList.URI = reader.GetString(2);

                reader.Close();
                return subCenterPluginList;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:26,代码来源:SubCenterPluginListProvider.cs

示例8: Select

        public Core.Business.JointReviewExperts Select(Guid id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectJointReviewExperts");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.JointReviewExperts jointReviewExperts = new Core.Business.JointReviewExperts();

                if (!reader.IsDBNull(0)) jointReviewExperts.Id = reader.GetGuid(0);
                if (!reader.IsDBNull(1)) jointReviewExperts.JointReviewID = reader.GetGuid(1);
                if (!reader.IsDBNull(2)) jointReviewExperts.ExpertID = reader.GetGuid(2);
                if (!reader.IsDBNull(3)) jointReviewExperts.ExpertHead = reader.GetInt32(3);

                reader.Close();
                return jointReviewExperts;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:27,代码来源:JointReviewExpertsProvider.cs

示例9: GetAllJointReviewExperts

        public IList<Core.Business.JointReviewExperts> GetAllJointReviewExperts()
        {
            IList<Core.Business.JointReviewExperts> jointReviewExpertslist = new List<Core.Business.JointReviewExperts>();
            SqlServerUtility sql = new SqlServerUtility();

            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectJointReviewExpertssAll");

            if(reader != null)
            {
                while(reader.Read())
                {
                    Core.Business.JointReviewExperts jointReviewExperts = new Core.Business.JointReviewExperts();

                    if (!reader.IsDBNull(0)) jointReviewExperts.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) jointReviewExperts.JointReviewID = reader.GetGuid(1);
                    if (!reader.IsDBNull(2)) jointReviewExperts.ExpertID = reader.GetGuid(2);
                    if (!reader.IsDBNull(3)) jointReviewExperts.ExpertHead = reader.GetInt32(3);

                    jointReviewExperts.MarkOld();
                    jointReviewExpertslist.Add(jointReviewExperts);
                }
                reader.Close();
            }
            return jointReviewExpertslist;
        }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:25,代码来源:JointReviewExpertsProvider.cs

示例10: GetAllPicture

        public IList<Core.Business.Picture> GetAllPicture()
        {
            IList<Core.Business.Picture> picturelist = new List<Core.Business.Picture>();
            SqlServerUtility sql = new SqlServerUtility(connectionString);

            SqlDataReader reader = sql.ExecuteSPReader("USP_Picture_SelectAll");

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.Picture picture = new Core.Business.Picture();

                    long id = reader.GetInt64(0);
                    picture = Core.Business.Picture.Load(id);

                    /*
                    if (!reader.IsDBNull(0)) picture.Id = reader.GetInt64(0);
                    if (!reader.IsDBNull(1)) picture.AlbumId = reader.GetInt64(1);
                    if (!reader.IsDBNull(2)) picture.DateCreated = reader.GetDateTime(2);
                    if (!reader.IsDBNull(3)) picture.Name = reader.GetString(3);
                    if (!reader.IsDBNull(4)) picture.Remark = reader.GetString(4);
                    if (!reader.IsDBNull(5)) picture.BigPath = reader.GetString(5);
                    if (!reader.IsDBNull(6)) picture.MiddlePath = reader.GetString(6);
                    if (!reader.IsDBNull(7)) picture.SmallPath = reader.GetString(7);
                    */

                    picture.MarkOld();
                    picturelist.Add(picture);
                }
                reader.Close();
            }
            return picturelist;
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:34,代码来源:PictureProvider.cs

示例11: Select

        public Core.Business.UserEducation Select(Guid id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@EducationID", SqlDbType.UniqueIdentifier, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectUserEducation");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.UserEducation userEducation = new Core.Business.UserEducation();

                if (!reader.IsDBNull(0)) userEducation.Id = reader.GetGuid(0);
                if (!reader.IsDBNull(1)) userEducation.EducationName = reader.GetString(1);

                reader.Close();
                return userEducation;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:25,代码来源:UserEducationProvider.cs

示例12: GetAllSubsidiesApplication

        public IList<Core.Business.SubsidiesApplication> GetAllSubsidiesApplication()
        {
            IList<Core.Business.SubsidiesApplication> subsidiesApplicationlist = new List<Core.Business.SubsidiesApplication>();
            SqlServerUtility sql = new SqlServerUtility();

            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectSubsidiesApplicationsAll");

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.SubsidiesApplication subsidiesApplication = new Core.Business.SubsidiesApplication();

                    if (!reader.IsDBNull(0)) subsidiesApplication.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) subsidiesApplication.SubsidiesID = reader.GetGuid(1);
                    if (!reader.IsDBNull(2)) subsidiesApplication.ApplicaiotnUser = reader.GetGuid(2);
                    if (!reader.IsDBNull(3)) subsidiesApplication.Type = reader.GetInt32(3);
                    if (!reader.IsDBNull(4)) subsidiesApplication.Status = reader.GetInt32(4);
                    if (!reader.IsDBNull(5)) subsidiesApplication.ApplicationTime = reader.GetDateTime(5);
                    if (!reader.IsDBNull(6)) subsidiesApplication.Des = reader.GetString(6);
                    if (!reader.IsDBNull(7)) subsidiesApplication.AuditDes = reader.GetString(7);

                    subsidiesApplication.MarkOld();
                    subsidiesApplicationlist.Add(subsidiesApplication);
                }
                reader.Close();
            }
            return subsidiesApplicationlist;
        }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:29,代码来源:SubsidiesApplicationProvider.cs

示例13: GetInstrattachmentDynamic

        public IList<CY.CSTS.Core.Business.INSTRATTACHMENT> GetInstrattachmentDynamic(string whereCondition, string orderByExpression)
        {
            IList<Core.Business.INSTRATTACHMENT> iNSTRATTACHMENTlist = new List<Core.Business.INSTRATTACHMENT>();
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@WhereCondition", SqlDbType.NVarChar, whereCondition);
            sql.AddParameter("@OrderByExpression", SqlDbType.NVarChar, orderByExpression);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectINSTRATTACHMENTsDynamic");

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.INSTRATTACHMENT iNSTRATTACHMENT = new Core.Business.INSTRATTACHMENT();

                    if (!reader.IsDBNull(0)) iNSTRATTACHMENT.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) iNSTRATTACHMENT.InstruId = reader.GetGuid(1);
                    if (!reader.IsDBNull(2)) iNSTRATTACHMENT.ATTACHMENTNAME = reader.GetString(2);
                    if (!reader.IsDBNull(3)) iNSTRATTACHMENT.ATTACHMENTAMOUNT = reader.GetInt32(3);
                    if (!reader.IsDBNull(4)) iNSTRATTACHMENT.ATTACHMENTSPEC = reader.GetString(4);
                    if (!reader.IsDBNull(5)) iNSTRATTACHMENT.ATTACHMENTPRICE = reader.GetDecimal(5);
                    if (!reader.IsDBNull(6)) iNSTRATTACHMENT.PURPOSE = reader.GetString(6);
                    if (!reader.IsDBNull(7)) iNSTRATTACHMENT.MANUFACTURER = reader.GetString(7);
                    if (!reader.IsDBNull(8)) iNSTRATTACHMENT.REMARK = reader.GetString(8);
                    if (!reader.IsDBNull(9)) iNSTRATTACHMENT.WRITEDATE = reader.GetDateTime(9);
                    if (!reader.IsDBNull(10)) iNSTRATTACHMENT.UPDATEDATE = reader.GetDateTime(10);

                    iNSTRATTACHMENT.MarkOld();
                    iNSTRATTACHMENTlist.Add(iNSTRATTACHMENT);
                }
                reader.Close();
            }
            return iNSTRATTACHMENTlist;
        }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:34,代码来源:INSTRATTACHMENTProvider.cs

示例14: GetAllINSTRATTACHMENT

        public IList<Core.Business.INSTRATTACHMENT> GetAllINSTRATTACHMENT()
        {
            IList<Core.Business.INSTRATTACHMENT> iNSTRATTACHMENTlist = new List<Core.Business.INSTRATTACHMENT>();
            SqlServerUtility sql = new SqlServerUtility();

            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectINSTRATTACHMENTsAll");

            if(reader != null)
            {
                while(reader.Read())
                {
                    Core.Business.INSTRATTACHMENT iNSTRATTACHMENT = new Core.Business.INSTRATTACHMENT();

                    if (!reader.IsDBNull(0)) iNSTRATTACHMENT.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) iNSTRATTACHMENT.InstruId = reader.GetGuid(1);
                    if (!reader.IsDBNull(2)) iNSTRATTACHMENT.ATTACHMENTNAME = reader.GetString(2);
                    if (!reader.IsDBNull(3)) iNSTRATTACHMENT.ATTACHMENTAMOUNT = reader.GetInt32(3);
                    if (!reader.IsDBNull(4)) iNSTRATTACHMENT.ATTACHMENTSPEC = reader.GetString(4);
                    if (!reader.IsDBNull(5)) iNSTRATTACHMENT.ATTACHMENTPRICE = reader.GetDecimal(5);
                    if (!reader.IsDBNull(6)) iNSTRATTACHMENT.PURPOSE = reader.GetString(6);
                    if (!reader.IsDBNull(7)) iNSTRATTACHMENT.MANUFACTURER = reader.GetString(7);
                    if (!reader.IsDBNull(8)) iNSTRATTACHMENT.REMARK = reader.GetString(8);
                    if (!reader.IsDBNull(9)) iNSTRATTACHMENT.WRITEDATE = reader.GetDateTime(9);
                    if (!reader.IsDBNull(10)) iNSTRATTACHMENT.UPDATEDATE = reader.GetDateTime(10);

                    iNSTRATTACHMENT.MarkOld();
                    iNSTRATTACHMENTlist.Add(iNSTRATTACHMENT);
                }
                reader.Close();
            }
            return iNSTRATTACHMENTlist;
        }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:32,代码来源:INSTRATTACHMENTProvider.cs

示例15: Select

        public Core.Business.LinkClass Select(Guid id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectLinkClas");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.LinkClass linkClass = new Core.Business.LinkClass();

                if (!reader.IsDBNull(0)) linkClass.Id = reader.GetGuid(0);
                if (!reader.IsDBNull(1)) linkClass.ClassName = reader.GetString(1);
                if (!reader.IsDBNull(2)) linkClass.Index = reader.GetInt32(2);

                reader.Close();
                return linkClass;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:26,代码来源:LinkClassProvider.cs


注:本文中的CY.Utility.DBUtility.SqlServerUtility.ExecuteSPReader方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。