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


C# IDataReader.GetSafeInt32方法代码示例

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


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

示例1: OfficeHourQuestionTagMap

        private OfficeHourQuestionTag OfficeHourQuestionTagMap(IDataReader reader)
        {
            OfficeHourQuestionTag item = new OfficeHourQuestionTag();
            int startingIndex = 0;

            item.OfficeHourQuestionId = reader.GetSafeInt32(startingIndex++);
            item.TagId = reader.GetSafeInt32(startingIndex++);
            item.TagName = reader.GetSafeString(startingIndex++);

            return item;
        }
开发者ID:neil0609,项目名称:Corbulo,代码行数:11,代码来源:OfficeHourServices.cs

示例2: MapTag

        private static Tags MapTag(IDataReader reader)
        {
            Tags t = new Tags();

            int startingIndex = 0;

            t.ID = reader.GetSafeInt32(startingIndex++);
            t.Name = reader.GetSafeString(startingIndex++);
            t.IsActive = reader.GetSafeBool(startingIndex++);
            t.blogID = reader.GetSafeInt32(startingIndex++);

            return t;
        }
开发者ID:thedevhunter,项目名称:MiDinero-MiFuturo,代码行数:13,代码来源:BlogService.cs

示例3: mapFaq

        private static FAQ mapFaq(IDataReader reader)
        {
            FAQ p = new FAQ();
            int startingIndex = 0; //startingOrdinal

            p.Id = reader.GetSafeInt32(startingIndex++);
            p.SortOrder = reader.GetSafeInt32(startingIndex++);
            p.Question = reader.GetSafeString(startingIndex++);
            p.Answer = reader.GetSafeString(startingIndex++);
            p.Category = reader.GetSafeInt32(startingIndex++);
            p.DateAdded = reader.GetSafeDateTime(startingIndex++);
            p.DateModified = reader.GetSafeDateTime(startingIndex++);
            p.LanguageCode = reader.GetSafeString(startingIndex++);
            p.userId = reader.GetSafeString(startingIndex++);
            return p;
        }
开发者ID:thedevhunter,项目名称:MiDinero-MiFuturo,代码行数:16,代码来源:FaqsService.cs

示例4: PrereqsMapCourse

        private static BaseCourse PrereqsMapCourse(IDataReader reader)
        {
            BaseCourse item = new BaseCourse();
            int startingIndex = 0;
            item.Id = reader.GetSafeInt32(startingIndex++);
            item.CourseName = reader.GetSafeString(startingIndex++);

            return item;
        }
开发者ID:ETorresWebDev,项目名称:Corbulo,代码行数:9,代码来源:CoursesService.cs

示例5: MapBlog

        private static Blog MapBlog(IDataReader reader)
        {
            Blog p = new Blog();
            ////bool isBlogPostData = false;
            //if (reader.FieldCount == 12)
            //{
            //    p = new Blog();
            //}
            //else
            //{
            //    p = new Blog();
            //    isBlogPostData = true;
            //}

            int startingIndex = 0;

            p.ID = reader.GetSafeInt32(startingIndex++);
            p.Title = reader.GetSafeString(startingIndex++);
            p.Content = reader.GetSafeString(startingIndex++);
            p.LiveDate = reader.GetSafeDateTime(startingIndex++);
            p.Status = reader.GetSafeInt32(startingIndex++);
            p.MetaData = reader.GetSafeString(startingIndex++);
            p.PathName = reader.GetSafeString(startingIndex++);
            string UserID = reader.GetSafeString(startingIndex++);
            p.DateAdded = reader.GetSafeDateTime(startingIndex++);
            p.DateModified = reader.GetSafeDateTime(startingIndex++);
            p.LanguageCode = reader.GetSafeString(startingIndex++);
            p.CountOfComments = reader.GetSafeInt32(startingIndex++);
            //p.Preview = reader.GetSafeString(startingIndex++);

            //here instead of Blog use the new Domain Object

            p.FirstName = reader.GetSafeString(startingIndex++);
            p.LastName = reader.GetSafeString(startingIndex++);
            p.Preview = reader.GetSafeString(startingIndex++);
            //DO NOT INCLUDE HERE p.CountOfComments = reader.GetSafeInt32(startingIndex++);
            //in here read out the extra properties

            return p;
        }
开发者ID:thedevhunter,项目名称:MiDinero-MiFuturo,代码行数:40,代码来源:BlogService.cs

