Esempio n. 1
0
 /// <summary>
 /// Retorna dados para alimentar a GridView.
 /// </summary>
 /// <param name="connection"></param>
 /// <param name="ls"></param>
 /// <returns></returns>
 public static DataTable Get(HzConexao connection, ListCampos ls)
 {
     try
     {
         string sql = ListCampo.RetornaSQL("SELECT [cmpAUTHPERSON] ,[cmpIDPERSON] ,[cmpAUTHID] ,[cmpVALIDFROM]  ,[cmpVALIDUNTIL] FROM [hzSolar].[dbo].[tblAUTHPERPERSON]", ls);
         return(connection.loadDataTable(sql));
     }
     catch (Exception ex)
     {
         throw new Exception("Erro ao buscar as autorizações por pessoa!");
     }
 }
Esempio n. 2
0
 /// <summary>
 /// buscar com filtro
 /// </summary>
 /// <param name="connection"></param>
 /// <param name="ls"></param>
 /// <returns></returns>
 public static DataTable Get(HzConexao connection, ListCampos ls)
 {
     try
     {
         string sql = ListCampo.RetornaSQL(@"SELECT [cmpIDPERSON], [cmpPERSID], [cmpFIRSTNAME], [cmpLASTNAME], [cmpDATEOFBIRTH8], [cmpPASSPORTNO], [cmpIDNUMBER], 
         [cmpPERSCLASSID], [cmpPHONEOFFICE], [cmpHONEMOBILE], [cmpEMAIL], [cmpCOMPANYID], [cmpNUMBERPLATE], [cmpRESERV2], [cmpRESERV3], 
     [cmpREASON],cmpVISID,cmpAutoPERSID FROM [hzSolar].[dbo].[tblPERSONS]", ls);
         return(connection.loadDataTable(sql));
     }
     catch (Exception)
     {
         throw new Exception("Erro ao buscar ao filtrar os dados no Banco!");
     }
 }