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


C# OracleDatabase.ExecuteReader方法代码示例

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


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

示例1: FindAll

 public static List<MEOMSS_discipline_new> FindAll(string sql)
 {
     OracleDatabase db = new OracleDatabase(DataAccess.OIDSConnStr);
     //OracleDatabase db = new OracleDatabase(UserSecurity.ConnectionString);
     DbCommand cmd = db.GetSqlStringCommand(sql);
     return EntityBase<MEOMSS_discipline_new>.DReaderToEntityList(db.ExecuteReader(cmd));
 }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:7,代码来源:MEOMSS_discipline_new.cs

示例2: Find

 /// <summary>
 /// ����Ȩ�ޱ�ʶ�����Ȩ����Ϣ
 /// </summary>
 /// <param name="flag"></param>
 /// <returns></returns>
 public static Privilege Find(string flag)
 {
     OracleDatabase db = new OracleDatabase(DataAccess.OIDSConnStr);
     string sql = "SELECT * FROM PLM.PRIVILEGE_TAB WHERE PRIVILEGE_FLAG=:flag";
     DbCommand cmd = db.GetSqlStringCommand(sql);
     db.AddInParameter(cmd, "flag", DbType.String, flag);
     return Populate(db.ExecuteReader(cmd));
 }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:13,代码来源:Privilege.cs

示例3: FindAll

 /// <summary>
 /// ��������Project�б�
 /// </summary>
 /// <returns></returns>
 public static List<project> FindAll()
 {
     OracleDatabase db = new OracleDatabase(DataAccess.IFSConnStr);
        // Database db = DatabaseFactory.CreateDatabase("ifsConnection");
     string sql = "SELECT * FROM IFSAPP.PROJECT";
     DbCommand cmd = db.GetSqlStringCommand(sql);
     return EntityBase<project>.DReaderToEntityList(db.ExecuteReader(cmd));
 }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:12,代码来源:project.cs

示例4: FindAll

 /// <summary>
 /// ��������Project�б�
 /// </summary>
 /// <returns></returns>
 public static List<ReasonCode> FindAll()
 {
     OracleDatabase db = new OracleDatabase(DataAccess.IFSConnStr);
        // Database db = DatabaseFactory.CreateDatabase("ifsConnection");
     string sql = "SELECT * FROM IFSAPP.YRS_REQUISITION_REASON_TAB";
     DbCommand cmd = db.GetSqlStringCommand(sql);
     return EntityBase<ReasonCode>.DReaderToEntityList(db.ExecuteReader(cmd));
 }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:12,代码来源:ReasonCode.cs

示例5: Find

 public static Unit Find(string id)
 {
     //Database db = DatabaseFactory.CreateDatabase();
     OracleDatabase db = new OracleDatabase(DataAccess.IFSConnStr);
     string sql = "SELECT UNIT_CODE FROM IFSAPP.ISO_UNIT WHERE UNIT_CODE=:id";
     DbCommand cmd = db.GetSqlStringCommand(sql);
     db.AddInParameter(cmd, "id", DbType.String, id);
     return Populate(db.ExecuteReader(cmd));
 }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:9,代码来源:Unit.cs

示例6: Find

 public static SubProject Find(string id)
 {
     //Database db = DatabaseFactory.CreateDatabase();
     OracleDatabase db = new OracleDatabase(DataAccess.IFSConnStr);
     string sql = "SELECT * FROM IFSAPP.SUB_PROJECT WHERE project_id=:id";
     DbCommand cmd = db.GetSqlStringCommand(sql);
     db.AddInParameter(cmd, "id", DbType.String, id);
     return Populate(db.ExecuteReader(cmd));
 }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:9,代码来源:SubProject.cs

示例7: Find

 public static ReasonCode Find(string id)
 {
     OracleDatabase db = new OracleDatabase(DataAccess.IFSConnStr);
     //Database db = DatabaseFactory.CreateDatabase();
     //OracleDatabase db = new OracleDatabase(UserSecurity.ConnectionString);
     string sql = "SELECT * FROM IFSAPP.YRS_REQUISITION_REASON_TAB WHERE REASON_CODE=:id";
     DbCommand cmd = db.GetSqlStringCommand(sql);
     db.AddInParameter(cmd, "id", DbType.String, id);
     return Populate(db.ExecuteReader(cmd));
 }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:10,代码来源:ReasonCode.cs

示例8: GetPrivilegeIds

 /// <summary>
 /// ��øĽڵ����е�Ȩ��id
 /// </summary>
 /// <param name="nodeid"></param>
 /// <returns></returns>
 public static List<int> GetPrivilegeIds(int nodeid)
 {
     List<int> privilegeids=new List<int>();
     OracleDatabase db = new OracleDatabase(DataAccess.OIDSConnStr);
     //Database db = DatabaseFactory.CreateDatabase("oidsConnection");
     string sql = "SELECT PRIVILEGE_ID FROM PRIVILEGE_NODE_TAB WHERE NODE_ID=:nodeid ORDER BY PRIVILEGE_ID";
     DbCommand cmd = db.GetSqlStringCommand(sql);
     db.AddInParameter(cmd, "nodeid", DbType.Int32, nodeid);
     using (IDataReader dr = db.ExecuteReader(cmd))
     {
         while (dr.Read())
         {
            privilegeids.Add(Convert.ToInt32(dr[0]));
         }
         dr.Close();
     }
     return privilegeids;
 }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:23,代码来源:PrivilegeNode.cs

