예제 #1
0
        public void TestMostrarPacienteXEps()
        {
            string         pacienteEsperado = "[{'IDPaciente':'4','IDeps':'1','Nombre':'Juan','Apellido':'Ramos','Cedula':'1026163147','Telefono':'322682565','Direccion':'Caldas','Contrasena':'Ju700'}]";
            GestorPaciente Gp                  = new GestorPaciente();
            Convertidor    conver              = new Convertidor();
            string         resultado           = conver.DataTableToJsonObj(Gp.MostrarPacienteXEps(1026163147, "SURA"));
            string         resultadoconvertido = resultado.Replace("\"", "'");

            Assert.AreEqual(pacienteEsperado, resultadoconvertido);
        }
예제 #2
0
파일: eEPS.cs 프로젝트: jean5241/Final
 private void buttonE_Click(object sender, EventArgs e)
 {
     if (eps.verificarNumero(textCedulaE.Text) == true)
     {
         if ((MessageBox.Show("Esta seguro que desea eliminar el Paciente con cedula"
                              + textCedulaE.Text, "Eliminar", MessageBoxButtons.YesNo) == DialogResult.Yes) && (pac.MostrarPacienteXEps(Convert.ToInt32(textCedulaE.Text), nombreEps).Rows.Count > 0))
         {
             pac.EliminarPaciente(Convert.ToInt32(textCedulaE.Text), nombreEps);
             MessageBox.Show("Se elimino correctamente");
             textCedulaE.Text = string.Empty;
         }
         else if (MessageBox.Show("No se pudo eliminar la cedula" + textCedulaE.Text + "no se encentra en la base de datos",
                                  "ERROR", MessageBoxButtons.OK) == DialogResult.OK)
         {
         }
     }
     else
     {
         MessageBox.Show("El campo Cedula tienen entrada de texto incorrecta o esta vacio, verifiquelo e intente de nuevo");
     }
 }