protected virtual void INPIClass_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            INPIClass row = e.Row as INPIClass;

            if (row == null)
            {
                return;
            }
            PXUIFieldAttribute.SetVisible <INPIClass.lastCountPeriod>(sender, row, row.SelectedMethod == PIInventoryMethod.LastCountDate);
            PXUIFieldAttribute.SetVisible <INPIClass.randomItemsLimit>(sender, row, row.SelectedMethod == PIInventoryMethod.RandomlySelectedItems);

            PXUIFieldAttribute.SetEnabled <INPIClass.aBCCodeID>(sender, row, row.ByFrequency != true);
            PXUIFieldAttribute.SetEnabled <INPIClass.movementClassID>(sender, row, row.ByFrequency != true);
            PXUIFieldAttribute.SetEnabled <INPIClass.cycleID>(sender, row, row.ByFrequency != true);

            this.Items.Cache.AllowInsert         =
                this.Items.Cache.AllowUpdate     =
                    this.Items.Cache.AllowDelete =
                        row.SelectedMethod == PIInventoryMethod.ListOfItems;
            AddItem.SetEnabled(row.SelectedMethod == PIInventoryMethod.ListOfItems);

            this.Locations.Cache.AllowInsert         =
                this.Locations.Cache.AllowUpdate     =
                    this.Locations.Cache.AllowDelete =
                        row.SiteID != null;
        }
Пример #2
0
        protected virtual void INPIClass_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            INPIClass row = (INPIClass)e.Row;

            if (row == null)
            {
                return;
            }

            PXUIFieldAttribute.SetEnabled <INPIClass.includeZeroItems>(sender, row, AllowIncludeZeroItems(row));

            PXUIFieldAttribute.SetVisible <INPIClass.lastCountPeriod>(sender, row, row.SelectedMethod == PIInventoryMethod.LastCountDate);
            PXUIFieldAttribute.SetVisible <INPIClass.randomItemsLimit>(sender, row, row.SelectedMethod == PIInventoryMethod.RandomlySelectedItems);

            PXUIFieldAttribute.SetEnabled <INPIClass.aBCCodeID>(sender, row, row.ByFrequency != true);
            PXUIFieldAttribute.SetEnabled <INPIClass.movementClassID>(sender, row, row.ByFrequency != true);
            PXUIFieldAttribute.SetEnabled <INPIClass.cycleID>(sender, row, row.ByFrequency != true);

            this.Items.Cache.AllowInsert         =
                this.Items.Cache.AllowUpdate     =
                    this.Items.Cache.AllowDelete =
                        row.SelectedMethod == PIInventoryMethod.ListOfItems;
            AddItem.SetEnabled(row.SelectedMethod == PIInventoryMethod.ListOfItems);

            this.Locations.Cache.AllowInsert         =
                this.Locations.Cache.AllowUpdate     =
                    this.Locations.Cache.AllowDelete =
                        row.SiteID != null;

            PXUIFieldAttribute.SetWarning <INPIClass.unlockSiteOnCountingFinish>(sender, row, row.UnlockSiteOnCountingFinish == true
                                ? Messages.PITypeEarlyInventoryUnfreezeWarning
                                : null);
        }