//registrar factura public int RegistrarFactura(Factura_En fac) { int r = 0; try { using (SqlCommand coman = new SqlCommand( "Registrar_Facturacion", Conexion.leerCadena())) { coman.CommandType = CommandType.StoredProcedure; coman.Parameters.AddWithValue("@codFacturacion", fac.numcomprobante); coman.Parameters.AddWithValue("@ruc", fac.ruc); coman.Parameters.AddWithValue("@fecha", fac.fecha); coman.Parameters.AddWithValue("@idpersona", fac.personal); //coman.Parameters.AddWithValue("@idpago", fac.pago); coman.Parameters.AddWithValue("@idcliente", fac.cliente); coman.Parameters.AddWithValue("@idestado", fac.estado); coman.Parameters.AddWithValue("@montototal", fac.montototal); coman.Parameters.AddWithValue("@igv", fac.igv); r = coman.ExecuteNonQuery(); } } catch (Exception e) { Console.WriteLine("Message:{0}", e.Message); } finally { Conexion.leerCadena().Close(); } return(r); }
public int RegistrarFactura(Factura_En fac) { return(f.RegistrarFactura(fac)); }