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


C# IDataReader.GetSafeDateTime方法代码示例

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


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

示例1: 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

示例2: MapSiteLink

        private SiteLink MapSiteLink(IDataReader reader)
        {
            SiteLink s = new SiteLink();
            int startingIndex = 0;

            s.Id = reader.GetSafeInt32(startingIndex++);
            s.Url = reader.GetSafeString(startingIndex++);
            s.Type = reader.GetSafeInt32(startingIndex++);
            s.Group = reader.GetSafeInt16(startingIndex++);
            s.OwnerId = reader.GetSafeInt32(startingIndex++);
            s.OwnerType = reader.GetSafeInt32(startingIndex++);
            s.DateAdded = reader.GetSafeDateTime(startingIndex++);
            s.DateModified = reader.GetSafeDateTime(startingIndex++);
            s.LanguageCode = reader.GetSafeString(startingIndex++);
            return s;
        }
开发者ID:jchan0321,项目名称:MyMoneyMyFuture,代码行数:16,代码来源:SiteLinksService.cs

示例3: MapCourse

        private static Course MapCourse(IDataReader reader)
        {
            Course item = new Course();
            int startingIndex = 0;

            item.Id = reader.GetSafeInt32(startingIndex++);
            item.CourseName = reader.GetSafeString(startingIndex++);
            item.Length = reader.GetSafeString(startingIndex++);
            item.Description = reader.GetSafeString(startingIndex++);
            item.Start = reader.GetSafeDateTime(startingIndex++);
            item.End = reader.GetSafeDateTime(startingIndex++);
            item.CourseLength = reader.GetSafeInt32(startingIndex++);
            item.LearningObjectives = reader.GetSafeString(startingIndex++);
            item.ExpectedOutcome = reader.GetSafeString(startingIndex++);
            item.EvaluationCriteria = reader.GetSafeString(startingIndex++);
            item.Format = reader.GetSafeInt32(startingIndex++);
            return item;
        }
开发者ID:ETorresWebDev,项目名称:Corbulo,代码行数:18,代码来源:CoursesService.cs

示例4: 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

示例5: MapPageMetaTag

        private PageMetaTag MapPageMetaTag(IDataReader reader)
        {
            PageMetaTag p = new PageMetaTag();
            int startingIndex = 0; //startingOrdinal

            p.Id = reader.GetSafeInt32(startingIndex++);
            p.MetaTagId = reader.GetSafeInt32(startingIndex++);
            p.Value = reader.GetSafeString(startingIndex++);
            p.OwnerId = reader.GetSafeInt32(startingIndex++);
            p.OwnerType = reader.GetSafeInt32(startingIndex++);
            p.DateAdded = reader.GetSafeDateTime(startingIndex++);
            p.DateModified = reader.GetSafeDateTime(startingIndex++);
            p.LanguageCode = reader.GetSafeString(startingIndex++);
            return p;
        }
开发者ID:jchan0321,项目名称:MyMoneyMyFuture,代码行数:15,代码来源:MetaTagsService.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: 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

示例8: MapMetaTag

        private void MapMetaTag(IDataReader reader, MetaTag m)
        {
            int startingIndex = 0;

            m.Id = reader.GetSafeInt32(startingIndex++);
            m.Name = reader.GetSafeString(startingIndex++);
            m.Description = reader.GetSafeString(startingIndex++);
            m.Example = reader.GetSafeString(startingIndex++);
            m.Template = reader.GetSafeString(startingIndex++);
            m.DateAdded = reader.GetSafeDateTime(startingIndex++);
            m.DateModified = reader.GetSafeDateTime(startingIndex++);
            m.LanguageCode = reader.GetSafeString(startingIndex++);
        }
开发者ID:jchan0321,项目名称:MyMoneyMyFuture,代码行数:13,代码来源:MetaTagsService.cs

示例9: 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

示例10: 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

示例11: 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

示例12: 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

示例13: 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

示例14: OfficeHourMap

        private OfficeHour OfficeHourMap(IDataReader reader)
        {
            OfficeHour item = new OfficeHour();
            int startingIndex = 0;

            item.Id = reader.GetSafeInt32(startingIndex++);
            item.InstructorId = reader.GetSafeInt32(startingIndex++);
            item.Date = reader.GetSafeDateTime(startingIndex++);
            item.StartTime = reader.GetSafeInt32(startingIndex++);
            item.EndTime = reader.GetSafeInt32(startingIndex++);
            item.TimeZone = reader.GetSafeInt32(startingIndex++);
            item.Topic = reader.GetSafeString(startingIndex++);
            item.Instructions = reader.GetSafeString(startingIndex++);
            item.SectionId = reader.GetSafeInt32(startingIndex++);

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

示例15: MapAnalytics

        private AnalyticEvent MapAnalytics(IDataReader reader)
        {
            AnalyticEvent p = new AnalyticEvent();
            int startingIndex = 0; //startingOrdinal

            p.Id = reader.GetSafeInt32(startingIndex++);
            p.UserId = reader.GetSafeString(startingIndex++);
            p.Category = reader.GetSafeInt32(startingIndex++);
            p.Action = reader.GetSafeInt32(startingIndex++);
            p.Value = reader.GetSafeString(startingIndex++);
            p.Data = reader.GetSafeString(startingIndex++);
            p.DateAdded = reader.GetSafeDateTime(startingIndex++);
            p.DateModified = reader.GetSafeDateTime(startingIndex++);
            p.LanguageCode = reader.GetSafeString(startingIndex++);
            p.PageUrl = reader.GetSafeString(startingIndex++);
            p.PageType = reader.GetSafeInt32(startingIndex++);

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


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