예제 #1
0
        private void AdminPanel_Load(object sender, EventArgs e)
        {
            System.Timers.Timer timer = new System.Timers.Timer();
            timer.Interval = 1000;
            timer.Elapsed += Timer_Elapsed;
            timer.Start();

            DateTime dt       = DateTime.Now;
            DateTime dateOnly = dt.Date;

            lblDate.Text = dateOnly.ToString();

            string name = lp.GetName(userId);

            lblName.Text = name.ToString();

            DataTable wdt = warn.GetData();

            if (wdt.Rows.Count == 0)
            {
                btnWarning.ForeColor = Color.White;
            }
            else
            {
                Color co = Color.FromArgb(242, 16, 16);
                btnWarning.ForeColor = co;
            }
        }