Example #1
0
        private void MostrarTurnosDelDia()
        {
            DataTable tabla = new DataTable();

            tabla = Turnos.GetTurnosDelDia();
            GrdTurnos.DataSource          = tabla;
            GrdTurnos.Columns[10].Visible = false;
            GrdTurnos.Columns[11].Visible = false;
            GrdTurnos.Columns[12].Visible = false;

            foreach (DataGridViewRow row in GrdTurnos.Rows)
            {
                if (Convert.ToBoolean(row.Cells[11].Value.ToString()) && Convert.ToBoolean(row.Cells[12].Value.ToString()))
                {
                    row.DefaultCellStyle.BackColor = Color.Red;
                }
                else if (Convert.ToBoolean(row.Cells[11].Value.ToString()))
                {
                    row.DefaultCellStyle.BackColor = Color.LightBlue;
                }
            }
        }