Exemple #1
0
        public virtual IEnumerable ViewAssignmentMap(PXAdapter adapter)
        {
            if (SetupApproval.Current != null)
            {
                PXGraph         graph         = null;
                APSetupApproval setupApproval = SetupApproval.Current;
                EPAssignmentMap map           = (EPAssignmentMap)PXSelect <EPAssignmentMap,
                                                                           Where <EPAssignmentMap.assignmentMapID, Equal <Required <EPAssignmentMap.assignmentMapID> > > > .Select(this, setupApproval.AssignmentMapID).First();

                if (map.MapType == EPMapType.Approval)
                {
                    graph = PXGraph.CreateInstance <EPApprovalMapMaint>();
                }
                else if (map.MapType == EPMapType.Assignment)
                {
                    graph = PXGraph.CreateInstance <EPAssignmentMapMaint>();
                }
                else if (map.MapType == EPMapType.Legacy && map.AssignmentMapID > 0)
                {
                    graph = PXGraph.CreateInstance <EPAssignmentMaint>();
                }
                else
                {
                    graph = PXGraph.CreateInstance <EPAssignmentAndApprovalMapEnq>();
                }

                PXRedirectHelper.TryRedirect(graph, map, PXRedirectHelper.WindowMode.NewWindow);
            }
            return(adapter.Get());
        }
Exemple #2
0
        protected virtual void APSetupApproval_DocType_FieldUpdated(PXCache sender, PXFieldUpdatedEventArgs e)
        {
            APSetupApproval row = e.Row as APSetupApproval;

            if (row == null)
            {
                return;
            }
            sender.SetDefaultExt <APSetupApproval.assignmentMapID>(row);
            sender.SetDefaultExt <APSetupApproval.assignmentNotificationID>(row);
        }