protected virtual void GLSetup_RowUpdated(PXCache sender, PXRowUpdatedEventArgs e) { foreach (GLConsolSetup detail in ConsolSetupRecords.Select()) { ConsolSetupRecords.Cache.MarkUpdated(detail); } }
protected virtual void GLSetup_RowUpdated(PXCache sender, PXRowUpdatedEventArgs e) { foreach (GLConsolSetup detail in ConsolSetupRecords.Select()) { if (ConsolSetupRecords.Cache.GetStatus(detail) == PXEntryStatus.Notchanged) { ConsolSetupRecords.Cache.SetStatus(detail, PXEntryStatus.Updated); } } }
public virtual void KCBulkProductSyncConfig_SyncType_FieldUpdated(PXCache sender, PXFieldUpdatedEventArgs e) { if (!(e.Row is KCBulkProductSyncConfig row)) { return; } foreach (var store in Stores.Select().RowCast <KCStore>()) { store.SyncType = row.SyncType; Stores.Update(store); } }
public override int ExecuteUpdate(string viewName, IDictionary keys, IDictionary values, params object[] parameters) { try { return(base.ExecuteUpdate(viewName, keys, values, parameters)); } catch (Exception ex) { if (viewName.ToLower() == "initemlist" && ((ex is System.Data.SqlClient.SqlException && ((System.Data.SqlClient.SqlException)ex).Number == 208 /*invalid object name*/) || (ex is PXArgumentException && ((PXArgumentException)ex).ParamName == "table"))) { INItemList.Select(); try { return(base.ExecuteUpdate(viewName, keys, values, parameters)); } catch (System.Data.SqlClient.SqlException) { return(0); } } else { throw; } } }
protected virtual void PaymentFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { PaymentFilter filter = e.Row as PaymentFilter; if (filter != null) { CurrencyInfo info = CurrencyInfo_CuryInfoID.Select(filter.CuryInfoID); var test = ARDocumentList.Select().Count; } }
protected virtual void BoundaryYears_YearTo_FieldDefaulting(PXCache sender, PXFieldDefaultingEventArgs e) { int?minyear = null; foreach (FABook book in Books.Select()) { if (book.LastCalendarYear != null && (minyear == null || minyear > Convert.ToInt32(book.LastCalendarYear))) { minyear = Convert.ToInt32(book.LastCalendarYear); } } e.NewValue = Convert.ToString(minyear + 1); }
protected virtual void _(Events.RowUpdated <ARRetainageFilter> e) { if (e.Row == null || e.OldRow == null) { return; } if (!e.Cache.ObjectsEqual < ARRetainageFilter.branchID, ARRetainageFilter.docDate, ARRetainageFilter.finPeriodID, ARRetainageFilter.customerID, ARRetainageFilter.projectID, ARRetainageFilter.refNbr, ARRetainageFilter.showBillsWithOpenBalance>(e.Row, e.OldRow) || !e.Cache.ObjectsEqual < ARRetainageFilter.projectTaskID, ARRetainageFilter.accountGroupID, ARRetainageFilter.costCodeID, ARRetainageFilter.inventoryID>(e.Row, e.OldRow)) { DocumentList.Cache.Clear(); DocumentList.View.Clear(); e.Row.CuryRetainageReleasedAmt = 0m; } else if (!e.Cache.ObjectsEqual <ARRetainageFilter.retainageReleasePct>(e.Row, e.OldRow)) { decimal retainageTotal = 0m; foreach (ARInvoiceExt item in DocumentList.Select()) { DocumentList.Cache.SetValueExt <ARInvoiceExt.retainageReleasePct>(item, e.Row.RetainageReleasePct); retainageTotal += item.Selected == true ? (item.CuryRetainageReleasedAmt ?? 0m) : 0m; } // Manually calculate amount here, because it is too late for automatic // ARInvoiceExt.CuryRetainageReleasedAmt formula calculation and filter // totals won't be updated. // e.Row.CuryRetainageReleasedAmt = retainageTotal; } }