Exemplo n.º 1
0
 public void MessageCenter(System.Collections.Generic.List <NoticeRecord> records)
 {
     try
     {
         this.Clear();
         if (records != null && records.Count > 0)
         {
             string Data = null;
             foreach (NoticeRecord record in records)
             {
                 if (record != null)
                 {
                     if (Data == null || !Data.Equals(record.createTime.Substring(0, 10)))
                     {
                         OANoticeRecordDateRow datarow = new OANoticeRecordDateRow(record.createTime.Substring(0, 10));
                         this.trgMessageTable.Rows.Add(datarow);
                         OANoticeRecordItem row = new OANoticeRecordItem(record.createTime, record.message, record.title, record.url);
                         this.trgMessageTable.Rows.Add(row);
                         Data = record.createTime.Substring(0, 10);
                     }
                     else
                     {
                         OANoticeRecordItem row = new OANoticeRecordItem(record.createTime, record.message, record.title, record.url);
                         this.trgMessageTable.Rows.Add(row);
                     }
                 }
             }
             this.DateSelect.Text = Data;
         }
     }
     catch (System.Exception e)
     {
         System.Console.WriteLine(e.ToString());
     }
 }
Exemplo n.º 2
0
        public void NoRecordInit()
        {
            this.tbkTotal.Text = "页/0页";
            this.textPage.Text = "0";
            this.trgMessageTable.Rows.Clear();
            string str = "                              无消息提醒   ";
            OANoticeRecordDateRow row = new OANoticeRecordDateRow(str, true);

            row.Foreground = Brushes.Gray;
            row.FontSize   = 14.0;
            this.trgMessageTable.Rows.Add(row);
        }
 public void MessageCenter(System.Collections.Generic.List<NoticeRecord> records)
 {
     try
     {
         this.Clear();
         if (records != null && records.Count > 0)
         {
             string Data = null;
             foreach (NoticeRecord record in records)
             {
                 if (record != null)
                 {
                     if (Data == null || !Data.Equals(record.createTime.Substring(0, 10)))
                     {
                         OANoticeRecordDateRow datarow = new OANoticeRecordDateRow(record.createTime.Substring(0, 10));
                         this.trgMessageTable.Rows.Add(datarow);
                         OANoticeRecordItem row = new OANoticeRecordItem(record.createTime, record.message, record.title, record.url);
                         this.trgMessageTable.Rows.Add(row);
                         Data = record.createTime.Substring(0, 10);
                     }
                     else
                     {
                         OANoticeRecordItem row = new OANoticeRecordItem(record.createTime, record.message, record.title, record.url);
                         this.trgMessageTable.Rows.Add(row);
                     }
                 }
             }
             this.DateSelect.Text = Data;
         }
     }
     catch (System.Exception e)
     {
         System.Console.WriteLine(e.ToString());
     }
 }
 public void NoRecordInit()
 {
     this.tbkTotal.Text = "页/0页";
     this.textPage.Text = "0";
     this.trgMessageTable.Rows.Clear();
     string str = "                              无消息提醒   ";
     OANoticeRecordDateRow row = new OANoticeRecordDateRow(str, true);
     row.Foreground = Brushes.Gray;
     row.FontSize = 14.0;
     this.trgMessageTable.Rows.Add(row);
 }