示例9: FindInheritRole

 /// <summary>
 /// ���ݽ�ɫ�������̳н�ɫ
 /// </summary>
 /// <param name="roleName"></param>
 /// <returns></returns>
 public static List<string> FindInheritRole(string roleName)
 {
     OracleDatabase db = new OracleDatabase(DataAccess.OIDSConnStr);
     string sql = "SELECT INHERITNAME FROM PLM.ROLEINHERIT_TAB WHERE ROLENAME=:rolename";
     DbCommand cmd = db.GetSqlStringCommand(sql);
     db.AddInParameter(cmd, "rolename", DbType.String, roleName);
     List<string> inheritRoleList = new List<string>();
     using (IDataReader dr = db.ExecuteReader(cmd))
     {
         while (dr.Read())
             inheritRoleList.Add(dr[0].ToString());
         dr.Close();
     }
     return inheritRoleList;
 }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:20,代码来源:Role.cs

示例10: FindName

 /// <summary>
 /// ���ݽ�ɫ�������Ա��
 /// </summary>
 /// <param name="userName"></param>
 /// <returns></returns>
 public static List<Role> FindName(string roleName)
 {
     OracleDatabase db = new OracleDatabase(DataAccess.OIDSConnStr);
     string sql = "SELECT * FROM PLM.userinrole_tab WHERE ROLENAME=:rolename";
     DbCommand cmd = db.GetSqlStringCommand(sql);
     db.AddInParameter(cmd, "rolename", DbType.String, roleName);
     return EntityBase<Role>.DReaderToEntityList(db.ExecuteReader(cmd));
 }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:13,代码来源:Role.cs

示例11: FindAll

 /// <summary>
 /// �����û������Ҵ��û�����Ľ�ɫ
 /// </summary>
 /// <returns></returns>
 public static List<Role> FindAll(string userName)
 {
     OracleDatabase db = new OracleDatabase(DataAccess.OIDSConnStr);
     string sql = "SELECT r.* FROM PLM.ROLE_TAB r, PLM.USERINROLE_TAB u WHERE r.ROLENAME=u.ROLENAME AND u.USERNAME=:username";
     DbCommand cmd = db.GetSqlStringCommand(sql);
     db.AddInParameter(cmd, "username", DbType.String, userName);
     return EntityBase<Role>.DReaderToEntityList(db.ExecuteReader(cmd));
 }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:12,代码来源:Role.cs

示例12: FindAvailableInheritRole

 /// <summary>
 /// ���ݽ�ɫ���������Լ̳еĽ�ɫ���ϣ��������䱾����̳������Ľ�ɫ��
 /// </summary>
 /// <param name="roleName"></param>
 /// <returns></returns>
 public static List<Role> FindAvailableInheritRole(string roleName)
 {
     OracleDatabase db = new OracleDatabase(DataAccess.OIDSConnStr);
     string sql = "SELECT * FROM PLM.ROLE_TAB WHERE ROLENAME<>:rolename AND ROLENAME NOT IN (SELECT DISTINCT ROLENAME FROM PLM.ROLEINHERIT_TAB WHERE INHERITNAME=:rolename)";
     DbCommand cmd = db.GetSqlStringCommand(sql);
     db.AddInParameter(cmd, "rolename", DbType.String, roleName);
     return EntityBase<Role>.DReaderToEntityList(db.ExecuteReader(cmd));
 }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:13,代码来源:Role.cs

示例13: Find1STPartType

        /// <summary>
        /// �������е�һ������б�
        /// </summary>
        /// <returns></returns>
        public static List<PartType> Find1STPartType()
        {
            OracleDatabase db = new OracleDatabase(DataAccess.OIDSConnStr);
            string sql = "SELECT * FROM plm.MM_PART_TYPE_TAB WHERE PARENT_ID=0";
            DbCommand cmd = db.GetSqlStringCommand(sql);

            return EntityBase<PartType>.DReaderToEntityList(db.ExecuteReader(cmd));
        }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:12,代码来源:PartType.cs

示例14: FindPartList

        /// <summary>
        /// ���ص�ǰ��Ŀ��ǰ��������Ԥ����ʷ
        /// </summary>
        /// <param name="pid"></param>
        /// <param name="projectstr"></param>
        /// <param name="creator"></param>
        /// <param name="lastflag"></param>
        /// <returns></returns>
        public static List<PartParameter> FindPartList(string partid, string projectstr, string creator)
        {
            OracleDatabase db = new OracleDatabase(DataAccess.OIDSConnStr);
            string sql = "SELECT * FROM mm_part_para_view t WHERE t.last_flag=0 and t.creator='" + creator + "' and t.PARTID=" + partid + " and t.projectid ='" + projectstr + "'";
            DbCommand cmd = db.GetSqlStringCommand(sql);

            return EntityBase<PartParameter>.DReaderToEntityList(db.ExecuteReader(cmd));
        }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:16,代码来源:PartParameter.cs

示例15: FindSelectResult

 public static List<PartBasicInfo> FindSelectResult(string sql)
 {
     //Database db = DatabaseFactory.CreateDatabase("ifsConnection");
     OracleDatabase db = new OracleDatabase(DataAccess.IFSConnStr);
     DbCommand cmd = db.GetSqlStringCommand(sql);
     return EntityBase<PartBasicInfo>.DReaderToEntityList(db.ExecuteReader(cmd));
 }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:7,代码来源:PartBasicInfo.cs


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