public int New_(string p_name, int p_scenario, string p_description, int p_userRelatedPerson) { RelatedPersonEN relatedPersonEN = null; int oid; //Initialized RelatedPersonEN relatedPersonEN = new RelatedPersonEN(); relatedPersonEN.Name = p_name; if (p_scenario != -1) { // El argumento p_scenario -> Property scenario es oid = false // Lista de oids id relatedPersonEN.Scenario = new MoSIoTGenNHibernate.EN.MosIoT.IoTScenarioEN(); relatedPersonEN.Scenario.Id = p_scenario; } relatedPersonEN.Description = p_description; if (p_userRelatedPerson != -1) { // El argumento p_userRelatedPerson -> Property userRelatedPerson es oid = false // Lista de oids id relatedPersonEN.UserRelatedPerson = new MoSIoTGenNHibernate.EN.MosIoT.UserEN(); relatedPersonEN.UserRelatedPerson.Id = p_userRelatedPerson; } //Call to RelatedPersonCAD oid = _IRelatedPersonCAD.New_(relatedPersonEN); return(oid); }
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); }