public void SetMaritalStatus(int p_oid, ChroniGenNHibernate.Enumerated.Chroni.MaritalStatusEnum p_maritalStatus)
        {
            /*PROTECTED REGION ID(ChroniGenNHibernate.CEN.Chroni_Patient_setMaritalStatus) ENABLED START*/

            // Write here your custom code...


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

            if (p_oid > 0)
            {
                PatientEN patient = patientCEN.ReadOID(p_oid);

                if (patient != null)
                {
                    if (p_maritalStatus > 0)
                    {
                        patient.MaritalStatus = p_maritalStatus;
                        patientCAD.Modify(patient);
                    }
                }
            }

            /*PROTECTED REGION END*/
        }
        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);
        }
        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 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);
 }