Пример #1
0
 /// <summary>
 /// Parent Constructor
 /// </summary>
 /// <param name="parent">parent</param>
 /// <param name="summary">summary</param>
 public MLdapProcessorLog(MLdapProcessor parent, String summary)
     : this(parent.GetCtx(), 0, null)
 {
     SetClientOrg(parent);
     SetAD_LdapProcessor_ID(parent.GetAD_LdapProcessor_ID());
     SetSummary(summary);
 } //	MLdapProcessorLog
Пример #2
0
        /// <summary>
        ///	Get Active LDAP Server
        /// </summary>
        /// <param name="ctx">ctx</param>
        /// <returns>array of Servers</returns>
        public static MLdapProcessor[] GetActive(Ctx ctx)
        {
            List <MLdapProcessor> list = new List <MLdapProcessor>();
            String      sql            = "SELECT * FROM AD_LdapProcessor WHERE IsActive='Y'";
            IDataReader idr            = null;
            DataTable   dt             = null;

            try
            {
                //pstmt = DataBase.prepareStatement (sql, null);
                idr = DataBase.DB.ExecuteReader(sql, null, null);
                dt  = new DataTable();
                dt.Load(idr);
                idr.Close();
                foreach (DataRow dr in dt.Rows)
                {
                    list.Add(new MLdapProcessor(ctx, dr, null));
                }
                dt = null;
            }
            catch (Exception e)
            {
                if (idr != null)
                {
                    idr.Close();
                }
                if (dt != null)
                {
                    dt = null;
                }
                _log.Log(Level.SEVERE, sql, e);
            }

            MLdapProcessor[] retValue = new MLdapProcessor[list.Count];
            retValue = list.ToArray();
            return(retValue);
        }       //	getActive