예제 #1
0
        public void registrar_laboratorio(LaboratorioEnt l)
        {
            SqlConnection cn = Conexion.getCadenaConexion();

            try
            {
                using (SqlDataAdapter da = new SqlDataAdapter("USP_REGISTRAR_LABORATORIO", cn))
                {
                    da.SelectCommand.CommandType = CommandType.StoredProcedure;
                    da.SelectCommand.Parameters.Clear();
                    da.SelectCommand.Parameters.AddWithValue("@RAZON_SOCIAL", l.RAZON_SOCIAL1);
                    da.SelectCommand.Parameters.AddWithValue("@UBICACION", l.UBICACION1);
                    da.SelectCommand.Parameters.AddWithValue("@TELEFONO", l.TELEFONO1);
                    da.SelectCommand.Parameters.AddWithValue("@HORA_ATENCION", l.HORA_ATENCION1);
                    da.SelectCommand.Parameters.AddWithValue("@DIRECTOR", l.DIRECTOR1);
                    cn.Open();
                    da.SelectCommand.ExecuteNonQuery();
                    cn.Close();
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #2
0
        private void registrar_lab()
        {
            l = new LaboratorioEnt();
            l.RAZON_SOCIAL1  = txtRazonsocial.Text;
            l.UBICACION1     = txtUbicacion.Text;
            l.TELEFONO1      = txtTelefono.Text;
            l.HORA_ATENCION1 = txtHoraatencion.Text;
            l.DIRECTOR1      = txtDirector.Text;

            rneg.registrar_laboratorio(l);
            MessageBox.Show("Laboratorio registrador correctamente");
        }
예제 #3
0
 public void registrar_laboratorio(LaboratorioEnt l)
 {
     rdao.registrar_laboratorio(l);
 }