public void SetStatus(int p_oid, ChroniGenNHibernate.Enumerated.Chroni.SlotStatusEnum p_status)
        {
            /*PROTECTED REGION ID(ChroniGenNHibernate.CEN.Chroni_Slot_setStatus) ENABLED START*/

            // Write here your custom code...

            SlotCAD slotCAD = new SlotCAD();
            SlotCEN slotCEN = new SlotCEN(slotCAD);

            if (p_oid > 0)
            {
                SlotEN slot = slotCEN.ReadOID(p_oid);

                if (slot != null)
                {
                    if (p_status > 0)
                    {
                        slot.Status = p_status;
                        slotCAD.Modify(slot);
                    }
                }
            }

            /*PROTECTED REGION END*/
        }
Exemplo n.º 2
0
        public void SetStartDate(int p_oid, Nullable <DateTime> p_startDate)
        {
            /*PROTECTED REGION ID(ChroniGenNHibernate.CEN.Chroni_Slot_setStartDate) ENABLED START*/

            // Write here your custom code...

            SlotCAD slotCAD = new SlotCAD();
            SlotCEN slotCEN = new SlotCEN(slotCAD);

            if (p_oid > 0)
            {
                SlotEN slot = slotCEN.ReadOID(p_oid);

                if (slot != null)
                {
                    if (p_startDate != null && p_startDate < slot.EndDate)
                    {
                        slot.StartDate = p_startDate;
                        slotCAD.Modify(slot);
                    }
                }
            }

            /*PROTECTED REGION END*/
        }
Exemplo n.º 3
0
        public void SetNote(int p_oid, string p_note)
        {
            /*PROTECTED REGION ID(ChroniGenNHibernate.CEN.Chroni_Slot_setNote) ENABLED START*/

            // Write here your custom code...

            SlotCAD slotCAD = new SlotCAD();
            SlotCEN slotCEN = new SlotCEN(slotCAD);

            if (p_oid > 0)
            {
                SlotEN slot = slotCEN.ReadOID(p_oid);

                if (slot != null)
                {
                    if (!string.IsNullOrEmpty(p_note))
                    {
                        slot.Note = p_note;
                        slotCAD.Modify(slot);
                    }
                }
            }

            /*PROTECTED REGION END*/
        }