示例6: MapQuickQuestion

        private static QuickQuestion MapQuickQuestion(IDataReader reader)
        {
            QuickQuestion qq = new QuickQuestion();
            int startingIndex = 0;

            qq.Id = reader.GetSafeInt32(startingIndex++);
            qq.Question = reader.GetSafeString(startingIndex++);
            qq.Status = reader.GetSafeInt32(startingIndex++);
            qq.DateAdded = reader.GetSafeDateTime(startingIndex++);
            qq.DateModified = reader.GetSafeDateTime(startingIndex++);
            qq.LanguageCode = reader.GetSafeString(startingIndex++);
            qq.CommentCount = reader.GetSafeInt32(startingIndex++);
            qq.BeenConverted = reader.GetSafeBool(startingIndex++);
            qq.ForumThreadId = reader.GetSafeInt32(startingIndex++);

            return qq;
        }
开发者ID:thedevhunter,项目名称:MiDinero-MiFuturo,代码行数:17,代码来源:QuickQuestionService.cs

示例7: InstructorsMapCourse

        private static CourseInstructors InstructorsMapCourse(IDataReader reader)
        {
            CourseInstructors item = new CourseInstructors();
            int startingIndex = 0;

            item.CourseId = reader.GetSafeInt32(startingIndex++);
            item.InstructorId = reader.GetSafeInt32(startingIndex++);
            item.Name = reader.GetSafeString(startingIndex++);

            return item;
        }
开发者ID:ETorresWebDev,项目名称:Corbulo,代码行数:11,代码来源:CoursesService.cs

示例8: MapWikiPage

        private static WikiPage MapWikiPage(IDataReader reader)
        {
            WikiPage wiki = new WikiPage();
            int startingIndex = 0;

            wiki.Id = reader.GetSafeInt32(startingIndex++);
            wiki.Title = reader.GetSafeString(startingIndex++);
            wiki.URL = reader.GetSafeString(startingIndex++);
            wiki.PublishDate = reader.GetSafeDateTime(startingIndex++);
            wiki.Language = reader.GetSafeInt32(startingIndex++);
            wiki.ParentId = reader.GetSafeInt32(startingIndex++);
            return wiki;
        }
开发者ID:FullStackPatel,项目名称:Project,代码行数:13,代码来源:WikiService.cs

示例9: MapWikiSpace

        private static WikiSpace MapWikiSpace(IDataReader reader)
        {
            WikiSpace ws = new WikiSpace();
            int startingIndex = 0;

            ws.Id = reader.GetSafeInt32(startingIndex++);
            ws.Title = reader.GetSafeString(startingIndex++);
            ws.ParentId = reader.GetSafeInt32(startingIndex++);
            return ws;
        }
开发者ID:FullStackPatel,项目名称:Project,代码行数:10,代码来源:WikiService.cs

示例10: PaymentMap

        private Payment PaymentMap(IDataReader reader)
        {
            Payment p = new Payment();
            int startingIndex = 0;

            p.Id = reader.GetSafeInt32(startingIndex++);
            p.DateAdded = reader.GetSafeDateTime(startingIndex++);
            p.DateModified = reader.GetSafeDateTime(startingIndex++);
            p.LoanAmount = reader.GetSafeInt32(startingIndex++);
            p.LoanTerm = reader.GetSafeInt32(startingIndex++);
            p.LoanApr = reader.GetDouble(startingIndex++);
            p.PurchasePrice = reader.GetSafeInt32(startingIndex++);
            p.CarMake = reader.GetSafeInt32(startingIndex++);
            p.CarModel = reader.GetSafeInt32(startingIndex++);
            p.CarYear = reader.GetSafeInt32(startingIndex++);
            p.CarCondition = reader.GetSafeInt32(startingIndex++);
            return p;
        }
开发者ID:thedevhunter,项目名称:MiDinero-MiFuturo,代码行数:18,代码来源:PaymentsService.cs

示例11: MapEvent

        private static Event MapEvent(IDataReader reader)
        {
            Event e = new Event();
            int startingIndex = 0; //startingOrdinal

            e.Id = reader.GetSafeInt32(startingIndex++);
            e.Title = reader.GetSafeString(startingIndex++);
            e.Description = reader.GetSafeString(startingIndex++);
            e.EventTime = reader.GetSafeDateTime(startingIndex++);
            e.VenueName = reader.GetSafeString(startingIndex++);
            e.Url = reader.GetSafeUri(startingIndex++);
            e.Type = reader.GetSafeString(startingIndex++);
            e.Tags = reader.GetSafeString(startingIndex++);
            e.DateAdded = reader.GetSafeDateTime(startingIndex++);
            e.DateModified = reader.GetSafeDateTime(startingIndex++);
            e.LanguageCode = reader.GetSafeString(startingIndex++);
            return e;
        }
