public Pantalla_Registro_Turno(decimal idP) { InitializeComponent(); idProfesional = idP; var MyReader = new System.Configuration.AppSettingsReader(); fechaHoy = MyReader.GetValue("Datekey", typeof(string)).ToString(); espeAdapter = new GD2C2016DataSetTableAdapters.EspecialidadTableAdapter(); turnosAdapter = new GD2C2016DataSetTableAdapters.TurnosDeProfesionalDelDiaTableAdapter(); espeData = espeAdapter.obtenerEspecialidades(); turnosData = turnosAdapter.obtenerTurnosDeProfesionalDelDia(idProfesional, Convert.ToDateTime(fechaHoy)); foreach (DataRow turno in turnosData.Rows) { dataGridView1.Rows.Add(turno.Field <decimal>("numero"), turno.Field <decimal>("id"), turno.Field <string>("nombre"), turno.Field <string>("apellido"), turno.Field <DateTime>("fecha")); } }
public Pantalla_Registro_Consulta_Principal(decimal idU) { InitializeComponent(); idUser = idU; turnosAdapter = new GD2C2016DataSetTableAdapters.TurnosDeProfesionalDelDiaTableAdapter(); var MyReader = new System.Configuration.AppSettingsReader(); fechaHoy = MyReader.GetValue("Datekey", typeof(string)).ToString(); turnosData = turnosAdapter.obtenerTurnosDeProfesionalDelDiaParaRegistroConsulta(idUser, Convert.ToDateTime(fechaHoy)); foreach (DataRow turno in turnosData.Rows) { dataGridView1.Rows.Add(turno.Field <decimal>("numero"), turno.Field <decimal>("numero_afiliado"), turno.Field <string>("nombre"), turno.Field <string>("apellido"), turno.Field <DateTime>("fecha")); } }