} // MAlertProcessorLog public MAlertProcessorLog(MAlertProcessor parent, String summary) : this(parent.GetCtx(), 0, parent.Get_TrxName()) { SetClientOrg(parent); SetAD_AlertProcessor_ID(parent.GetAD_AlertProcessor_ID()); SetSummary(summary); } // MAlertProcessorLog
public static MAlertProcessor[] GetActive(Ctx ctx) { List <MAlertProcessor> list = new List <MAlertProcessor>(); String sql = "SELECT * FROM AD_AlertProcessor WHERE IsActive='Y'"; try { DataSet ds = DB.ExecuteDataset(sql); foreach (DataRow dr in ds.Tables[0].Rows) { list.Add(new MAlertProcessor(ctx, dr, null)); } } catch (Exception e) { s_log.Log(Level.SEVERE, sql, e); } MAlertProcessor[] retValue = new MAlertProcessor[list.Count()]; retValue = list.ToArray(); return(retValue); } // getActive
public static MAlertProcessor[] GetActive(Ctx ctx) { List <MAlertProcessor> list = new List <MAlertProcessor>(); String sql = "SELECT * FROM AD_AlertProcessor WHERE IsActive='Y'"; //Changed By Karan..... string scheduleIP = null; try { string machineIP = System.Net.Dns.GetHostEntry(Environment.MachineName).AddressList[0].ToString(); DataSet ds = DB.ExecuteDataset(sql); foreach (DataRow dr in ds.Tables[0].Rows) { scheduleIP = Util.GetValueOfString(DB.ExecuteScalar(@"SELECT RunOnlyOnIP FROM AD_Schedule WHERE AD_Schedule_ID = (SELECT AD_Schedule_ID FROM AD_AlertProcessor WHERE AD_AlertProcessor_ID =" + dr["AD_AlertProcessor_ID"] + " )")); //if (string.IsNullOrEmpty(scheduleIP) || machineIP.Contains(scheduleIP) || machineIPPort.Contains(scheduleIP)) if (string.IsNullOrEmpty(scheduleIP) || machineIP.Contains(scheduleIP)) { list.Add(new MAlertProcessor(new Ctx(), dr, null)); } } ds = null; //foreach(DataRow dr in ds.Tables[0].Rows) // list.Add(new MAlertProcessor(ctx, dr, null)); } catch (Exception e) { s_log.Log(Level.SEVERE, sql, e); } MAlertProcessor[] retValue = new MAlertProcessor[list.Count()]; retValue = list.ToArray(); return(retValue); } // getActive