public void SetBirthDate(int p_oid, Nullable <DateTime> p_birthDate) { /*PROTECTED REGION ID(ChroniGenNHibernate.CEN.Chroni_Administrator_setBirthDate) 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_birthDate != null) { administrator.BirthDate = p_birthDate; administratorCAD.Modify(administrator); } } } /*PROTECTED REGION END*/ }
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*/ }
public void SetPhoto(int p_oid, string p_photo) { /*PROTECTED REGION ID(ChroniGenNHibernate.CEN.Chroni_Administrator_setPhoto) 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 (!string.IsNullOrEmpty(p_photo)) { administrator.Photo = p_photo; administratorCAD.Modify(administrator); } } } /*PROTECTED REGION END*/ }
public void SetPassword(int p_oid, string p_passwordCurrent, string p_passwordNew) { /*PROTECTED REGION ID(ChroniGenNHibernate.CEN.Chroni_Administrator_setPassword) 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 (!string.IsNullOrEmpty(p_passwordCurrent) && !string.IsNullOrEmpty(p_passwordNew)) { if (Utils.Util.GetEncondeMD5(p_passwordCurrent).Equals(administrator.Password)) { administrator.Password = Utils.Util.GetEncondeMD5(p_passwordNew); administratorCAD.Modify(administrator); } } } } /*PROTECTED REGION END*/ }