private static async void Prueba2() { var api = new WebApi.Client.RuleMotorClient("http://psmnt96/ECCO/webapi/"); var response = await api.PostTest(); var a = 0; }
private async void btnListPending_Click(object sender, EventArgs e) { var api = new WebApi.Client.RuleMotorClient(_host); //await api.ListPendingNotificationsWithState(5, 0, new List<int> { 1, 2, 3 }, 50); await api.ListPendingNotificationsWithState(0, 5, new List <int> { 1 }, 50); }
private async void btnMarkActionStateAs_Click(object sender, EventArgs e) { var user = txtMarkActionUser.Text.Trim(); var device = txtMarkActionDevice.Text.Trim(); var state = txtMarkActionState.Text.Trim(); var api = new WebApi.Client.RuleMotorClient(_host); await api.MarkActionStateAs(1, Model.BL.DTO.Enums.Notification_State.Enviado, 1, 1); }
private async void btnListar_Click(object sender, EventArgs e) { string strUser = txtListarUser.Text.Trim(); int[] users = null; if (!string.IsNullOrEmpty(strUser)) { int user = 0; if (int.TryParse(strUser, out user)) { users = new int[] { user } } ; } string strDevice = txtListarDevice.Text.Trim(); int[] devices = null; if (!string.IsNullOrEmpty(strDevice)) { int device = 0; if (int.TryParse(strDevice, out device)) { devices = new int[] { device } } ; } WebApi.Client.RuleMotorClient ruleMotor = new WebApi.Client.RuleMotorClient(_host); var pending = await ruleMotor.ListPendingNotificationsWithState(0, 5, new List <int> { 4 }, 50); var api = new WebApi.Client.HistoricClient(_host); //var historics = await api.Listar(null, null, users, devices, null, 0, 50); //var historics = await api.Listar(null, null, null, new int[] { 2 }, new int[] { 1, 2, 3}, null, 0, 200); var historics = await api.Listar(null, null, new int[] { 0 }, new int[] { 5 }, new int[] { 4 }, null, null, 0, 50, false); string msg = string.Format("Listar() Número de elementos obtenidos: {0}", historics != null ? historics.Count.ToString() : "null"); AddTrace(msg); }
private async void btnListActiveRules_Click(object sender, EventArgs e) { var api = new WebApi.Client.RuleMotorClient(_host); await api.ListActiveRules(new int[] { 16, 18, 50, 51, 52 }); }