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 int New_(string p_name, int p_scenario, string p_description, int p_patientProfile, int p_userPatient) { PatientEN patientEN = null; int oid; //Initialized PatientEN patientEN = new PatientEN(); patientEN.Name = p_name; if (p_scenario != -1) { // El argumento p_scenario -> Property scenario es oid = false // Lista de oids id patientEN.Scenario = new MoSIoTGenNHibernate.EN.MosIoT.IoTScenarioEN(); patientEN.Scenario.Id = p_scenario; } patientEN.Description = p_description; if (p_patientProfile != -1) { // El argumento p_patientProfile -> Property patientProfile es oid = false // Lista de oids id patientEN.PatientProfile = new MoSIoTGenNHibernate.EN.MosIoT.PatientProfileEN(); patientEN.PatientProfile.Id = p_patientProfile; } if (p_userPatient != -1) { // El argumento p_userPatient -> Property userPatient es oid = false // Lista de oids id patientEN.UserPatient = new MoSIoTGenNHibernate.EN.MosIoT.UserEN(); patientEN.UserPatient.Id = p_userPatient; } //Call to PatientCAD oid = _IPatientCAD.New_(patientEN); return(oid); }