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


C# Oracle.OracleDatabase类代码示例

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


OracleDatabase类属于Microsoft.Practices.EnterpriseLibrary.Data.Oracle命名空间,在下文中一共展示了OracleDatabase类的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: 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

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

示例4: FindUnitDataset

 /// <summary>
 /// ��������Project�б�
 /// </summary>
 /// <returns></returns>
 public static DataSet FindUnitDataset()
 {
     OracleDatabase db = new OracleDatabase(DataAccess.IFSConnStr);
        // Database db = DatabaseFactory.CreateDatabase("ifsConnection");
     string sql = "SELECT UNIT_CODE  from IFSAPP.ISO_UNIT";
     DbCommand cmd = db.GetSqlStringCommand(sql);
     return db.ExecuteDataSet(cmd);
 }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:12,代码来源:Unit.cs

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

示例6: Exist

 /// <summary>
 /// ����Ȩ�ޱ�ʶ���ж��Ƿ���ڴ�Ȩ��
 /// </summary>
 /// <param name="flag"></param>
 /// <returns></returns>
 public static bool Exist(string flag)
 {
     OracleDatabase db = new OracleDatabase(DataAccess.OIDSConnStr);
     string sql = "SELECT PRIVILEGE_FLAG FROM PLM.PRIVILEGE_TAB WHERE PRIVILEGE_FLAG=:flag";
     DbCommand cmd = db.GetSqlStringCommand(sql);
     db.AddInParameter(cmd, "flag", DbType.String, flag);
     object ret = db.ExecuteScalar(cmd);
     return (ret == null || ret == DBNull.Value) ? false : true;
 }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:14,代码来源:Privilege.cs

示例7: Find

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

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

示例9: FindECDMSID

 /// <summary>
 /// ����ERPID��ȡ��Ӧ��ECDMSID
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public static string FindECDMSID(string id)
 {
     //Database db = DatabaseFactory.CreateDatabase();
     OracleDatabase db = new OracleDatabase(DataAccess.OIDSConnStr);
     string sql = "SELECT ECDMSID FROM plm.PROJECT_RELATION_TAB WHERE ERPid=:id";
     DbCommand cmd = db.GetSqlStringCommand(sql);
     db.AddInParameter(cmd, "id", DbType.String, id);
     return Convert.ToString(db.ExecuteScalar(cmd));
 }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:14,代码来源:project.cs

示例10: FindDesc

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

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

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

示例13: Available

 /// <summary>
 /// �жϽ�ɫ�Ƿ����
 /// </summary>
 /// <param name="roleName"></param>
 /// <returns></returns>
 public static bool Available(string roleName)
 {
     OracleDatabase db = new OracleDatabase(DataAccess.OIDSConnStr);
     string sql = "SELECT STATE FROM PLM.ROLE_TAB WHERE ROLENAME=:rolename";
     DbCommand cmd = db.GetSqlStringCommand(sql);
     db.AddInParameter(cmd, "rolename", DbType.String, roleName);
     object state = db.ExecuteScalar(cmd);
     if (state == null || state == DBNull.Value) return false;
     return state.ToString().ToUpper() == RoleState.NORMAL.ToString();
 }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:15,代码来源:Role.cs

示例14: AddPrivilege

 /// <summary>
 /// ��ӽ�ɫ��Ȩ��
 /// </summary>
 /// <param name="roleName">��ɫ����</param>
 /// <param name="privilegeId">Ȩ��ID</param>
 /// <param name="projectIDs">��ĿID����</param>
 /// <returns></returns>
 public static int AddPrivilege(string roleName, int privilegeId, string projectIDs)
 {
     string sql = "INSERT INTO PLM.ROLEINPRIVILEGE_TAB (ROLENAME, PRIVILEGE_ID, PROJECT_ID) VALUES (:rolename, :privilegeid, :projectids)";
     OracleDatabase db = new OracleDatabase(DataAccess.OIDSConnStr);
     DbCommand cmd = db.GetSqlStringCommand(sql);
     db.AddInParameter(cmd, "rolename", DbType.String, roleName);
     db.AddInParameter(cmd, "privilegeid", DbType.Int32, privilegeId);
     db.AddInParameter(cmd, "projectids", DbType.String, projectIDs);
     return db.ExecuteNonQuery(cmd);
 }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:17,代码来源:Role.cs

示例15: ExistModifyDrawing

 /// <summary>
 /// 查看是否存在修改通知单
 /// </summary>
 /// <param name="pid"></param>
 /// <param name="drawingno"></param>
 /// <returns></returns>
 public static bool ExistModifyDrawing(string pid, string drawingno)
 {
     OracleDatabase db = new OracleDatabase(DataAccess.OIDSConnStr);
     string sql = "select t.modifydrawings from plm.SP_CREATEPDFDRAWING t  where t.projectid='" + pid + "' and t.drawingno='" + drawingno + "' and t.FRONTPAGE is not null AND t.FLAG = 'Y'";
     DbCommand cmd = db.GetSqlStringCommand(sql);
     object ret = db.ExecuteScalar(cmd);
     if (ret == null || ret == DBNull.Value)
         return false;
     return true;
 }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:16,代码来源:CreatePDFDrawing.cs


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