Abdalla Elawad

Abdalla Elawad

  • NA
  • 1k
  • 215.1k

How display color to numbers of days in a month

Sep 29 2016 3:46 AM
string date = TextBox2.Text;
DateTime dt1 = DateTime.ParseExact(date, "dd/MM/yyyy", CultureInfo.InvariantCulture);
TextBox3.Text = dt1.AddDays(30).ToString("dd/MM/yyyy");
if (dt1.Day == 29)
Label1.BackColor = Color.Red;
Label1.Text = "Bad Status of Team Working Now";
if (dt1.Day == 30)
Label1.BackColor = Color.Green;
Label1.Text = "Good Status of Team Working Now";
if (dt1.Day == 27)
Label1.BackColor = Color.Yellow;
Label1.ForeColor = Color.Red;
Label1.Text = "Start to change Status of Team Working Now";
 
above code working good  

Answers (1)