public static List <WSSucursales.Sucursal> SucursalCorreo_TXPrestador(long idPrestador) { WSSucursales.SucursalesWS oServicio = new WSSucursales.SucursalesWS(); oServicio.Url = ConfigurationManager.AppSettings["WSSucursales.SucursalesWS"]; oServicio.Credentials = CredentialCache.DefaultCredentials; List <WSSucursales.Sucursal> oListSucursal = null; try { oListSucursal = new List <WSSucursales.Sucursal>(oServicio.SucursalCorreo_TXPrestador(idPrestador)); } catch (Exception ex) { log.Error(string.Format("Error Ejecución:{0}->{1} - Error:{2}->{3}", DateTime.Now, System.Reflection.MethodBase.GetCurrentMethod(), ex.Source, ex.Message)); return(null); } finally { oServicio.Dispose(); } return(oListSucursal); }