private void RefreshGridView() { string aptDate = Request.QueryString["aptDate"]; List <Appointment> aList = new List <Appointment>(); aList = client.GetAllAppointmentByTodayDateAscend(aptDate).ToList <Appointment>(); //aList = client.GetAllAppointmentByTodayDateAscend().ToList<Appointment>(); GV_appointment.Visible = true; GV_appointment.DataSource = aList; GV_appointment.DataBind(); }
private void RefreshGridView() { List <string> aList = new List <string>(); aList = client.selectAllAppointmentDateAscend().ToList <string>(); DataTable dt = new DataTable(); dt.Columns.AddRange(new DataColumn[2] { new DataColumn("aptDate"), new DataColumn("count") }); foreach (string aptDate in aList) { int count = client.selectCountByDate(aptDate); dt.Rows.Add(aptDate, count); } //aList = client.GetAllAppointmentByTodayDateAscend().ToList<Appointment>(); GV_appointment.Visible = true; GV_appointment.DataSource = dt; GV_appointment.DataBind(); }