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


C# IDataReader.HasColumn方法代码示例

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


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

示例1: Insurance

        public Insurance(IDataReader dbReader)
            : this()
        {
            if (dbReader.HasColumn("InsuranceId") && dbReader["InsuranceId"] != DBNull.Value)
                InsuranceId = (int)dbReader["InsuranceId"];

            if (dbReader.HasColumn("CompanyId") && dbReader["CompanyId"] != DBNull.Value)
                CompanyId = (int)dbReader["CompanyId"];

            if (dbReader.HasColumn("InsuranceAddress") && dbReader["InsuranceAddress"] != DBNull.Value)
                InsuranceAddress = (string)dbReader["InsuranceAddress"];

            if (dbReader.HasColumn("InsuranceWebsite") && dbReader["InsuranceWebsite"] != DBNull.Value)
                InsuranceWebsite = (string)dbReader["InsuranceWebsite"];

            if (dbReader.HasColumn("InsurancePhone") && dbReader["InsurancePhone"] != DBNull.Value)
                InsurancePhone = (string)dbReader["InsurancePhone"];

            if (dbReader.HasColumn("InsuranceName") && dbReader["InsuranceName"] != DBNull.Value)
                InsuranceName = (string)dbReader["InsuranceName"];

            if (dbReader.HasColumn("CreatedBy") && dbReader["CreatedBy"] != DBNull.Value)
                base.CreatedBy = (int)dbReader["CreatedBy"];

            if (dbReader.HasColumn("UpdatedBy") && dbReader["UpdatedBy"] != DBNull.Value)
                base.UpdatedBy = (int)dbReader["UpdatedBy"];

            if (dbReader.HasColumn("DateCreated") && dbReader["DateCreated"] != DBNull.Value)
                base.DateCreated = (DateTime)dbReader["DateCreated"];

            if (dbReader.HasColumn("DateUpdated") && dbReader["DateUpdated"] != DBNull.Value)
                base.DateUpdated = (DateTime)dbReader["DateUpdated"];
        }
开发者ID:heartbeatservice,项目名称:HeartbeatServiceSolution,代码行数:33,代码来源:Insurance.cs

示例2: DashboardAppointment

        public DashboardAppointment(IDataReader dbReader)
            : this()
        {
            if (dbReader.HasColumn("DoctorName") && dbReader["DoctorName"] != DBNull.Value)
                DoctorName = (string)dbReader["DoctorName"];

            if (dbReader.HasColumn("TotalAppointment") && dbReader["TotalAppointment"] != DBNull.Value)
                NoOfAppointments = Convert.ToInt32(dbReader["TotalAppointment"]);
        }
开发者ID:heartbeatservice,项目名称:HeartbeatServiceSolution,代码行数:9,代码来源:Dashboard.cs

示例3: ProfessionalSchedule

        public ProfessionalSchedule(IDataReader dbReader)
            : this()
        {
            if (dbReader.HasColumn("ProfessionalScheduleId") && dbReader["ProfessionalScheduleId"] != DBNull.Value)
                ProfessionalScheduleId = (int)dbReader["ProfessionalScheduleId"];

            if (dbReader.HasColumn("ProfessionalId") && dbReader["ProfessionalId"] != DBNull.Value)
                ProfessionalId = (int)dbReader["ProfessionalId"];

            if (dbReader.HasColumn("StartTime") && dbReader["StartTime"] != DBNull.Value)
                StartTime = (DateTime)dbReader["StartTime"];

            if (dbReader.HasColumn("EndTime") && dbReader["EndTime"] != DBNull.Value)
                EndTime = (DateTime)dbReader["EndTime"];

            if (dbReader.HasColumn("TimeIntervalMinutes") && dbReader["TimeIntervalMinutes"] != DBNull.Value)
                TimeIntervalMinutes = Convert.ToInt16(dbReader["TimeIntervalMinutes"]);

            if (dbReader.HasColumn("CreatedBy") && dbReader["CreatedBy"] != DBNull.Value)
                base.CreatedBy = (int)dbReader["CreatedBy"];

            if (dbReader.HasColumn("UpdatedBy") && dbReader["UpdatedBy"] != DBNull.Value)
                base.UpdatedBy = (int)dbReader["UpdatedBy"];

            if (dbReader.HasColumn("DateCreated") && dbReader["DateCreated"] != DBNull.Value)
                base.DateCreated = (DateTime)dbReader["DateCreated"];

            if (dbReader.HasColumn("DateUpdated") && dbReader["DateUpdated"] != DBNull.Value)
                base.DateUpdated = (DateTime)dbReader["DateUpdated"];
        }
