本文整理汇总了C#中Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDatabase类的典型用法代码示例。如果您正苦于以下问题:C# OracleDatabase类的具体用法?C# OracleDatabase怎么用?C# OracleDatabase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OracleDatabase类属于Microsoft.Practices.EnterpriseLibrary.Data.Oracle命名空间,在下文中一共展示了OracleDatabase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: ExistInfo
/// <summary>
/// 查看合并生成图纸表中是否存在该项
/// </summary>
/// <param name="pid"></param>
/// <param name="drawingno"></param>
/// <returns></returns>
public static bool ExistInfo(string pid,string drawingno)
{
OracleDatabase db = new OracleDatabase(DataAccess.OIDSConnStr);
string sql = "select count(*) from plm.SP_CREATEPDFDRAWING t where t.projectid='"+pid+"' and t.drawingno='"+drawingno+"' AND t.FLAG = 'Y'";
DbCommand cmd = db.GetSqlStringCommand(sql);
object ret = db.ExecuteScalar(cmd);
int num = Convert.ToInt32(ret);
if (num==0)
return false;
return true;
}
开发者ID:freudshow,项目名称:raffles-codes,代码行数:17,代码来源:CreatePDFDrawing.cs
示例17: ExistPrivilege
/// <summary>
/// �ڵ��Ƿ��и�Ȩ������
/// </summary>
/// <returns></returns>
public static bool ExistPrivilege(int privilegeid,int nodeid)
{
OracleDatabase db = new OracleDatabase(DataAccess.OIDSConnStr);
//OracleDatabase db = new OracleDatabase(UserSecurity.ConnectionString);
string sql = "SELECT * FROM PLM.PRIVILEGE_NODE_TAB WHERE PRIVILEGE_ID=:privilegeid AND NODE_ID=:nodeid";
DbCommand cmd = db.GetSqlStringCommand(sql);
db.AddInParameter(cmd, "privilegeid", DbType.Int32, privilegeid);
db.AddInParameter(cmd, "nodeid", DbType.Int32, nodeid);
object ret = db.ExecuteScalar(cmd);
if (ret == null || ret == DBNull.Value) return false;
return true;
}
开发者ID:freudshow,项目名称:raffles-codes,代码行数:16,代码来源:PrivilegeNode.cs
示例18: AddInherit
/// <summary>
/// ��ӽ�ɫ�̳�
/// </summary>
/// <param name="roleName"></param>
/// <param name="inheritRoleName"></param>
/// <returns></returns>
public static void AddInherit(string roleName, string[] inheritRoleName)
{
string sql = "INSERT INTO PLM.ROLEINHERIT_TAB (ROLENAME, INHERITNAME) VALUES (:rolename, :inheritname)";
OracleDatabase db = new OracleDatabase(DataAccess.OIDSConnStr);
DbCommand cmd = db.GetSqlStringCommand(sql);
db.AddInParameter(cmd, "rolename", DbType.String, roleName);
foreach (string inheritName in inheritRoleName)
{
if (inheritName == string.Empty) continue;
if (cmd.Parameters.Contains("inheritname")) cmd.Parameters.RemoveAt("inheritname");
db.AddInParameter(cmd, "inheritname", DbType.String, inheritName);
db.ExecuteNonQuery(cmd);
}
}
开发者ID:freudshow,项目名称:raffles-codes,代码行数:20,代码来源:Role.cs
示例19: 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
示例20: DrawingAllowedFlag
/// <summary>
/// ���ݽ�ɫ��ͼֽ��Ż�ȡ�Ƿ�������ʱ�ʶ
/// </summary>
/// <param name="roleName"></param>
/// <param name="drawingId"></param>
/// <returns></returns>
public static string DrawingAllowedFlag(string roleName, int drawingId)
{
OracleDatabase db = new OracleDatabase(DataAccess.OIDSConnStr);
string sql = "SELECT ALLOW_FLAG FROM PLM.ROLEINDRAWING_TAB WHERE ROLENAME=:rolename AND DRAWING_ID=:drawingid";
DbCommand cmd = db.GetSqlStringCommand(sql);
db.AddInParameter(cmd, "rolename", DbType.String, roleName);
db.AddInParameter(cmd, "drawingid", DbType.Int32, drawingId);
object allowFlag = db.ExecuteScalar(cmd);
if (allowFlag == DBNull.Value || allowFlag == null) return string.Empty;
return allowFlag.ToString();
}
开发者ID:freudshow,项目名称:raffles-codes,代码行数:18,代码来源:Role.cs
注:本文中的Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDatabase类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论