public void SetEmail(int p_oid, string p_email)
        {
            /*PROTECTED REGION ID(ChroniGenNHibernate.CEN.Chroni_Patient_setEmail) 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 (!string.IsNullOrEmpty(p_email))
                    {
                        patient.Email = p_email;
                        patientCAD.Modify(patient);
                    }
                }
            }

            /*PROTECTED REGION END*/
        }
Exemplo n.º 2
0
        public void SetPassword(int p_oid, string p_passwordCurrent, string p_passwordNew)
        {
            /*PROTECTED REGION ID(ChroniGenNHibernate.CEN.Chroni_Patient_setPassword) 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 (!string.IsNullOrEmpty(p_passwordCurrent) && !string.IsNullOrEmpty(p_passwordNew))
                    {
                        if (Utils.Util.GetEncondeMD5(p_passwordCurrent).Equals(patient.Password))
                        {
                            patient.Password = Utils.Util.GetEncondeMD5(p_passwordNew);
                            patientCAD.Modify(patient);
                        }
                    }
                }
            }

            /*PROTECTED REGION END*/
        }
        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*/
        }
Exemplo n.º 4
0
        public void SetBirthDate(int p_oid, Nullable <DateTime> p_birthDate)
        {
            /*PROTECTED REGION ID(ChroniGenNHibernate.CEN.Chroni_Patient_setBirthDate) 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_birthDate != null)
                    {
                        patient.BirthDate = p_birthDate;
                        patientCAD.Modify(patient);
                    }
                }
            }

            /*PROTECTED REGION END*/
        }
public void SetActive (int p_oid, bool p_active)
{
        /*PROTECTED REGION ID(ChroniGenNHibernate.CEN.Chroni_Patient_setActive) 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) {
                        patient.Active = p_active;
                        patientCAD.Modify (patient);
                }
        }

        /*PROTECTED REGION END*/
}