public override void openServiceContractScreenBySchedules()
        {
            ServiceContractEntry graphServiceContractEntry = PXGraph.CreateInstance <ServiceContractEntry>();
            FSServiceContract    fsServiceContractRow      =
                PXSelect <FSServiceContract,
                          Where <
                              FSServiceContract.serviceContractID, Equal <Required <FSServiceContract.serviceContractID> > > >
                .Select(this, ServiceContractSchedules.Current.EntityID);

            graphServiceContractEntry.ServiceContractRecords.Current = fsServiceContractRow;
            throw new PXRedirectRequiredException(graphServiceContractEntry, null)
                  {
                      Mode = PXBaseRedirectException.WindowMode.NewWindow
                  };
        }
Esempio n. 2
0
 public virtual void UpdateSourcePostDoc(FSSetup fsSetupRow, FSContractPostDoc fsContractPostDocRow, FSServiceContract fsServiceContractRow)
 {
     if (fsServiceContractRow.RecordType == ID.RecordType_ServiceContract.SERVICE_CONTRACT)
     {
         ServiceContractEntry ServiceContractGraph = PXGraph.CreateInstance <ServiceContractEntry>();
         ServiceContractGraph.ServiceContractRecords.Current = ServiceContractGraph.ServiceContractRecords.Search <FSServiceContract.serviceContractID>(fsContractPostDocRow.ServiceContractID, fsServiceContractRow.CustomerID);
         ServiceContractGraph.InvoiceBillingPeriod(fsSetupRow, fsContractPostDocRow);
     }
     else
     {
         RouteServiceContractEntry RouteServiceContractGraph = PXGraph.CreateInstance <RouteServiceContractEntry>();
         RouteServiceContractGraph.ServiceContractRecords.Current = RouteServiceContractGraph.ServiceContractRecords.Search <FSServiceContract.serviceContractID>(fsContractPostDocRow.ServiceContractID, fsServiceContractRow.CustomerID);
         RouteServiceContractGraph.InvoiceBillingPeriod(fsSetupRow, fsContractPostDocRow);
     }
 }
        public override void openServiceContractScreenByGenerationLogError()
        {
            ServiceContractEntry graphServiceContractEntry = PXGraph.CreateInstance <ServiceContractEntry>();

            FSServiceContract fsServiceContractRow =
                PXSelectJoin <FSServiceContract,
                              InnerJoin <FSSchedule,
                                         On <FSSchedule.entityID, Equal <FSServiceContract.serviceContractID>,
                                             And <FSSchedule.customerID, Equal <FSServiceContract.customerID> > > >,
                              Where <FSSchedule.scheduleID, Equal <Required <FSSchedule.scheduleID> > > >
                .Select(this, ErrorMessageRecords.Current.ScheduleID);

            graphServiceContractEntry.ServiceContractRecords.Current = fsServiceContractRow;
            throw new PXRedirectRequiredException(graphServiceContractEntry, null)
                  {
                      Mode = PXBaseRedirectException.WindowMode.NewWindow
                  };
        }
        public virtual void openContract()
        {
            ContractPostBatchDetail fsContractPostDocRow = ContractPostDocRecords.Current;

            if (fsContractPostDocRow == null)
            {
                return;
            }

            FSServiceContract fsServiceContractRow =
                PXSelect <FSServiceContract,
                          Where <
                              FSServiceContract.serviceContractID, Equal <Required <FSServiceContract.serviceContractID> > > >
                .Select(this, fsContractPostDocRow.ServiceContractID);

            if (fsServiceContractRow == null)
            {
                return;
            }

            if (fsServiceContractRow.RecordType == ID.RecordType_ServiceContract.SERVICE_CONTRACT)
            {
                ServiceContractEntry graphServiceContractEntry = PXGraph.CreateInstance <ServiceContractEntry>();
                graphServiceContractEntry.ServiceContractRecords.Current = graphServiceContractEntry.ServiceContractRecords.Search <FSServiceContract.serviceContractID>(fsServiceContractRow.ServiceContractID, fsServiceContractRow.CustomerID);
                throw new PXRedirectRequiredException(graphServiceContractEntry, null)
                      {
                          Mode = PXBaseRedirectException.WindowMode.NewWindow
                      };
            }
            else
            {
                RouteServiceContractEntry graphRouteServiceContractEntry = PXGraph.CreateInstance <RouteServiceContractEntry>();
                graphRouteServiceContractEntry.ServiceContractRecords.Current = graphRouteServiceContractEntry.ServiceContractRecords.Search <FSServiceContract.serviceContractID>(fsServiceContractRow.ServiceContractID, fsServiceContractRow.CustomerID);
                throw new PXRedirectRequiredException(graphRouteServiceContractEntry, null)
                      {
                          Mode = PXBaseRedirectException.WindowMode.NewWindow
                      };
            }
        }