开发者ID:heartbeatservice,项目名称:HeartbeatServiceSolution,代码行数:30,代码来源:ProfessionalSchedule.cs

示例4: Role

        public Role(IDataReader dbReader)
            : this()
        {
            if (dbReader.HasColumn("RoleId") && dbReader["RoleId"] != DBNull.Value)
                RoleId = (int)dbReader["RoleId"];

            if (dbReader.HasColumn("CompanyId") && dbReader["CompanyId"] != DBNull.Value)
                CompanyId = (int)dbReader["ProfessionalId"];

            if (dbReader.HasColumn("RoleName") && dbReader["RoleName"] != DBNull.Value)
                RoleName = (string)dbReader["RoleName"];
        }
开发者ID:heartbeatservice,项目名称:HeartbeatServiceSolution,代码行数:12,代码来源:Role.cs

示例5: StatusType

        public StatusType(IDataReader dbReader)
            : this()
        {
            if (dbReader.HasColumn("StatusId") && dbReader["StatusId"] != DBNull.Value)
                StatusId = (int)dbReader["StatusId"];

            if (dbReader.HasColumn("StatusDesc") && dbReader["StatusDesc"] != DBNull.Value)
                StatusDesc = (string)dbReader["StatusDesc"];

            if (dbReader.HasColumn("CompanyId") && dbReader["CompanyId"] != DBNull.Value)
                CompanyId = (int)dbReader["CompanyId"];
        }
开发者ID:heartbeatservice,项目名称:HeartbeatServiceSolution,代码行数:12,代码来源:StatusType.cs

示例6: Invoice

 public Invoice(IDataReader dbReader)
 {
     if (dbReader.HasColumn("FirstName") && dbReader["FirstName"] != DBNull.Value) FirstName = dbReader["FirstName"].ToString();
     if (dbReader.HasColumn("LastName") && dbReader["LastName"] != DBNull.Value) LastName = dbReader["LastName"].ToString();
     if (dbReader.HasColumn("ProjectName") && dbReader["ProjectName"] != DBNull.Value) ProjectName = dbReader["ProjectName"].ToString();
     if (dbReader.HasColumn("TaskName") && dbReader["TaskName"] != DBNull.Value) TaskName = dbReader["TaskName"].ToString();
     if (dbReader.HasColumn("WorkDate") && dbReader["WorkDate"] != DBNull.Value) WorkDate = Convert.ToDateTime(dbReader["WorkDate"]).ToShortDateString();
     if (dbReader.HasColumn("HoursWorked") && dbReader["HoursWorked"] != DBNull.Value) HoursWorked = Convert.ToInt32(dbReader["HoursWorked"].ToString());
     if (dbReader.HasColumn("WorkDescription") && dbReader["WorkDescription"] != DBNull.Value) Description = dbReader["WorkDescription"].ToString();
     if (dbReader.HasColumn("ChargeRate") && dbReader["ChargeRate"] != DBNull.Value) ChargeRate = dbReader["ChargeRate"].ToString();
     if (dbReader.HasColumn("Total") && dbReader["Total"] != DBNull.Value) TotalAmount = dbReader["Total"].ToString();
     if (dbReader.HasColumn("TimeID") && dbReader["TimeID"] != DBNull.Value) InvoiceID = dbReader["TimeID"].ToString();
 }
