protected virtual void _(Events.RowSelected <CROpportunity> e)
        {
            if (e.Row == null)
            {
                return;
            }

            CROpportunity crOpportunityRow = (CROpportunity)e.Row;
            PXCache       cache            = e.Cache;

            FSxCROpportunity fsxCROpportunityRow = cache.GetExtension <FSxCROpportunity>(crOpportunityRow);

            FSServiceOrder fsServiceOrderRow = CRExtensionHelper.GetRelatedServiceOrder(Base, cache, crOpportunityRow, fsxCROpportunityRow.SOID);
            FSSrvOrdType   fsSrvOrdTypeRow   = null;

            if (fsServiceOrderRow != null)
            {
                fsSrvOrdTypeRow = CRExtensionHelper.GetServiceOrderType(Base, fsServiceOrderRow.SrvOrdType);
            }

            EnableDisableExtensionFields(cache, fsxCROpportunityRow, fsServiceOrderRow);
            EnableDisableActions(cache, crOpportunityRow, fsxCROpportunityRow, fsServiceOrderRow, fsSrvOrdTypeRow);
            SetPersistingChecks(cache, crOpportunityRow, fsxCROpportunityRow, fsSrvOrdTypeRow);

            HideOrShowFieldsActionsByInventoryFeature();
        }
예제 #2
0
        protected void CRCase_RowSelected(PXCache cache, PXRowSelectedEventArgs e)
        {
            if (e.Row == null)
            {
                return;
            }

            CRCase    crCaseRow    = (CRCase)e.Row;
            FSxCRCase fsxCRCaseRow = cache.GetExtension <FSxCRCase>(crCaseRow);

            FSServiceOrder fsServiceOrderRow = CRExtensionHelper.GetRelatedServiceOrder(Base, cache, crCaseRow, fsxCRCaseRow.SOID);
            FSSrvOrdType   fsSrvOrdTypeRow   = null;

            if (fsServiceOrderRow != null)
            {
                fsSrvOrdTypeRow = CRExtensionHelper.GetServiceOrderType(Base, fsServiceOrderRow.SrvOrdType);
            }

            EnableDisableCustomFields(cache, crCaseRow, fsxCRCaseRow, fsServiceOrderRow, fsSrvOrdTypeRow);
            EnableDisableActions(cache, crCaseRow, fsxCRCaseRow, fsServiceOrderRow, fsSrvOrdTypeRow);
            SetPersistingChecks(cache, crCaseRow, fsxCRCaseRow, fsSrvOrdTypeRow);
        }