private void btAceptar_Click(object sender, EventArgs e) { var user = tbUser.Text; var contra = tbContra.Text; string sURL = string.Format("http://localhost:57008/Example.svc/Consulta/{0}-{1}", user, contra); reqServ.Method = "GET"; reqServ.ContentType = "application/json"; var response = reqServ.CalltoRest(sURL); var respConEmp = JsonConvert.DeserializeObject <RespConEmp>(response); var dataEmp = JsonConvert.DeserializeObject <Employee>(respConEmp.ConsultaEmpResult); if (!string.IsNullOrEmpty(dataEmp.nombre)) { VisorDatos vData = new VisorDatos(); vData.cr = dataEmp; vData.LlenaDatos(user, contra); vData.Show(this); } else { MessageBox.Show("No se encontrĂ³ resultados."); } }
private void btNewData_Click(object sender, EventArgs e) { VisorDatos vData = new VisorDatos(); vData.Show(this); }