Exemple #1
0
        public static CustomList <TempRuleDetails> GetAllSecurityRule_ObjectWithApplicationID(string applicationID)
        {
            ConnectionManager            conManager = new ConnectionManager(ConnectionName.SysMan);
            CustomList <TempRuleDetails> SecurityRule_ObjectCollection = new CustomList <TempRuleDetails>();
            IDataReader reader = null;
            String      sql    = "Select * from SecurityRule_Object where ApplicationID='" + applicationID + "'";

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    TempRuleDetails newSecurityRule_Object = new TempRuleDetails();
                    newSecurityRule_Object.SetData(reader);
                    SecurityRule_ObjectCollection.Add(newSecurityRule_Object);
                }
                SecurityRule_ObjectCollection.InsertSpName = "spInsertSecurityRule_Object";
                SecurityRule_ObjectCollection.UpdateSpName = "spUpdateSecurityRule_Object";
                SecurityRule_ObjectCollection.DeleteSpName = "spDeleteSecurityRule_Object";
                return(SecurityRule_ObjectCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
 public static CustomList<TempRuleDetails> GetAllSecurityRule_ObjectWithSecurityRule(string securityRuleCode)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.SysMan);
     CustomList<TempRuleDetails> SecurityRule_ObjectCollection = new CustomList<TempRuleDetails>();
     IDataReader reader = null;
     String sql = "Select * from SecurityRule_Object where SecurityRuleCode='" + securityRuleCode + "'";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             TempRuleDetails newSecurityRule_Object = new TempRuleDetails();
             newSecurityRule_Object.SetData(reader);
             SecurityRule_ObjectCollection.Add(newSecurityRule_Object);
         }
         SecurityRule_ObjectCollection.InsertSpName = "spInsertSecurityRule_Object";
         SecurityRule_ObjectCollection.UpdateSpName = "spUpdateSecurityRule_Object";
         SecurityRule_ObjectCollection.DeleteSpName = "spDeleteSecurityRule_Object";
         return SecurityRule_ObjectCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }