Пример #1
0
 private void Limpiar()
 {
     FechaLabel.Text         = FechaLabel.Text;
     IdTextBox.Text          = string.Empty;
     CentroSaludTextBox.Text = "";
     ProvinciaDropDownList.ClearSelection();
     MunicipioDropDownList.ClearSelection();
     PacienteDropDownList.ClearSelection();
     VacunaDropDownList.ClearSelection();
     DosisTextBox.Text            = string.Empty;
     FechaVacunaTextBox.Text      = string.Empty;
     HistorialGridView.DataSource = null;
     HistorialGridView.DataBind();
 }
Пример #2
0
 private void LlenarCampos(Historiales historial)
 {
     IdTextBox.Text                      = historial.HistorialId.ToString();
     FechaLabel.Text                     = historial.Fecha;
     CentroSaludTextBox.Text             = historial.CentroSalud;
     ProvinciaDropDownList.SelectedIndex = historial.ProvinciaId;
     MunicipioDropDownList.SelectedIndex = historial.MunicipioId;
     PacienteDropDownList.SelectedIndex  = historial.PacienteId;
     //foreach (GridViewRow item in HistorialGridView.Rows)
     //{
     //    historial.AgregarVacuna(Utility.ConvertirToInt(item.Cells[0].Text), Utility.ConvertirToInt(item.Cells[1].Text), item.Cells[2].Text);
     //}
     HistorialGridView.DataSource = historial.historialVacuna;
     HistorialGridView.DataBind();
 }
Пример #3
0
        protected void AgregarButton_Click(object sender, EventArgs e)
        {
            if (Session["historial"] == null)
            {
                Session["historial"] = new Historiales();
            }

            DataTable dt = (DataTable)Session["historial"];

            dt.Rows.Add(Utility.ConvertirToInt(VacunaDropDownList.Text), Utility.ConvertirToInt(DosisTextBox.Text), FechaVacunaTextBox.Text);

            Session["historial"] = dt;

            HistorialGridView.DataSource = dt;
            HistorialGridView.DataBind();
        }