public int New_(string p_name, ChroniGenNHibernate.Enumerated.Chroni.GenderEnum p_gender, Nullable <DateTime> p_birthDate, string p_photo, string p_email, String p_password, string p_surnames, string p_nif, string p_address, string p_phone)
        {
            AdministratorEN administratorEN = null;
            int             oid;

            //Initialized AdministratorEN
            administratorEN      = new AdministratorEN();
            administratorEN.Name = p_name;

            administratorEN.Gender = p_gender;

            administratorEN.BirthDate = p_birthDate;

            administratorEN.Photo = p_photo;

            administratorEN.Email = p_email;

            administratorEN.Password = Utils.Util.GetEncondeMD5(p_password);

            administratorEN.Surnames = p_surnames;

            administratorEN.Nif = p_nif;

            administratorEN.Address = p_address;

            administratorEN.Phone = p_phone;

            //Call to AdministratorCAD

            oid = _IAdministratorCAD.New_(administratorEN);
            return(oid);
        }
        public void SetGender(int p_oid, ChroniGenNHibernate.Enumerated.Chroni.GenderEnum p_gender)
        {
            /*PROTECTED REGION ID(ChroniGenNHibernate.CEN.Chroni_Practitioner_setGender) ENABLED START*/

            // Write here your custom code...

            PractitionerCAD practitionerCAD = new PractitionerCAD();
            PractitionerCEN practitionerCEN = new PractitionerCEN(practitionerCAD);

            if (p_oid > 0)
            {
                PractitionerEN practitioner = practitionerCEN.ReadOID(p_oid);

                if (practitioner != null)
                {
                    if (p_gender > 0)
                    {
                        practitioner.Gender = p_gender;
                        practitionerCAD.Modify(practitioner);
                    }
                }
            }

            /*PROTECTED REGION END*/
        }
        private void init(int identifier
                          , string name, ChroniGenNHibernate.Enumerated.Chroni.GenderEnum gender, Nullable <DateTime> birthDate, string photo, string email, String password, string surnames, string nif, string address, string phone)
        {
            this.Identifier = identifier;


            this.Name = name;

            this.Gender = gender;

            this.BirthDate = birthDate;

            this.Photo = photo;

            this.Email = email;

            this.Password = password;

            this.Surnames = surnames;

            this.Nif = nif;

            this.Address = address;

            this.Phone = phone;
        }
        public void SetGender(int p_oid, ChroniGenNHibernate.Enumerated.Chroni.GenderEnum p_gender)
        {
            /*PROTECTED REGION ID(ChroniGenNHibernate.CEN.Chroni_Administrator_setGender) ENABLED START*/

            // Write here your custom code...

            AdministratorCAD administratorCAD = new AdministratorCAD();
            AdministratorCEN adminitratorCEN  = new AdministratorCEN(administratorCAD);

            if (p_oid > 0)
            {
                AdministratorEN administrator = adminitratorCEN.ReadOID(p_oid);

                if (administrator != null)
                {
                    if (p_gender > 0)
                    {
                        administrator.Gender = p_gender;
                        administratorCAD.Modify(administrator);
                    }
                }
            }

            /*PROTECTED REGION END*/
        }
        private void init(int identifier
                          , string nif, bool active, string name, string surnames, ChroniGenNHibernate.Enumerated.Chroni.GenderEnum gender, Nullable <DateTime> birthDate, bool deceased, string address, string email, string phone, ChroniGenNHibernate.Enumerated.Chroni.MaritalStatusEnum maritalStatus, string photo, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.RelatedPersonEN> relatedPerson, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.LocationEN> location, ChroniGenNHibernate.EN.Chroni.DiaryEN diary, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.EncounterEN> encounter, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.ConversationEN> conversation, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.ReclamationEN> reclamation, String password, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.PractitionerEN> practitioner, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.AssessmentEN> assessmentPractitioner)
        {
            this.Identifier = identifier;


            this.Nif = nif;

            this.Active = active;

            this.Name = name;

            this.Surnames = surnames;

            this.Gender = gender;

            this.BirthDate = birthDate;

            this.Deceased = deceased;

            this.Address = address;

            this.Email = email;

            this.Phone = phone;

            this.MaritalStatus = maritalStatus;

            this.Photo = photo;

            this.RelatedPerson = relatedPerson;

            this.Location = location;

            this.Diary = diary;

            this.Encounter = encounter;

            this.Conversation = conversation;

            this.Reclamation = reclamation;

            this.Password = password;

            this.Practitioner = practitioner;

            this.AssessmentPractitioner = assessmentPractitioner;
        }
        public void Modify(int p_Administrator_OID, string p_name, ChroniGenNHibernate.Enumerated.Chroni.GenderEnum p_gender, Nullable <DateTime> p_birthDate, string p_photo, string p_email, String p_password, string p_surnames, string p_nif, string p_address, string p_phone)
        {
            AdministratorEN administratorEN = null;

            //Initialized AdministratorEN
            administratorEN            = new AdministratorEN();
            administratorEN.Identifier = p_Administrator_OID;
            administratorEN.Name       = p_name;
            administratorEN.Gender     = p_gender;
            administratorEN.BirthDate  = p_birthDate;
            administratorEN.Photo      = p_photo;
            administratorEN.Email      = p_email;
            administratorEN.Password   = Utils.Util.GetEncondeMD5(p_password);
            administratorEN.Surnames   = p_surnames;
            administratorEN.Nif        = p_nif;
            administratorEN.Address    = p_address;
            administratorEN.Phone      = p_phone;
            //Call to AdministratorCAD

            _IAdministratorCAD.Modify(administratorEN);
        }
        private void init(int identifier
                          , string nif, string name, string surnames, ChroniGenNHibernate.Enumerated.Chroni.GenderEnum gender, Nullable <DateTime> birthDate, string address, string email, string phone, string photo, Nullable <DateTime> startDate, Nullable <DateTime> endDate, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.PatientEN> patient, String password, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.ConversationEN> conversation, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.ReclamationEN> reclamation, bool active, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.AssessmentEN> assessmentPractitioner)
        {
            this.Identifier = identifier;


            this.Nif = nif;

            this.Name = name;

            this.Surnames = surnames;

            this.Gender = gender;

            this.BirthDate = birthDate;

            this.Address = address;

            this.Email = email;

            this.Phone = phone;

            this.Photo = photo;

            this.StartDate = startDate;

            this.EndDate = endDate;

            this.Patient = patient;

            this.Password = password;

            this.Conversation = conversation;

            this.Reclamation = reclamation;

            this.Active = active;

            this.AssessmentPractitioner = assessmentPractitioner;
        }
        public int New_(string p_nif, string p_name, string p_surnames, ChroniGenNHibernate.Enumerated.Chroni.GenderEnum p_gender, Nullable <DateTime> p_birthDate, string p_address, string p_email, string p_phone, string p_photo, Nullable <DateTime> p_startDate, Nullable <DateTime> p_endDate, String p_password, bool p_active)
        {
            RelatedPersonEN relatedPersonEN = null;
            int             oid;

            //Initialized RelatedPersonEN
            relatedPersonEN     = new RelatedPersonEN();
            relatedPersonEN.Nif = p_nif;

            relatedPersonEN.Name = p_name;

            relatedPersonEN.Surnames = p_surnames;

            relatedPersonEN.Gender = p_gender;

            relatedPersonEN.BirthDate = p_birthDate;

            relatedPersonEN.Address = p_address;

            relatedPersonEN.Email = p_email;

            relatedPersonEN.Phone = p_phone;

            relatedPersonEN.Photo = p_photo;

            relatedPersonEN.StartDate = p_startDate;

            relatedPersonEN.EndDate = p_endDate;

            relatedPersonEN.Password = Utils.Util.GetEncondeMD5(p_password);

            relatedPersonEN.Active = p_active;

            //Call to RelatedPersonCAD

            oid = _IRelatedPersonCAD.New_(relatedPersonEN);
            return(oid);
        }
        public void Modify(int p_Patient_OID, string p_nif, bool p_active, string p_name, string p_surnames, ChroniGenNHibernate.Enumerated.Chroni.GenderEnum p_gender, Nullable <DateTime> p_birthDate, bool p_deceased, string p_address, string p_email, string p_phone, ChroniGenNHibernate.Enumerated.Chroni.MaritalStatusEnum p_maritalStatus, string p_photo, String p_password)
        {
            PatientEN patientEN = null;

            //Initialized PatientEN
            patientEN               = new PatientEN();
            patientEN.Identifier    = p_Patient_OID;
            patientEN.Nif           = p_nif;
            patientEN.Active        = p_active;
            patientEN.Name          = p_name;
            patientEN.Surnames      = p_surnames;
            patientEN.Gender        = p_gender;
            patientEN.BirthDate     = p_birthDate;
            patientEN.Deceased      = p_deceased;
            patientEN.Address       = p_address;
            patientEN.Email         = p_email;
            patientEN.Phone         = p_phone;
            patientEN.MaritalStatus = p_maritalStatus;
            patientEN.Photo         = p_photo;
            patientEN.Password      = Utils.Util.GetEncondeMD5(p_password);
            //Call to PatientCAD

            _IPatientCAD.Modify(patientEN);
        }
        public int New_(string p_nif, bool p_active, string p_name, string p_surnames, ChroniGenNHibernate.Enumerated.Chroni.GenderEnum p_gender, Nullable <DateTime> p_birthDate, bool p_deceased, string p_address, string p_email, string p_phone, ChroniGenNHibernate.Enumerated.Chroni.MaritalStatusEnum p_maritalStatus, string p_photo, System.Collections.Generic.IList <int> p_location, ChroniGenNHibernate.EN.Chroni.DiaryEN p_diary, String p_password)
        {
            PatientEN patientEN = null;
            int       oid;

            //Initialized PatientEN
            patientEN     = new PatientEN();
            patientEN.Nif = p_nif;

            patientEN.Active = p_active;

            patientEN.Name = p_name;

            patientEN.Surnames = p_surnames;

            patientEN.Gender = p_gender;

            patientEN.BirthDate = p_birthDate;

            patientEN.Deceased = p_deceased;

            patientEN.Address = p_address;

            patientEN.Email = p_email;

            patientEN.Phone = p_phone;

            patientEN.MaritalStatus = p_maritalStatus;

            patientEN.Photo = p_photo;


            patientEN.Location = new System.Collections.Generic.List <ChroniGenNHibernate.EN.Chroni.LocationEN>();
            if (p_location != null)
            {
                foreach (int item in p_location)
                {
                    ChroniGenNHibernate.EN.Chroni.LocationEN en = new ChroniGenNHibernate.EN.Chroni.LocationEN();
                    en.Identifier = item;
                    patientEN.Location.Add(en);
                }
            }

            else
            {
                patientEN.Location = new System.Collections.Generic.List <ChroniGenNHibernate.EN.Chroni.LocationEN>();
            }

            patientEN.Diary = p_diary;

            patientEN.Password = Utils.Util.GetEncondeMD5(p_password);

            //Call to PatientCAD

            oid = _IPatientCAD.New_(patientEN);
            return(oid);
        }
 public PatientEN(int identifier, string nif, bool active, string name, string surnames, ChroniGenNHibernate.Enumerated.Chroni.GenderEnum gender, Nullable <DateTime> birthDate, bool deceased, string address, string email, string phone, ChroniGenNHibernate.Enumerated.Chroni.MaritalStatusEnum maritalStatus, string photo, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.RelatedPersonEN> relatedPerson, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.LocationEN> location, ChroniGenNHibernate.EN.Chroni.DiaryEN diary, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.EncounterEN> encounter, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.ConversationEN> conversation, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.ReclamationEN> reclamation, String password, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.PractitionerEN> practitioner, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.AssessmentEN> assessmentPractitioner
                  )
 {
     this.init(Identifier, nif, active, name, surnames, gender, birthDate, deceased, address, email, phone, maritalStatus, photo, relatedPerson, location, diary, encounter, conversation, reclamation, password, practitioner, assessmentPractitioner);
 }
        public void Modify(int p_Practitioner_OID, string p_nif, bool p_active, ChroniGenNHibernate.Enumerated.Chroni.PractitionerRoleEnum p_role, string p_name, string p_surnames, ChroniGenNHibernate.Enumerated.Chroni.GenderEnum p_gender, Nullable <DateTime> p_birthDate, string p_address, string p_email, string p_phone, string p_photo, Nullable <DateTime> p_startDate, Nullable <DateTime> p_endDate, String p_password)
        {
            PractitionerEN practitionerEN = null;

            //Initialized PractitionerEN
            practitionerEN            = new PractitionerEN();
            practitionerEN.Identifier = p_Practitioner_OID;
            practitionerEN.Nif        = p_nif;
            practitionerEN.Active     = p_active;
            practitionerEN.Role       = p_role;
            practitionerEN.Name       = p_name;
            practitionerEN.Surnames   = p_surnames;
            practitionerEN.Gender     = p_gender;
            practitionerEN.BirthDate  = p_birthDate;
            practitionerEN.Address    = p_address;
            practitionerEN.Email      = p_email;
            practitionerEN.Phone      = p_phone;
            practitionerEN.Photo      = p_photo;
            practitionerEN.StartDate  = p_startDate;
            practitionerEN.EndDate    = p_endDate;
            practitionerEN.Password   = Utils.Util.GetEncondeMD5(p_password);
            //Call to PractitionerCAD

            _IPractitionerCAD.Modify(practitionerEN);
        }
 public PractitionerEN(int identifier, string nif, bool active, ChroniGenNHibernate.Enumerated.Chroni.PractitionerRoleEnum role, string name, string surnames, ChroniGenNHibernate.Enumerated.Chroni.GenderEnum gender, Nullable <DateTime> birthDate, string address, string email, string phone, string photo, Nullable <DateTime> startDate, Nullable <DateTime> endDate, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.LocationEN> location, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.DiaryEN> diary, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.EncounterEN> encounter, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.ConversationEN> conversation, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.ReclamationEN> reclamation, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.ScheduleEN> schedule, String password, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.PatientEN> patient, ChroniGenNHibernate.EN.Chroni.SpecialtyEN specialty, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.AssessmentEN> assessmentPractitioner
                       )
 {
     this.init(Identifier, nif, active, role, name, surnames, gender, birthDate, address, email, phone, photo, startDate, endDate, location, diary, encounter, conversation, reclamation, schedule, password, patient, specialty, assessmentPractitioner);
 }
 public AdministratorEN(int identifier, string name, ChroniGenNHibernate.Enumerated.Chroni.GenderEnum gender, Nullable <DateTime> birthDate, string photo, string email, String password, string surnames, string nif, string address, string phone
                        )
 {
     this.init(Identifier, name, gender, birthDate, photo, email, password, surnames, nif, address, phone);
 }
 public RelatedPersonEN(int identifier, string nif, string name, string surnames, ChroniGenNHibernate.Enumerated.Chroni.GenderEnum gender, Nullable <DateTime> birthDate, string address, string email, string phone, string photo, Nullable <DateTime> startDate, Nullable <DateTime> endDate, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.PatientEN> patient, String password, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.ConversationEN> conversation, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.ReclamationEN> reclamation, bool active, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.AssessmentEN> assessmentPractitioner
                        )
 {
     this.init(Identifier, nif, name, surnames, gender, birthDate, address, email, phone, photo, startDate, endDate, patient, password, conversation, reclamation, active, assessmentPractitioner);
 }
        private void init(int identifier
                          , string nif, bool active, ChroniGenNHibernate.Enumerated.Chroni.PractitionerRoleEnum role, string name, string surnames, ChroniGenNHibernate.Enumerated.Chroni.GenderEnum gender, Nullable <DateTime> birthDate, string address, string email, string phone, string photo, Nullable <DateTime> startDate, Nullable <DateTime> endDate, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.LocationEN> location, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.DiaryEN> diary, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.EncounterEN> encounter, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.ConversationEN> conversation, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.ReclamationEN> reclamation, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.ScheduleEN> schedule, String password, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.PatientEN> patient, ChroniGenNHibernate.EN.Chroni.SpecialtyEN specialty, System.Collections.Generic.IList <ChroniGenNHibernate.EN.Chroni.AssessmentEN> assessmentPractitioner)
        {
            this.Identifier = identifier;


            this.Nif = nif;

            this.Active = active;

            this.Role = role;

            this.Name = name;

            this.Surnames = surnames;

            this.Gender = gender;

            this.BirthDate = birthDate;

            this.Address = address;

            this.Email = email;

            this.Phone = phone;

            this.Photo = photo;

            this.StartDate = startDate;

            this.EndDate = endDate;

            this.Location = location;

            this.Diary = diary;

            this.Encounter = encounter;

            this.Conversation = conversation;

            this.Reclamation = reclamation;

            this.Schedule = schedule;

            this.Password = password;

            this.Patient = patient;

            this.Specialty = specialty;

            this.AssessmentPractitioner = assessmentPractitioner;
        }
        public int New_(string p_nif, bool p_active, ChroniGenNHibernate.Enumerated.Chroni.PractitionerRoleEnum p_role, string p_name, string p_surnames, ChroniGenNHibernate.Enumerated.Chroni.GenderEnum p_gender, Nullable <DateTime> p_birthDate, string p_address, string p_email, string p_phone, string p_photo, Nullable <DateTime> p_startDate, Nullable <DateTime> p_endDate, System.Collections.Generic.IList <int> p_location, String p_password)
        {
            PractitionerEN practitionerEN = null;
            int            oid;

            //Initialized PractitionerEN
            practitionerEN     = new PractitionerEN();
            practitionerEN.Nif = p_nif;

            practitionerEN.Active = p_active;

            practitionerEN.Role = p_role;

            practitionerEN.Name = p_name;

            practitionerEN.Surnames = p_surnames;

            practitionerEN.Gender = p_gender;

            practitionerEN.BirthDate = p_birthDate;

            practitionerEN.Address = p_address;

            practitionerEN.Email = p_email;

            practitionerEN.Phone = p_phone;

            practitionerEN.Photo = p_photo;

            practitionerEN.StartDate = p_startDate;

            practitionerEN.EndDate = p_endDate;


            practitionerEN.Location = new System.Collections.Generic.List <ChroniGenNHibernate.EN.Chroni.LocationEN>();
            if (p_location != null)
            {
                foreach (int item in p_location)
                {
                    ChroniGenNHibernate.EN.Chroni.LocationEN en = new ChroniGenNHibernate.EN.Chroni.LocationEN();
                    en.Identifier = item;
                    practitionerEN.Location.Add(en);
                }
            }

            else
            {
                practitionerEN.Location = new System.Collections.Generic.List <ChroniGenNHibernate.EN.Chroni.LocationEN>();
            }

            practitionerEN.Password = Utils.Util.GetEncondeMD5(p_password);

            //Call to PractitionerCAD

            oid = _IPractitionerCAD.New_(practitionerEN);
            return(oid);
        }