Advertisement
gkpoll

Untitled

Mar 11th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.18 KB | None | 0 0
  1. protected static List<VencimentoCredenciamento> ListarGraficasComCredenciamentoAVencerBD
  2.                                                                         (int daquiHaQuantosDias)
  3.         {
  4.             DateTime dataBase = DateTime.Now;
  5.  
  6.             string ano = "2019"; string mes = "03"; string dia = "11";
  7.             dataBase = new DateTime(int.Parse(ano), int.Parse(mes), int.Parse(dia));
  8.  
  9.             string procedure = "usr_sat_ciaf.PKG_AIDF_DATA.PESQUISA_CREDENC_A_VENCER";
  10.  
  11.             DbProcedureSettings sp = new DbProcedureSettings();
  12.             sp.ObjectName = procedure;
  13.             sp.Parameters.AddInput("p_DIAS_INICIAL", daquiHaQuantosDias-1, DbDataType.Int64);
  14.             sp.Parameters.AddInput("p_DIAS_FINAL", daquiHaQuantosDias+1, DbDataType.Int64);
  15.             sp.Parameters.AddInput("p_DATABASE", dataBase, DbDataType.Date);
  16.             sp.Parameters.AddOutput("p_Cursor", typeof(VencimentoCredenciamento));
  17.             DbManager.InvokeStoredProcedure(sp);
  18.             List<VencimentoCredenciamento> ListaVencimentos =
  19.                         sp.Parameters.GetValue<List<VencimentoCredenciamento>>("p_Cursor").ToList();
  20.  
  21.             return ListaVencimentos;
  22.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement