public int New_(string p_name, int p_scenario, string p_description, int p_userPractitioner)
        {
            PractitionerEN practitionerEN = null;
            int            oid;

            //Initialized PractitionerEN
            practitionerEN      = new PractitionerEN();
            practitionerEN.Name = p_name;


            if (p_scenario != -1)
            {
                // El argumento p_scenario -> Property scenario es oid = false
                // Lista de oids id
                practitionerEN.Scenario    = new MoSIoTGenNHibernate.EN.MosIoT.IoTScenarioEN();
                practitionerEN.Scenario.Id = p_scenario;
            }

            practitionerEN.Description = p_description;


            if (p_userPractitioner != -1)
            {
                // El argumento p_userPractitioner -> Property userPractitioner es oid = false
                // Lista de oids id
                practitionerEN.UserPractitioner    = new MoSIoTGenNHibernate.EN.MosIoT.UserEN();
                practitionerEN.UserPractitioner.Id = p_userPractitioner;
            }

            //Call to PractitionerCAD

            oid = _IPractitionerCAD.New_(practitionerEN);
            return(oid);
        }
        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);
        }