public static void ReleaseCustomSchedule(DRScheduleDetail item)
        {
            ScheduleMaint maint = PXGraph.CreateInstance <ScheduleMaint>();

            maint.Clear();
            maint.Document.Current = PXSelect <DR.DRScheduleDetail,
                                               Where <DR.DRScheduleDetail.scheduleID, Equal <Required <DR.DRScheduleDetail.scheduleID> >,
                                                      And <DR.DRScheduleDetail.componentID, Equal <Required <DR.DRScheduleDetail.componentID> > > > > .Select(maint, item.ScheduleID, item.ComponentID);

            maint.ReleaseCustomScheduleDetail();
        }
Пример #2
0
        public static void ReleaseCustomSchedule(DRScheduleDetail item)
        {
            ScheduleMaint maint = PXGraph.CreateInstance <ScheduleMaint>();

            var details = PXSelect <
                DRScheduleDetail,
                Where <DRScheduleDetail.scheduleID, Equal <Required <DRSchedule.scheduleID> >,
                       And <DRScheduleDetail.isResidual, Equal <False> > > >
                          .Select(maint, item.ScheduleID)
                          .RowCast <DRScheduleDetail>();

            maint.GetService <IFinPeriodUtils>().ValidateFinPeriod <DRScheduleDetail>(details, m => item.FinPeriodID, m => m.BranchID.SingleToArray());

            maint.Clear();
            maint.Document.Current = PXSelect <DR.DRScheduleDetail,
                                               Where <DR.DRScheduleDetail.scheduleID, Equal <Required <DR.DRScheduleDetail.scheduleID> >,
                                                      And <DR.DRScheduleDetail.componentID, Equal <Required <DR.DRScheduleDetail.componentID> > > > > .Select(maint, item.ScheduleID, item.ComponentID);

            maint.ReleaseCustomScheduleDetail();
        }