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


C# OleDbDataReader.SafeNullableBool方法代码示例

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


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

示例1: PipeDataAdapter

        public PipeDataAdapter(OleDbDataReader dr, string workSheetName, int rowNumber)
        {
            //setting parts via a data reader
            ErrorMessages = new List<string>();

            AreaNumber = string.Empty;
            SequenceNumber =string.Empty;
            Class = string.Empty;
            Size = string.Empty;
            FluidCode = string.Empty;
            SpecialFeature =string.Empty;
            PandID = string.Empty;
            From = string.Empty;
            To = string.Empty;
            Category = string.Empty;
            Description = string.Empty;

            mRowNumber = rowNumber;
            mWorkSheetName = workSheetName;

            AreaNumber = dr.SafeString((int)PipeColumn.Area);
            SequenceNumber = dr.SafeString((int)PipeColumn.Sequence);
            Class = dr.SafeString((int)PipeColumn.PipeClass);
            Size = dr.SafeString((int)PipeColumn.Size);
            FluidCode = dr.SafeString((int)PipeColumn.FluidCode);
            SpecialFeature = dr.SafeString((int)PipeColumn.SpecialFeature);

            PandID = dr.SafeString((int)PipeColumn.PID);
            From = dr.SafeString((int)PipeColumn.From);
            To = dr.SafeString((int)PipeColumn.To);
            Category = dr.SafeString((int)PipeColumn.Category);
            Description = dr.SafeString((int)PipeColumn.Description);
            IsActive = dr.SafeNullableBool((int) PipeColumn.IsActive);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:34,代码来源:PipeDataAdapter.cs

示例2: MechanicalDataAdapter

        public MechanicalDataAdapter(OleDbDataReader dr, string workSheetName, int rowNumber)
        {
            RowNumber = rowNumber;
            WorkSheetName = workSheetName;

            Tag = dr.SafeString((int)EquipmentColumn.Tag);

            EquipmentType = dr.SafeString((int)EquipmentColumn.Type).Trim();
            Description = dr.SafeString((int)EquipmentColumn.Description).Trim();
            Notes = dr.SafeString((int)EquipmentColumn.Notes).Trim();
            AreaNumber = dr.SafeString((int)EquipmentColumn.Area).Trim();
            Specification = dr.SafeString((int)EquipmentColumn.Spec).Trim();
            PandID = dr.SafeString((int)EquipmentColumn.PID).Trim();
            MaintSysId = dr.SafeString((int)EquipmentColumn.MaintSysId);
            Classified = dr.SafeNullableBool((int)EquipmentColumn.Classified);
            IsActive = dr.SafeNullableBool((int)EquipmentColumn.IsActive);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:17,代码来源:MechanicalDataAdapter.cs

示例3: InstrumentDataAdapter

        public InstrumentDataAdapter(OleDbDataReader dr, string workSheetName, int rowNumber, CommonUtils.ImportType importType)
        {
            RowNumber = rowNumber;
            WorkSheetName = workSheetName;

            ErrorMessages = new List<string>();

            Tag = dr.SafeString((int)InstrumentColumn.Tag).Trim();
            EquipmentType = dr.SafeString((int)InstrumentColumn.Type).Trim();
            Description = dr.SafeString((int)InstrumentColumn.Description).Trim();
            Notes = dr.SafeString((int)InstrumentColumn.Notes).Trim();
            AreaNumber = dr.SafeString((int)InstrumentColumn.Area).Trim();

            Specification = dr.SafeString((int)InstrumentColumn.Spec).Trim();
            PandID = dr.SafeString((int)InstrumentColumn.PID).Trim();
            MaintSysId = dr.SafeString((int)InstrumentColumn.MaintSysId);
            Classified = dr.SafeNullableBool((int) InstrumentColumn.Classified);
            VerificationFrequency = dr.SafeString((int)InstrumentColumn.VerificationFrequency);

            IsActive = dr.SafeNullableBool((int) InstrumentColumn.IsActive);

            Validate(importType==CommonUtils.ImportType.CreateInstrument);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:23,代码来源:InstrumentDataAdapter.cs

示例4: MobilePlantDataAdapter

        public MobilePlantDataAdapter(OleDbDataReader dr, string workSheetName, int rowNumber, CommonUtils.ImportType importType)
        {
            RowNumber = rowNumber;
            WorkSheetName = workSheetName;

            Hirer = string.Empty;
            Owner = string.Empty;
            Registration = string.Empty;

            Tag = dr.SafeString((int)MobilePlantColumn.Tag).Trim();
            EquipmentType = dr.SafeString((int)MobilePlantColumn.Type).Trim();
            Description = dr.SafeString((int)MobilePlantColumn.Description).Trim();
            Notes = dr.SafeString((int)MobilePlantColumn.Notes);
            Hirer = dr.SafeString((int)MobilePlantColumn.Hirer);
            Owner = dr.SafeString((int)MobilePlantColumn.Owner);
            AreaNumber = dr.SafeString((int)MobilePlantColumn.Area).Trim();
            Registration = dr.SafeString((int)MobilePlantColumn.Registration).Trim();
            Expiry = dr.SafeNullableDate((int)MobilePlantColumn.Expiry);
            Classified = dr.SafeNullableBool((int)MobilePlantColumn.Classified);
            MaintSysId = dr.SafeString((int)MobilePlantColumn.MaintSysId);
            IsActive = dr.SafeNullableBool((int)MobilePlantColumn.IsActive);

            Validate(importType == CommonUtils.ImportType.CreateMobilePlant);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:24,代码来源:MobilePlantDataAdapter.cs

示例5: AlarmDataAdapter

        public AlarmDataAdapter(OleDbDataReader dr, string workSheetName, int rowNumber, CommonUtils.ImportType importType)
        {
            RowNumber = rowNumber;
            WorkSheetName = workSheetName;

            ControlSystemName = dr.SafeString((int)AlarmColumn.ControlSystemName).Trim();
            ComponentName = dr.SafeString((int)AlarmColumn.ComponentName).Trim();
            AlarmPropertyName = dr.SafeString((int)AlarmColumn.AlarmPropertyName).Trim();

            Enabled = dr.SafeNullableBool((int)AlarmColumn.Enabled);

            OnDelay = dr.SafeNullableInt((int)AlarmColumn.OnDelay);
            OffDelay = dr.SafeNullableInt((int)AlarmColumn.OffDelay);

            ActivationExpr = dr.SafeString((int)AlarmColumn.ActivationExpr).Trim();
            MaskingExpr = dr.SafeString((int)AlarmColumn.MaskingExpr).Trim();

            AlarmCalcExprEnabled = dr.SafeNullableBool((int)AlarmColumn.AlarmCalcExprEnabled);
            AlarmCalcExpr = dr.SafeString((int)AlarmColumn.AlarmCalcExpr).Trim();

            Purpose = dr.SafeString((int)AlarmColumn.Purpose).Trim();
            Consequence = dr.SafeString((int)AlarmColumn.Consequence).Trim();
            Response = dr.SafeString((int)AlarmColumn.Response).Trim();

            Notes = dr.SafeString((int)AlarmColumn.Notes).Trim();
            Guidance = dr.SafeString((int)AlarmColumn.Guidance).Trim();

            Tested = dr.SafeNullableBool((int)AlarmColumn.Tested);
            TestedDate = dr.SafeNullableDate((int)AlarmColumn.TestedDate);
            TestedUser = dr.SafeString((int)AlarmColumn.TestedUser).Trim();

            Reviewed = dr.SafeNullableBool((int)AlarmColumn.Reviewed);
            ReviewedDate = dr.SafeNullableDate((int)AlarmColumn.ReviewedDate);
            ReviewedUser = dr.SafeString((int)AlarmColumn.ReviewedUser).Trim();

            Reportable = dr.SafeNullableBool((int)AlarmColumn.Reportable);
            ReportableDate = dr.SafeNullableDate((int)AlarmColumn.ReportableDate);
            ReportableUser = dr.SafeString((int)AlarmColumn.ReportableUser).Trim();

            PurposeIsIndendedNull = dr.IntendedNull((int)AlarmColumn.Purpose);
            ConsequenceIsIntendedNull = dr.IntendedNull((int)AlarmColumn.Consequence);
            ResponseTimeIsIndendedNull = dr.IntendedNull((int)AlarmColumn.Response);

            AlarmCalcExprIsIntendedNull = dr.IntendedNull((int)AlarmColumn.AlarmCalcExpr);
            ActivationExprIsIntendedNull = dr.IntendedNull((int)AlarmColumn.ActivationExpr);
            MaskingExprIsIntendedNull = dr.IntendedNull((int)AlarmColumn.MaskingExpr);
            GuidanceIsIntendedNull = dr.IntendedNull((int)AlarmColumn.Guidance);

            OnDelayIsIntendedNull = dr.IntendedNull((int)AlarmColumn.OnDelay);
            OffDelayIsIntendedNull = dr.IntendedNull((int)AlarmColumn.OffDelay);
            NotesIsIntendedNull = dr.IntendedNull((int)AlarmColumn.Notes);

            TestedDateIsIntendedNull = dr.IntendedNull((int)AlarmColumn.TestedDate);
            TestedUserIsIntendedNull = dr.IntendedNull((int)AlarmColumn.TestedUser);

            ReviewedIsIntendedNull = dr.IntendedNull((int)AlarmColumn.Reviewed);
            ReviewedDateIsIntendedNull = dr.IntendedNull((int)AlarmColumn.ReviewedDate);
            ReviewedUserIsIntendedNull = dr.IntendedNull((int)AlarmColumn.ReviewedUser);

            ReportabledIsIntendedNull = dr.IntendedNull((int)AlarmColumn.Reportable);
            ReportabledDateIsIntendedNull = dr.IntendedNull((int)AlarmColumn.ReportableDate);
            ReportableUserIsIntendedNull = dr.IntendedNull((int)AlarmColumn.ReportableUser);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:63,代码来源:AlarmDataAdapter.cs


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