Exemplo n.º 1
0
        private void LoadLogs()
        {
            jobSys = SmsFactory.getSystem("eJobs");
            //get unset list from db
            DataTable MessageList = jobSys.getLogs();

            //convert datasource to list
            List <DataRow> Messagelist = MessageList.AsEnumerable().ToList();

            LogsTablePanel.RowCount = 0;
            LogsTablePanel.Controls.Clear();
            foreach (DataRow row in MessageList.Rows)
            {
                string notificationID = row["NotficationId"].ToString();
                string serviceId      = row["ServiceId"].ToString();
                string clientName     = row["ClientName"].ToString();
                string message        = row["Message"].ToString();
                string schedule       = row["DTlog"].ToString();
                string status         = row["Status"].ToString();

                LogsControl logs = new LogsControl();
                logs.setDetails(Int32.Parse(notificationID), Int32.Parse(serviceId), clientName, status);

                //SMSinbox msgbox = new SMSinbox();
                //msgbox.setContent(Int32.Parse(notificationID), ClientName, message, Schedule, msgStatus);
                LogsTablePanel.RowCount = LogsTablePanel.RowCount + 1;
                LogsTablePanel.Controls.Add(logs);
            }
        }