开发者ID:umais,项目名称:HeartbeatBusiness,代码行数:13,代码来源:Invoice.cs

示例7: Module

        public Module(IDataReader dbReader)
            : base()
        {
            if (dbReader.HasColumn("ModuleId") && dbReader["ModuleId"] != DBNull.Value)
                ModuleId = (int)dbReader["ModuleId"];

            if (dbReader.HasColumn("ModuleName") && dbReader["ModuleName"] != DBNull.Value)
                ModuleName = (string)dbReader["ModuleName"];

            if (dbReader.HasColumn("ModuleDescription") && dbReader["ModuleDescription"] != DBNull.Value)
                ModuleDescription = (string)dbReader["ModuleDescription"];

            if (dbReader.HasColumn("DisplayOrder") && dbReader["DisplayOrder"] != DBNull.Value)
                DisplayOrder = (int)dbReader["DisplayOrder"];

            if (dbReader.HasColumn("ModuleURL") && dbReader["ModuleURL"] != DBNull.Value)
                ModuleURL = (string)dbReader["ModuleURL"];

            if (dbReader.HasColumn("IsForAll") && dbReader["IsForAll"] != DBNull.Value)
                IsForAll = (bool)dbReader["IsForAll"];

            if (dbReader.HasColumn("ParentId") && dbReader["ParentId"] != DBNull.Value)
                ParentId = (int)dbReader["ParentId"];

            if (dbReader.HasColumn("IconName") && dbReader["IconName"] != DBNull.Value)
                IconName = (string)dbReader["IconName"];
        }
开发者ID:heartbeatservice,项目名称:HeartbeatServiceSolution,代码行数:27,代码来源:Module.cs

示例8: HeartbeatParams

        public HeartbeatParams(IDataReader dbReader,string callType)
        {
            if(callType=="users")
             {
               if (dbReader.HasColumn("WorkerID") && dbReader["WorkerID"] != DBNull.Value) ParamValue = dbReader["WorkerID"].ToString();
            if (dbReader.HasColumn("Name") && dbReader["Name"] != DBNull.Value) ParamName = dbReader["Name"].ToString();
             }

             if (callType == "tasks")
             {
             if (dbReader.HasColumn("TaskID") && dbReader["TaskID"] != DBNull.Value) ParamValue = dbReader["TaskID"].ToString();
             if (dbReader.HasColumn("TaskName") && dbReader["TaskName"] != DBNull.Value) ParamName = dbReader["TaskName"].ToString();
             }
        }
开发者ID:umais,项目名称:HeartbeatBusiness,代码行数:14,代码来源:HeartbeatParams.cs

示例9: ConfigValues

        public ConfigValues(IDataReader dbReader)
            : this()
        {
            if (dbReader.HasColumn("ControlItemKey") && dbReader["ControlItemKey"] != DBNull.Value)
                ControlItemKey = (string)dbReader["ControlItemKey"];

            if (dbReader.HasColumn("ControlItemValue") && dbReader["ControlItemValue"] != DBNull.Value)
                ControlItemValue = (string)dbReader["ControlItemValue"];

            if (dbReader.HasColumn("ControlItemText") && dbReader["ControlItemText"] != DBNull.Value)
                ControlItemText = (string)dbReader["ControlItemText"];

            if (dbReader.HasColumn("ControlItemOrder") && dbReader["ControlItemOrder"] != DBNull.Value)
                ControlItemOrder = (float)dbReader["ControlItemOrder"];

            if (dbReader.HasColumn("OtherText") && dbReader["OtherText"] != DBNull.Value)
                OtherText = (string)dbReader["OtherText"];
        }
开发者ID:heartbeatservice,项目名称:HeartbeatServiceSolution,代码行数:18,代码来源:ConfigValues.cs

