Пример #1
0
        protected virtual void POPrintOrderFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            POPrintOrderFilter filter = (POPrintOrderFilter)e.Row;

            PXUIFieldAttribute.SetEnabled <POPrintOrderFilter.ownerID>(sender, filter, filter == null || filter.MyOwner == false);
            PXUIFieldAttribute.SetEnabled <POPrintOrderFilter.workGroupID>(sender, filter, filter == null || filter.MyWorkGroup == false);

            if (filter != null && !String.IsNullOrEmpty(filter.Action))
            {
                Dictionary <string, object> parameters = Filter.Cache.ToDictionary(filter);
                Records.SetProcessTarget(null, null, null, filter.Action, parameters);
                bool showPrintSettings = IsPrintingAllowed(filter);

                PXUIFieldAttribute.SetVisible <POPrintOrderFilter.printWithDeviceHub>(sender, filter, showPrintSettings);
                PXUIFieldAttribute.SetVisible <POPrintOrderFilter.definePrinterManually>(sender, filter, showPrintSettings);
                PXUIFieldAttribute.SetVisible <POPrintOrderFilter.printerID>(sender, filter, showPrintSettings);
                PXUIFieldAttribute.SetVisible <POPrintOrderFilter.numberOfCopies>(sender, filter, showPrintSettings);

                PXUIFieldAttribute.SetEnabled <POPrintOrderFilter.definePrinterManually>(sender, filter, filter.PrintWithDeviceHub == true);
                PXUIFieldAttribute.SetEnabled <POPrintOrderFilter.numberOfCopies>(sender, filter, filter.PrintWithDeviceHub == true);
                PXUIFieldAttribute.SetEnabled <POPrintOrderFilter.printerID>(sender, filter, filter.PrintWithDeviceHub == true && filter.DefinePrinterManually == true);

                if (filter.PrintWithDeviceHub != true || filter.DefinePrinterManually != true)
                {
                    filter.PrinterID = null;
                }
            }
        }
        protected virtual void POPrintOrderFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            POPrintOrderFilter filter = (POPrintOrderFilter)e.Row;

            PXUIFieldAttribute.SetEnabled <POPrintOrderFilter.ownerID>(sender, filter, filter == null || filter.MyOwner == false);
            PXUIFieldAttribute.SetEnabled <POPrintOrderFilter.workGroupID>(sender, filter, filter == null || filter.MyWorkGroup == false);

            if (filter != null && !String.IsNullOrEmpty(filter.Action))
            {
                Dictionary <string, object> parameters = Filter.Cache.ToDictionary(filter);
                Records.SetProcessTarget(null, null, null, filter.Action, parameters);

                bool showPrintSettings = PXAccess.FeatureInstalled <FeaturesSet.deviceHub>() &&
                                         (filter != null && !String.IsNullOrEmpty(filter.Action) && POReports.GetReportIDByName(Records, filter.Action) == POReports.PurchaseOrderReportID);

                PXUIFieldAttribute.SetVisible <POPrintOrderFilter.printWithDeviceHub>(sender, filter, showPrintSettings);
                PXUIFieldAttribute.SetVisible <POPrintOrderFilter.definePrinterManually>(sender, filter, showPrintSettings);
                PXUIFieldAttribute.SetVisible <POPrintOrderFilter.printerName>(sender, filter, showPrintSettings);

                PXUIFieldAttribute.SetEnabled <POPrintOrderFilter.definePrinterManually>(sender, filter, filter.PrintWithDeviceHub == true);
                PXUIFieldAttribute.SetEnabled <POPrintOrderFilter.printerName>(sender, filter, filter.PrintWithDeviceHub == true && filter.DefinePrinterManually == true);

                if (filter.PrintWithDeviceHub != true || filter.DefinePrinterManually != true)
                {
                    filter.PrinterName = null;
                }
            }
        }
Пример #3
0
        protected virtual void POPrintOrderFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            POPrintOrderFilter o = (POPrintOrderFilter)e.Row;

            PXUIFieldAttribute.SetEnabled <POPrintOrderFilter.ownerID>(sender, o, o == null || o.MyOwner == false);
            PXUIFieldAttribute.SetEnabled <POPrintOrderFilter.workGroupID>(sender, o, o == null || o.MyWorkGroup == false);

            if (o != null && !String.IsNullOrEmpty(o.Action))
            {
                Records.SetProcessTarget(null, null, null, o.Action);
            }
        }
Пример #4
0
        protected virtual void POPrintOrderFilter_PrinterName_FieldVerifying(PXCache sender, PXFieldVerifyingEventArgs e)
        {
            POPrintOrderFilter row = (POPrintOrderFilter)e.Row;

            if (row != null)
            {
                if (!IsPrintingAllowed(row))
                {
                    e.NewValue = null;
                }
            }
        }
Пример #5
0
 public virtual bool IsPrintingAllowed(POPrintOrderFilter filter)
 {
     return(PXAccess.FeatureInstalled <FeaturesSet.deviceHub>() &&
            (filter != null && !String.IsNullOrEmpty(filter.Action) && POReports.GetReportIDByName(Records, filter.Action) == POReports.PurchaseOrderReportID));
 }