开发者ID:thedevhunter,项目名称:MiDinero-MiFuturo,代码行数:18,代码来源:EventsService.cs

示例12: MapComment

        private static UserComment MapComment(IDataReader reader)
        {
            UserComment c = new UserComment();

            int startingIndex = 0;

            c.Id = reader.GetSafeInt32(startingIndex++);
            c.Comment = reader.GetSafeString(startingIndex++);
            c.CommentDate = reader.GetSafeDateTime(startingIndex++);
            c.IsFlagged = reader.GetSafeBool(startingIndex++);
            c.IsVisible = reader.GetSafeBool(startingIndex++);
            c.ParentId = reader.GetSafeInt32(startingIndex++, null);
            c.OwnerId = reader.GetSafeInt32(startingIndex++);
            c.OwnerType = reader.GetSafeEnum<CommentOwnerType>(startingIndex++);
            c.Deleted = reader.GetSafeBool(startingIndex++);
            c.DeletedDate = reader.GetSafeDateTime(startingIndex++);
            c.LanguageCode = reader.GetSafeString(startingIndex++);
            c.UpdateDate = reader.GetSafeDateTime(startingIndex++);
            c.Title = reader.GetSafeString(startingIndex++);
            c.Profile.Handle = reader.GetSafeString(startingIndex++);
            c.Profile.Avatar = reader.GetSafeString(startingIndex++);

            return c;
        }
开发者ID:thedevhunter,项目名称:MiDinero-MiFuturo,代码行数:24,代码来源:CommentsService.cs

示例13: MapPlanFeature

        private static PlanFeature MapPlanFeature(IDataReader reader)
        {
            PlanFeature pf = new PlanFeature();

            PriorityLevel pl = new PriorityLevel();

            int startingIndex = 0;

            pf.Id = reader.GetSafeInt32(startingIndex++);
            pf.Title = reader.GetSafeString(startingIndex++);
            pf.Description = reader.GetSafeString(startingIndex++);
            pf.Category = reader.GetSafeInt32(startingIndex++);
            pf.PlanId = reader.GetSafeInt32(startingIndex++);
            pf.DateAdded = reader.GetSafeDateTime(startingIndex++);
            pf.DateModified = reader.GetSafeDateTime(startingIndex++);
            pf.LanguageCode = reader.GetSafeString(startingIndex++);

            pl.Name = reader.GetSafeString(startingIndex++);
            pl.Id = reader.GetSafeInt32(startingIndex++);

            pf.SortOrder = pl;

            return pf;
        }
开发者ID:thedevhunter,项目名称:MiDinero-MiFuturo,代码行数:24,代码来源:PlansService.cs

示例14: MapPlan

        private static Plan MapPlan(IDataReader reader)
        {
            Plan p = new Plan();

            PlanType pt = new PlanType();

            int startingIndex = 0;

            p.Id = reader.GetSafeInt32(startingIndex++);
            p.Name = reader.GetSafeString(startingIndex++);
            p.Description = reader.GetSafeString(startingIndex++);
            p.Cost = reader.GetSafeInt32(startingIndex++);
            p.GoLiveDate = reader.GetSafeDateTime(startingIndex++);
            p.DateAdded = reader.GetSafeDateTime(startingIndex++);
            p.DateModified = reader.GetSafeDateTime(startingIndex++);
            p.LanguageCode = reader.GetSafeString(startingIndex++);
            p.Tag = reader.GetSafeString(startingIndex++);

            int secondIndex = 9;
            pt.Name = reader.GetSafeString(secondIndex++);
            pt.Id = reader.GetSafeInt32(secondIndex++);

            p.Type = pt;

            return p;
        }
开发者ID:thedevhunter,项目名称:MiDinero-MiFuturo,代码行数:26,代码来源:PlansService.cs

示例15: MapModule

 private Module MapModule(IDataReader reader)
 {
     Module module = new Module();
     int startingIndex = 0;
     module.Id = reader.GetSafeInt32(startingIndex++);
     module.ModuleName = reader.GetSafeString(startingIndex++);
     module.Length = reader.GetSafeInt32(startingIndex++);
     module.Labs = reader.GetSafeString(startingIndex++);
     module.RequiredReading = reader.GetSafeString(startingIndex++);
     module.Homework = reader.GetSafeString(startingIndex++);
     module.Description = reader.GetSafeString(startingIndex++);
     module.SectionId = reader.GetSafeInt32(startingIndex++);
     return module;
 }
开发者ID:ETorresWebDev,项目名称:Corbulo,代码行数:14,代码来源:ModuleService.cs


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