Пример #1
0
 public ExamenGabineteUI(bool isNuevoX, HistoriaClinicaUI historiaClinicaX, int idHC,ExamenGabineteVO examenGabineteX)
 {
     InitializeComponent();
     historiaClinicaUI = historiaClinicaX;
     examenGabinete = examenGabineteX;
     idHistoriaClinica = idHC;
     IsNuevo = isNuevoX;
 }
        public void ModificarExamenGabinete(ExamenGabineteVO ExamenGabinete)
        {

            con.Open();

            SqlCommand command = new SqlCommand("spr_ModificarExamenGabinete", con);

            command.CommandType = System.Data.CommandType.StoredProcedure;

            command.Parameters.AddWithValue("@idExamenGabinete", ExamenGabinete.idExamenGabinete);
            command.Parameters.AddWithValue("@observaciones", ExamenGabinete.observaciones);
            command.Parameters.AddWithValue("@idHistoriaClinica", ExamenGabinete.idHistoriaClinica);
            command.Parameters.AddWithValue("@idTipoExamen", ExamenGabinete.idTipoExamen);
            command.Parameters.AddWithValue("@fecha", ExamenGabinete.fecha);

            command.ExecuteNonQuery();

            con.Close();

        }
        public int AgregarExamenGabinete(ExamenGabineteVO ExamenGabinete)
        {

            con.Open();

            SqlCommand command = new SqlCommand("spr_AgregarExamenGabinete", con);

            command.CommandType = System.Data.CommandType.StoredProcedure;

            command.Parameters.AddWithValue("@observaciones", ExamenGabinete.observaciones);
            command.Parameters.AddWithValue("@idHistoriaClinica", ExamenGabinete.idHistoriaClinica);
            command.Parameters.AddWithValue("@idTipoExamen", ExamenGabinete.idTipoExamen);
            command.Parameters.AddWithValue("@fecha", ExamenGabinete.fecha);

            int idExamenGabinete = Convert.ToInt32(command.ExecuteScalar());

            con.Close();
            return idExamenGabinete;

        }
Пример #4
0
 private void AgregarExamenDeGabinete()
 {
     try
     {
         ExamenGabineteVO examenG = new ExamenGabineteVO();
         examenG.idExamenGabinete = examenG.idExamenGabinete;
         examenG.idTipoExamen = Convert.ToInt32(cboTipoExamen.SelectedValue);
         examenG.idHistoriaClinica = idHistoriaClinica;
         examenG.fecha = dtFechaExamen.Value;
         examenG.observaciones = txtObservaciones.Text;
         int id = new ExamenGabineteBUS().AgregarExamen(examenG);
         AuditoriaVO auditoria = new AuditoriaVO();
         auditoria.idEmpleado = PrincipalUI.idEmpleadogbl;
         auditoria.idRegistro = id;
         auditoria.tabla = "ExamenGabinete";
         auditoria.tipo = "INSERT";
         auditoria.fecha = DateTime.Now.ToLocalTime();
         new AuditoriaBUS().AgregarAuditoria(auditoria);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 public void ModificarExamen(ExamenGabineteVO examen)
 {
     new ExamenGabineteDAL().ModificarExamenGabinete(examen);
 }
 public int AgregarExamen(ExamenGabineteVO examen)
 {
     return new ExamenGabineteDAL().AgregarExamenGabinete(examen);
 }