コード例 #1
0
 public void RUTROTDeductibleUpdated(IRUTROTable row, IRUTROTable oldRow, RUTROT rutrot)
 {
     if (row != null && oldRow?.IsRUTROTDeductible != row.IsRUTROTDeductible)
     {
         if ((rutrot == null || rutrot.RefNbr == null) && row.IsRUTROTDeductible == true)
         {
             rutrot = (RUTROT)Rutrots.Insert(new RUTROT());
         }
         else if (row.IsRUTROTDeductible != true)
         {
             Rutrots.Delete(rutrot);
         }
     }
 }
コード例 #2
0
        protected virtual void InsertLocationLock(int?locationId, bool excluded = false)
        {
            if (locationId == null && excluded == true)
            {
                throw new PXArgumentException(nameof(excluded));
            }
            var loc = new INPIStatusLoc
            {
                SiteID     = _siteId,
                PIID       = _piId,
                LocationID = locationId,
                Excluded   = excluded,
            };

            _inPIStatusLocation.Insert(loc);
        }
コード例 #3
0
        protected virtual void InsertInventoryLock(int?inventoryId, bool excluded = false)
        {
            if (inventoryId == null && excluded == true)
            {
                throw new PXArgumentException(nameof(excluded));
            }
            var item = new INPIStatusItem
            {
                SiteID      = _siteId,
                PIID        = _piId,
                InventoryID = inventoryId,
                Excluded    = excluded,
            };

            _inPIStatusItem.Insert(item);
        }
コード例 #4
0
        public static IEnumerable EmployeeRecordsDelegate(object employeeView, PXSelectBase <EmployeeGridFilter> employeeFilterView)
        {
            foreach (EmployeeGridFilter employeeRow in PopulateEmployeeFilter(employeeView))
            {
                EmployeeGridFilter employeeInView = employeeFilterView.Locate(employeeRow);

                if (employeeInView == null)
                {
                    employeeRow.Mem_Selected = true;
                    employeeInView           = employeeFilterView.Insert(employeeRow);
                }

                employeeFilterView.Cache.SetStatus(employeeInView, PXEntryStatus.Held);
                employeeFilterView.Cache.IsDirty = false;

                yield return(employeeInView);
            }
        }
コード例 #5
0
        public static void InsertCurrentService <ServiceDetType>(PXSelectBase <InventoryItem> inventoryView,
                                                                 PXSelectBase <ServiceDetType> serviceDetView)
            where ServiceDetType : class, IBqlTable, IFSSODetBase, new()
        {
            if (inventoryView.Current == null)
            {
                return;
            }

            InventoryItem inventoryItemRow = SharedFunctions.GetInventoryItemRow(serviceDetView.Cache.Graph, inventoryView.Current.InventoryID);

            var newRow = new ServiceDetType();

            newRow.LineType    = ID.LineType_ALL.SERVICE;
            newRow.InventoryID = inventoryItemRow.InventoryID;

            newRow = serviceDetView.Insert(newRow);
        }
コード例 #6
0
 private void RUTROTDeductibleUpdated(IRUTROTable row, IRUTROTable oldRow, RUTROT rutrot)
 {
     if (row != null)
     {
         if (oldRow?.IsRUTROTDeductible != row.IsRUTROTDeductible)
         {
             if ((rutrot == null || rutrot.RefNbr == null) && row.IsRUTROTDeductible == true)
             {
                 rutrot = (RUTROT)Rutrots.Insert(new RUTROT());
             }
             else if (row.IsRUTROTDeductible != true)
             {
                 Rutrots.Delete(rutrot);
             }
         }
         else if (row.IsRUTROTDeductible == true && rutrot != null && Rutrots.Cache.GetStatus(rutrot) == PXEntryStatus.Notchanged)
         {
             //we need this to raise RowPersisting on RUTROT even it was not changed
             Rutrots.Cache.SetStatus(rutrot, PXEntryStatus.Updated);
         }
     }
 }
コード例 #7
0
        public static void InsertCurrentService <ServiceDetType>(
            PXSelectBase <InventoryItem> inventoryView,
            PXSelectBase <ServiceDetType> serviceDetView)
            where ServiceDetType : class, IBqlTable, IFSSODetBase, new()
        {
            if (inventoryView.Current == null)
            {
                return;
            }

            InventoryItem inventoryItemRow = SharedFunctions.GetInventoryItemRow(serviceDetView.Cache.Graph, inventoryView.Current.InventoryID);

            SharedFunctions.ShowServiceOrderNote(PXDBOperation.Insert, serviceDetView.View, inventoryItemRow);
            serviceDetView.ClearDialog();

            var newRow = new ServiceDetType();

            newRow.LineType = ID.LineType_All.SERVICE;

            newRow = serviceDetView.Insert(newRow);

            serviceDetView.SetValueExt <FSSODetService.inventoryID>(newRow, inventoryItemRow.InventoryID);
            serviceDetView.Update(newRow);
        }