Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ALTER PROCEDURE [dbo].[spGiros_leer_cantidad_giros_pendientes]
- @idAgenciaDestino int,
- @cantGirosPendientes int output
- AS
- BEGIN
- SET NOCOUNT
- set @cantGirosPendientes = (
- select count(*) from giros g
- where g.idagencia_destino = @idAgenciaDestino
- and g.idestado = 6)
- END
- return @cantGirosPendientes
- public int LeerCantidadGirosPendientes(int? idAgenciaDestino)
- {
- DbTransaction transaccion = null;
- try
- {
- int? cantGirosPendientes = 0;
- cantGirosPendientes = context.spGiros_leer_cantidad_giros_pendientes(idAgenciaDestino, ref cantGirosPendientes);
- return Convert.ToInt32(cantGirosPendientes);
- }
- catch (Exception ex)
- {
- transaccion.Rollback();
- context.Connection.Close();
- log.Error("NegGiros.cs:LeerCantidadGirosPendientes", ex);
- throw ex;
- }
- }
- [global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.spGiros_leer_cantidad_giros_pendientes")]
- public int spGiros_leer_cantidad_giros_pendientes([global::System.Data.Linq.Mapping.ParameterAttribute(DbType="Int")] System.Nullable<int> idAgencia, [global::System.Data.Linq.Mapping.ParameterAttribute(DbType="Int")] ref System.Nullable<int> cantGirosPendientes)
- {
- IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), idAgencia, cantGirosPendientes);
- cantGirosPendientes = ((System.Nullable<int>)(result.GetParameterValue(1)));
- return ((int)(result.ReturnValue));
- }
Add Comment
Please, Sign In to add comment