public bool Login(string p_nif, string p_password)
        {
            /*PROTECTED REGION ID(ChroniGenNHibernate.CEN.Chroni_Patient_login) ENABLED START*/

            // Write here your custom code...
            bool resultado = false;

            PatientCAD patientCAD = new PatientCAD();
            PatientCEN patientCEN = new PatientCEN(patientCAD);

            if (!string.IsNullOrEmpty(p_nif))
            {
                IList <PatientEN> patient = patientCEN.GetPatientByNif(p_nif);
                if (patient != null && patient.Count == 1)
                {
                    if (!string.IsNullOrEmpty(p_password))
                    {
                        if (patient [0].Password.Equals(Utils.Util.GetEncondeMD5(p_password)))
                        {
                            resultado = true;
                        }
                    }
                }
            }


            return(resultado);
            /*PROTECTED REGION END*/
        }