public string WS_loggerhistorial(System.Web.UI.WebControls.GridView grillaa) { //DELCARAR VARIABLES string email = "*****@*****.**"; string msg = null; //INSTANCIAR WS WS_LoggerService.LoggerServiceClient ws = new WS_LoggerService.LoggerServiceClient(); ws.ClientCredentials.UserName.UserName = "******"; ws.ClientCredentials.UserName.Password = "******"; //ENVIO DE VARIABLES A WS Y OBTENEMOS DATASET PARA BINDEARLO EN GRIDVIEW try { ws.Open(); grillaa.DataSource = ws.Historial(email); grillaa.DataBind(); ws.Close(); msg += "ws log consumido correctamente"; } catch (Exception exc) { msg += exc.Message; } //REGRESAMOS RESPUESTA return(msg); }
//SECCIÓN WEBSERVICE public string WS_logger(string message, int level, string metadata) { //DELCARAR VARIABLES string email = "*****@*****.**"; string msg = null; //INSTANCIAR WS WS_LoggerService.LoggerServiceClient ws = new WS_LoggerService.LoggerServiceClient(); ws.ClientCredentials.UserName.UserName = "******"; ws.ClientCredentials.UserName.Password = "******"; //ENVIO DE VARIABLES A WS try { ws.Open(); ws.Log(email, message, 0, metadata); ws.Close(); msg += "ws log consumido correctamente"; } catch (Exception exc) { msg += exc.Message; } //REGRESAMOS RESPUESTA return(msg); }