示例10: DataReader2ShapefileGroup

 public static ShapefileGroup DataReader2ShapefileGroup(IDataReader reader)
 {
     if (!reader.HasColumn("shapefilegroup_id")) return null;
     return new ShapefileGroup
     {
         ID      = (int)reader["shapefilegroup_id"],
         Name    = (string)reader["shapefilegroup_name"]
     };
 }
开发者ID:apdmatos,项目名称:geostatistics,代码行数:9,代码来源:DataStoreModelBuilders.cs

示例11: DataReader2Configuration

 public static Configuration DataReader2Configuration(IDataReader reader)
 {
     if (!reader.HasColumn("configuration_id")) return null;
     return new Configuration
     {
         ID          = (int)reader["configuration_id"],
         GeoLevel    = (string)reader["configuration_geolevel"],
         Shapefile   = DataReader2Shapefile(reader)
     };
 }
开发者ID:apdmatos,项目名称:geostatistics,代码行数:10,代码来源:DataStoreModelBuilders.cs

示例12: DataReader2Provider

 public static Provider DataReader2Provider(IDataReader reader)
 {
     if (!reader.HasColumn("provider_id")) return null;
     return new Provider
     {
         ID          = (int)reader["provider_id"],
         Name        = (string)reader["provider_name"],
         NameAbbr    = (string)reader["provider_nameabbr"],
         ServiceURL  = (string)reader["provider_serviceurl"],
         URL         = (string)reader["provider_url"]
     };
 }
开发者ID:apdmatos,项目名称:geostatistics,代码行数:12,代码来源:DataStoreModelBuilders.cs

示例13: DataReader2SubTheme

 public static SubTheme DataReader2SubTheme(IDataReader reader)
 {
     if (!reader.HasColumn("subtheme_id")) return null;
     return new SubTheme
     {
         ID          = (int)reader["subtheme_id"],
         Name        = (string)reader["subtheme_name"],
         NameAbbr    = (string)reader["subtheme_nameabbr"],
         ProviderID  = (int)reader["provider_id"],
         ThemeID     = (int)reader["theme_id"]
     };
 }
开发者ID:apdmatos,项目名称:geostatistics,代码行数:12,代码来源:DataStoreModelBuilders.cs

示例14: UserProfile

 public UserProfile(IDataReader dbReader)
     : this()
 {
     if (dbReader["CompanyId"] != DBNull.Value) CompanyId = (int)dbReader["CompanyId"];
     if (dbReader["UserName"] != DBNull.Value) UserName = (string)dbReader["UserName"];
     if (dbReader["FirstName"] != DBNull.Value) FirstName = (string)dbReader["FirstName"];
     if (dbReader["LastName"] != DBNull.Value) LastName = (string)dbReader["LastName"];
     if (dbReader["Email"] != DBNull.Value) Email = (string)dbReader["Email"];
     if (dbReader["UserId"] != DBNull.Value) UserId = (int)dbReader["UserId"];
     if (dbReader["Password"] != DBNull.Value) Password = (string)dbReader["Password"];
     if (dbReader["RoleId"] != DBNull.Value) RoleId = (int)dbReader["RoleId"];
     if (dbReader.HasColumn("RoleName") && dbReader["RoleName"] != DBNull.Value) RoleName = (string)dbReader["RoleName"];
 }
开发者ID:heartbeatservice,项目名称:HeartbeatServiceSolution,代码行数:13,代码来源:UserProfile.cs

示例15: DataReader2Shapefile

 public static Shapefile DataReader2Shapefile(IDataReader reader)
 {
     if (!reader.HasColumn("shapefile_id")) return null;
     return new Shapefile
     {
         Group       = DataReader2ShapefileGroup(reader),
         ID          = (int)reader["shapefile_id"],
         Level       = (int)reader["shapefile_level"],
         Name        = (string)reader["shapefile_name"],
         Path        = (string)reader["shapefile_path"],
         FileName    = (string)reader["shapefile_filename"]
     };
 }
开发者ID:apdmatos,项目名称:geostatistics,代码行数:13,代码来源:DataStoreModelBuilders.cs


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