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


C# OracleDatabase.AddInParameter方法代码示例

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


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

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

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

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

示例4: Find

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

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

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

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

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

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

示例13: FindFlagsByRoleName

 /// <summary>
 /// ���ݽ�ɫ���ƻ�ô˽�ɫȨ�ޱ�ʶ
 /// </summary>
 /// <param name="roleName"></param>
 /// <returns></returns>
 public static string FindFlagsByRoleName(string roleName)
 {
     OracleDatabase db = new OracleDatabase(DataAccess.OIDSConnStr);
     string sql = "SELECT PRIVILEGE_FLAGS FROM PLM.ROLE_TAB WHERE ROLENAME=:rolename";
     DbCommand cmd = db.GetSqlStringCommand(sql);
     db.AddInParameter(cmd, "rolename", DbType.String, roleName);
     object flags = db.ExecuteScalar(cmd);
     return (flags == null || flags == DBNull.Value) ? string.Empty : flags.ToString();
 }
开发者ID:freudshow,项目名称:raffles-codes,代码行数:14,代码来源:Role.cs

示例14: FindERPID

 /// <summary>
 /// ����PROJECTNAME��ȡ��Ӧ��ERP����ĿID
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public static string FindERPID(string id)
 {
     //Database db = DatabaseFactory.CreateDatabase();
     OracleDatabase db = new OracleDatabase(DataAccess.OIDSConnStr);
     string sql = "SELECT ERPID FROM plm.project_relation_view WHERE projectname_db=: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

示例15: FindPrivilege

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


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