public virtual void BranchAcctMapFrom_RowInserting(PXCache sender, PXRowInsertingEventArgs e) { e.Cancel = !ValidateDuplicateMap <BranchAcctMap.toBranchID>(sender, MapFrom.View, e.Row, null); }
protected virtual void EMailSyncAccountPreferences_RowInserting(PXCache sender, PXRowInsertingEventArgs e) { var row = e.Row as EMailSyncAccountPreferences; if (row == null) { return; } if (row.EmployeeID != null) { foreach (PXResult <EPEmployee, Contact> result in PXSelectJoin <EPEmployee, InnerJoin <Contact, On <EPEmployee.defContactID, Equal <Contact.contactID>, And <EPEmployee.parentBAccountID, Equal <Contact.bAccountID> > > >, Where <EPEmployee.bAccountID, Equal <Required <EPEmployee.bAccountID> > > > .Select(Base, row.EmployeeID)) { row.EmployeeCD = ((EPEmployee)result).AcctName; row.Address = ((Contact)result).EMail; } } }
public virtual void RowInserting(PXCache sender, PXRowInsertingEventArgs e) { var item = (CAAdj)e.Row; UpdateStatus(sender, item, item.Hold); }
protected virtual void KCChannelAdvisorMappingField_RowInserting(PXCache sender, PXRowInsertingEventArgs e) { if (!(e.Row is KCChannelAdvisorMappingField row && !string.IsNullOrWhiteSpace(row.EntityType) && !string.IsNullOrWhiteSpace(row.FieldName))) { return; } var hash = KCCDHelper.GetMd5Sum(new[] { row.EntityType, row.FieldName }); sender.SetValue <KCChannelAdvisorMappingField.fieldHash>(e.Row, hash); }
protected virtual void AddTrxFilter_RowInserting(PXCache sender, PXRowInsertingEventArgs e) { AddTrxFilter filter = (AddTrxFilter)e.Row; filter.OnlyExpense = true; }
protected virtual void CCProcessingCenterPmntMethod_RowInserting(PXCache cache, PXRowInsertingEventArgs e) { if (errorKey) { errorKey = false; e.Cancel = true; } else { CCProcessingCenterPmntMethod row = e.Row as CCProcessingCenterPmntMethod; string detID = row.ProcessingCenterID; bool isExist = false; foreach (CCProcessingCenterPmntMethod it in this.ProcessingCenters.Select()) { if (!Object.ReferenceEquals(it, row) && it.ProcessingCenterID == row.ProcessingCenterID) { isExist = true; } } if (isExist) { cache.RaiseExceptionHandling <CCProcessingCenterPmntMethod.processingCenterID>(e.Row, detID, new PXException(Messages.ProcessingCenterIsAlreadyAssignedToTheCard)); e.Cancel = true; } else { CCProcessingCenter procCenter = GetProcessingCenterById(row.ProcessingCenterID); bool supported = CCProcessingFeatureHelper.IsFeatureSupported(procCenter, CCProcessingFeature.PaymentHostedForm); if (supported) { if (row.IsDefault == false) { WebDialogResult result = ProcessingCenters.Ask(Messages.DefaultProcessingCenterConfirmation, MessageButtons.YesNo); if (result == WebDialogResult.Yes) { row.IsDefault = true; } } } } } }
public void RowInserting(PXCache sender, PXRowInsertingEventArgs e) { throw new NotImplementedException(); }
protected virtual void EMailSyncAccount_RowInserting(PXCache sender, PXRowInsertingEventArgs e) { var row = e.Row as EMailSyncAccount; if (row == null) { return; } if (row.EmployeeID != null && row.Address == null && row.IsVitrual == false) { foreach (PXResult <EPEmployee, Contact> result in PXSelectJoin <EPEmployee, InnerJoin <Contact, On <EPEmployee.defContactID, Equal <Contact.contactID>, And <EPEmployee.parentBAccountID, Equal <Contact.bAccountID> > > >, Where <EPEmployee.bAccountID, Equal <Required <EPEmployee.bAccountID> > > > .Select(Base, row.EmployeeID)) { row.EmployeeCD = ((EPEmployee)result).AcctName; row.OwnerID = ((EPEmployee)result).UserID; row.Address = ((Contact)result).EMail; } } // Inserting a new record when SyncAccount is updated if (!(row.SyncAccount ?? false)) { return; } if (row.EmailAccountID != null) { return; } EMailAccount account = null; UserPreferences prefs = null; if (row.OwnerID != null) { prefs = Base.UserSettings.Search <UserPreferences.userID>(row.OwnerID); if (prefs == null) { prefs = new UserPreferences(); prefs.UserID = row.OwnerID; prefs = Base.UserSettings.Insert(prefs); } } using (new PXReadDeletedScope()) { account = PXSelectReadonly <EMailAccount, Where <EMailAccount.address, Equal <Required <EMailAccount.address> >, And <EMailAccount.emailAccountType, Equal <EmailAccountTypesAttribute.exchange> > > > .SelectSingleBound(Base, null, row.Address); if (account == null) { account = new EMailAccount(); account.Description = row.EmployeeCD; account.Address = row.Address; account.EmailAccountType = EmailAccountTypesAttribute.Exchange; account.IncomingHostProtocol = IncomingMailProtocolsAttribute._EXCHANGE; account.IncomingProcessing = true; account.ForbidRouting = true; account.CreateActivity = true; account.DefaultOwnerID = row.OwnerID; account = Base.EmailAccounts.Insert(account); } else { account.DeletedDatabaseRecord = false; Base.EmailAccounts.Update(account); } } row.EmailAccountID = account.EmailAccountID; if (prefs != null && Base.EmailAccounts.Cache.GetStatus(account) == PXEntryStatus.Inserted) { prefs.DefaultEMailAccountID = account.EmailAccountID; prefs = Base.UserSettings.Update(prefs) as UserPreferences; } }
protected virtual void NumberingSequence_RowInserting(PXCache cache, PXRowInsertingEventArgs e) { CheckNumbers(e.Row); }
public void RowInserting(PXCache sender, PXRowInsertingEventArgs e) { throw new PXSetupNotEnteredException("Setup is not entered", typeof(SOInvoice)); }
protected virtual void CCProcessingCenterPmntMethod_RowInserting(PXCache cache, PXRowInsertingEventArgs e) { if (errorKey) { errorKey = false; e.Cancel = true; } else { CCProcessingCenterPmntMethod row = e.Row as CCProcessingCenterPmntMethod; string detID = row.ProcessingCenterID; bool isExist = false; foreach (CCProcessingCenterPmntMethod it in this.PaymentMethods.Select()) { if (!Object.ReferenceEquals(it, row) && (it.PaymentMethodID == row.PaymentMethodID) && (it.ProcessingCenterID == it.ProcessingCenterID)) { isExist = true; } } if (isExist) { cache.RaiseExceptionHandling <CCProcessingCenterPmntMethod.paymentMethodID>(e.Row, detID, new PXException(Messages.PaymentMethodIsAlreadyAssignedToTheProcessingCenter)); e.Cancel = true; } } }
public virtual void RowInserting(PXCache sender, PXRowInsertingEventArgs e) { var item = (POLandedCostDoc)e.Row; StatusSet(sender, item, item.Hold); }