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); } } }
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); }
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); }
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); } }
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); }
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); } } }
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); }