public void Agregar() { Clases.Conexion conexion = new Clases.Conexion(); SqlCommand cmd = new SqlCommand("SP_InsertarUsuario", conexion.conexion); cmd.CommandType = CommandType.StoredProcedure; try { conexion.Abrir(); cmd.Parameters.Add(new SqlParameter("Nombre", SqlDbType.NVarChar, 25)); cmd.Parameters["nombre"].Value = this.nombre; cmd.Parameters.Add(new SqlParameter("Apellido", SqlDbType.NVarChar, 25)); cmd.Parameters["apellido"].Value = this.apellido; cmd.Parameters.Add(new SqlParameter("Clave", SqlDbType.NVarChar, 20)); cmd.Parameters["clave"].Value = this.clave; cmd.Parameters.Add(new SqlParameter("idRol", SqlDbType.Int)); cmd.Parameters["idRol"].Value = this.rol; cmd.ExecuteNonQuery(); } catch (SqlException ex) { throw ex; } finally { conexion.Cerrar(); } }
public static DataView GetDataViewInsumo(string descripcion) { Clases.Conexion conexion = new Clases.Conexion(); string sql = @"SELECT Restaurante.Insumos.idInsumo as Código, Restaurante.Insumos.nombre as Insumo, Restaurante.Insumos.costo as Costo, Restaurante.Insumos.cantidad as Cantidad, Restaurante.TipoUnidad.descripcion as Unidad FROM Restaurante.TipoUnidad INNER JOIN Restaurante.Insumos ON Restaurante.TipoUnidad.idTipoUnidad = Restaurante.Insumos.idTipoUnidad WHERE nombre = '" + descripcion + "'; "; try { SqlDataAdapter data = new SqlDataAdapter(); data.SelectCommand = new SqlCommand(sql, conexion.conexion); DataSet ds = new DataSet(); data.Fill(ds, "Restaurante.Insumos"); DataTable dt = ds.Tables["Restaurante.Insumos"]; DataView dv = new DataView(dt, "", "Código", DataViewRowState.Unchanged); return(dv); } catch (SqlException ex) { throw ex; } finally { conexion.Cerrar(); } }
public void Modificar() { Clases.Conexion conexion = new Clases.Conexion(); SqlCommand cmd = new SqlCommand("SP_ModificarArea", conexion.conexion); cmd.CommandType = CommandType.StoredProcedure; try { conexion.Abrir(); cmd.Parameters.Add(new SqlParameter("id", SqlDbType.Int)); cmd.Parameters["id"].Value = Id; cmd.Parameters.Add(new SqlParameter("nombre", SqlDbType.NVarChar, 50)); cmd.Parameters["nombre"].Value = Nombre; cmd.Parameters.Add(new SqlParameter("numeroMesas", SqlDbType.TinyInt)); cmd.Parameters["numeroMesas"].Value = NumeroMesas; cmd.ExecuteNonQuery(); } catch (SqlException ex) { throw ex; } finally { conexion.Cerrar(); } }
public static DataView GetDataView() { Clases.Conexion conexion = new Clases.Conexion(); //colocar el nombre del area a la cual pertenece el usuario en el strin de conexion string sql = @"SELECT Acceso.Usuarios.id as Código, Acceso.Usuarios.nombre as Nombre, Acceso.Usuarios.apellido as Apellido, Acceso.Usuarios.usuario as Usuario FROM Acceso.Usuarios;"; try { SqlDataAdapter data = new SqlDataAdapter(); data.SelectCommand = new SqlCommand(sql, conexion.conexion); DataSet ds = new DataSet(); data.Fill(ds, "Acceso.Usuarios"); DataTable dt = ds.Tables["Acceso.Usuarios"]; DataView dv = new DataView(dt, "", "Código", DataViewRowState.Unchanged); return(dv); } catch (SqlException ex) { throw ex; } finally { conexion.Cerrar(); } }
/// <summary> /// Devuelve una matricula según el estudiante, curso y periodo /// </summary> /// <param name="MatriculaConsulta">Objeto de tipo Matricula que contiene los datos de matricula a consultar</param> /// <returns></returns> public DataTable GetMatriculaPorEstudianteCursoPeriodo(Clases.Matricula MatriculaConsulta) { #region :-: Clases Utilizadas :-: Clases.Conexion ClaseConexion = new Clases.Conexion(); #endregion #region :-: Variables Utilizadas :-: DataTable DtGuia = new DataTable(); #endregion ClaseConexion.ConectarABase(); using (SqlCommand ComandoParaConsulta = new SqlCommand()) { ComandoParaConsulta.Connection = ClaseConexion.Conectar; ComandoParaConsulta.CommandType = CommandType.StoredProcedure; ComandoParaConsulta.CommandText = "SP_Matricula_Cargar_Por_Estudiante_Curso_Periodo"; ComandoParaConsulta.Parameters.AddWithValue("@Cedula_Alumno", MatriculaConsulta.Cedula_Alumno); ComandoParaConsulta.Parameters.AddWithValue("@Id_Curso", MatriculaConsulta.Id_Curso); ComandoParaConsulta.Parameters.AddWithValue("@Id_Periodo", MatriculaConsulta.Id_Periodo); DtGuia = ClaseConexion.CargarDatatableConProcedimiento(ComandoParaConsulta); } return DtGuia; }
public void Modificar() { Clases.Conexion conexion = new Clases.Conexion(); SqlCommand cmd = new SqlCommand("SP_ModificarInsumosProductos", conexion.conexion); cmd.CommandType = CommandType.StoredProcedure; try { conexion.Abrir(); cmd.Parameters.Add(new SqlParameter("idInsumoProducto", SqlDbType.Int)); cmd.Parameters["idInsumoProducto"].Value = IdInsumoProducto; cmd.Parameters.Add(new SqlParameter("idInsumo", SqlDbType.Int)); cmd.Parameters["idInsumo"].Value = IdInsumo; cmd.Parameters.Add(new SqlParameter("idInventario", SqlDbType.Int)); cmd.Parameters["idInventario"].Value = IdInventario; cmd.Parameters.Add(new SqlParameter("cantidad", SqlDbType.Decimal)); cmd.Parameters["cantidad"].Value = Cantidad; cmd.ExecuteNonQuery(); } catch (SqlException ex) { throw new Clases.Exepcion(ex.Message, ex, "Clase_InsumosProductos"); } finally { conexion.Cerrar(); } }
private void EscanearPL_Load(object sender, EventArgs e) { _con = new MaterialCore.Clases.Conexion(); this.sku_escanearTableAdapter.Fill(this.embarques.sku_escanear, 70, chkEscaneados.Checked); if (_Nid_sku != "") //modo automatico { txtBuscarsku.Text = _Nid_sku; btnBuscar_Click(0, e); if (!ErrorAuto) { dgvEscanear.Enabled = false; txtBuscarsku.Enabled = false; btnBuscar.Enabled = false; groupBox1.Visible = false; if (Digitalizar()) { btnAsosiar_Click(0, e); } } else { this.Close(); } // btnAsosiar.Focus(); } }
public void Modificar() { Clases.Conexion conexion = new Clases.Conexion(); SqlCommand cmd = new SqlCommand("SP_ModificarMesero", conexion.conexion); cmd.CommandType = CommandType.StoredProcedure; try { conexion.Abrir(); cmd.Parameters.Add(new SqlParameter("id", SqlDbType.Int)); cmd.Parameters["id"].Value = Id; cmd.Parameters.Add(new SqlParameter("identidad", SqlDbType.NVarChar, 15)); cmd.Parameters["identidad"].Value = Identidad; cmd.Parameters.Add(new SqlParameter("nombre", SqlDbType.NVarChar, 25)); cmd.Parameters["nombre"].Value = Nombre; cmd.Parameters.Add(new SqlParameter("apellido", SqlDbType.NVarChar, 25)); cmd.Parameters["apellido"].Value = Apellido; cmd.ExecuteNonQuery(); } catch (SqlException ex) { throw ex; } finally { conexion.Cerrar(); } }
/// <summary> /// Devuelve un periodo según su Id /// </summary> /// <param name="PeriodoConsulta">Objeto de tipo Periodo que contiene el Id del periodo a consultar</param> /// <returns></returns> public DataTable GetPeriodoPorId(Clases.Periodo PeriodoConsulta) { #region :-: Clases Utilizadas :-: Clases.Conexion ClaseConexion = new Clases.Conexion(); #endregion #region :-: Variables Utilizadas :-: DataTable DtGuia = new DataTable(); #endregion ClaseConexion.ConectarABase(); using (SqlCommand ComandoParaConsulta = new SqlCommand()) { ComandoParaConsulta.Connection = ClaseConexion.Conectar; ComandoParaConsulta.CommandType = CommandType.StoredProcedure; ComandoParaConsulta.CommandText = "SP_Periodo_Cargar_Por_Id_Periodo"; ComandoParaConsulta.Parameters.AddWithValue("@Id_Periodo", PeriodoConsulta.Id_Periodo); DtGuia = ClaseConexion.CargarDatatableConProcedimiento(ComandoParaConsulta); } return DtGuia; }
public static DataView GetDataView() { Clases.Conexion conexion = new Clases.Conexion(); string sql = @"SELECT Restaurante.CategoriaProducto.idCategoria as Código, Restaurante.CategoriaProducto.descripcion as Descripción FROM Restaurante.CategoriaProducto"; try { SqlDataAdapter data = new SqlDataAdapter(); data.SelectCommand = new SqlCommand(sql, conexion.conexion); DataSet ds = new DataSet(); data.Fill(ds, "Restaurante.CategoriaProducto"); DataTable dt = ds.Tables["Restaurante.CategoriaProducto"]; DataView dv = new DataView(dt, "", "Código", DataViewRowState.Unchanged); return(dv); } catch (SqlException ex) { throw ex; } finally { conexion.Cerrar(); } }
public void Modificar() { Clases.Conexion conexion = new Clases.Conexion(); SqlCommand cmd = new SqlCommand("SP_ModificarProveedor", conexion.conexion); cmd.CommandType = CommandType.StoredProcedure; try { conexion.Abrir(); cmd.Parameters.Add(new SqlParameter("idProveedor", SqlDbType.Int)); cmd.Parameters["idProveedor"].Value = Id; cmd.Parameters.Add(new SqlParameter("nombre", SqlDbType.NVarChar, 100)); cmd.Parameters["nombre"].Value = Nombre; cmd.Parameters.Add(new SqlParameter("telefono", SqlDbType.NVarChar, 9)); cmd.Parameters["telefono"].Value = this.Telefono; cmd.Parameters.Add(new SqlParameter("direccion", SqlDbType.NVarChar, 300)); cmd.Parameters["direccion"].Value = this.Direccion; cmd.ExecuteNonQuery(); } catch (SqlException ex) { throw ex; } finally { conexion.Cerrar(); } }
public void Agregar() { Clases.Conexion conexion = new Clases.Conexion(); SqlCommand cmd = new SqlCommand("SP_AgregarInsumo", conexion.conexion); cmd.CommandType = CommandType.StoredProcedure; try { conexion.Abrir(); cmd.Parameters.Add(new SqlParameter("nombre", SqlDbType.NVarChar, 100)); cmd.Parameters["nombre"].Value = Nombre; cmd.Parameters.Add(new SqlParameter("costo", SqlDbType.Decimal)); cmd.Parameters["costo"].Value = Costo; cmd.Parameters.Add(new SqlParameter("cantidad", SqlDbType.Decimal)); cmd.Parameters["cantidad"].Value = Cantidad; cmd.Parameters.Add(new SqlParameter("cantidadMinima", SqlDbType.Decimal)); cmd.Parameters["cantidadMinima"].Value = CantidadMinima; cmd.Parameters.Add(new SqlParameter("idTipoUnidad", SqlDbType.Int)); cmd.Parameters["idTipoUnidad"].Value = IdTipoUnidad; cmd.Parameters.Add(new SqlParameter("descripcion", SqlDbType.NVarChar, 200)); cmd.Parameters["descripcion"].Value = Descripcion; cmd.Parameters.Add(new SqlParameter("idProveedor", SqlDbType.Int)); cmd.Parameters["idProveedor"].Value = IdProveedor; cmd.ExecuteNonQuery(); } catch (SqlException ex) { throw new Clases.Exepcion(ex.Message, ex, "Clase_Insumo"); } finally { conexion.Cerrar(); } }
public static DataView GetDataView() { Clases.Conexion conexion = new Clases.Conexion(); //colocar el nombre del area a la cual pertenece el usuario en el string de conexion string sql = @"SELECT Restaurante.Areas.id as Código, Restaurante.Areas.nombre as Areas, Restaurante.Areas.numeroMesas as [Número Mesas] FROM Restaurante.Areas"; try { SqlDataAdapter data = new SqlDataAdapter(); data.SelectCommand = new SqlCommand(sql, conexion.conexion); DataSet ds = new DataSet(); data.Fill(ds, "Restaurante.Areas"); DataTable dt = ds.Tables["Restaurante.Areas"]; DataView dv = new DataView(dt, "", "Código", DataViewRowState.Unchanged); return(dv); } catch (SqlException ex) { throw ex; } finally { conexion.Cerrar(); } }
public static DataTable GetDataTableUsuarios() { DataTable dt = new DataTable(); Clases.Conexion conexion = new Clases.Conexion(); string sql = "select usuario FROM Acceso.Usuarios"; SqlCommand cmd = new SqlCommand(sql, conexion.conexion); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(dt); return(dt); }
public int Guardar() { DataSet DS; Clases.Conexion Conexion = new Clases.Conexion(); Conexion.EjecutarScript("insert into salidas (idusuario, iddepartamento, fecha, cant_total)" + " values (" + IdUsuario + ", " + IdDepart + ", Convert(char(19), '" + Fecha.ToShortDateString() + "'), " + CantidadTotal + ")"); DS = Conexion.ExtraeraDataSet("select * from salidas"); IdSalida = DS.Tables[0].Rows.Count; IdSalida = Convert.ToInt32(DS.Tables[0].Rows[IdSalida - 1]["idsalida"]); return(IdSalida); }
public static DataTable GetDataTableRol() { DataTable dt = new DataTable(); Clases.Conexion conexion = new Clases.Conexion(); string sql = "select departamento FROM Acceso.TipoAcceso"; SqlCommand cmd = new SqlCommand(sql, conexion.conexion); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(dt); return(dt); }
private void Recepcion_Load(object sender, EventArgs e) { this.Cursor = Cursors.WaitCursor; // TODO: This line of code loads data into the 'core_v2DataSet.EmbarquesZodiac' table. You can move, or remove it, as needed. this.embarquesZodiacTableAdapter.FillEmbarques(this.core_v2DataSet.EmbarquesZodiac); CargarDatos(); _con = new MaterialCore.Clases.Conexion(); directorio = ConfigurationManager.AppSettings["dirOUT"].ToString(); this.Cursor = Cursors.WaitCursor; Tamaño(); Colores(); this.Cursor = Cursors.Default; }
public static DataView GetDataView(int IdInventario) { Clases.Conexion conexion = new Clases.Conexion(); //string sql = @"SELECT Restaurante.InsumosProductos.idInsumoProducto as Código, // Restaurante.InsumosProductos.idInsumo as Insumo, // Restaurante.InsumosProductos.idInventario as Producto, // Restaurante.InsumosProductos.cantidad as Cantidad // FROM Restaurante.InsumosProductos // WHERE idInventario = '" + IdInventario + "'; "; string sql = @"SELECT Restaurante.InsumosProductos.idInsumoProducto as Código, Restaurante.Insumos.nombre as Insumo, Restaurante.Inventario.descripcion as Producto, Restaurante.InsumosProductos.cantidad as Cantidad FROM Restaurante.Inventario INNER JOIN Restaurante.InsumosProductos ON Restaurante.Inventario.idInventario = Restaurante.InsumosProductos.idInventario INNER JOIN Restaurante.Insumos ON Restaurante.Insumos.idInsumo = Restaurante.InsumosProductos.idInsumo WHERE Restaurante.InsumosProductos.idInventario = '" + IdInventario + "'; "; try { SqlDataAdapter data = new SqlDataAdapter(); data.SelectCommand = new SqlCommand(sql, conexion.conexion); DataSet ds = new DataSet(); data.Fill(ds, "Restaurante.InsumosProductos"); DataTable dt = ds.Tables["Restaurante.InsumosProductos"]; DataView dv = new DataView(dt, "", "Código", DataViewRowState.Unchanged); return(dv); } catch (SqlException ex) { throw ex; } finally { conexion.Cerrar(); } }
public static DataView GetDataView() { Clases.Conexion conexion = new Clases.Conexion(); string sql = @"SELECT Restaurante.Inventario.idInventario as Código, Restaurante.Inventario.descripcion as Nombre, Restaurante.Inventario.costo as Costo, Restaurante.Inventario.precioVenta as PrecioVenta, Restaurante.Inventario.cantidad as Cantidad, Restaurante.Inventario.cantidadMinima as CantidadMin, Restaurante.CategoriaProducto.descripcion as Categoría, Restaurante.TipoProducto.nombre as TipoProducto, Restaurante.Proveedores.nombre as Proveedor FROM Restaurante.Proveedores INNER JOIN Restaurante.Inventario ON Restaurante.Proveedores.idProveedor = Restaurante.Inventario.idProveedor INNER JOIN Restaurante.TipoProducto ON Restaurante.TipoProducto.idTipoProducto = Restaurante.Inventario.idTipoProducto INNER JOIN Restaurante.CategoriaProducto ON Restaurante.CategoriaProducto.idCategoria = Restaurante.Inventario.idCategoria"; try { SqlDataAdapter data = new SqlDataAdapter(); data.SelectCommand = new SqlCommand(sql, conexion.conexion); DataSet ds = new DataSet(); data.Fill(ds, "Restaurante.Inventario"); DataTable dt = ds.Tables["Restaurante.Inventario"]; DataView dv = new DataView(dt, "", "Código", DataViewRowState.Unchanged); return(dv); } catch (SqlException ex) { throw ex; } finally { conexion.Cerrar(); } }
public void Agregar() { Clases.Conexion conexion = new Clases.Conexion(); SqlCommand cmd = new SqlCommand("SP_InsertarCategoriaProducto", conexion.conexion); cmd.CommandType = CommandType.StoredProcedure; try { conexion.Abrir(); cmd.Parameters.Add(new SqlParameter("descripcion", SqlDbType.NVarChar, 100)); cmd.Parameters["descripcion"].Value = Descripcion; cmd.ExecuteNonQuery(); } catch (SqlException ex) { throw new Clases.Exepcion(ex.Message, ex, "Clase_CategoriaProducto"); } finally { conexion.Cerrar(); } }
//Metodo que guarda los detalles registrados en el datagrid public void GuardarDetails(DataGridView DataGrid, int IdProceso, string Proceso) { Clases.Conexion conexion = new Clases.Conexion(); int iterador = 0, contador = 0; iterador = DataGrid.Rows.Count; if (Proceso == "Entrada") { for (contador = 0; contador < iterador; contador++) { conexion.EjecutarScript("insert into entradadetail (numentrada, idarticulo, cantidad) values " + "(" + IdProceso + ", " + Convert.ToInt32(DataGrid.Rows[contador].Cells[0].Value.ToString()) + ", " + Convert.ToInt32(DataGrid.Rows[contador].Cells[2].Value.ToString()) + ") "); } } else if (Proceso == "Salida") { for (contador = 0; contador < iterador; contador++) { conexion.EjecutarScript("insert into salidadetail (numsalida, idarticulo, cantidad) values (" + IdProceso + ", '" + int.Parse(DataGrid.Rows[contador].Cells[0].Value.ToString()) + "', '" + int.Parse(DataGrid.Rows[contador].Cells[2].Value.ToString()) + "')"); } } }
public void Eliminar() { Clases.Conexion conexion = new Clases.Conexion(); SqlCommand cmd = new SqlCommand("SP_EliminarInventario", conexion.conexion); cmd.CommandType = CommandType.StoredProcedure; try { conexion.Abrir(); cmd.Parameters.Add(new SqlParameter("idInventario", SqlDbType.Int)); cmd.Parameters["idInventario"].Value = IdInventario; cmd.ExecuteNonQuery(); } catch (SqlException ex) { throw new Clases.Exepcion(ex.Message, ex, "Clase_Inventario"); } finally { conexion.Cerrar(); } }
public void Eliminar() { Clases.Conexion conexion = new Clases.Conexion(); SqlCommand cmd = new SqlCommand("SP_EliminarArea", conexion.conexion); cmd.CommandType = CommandType.StoredProcedure; try { conexion.Abrir(); cmd.Parameters.Add(new SqlParameter("id", SqlDbType.Int)); cmd.Parameters["id"].Value = Id; cmd.ExecuteNonQuery(); } catch (SqlException ex) { throw ex; } finally { conexion.Cerrar(); } }
public void Eliminar() { Clases.Conexion conexion = new Clases.Conexion(); SqlCommand cmd = new SqlCommand("SP_EliminarUsuario", conexion.conexion); cmd.CommandType = CommandType.StoredProcedure; try { conexion.Abrir(); cmd.Parameters.Add(new SqlParameter("Usuario", SqlDbType.VarChar, 26)); cmd.Parameters["usuario"].Value = this.usuario; cmd.ExecuteNonQuery(); } catch (SqlException ex) { throw ex; } finally { conexion.Cerrar(); } }
public void Modificar() { Clases.Conexion conexion = new Clases.Conexion(); SqlCommand cmd = new SqlCommand("SP_ModificarInventario", conexion.conexion); cmd.CommandType = CommandType.StoredProcedure; try { conexion.Abrir(); cmd.Parameters.Add(new SqlParameter("idInventario", SqlDbType.Int)); cmd.Parameters["idInventario"].Value = IdInventario; cmd.Parameters.Add(new SqlParameter("descripcion", SqlDbType.NVarChar, 100)); cmd.Parameters["descripcion"].Value = Descripcion; cmd.Parameters.Add(new SqlParameter("costo", SqlDbType.Decimal)); cmd.Parameters["costo"].Value = Costo; cmd.Parameters.Add(new SqlParameter("precioVenta", SqlDbType.Decimal)); cmd.Parameters["precioVenta"].Value = PrecioVenta; cmd.Parameters.Add(new SqlParameter("cantidad", SqlDbType.Decimal)); cmd.Parameters["cantidad"].Value = Cantidad; cmd.Parameters.Add(new SqlParameter("cantidadMinima", SqlDbType.Decimal)); cmd.Parameters["cantidadMinima"].Value = CantidadMinima; cmd.Parameters.Add(new SqlParameter("idCategoria", SqlDbType.Int)); cmd.Parameters["idCategoria"].Value = IdCategoria; cmd.Parameters.Add(new SqlParameter("idTipoProducto", SqlDbType.Int)); cmd.Parameters["idTipoProducto"].Value = IdTipoProducto; cmd.Parameters.Add(new SqlParameter("idProveedor", SqlDbType.Int)); cmd.Parameters["idProveedor"].Value = IdProveedor; cmd.ExecuteNonQuery(); } catch (SqlException ex) { throw new Clases.Exepcion(ex.Message, ex, "Clase_Inventario"); } finally { conexion.Cerrar(); } }
public void Agregar() { Clases.Conexion conexion = new Clases.Conexion(); SqlCommand cmd = new SqlCommand("SP_InsertarArea", conexion.conexion); cmd.CommandType = CommandType.StoredProcedure; try { conexion.Abrir(); cmd.Parameters.Add(new SqlParameter("nombre", SqlDbType.NVarChar, 50)); cmd.Parameters["nombre"].Value = Nombre; cmd.Parameters.Add(new SqlParameter("numeroMesas", SqlDbType.TinyInt)); cmd.Parameters["numeroMesas"].Value = NumeroMesas; cmd.ExecuteNonQuery(); } catch (SqlException ex) { throw new Clases.Exepcion(ex.Message, ex, "Clase_Areas"); } finally { conexion.Cerrar(); } }
public void Modificar() { Clases.Conexion conexion = new Clases.Conexion(); SqlCommand cmd = new SqlCommand("SP_ModificarTipoProducto", conexion.conexion); cmd.CommandType = CommandType.StoredProcedure; try { conexion.Abrir(); cmd.Parameters.Add(new SqlParameter("idTipoProducto", SqlDbType.Int)); cmd.Parameters["idTipoProducto"].Value = Id; cmd.Parameters.Add(new SqlParameter("nombre", SqlDbType.NVarChar, 100)); cmd.Parameters["nombre"].Value = Nombre; cmd.ExecuteNonQuery(); } catch (SqlException ex) { throw new Clases.Exepcion(ex.Message, ex, "Clase_TipoProducto"); } finally { conexion.Cerrar(); } }
/// <summary> /// Devuelve una matricula según el número de matricula /// </summary> /// <param name="MatriculaConsulta">Objeto de tipo Matricula que contiene el número de matricula a consultar</param> /// <returns></returns> public DataTable GetMatriculaPorNumeroMatricula(Clases.Matricula MatriculaConsulta) { #region :-: Clases Utilizadas :-: Clases.Conexion ClaseConexion = new Clases.Conexion(); #endregion #region :-: Variables Utilizadas :-: DataTable DtGuia = new DataTable(); #endregion ClaseConexion.ConectarABase(); using (SqlCommand ComandoParaConsulta = new SqlCommand()) { ComandoParaConsulta.Connection = ClaseConexion.Conectar; ComandoParaConsulta.CommandType = CommandType.StoredProcedure; ComandoParaConsulta.CommandText = "SP_Matricula_Cargar_Por_Numero_Matricula"; ComandoParaConsulta.Parameters.AddWithValue("@Numero_Matricula", MatriculaConsulta.Numero_Matricula); DtGuia = ClaseConexion.CargarDatatableConProcedimiento(ComandoParaConsulta); } return DtGuia; }