private void btn_ofd_exchange_status_Click(object sender, EventArgs e) { txtB_ofd_exchange_status.BackColor = Color.Green; Cash8.FiscallPrintJason.RootObject result = MainStaticClass.get_ofd_exchange_status(); if (result != null) { if (result.results[0].result != null) { if (result.results[0].result.status.notSentCount > 0) { if ((DateTime.Now - result.results[0].result.status.notSentFirstDocDateTime).Days > 3) { txtB_ofd_exchange_status.Text = "Не отправлено документов " + result.results[0].result.status.notSentCount.ToString().Trim() + "\r\n" + " начиная с даты " + result.results[0].result.status.notSentFirstDocDateTime.ToString("yyyy-MM-dd HH:mm:ss"); txtB_ofd_exchange_status.BackColor = Color.Gold; } else { txtB_ofd_exchange_status.Text = "Не отправлено документов " + result.results[0].result.status.notSentCount.ToString().Trim(); } } else { txtB_ofd_exchange_status.Text = "Все отправлено"; } } else { txtB_ofd_exchange_status.Text = "Нет связи"; txtB_ofd_exchange_status.BackColor = Color.Gold; } } else { txtB_ofd_exchange_status.Text = "Нет связи"; txtB_ofd_exchange_status.BackColor = Color.Gold; } }