private void LogDetails(AlarmDataSet.alarm_phone_queueRow alarm) { var tbl = alarm.Table; for (int c = 0; c < tbl.Columns.Count; c++) { Logger.WriteLine(tbl.Columns[c].ColumnName + ": " + alarm[c].ToString()); } }
/// <summary> /// current_list_index is initilized to -1 in database. /// increment or rollback to zero /// </summary> /// <param name="alarm"></param> /// <param name="numbers"></param> /// <returns></returns> private static int UpdateCurrentPhoneIndex(AlarmDataSet.alarm_phone_queueRow alarm, string[] numbers) { if (numbers.Length == 0) { throw new Exception("Error: no phone numbers... list is empty"); } int rval = alarm.current_list_index + 1; if (alarm.current_list_index < 0 || rval >= numbers.Length) { rval = 0; // start back at beginning. } return(rval); }
private static void UpdatePiscesStatus(AlarmDataSet.alarm_phone_queueRow alarm) { alarm.status = Asterisk.Status; alarm.status_time = Asterisk.StatusTime; alarm.confirmed_by = Asterisk.ConfirmedBy; }