Example #1
0
 //public void InsertarMedico(Entidad.Medico m)
 //{
 //    try
 //    {
 //        Datos.medicoData dc = new Datos.medicoData();
 //        /*OBTENEMOS LA FECHA DE NACIMIENTO EN UNA VARIABLE PARA TRATARLA DESPUES*/
 //        DateTime fecha_nac = Convert.ToDateTime(m.Fecha_nacimiento);
 //        /*GUARDAMOS EN UNA VARIABLE LA FECHA ACTUAL*/
 //        string fecha = Convert.ToString(DateTime.Now.ToString().Substring(0, 10));//19/08/2014 10:00:20 a.m.
 //        DateTime fechaactual = Convert.ToDateTime(fecha);
 //        /*VERIFICAMOS QUE LA FECHA DIJITADA NO SEA MAYOR A LA FECHA ACTUAL*/
 //        if (fecha_nac > fechaactual)
 //            throw new Exception("La fecha de nacimiento no puede ser mayor a la fecha actual!!!");
 //        else
 //            dc.InsertMedico(m);
 //    }
 //    catch (Exception err)
 //    {
 //        throw new Exception("Error en InsertarMedico: " + err.Message);
 //    }
 //}
 public int ExisteCedula(string cedula)
 {
     try
     {
         int resp;
         Datos.medicoData dc = new Datos.medicoData();
         return resp = dc.ExistCedula(cedula);
     }
     catch (Exception err)
     {
         throw new Exception("Error en ExisteCedula: " + err.Message);
     }
 }