public void SetMorningEnd(int p_oid, Nullable <DateTime> p_morningEnd)
        {
            /*PROTECTED REGION ID(ChroniGenNHibernate.CEN.Chroni_Schedule_setMorningEnd) ENABLED START*/

            // Write here your custom code...

            ScheduleCAD scheduleCAD = new ScheduleCAD();
            ScheduleCEN scheduleCEN = new ScheduleCEN(scheduleCAD);

            if (p_oid > 0)
            {
                ScheduleEN schedule = scheduleCEN.ReadOID(p_oid);

                if (schedule != null)
                {
                    if (p_morningEnd != null && p_morningEnd > schedule.MorningStart)
                    {
                        schedule.MorningEnd = p_morningEnd;
                        scheduleCAD.Modify(schedule);
                    }
                }
            }

            /*PROTECTED REGION END*/
        }
Esempio n. 2
0
        public void SetActive(int p_oid, bool p_active)
        {
            /*PROTECTED REGION ID(ChroniGenNHibernate.CEN.Chroni_Schedule_setActive) ENABLED START*/

            // Write here your custom code...

            ScheduleCAD scheduleCAD = new ScheduleCAD();
            ScheduleCEN scheduleCEN = new ScheduleCEN(scheduleCAD);

            if (p_oid > 0)
            {
                ScheduleEN schedule = scheduleCEN.ReadOID(p_oid);

                if (schedule != null)
                {
                    schedule.Active = p_active;
                    scheduleCAD.Modify(schedule);
                }
            }

            /*PROTECTED REGION END*/
        }