Пример #1
0
        public void RowPersisted(PXCache sender, PXRowPersistedEventArgs e)
        {
            SOInvoice invoice = e.Row as SOInvoice;

            switch (Mode)
            {
            case 0:
                throw new PXRowPersistedException(typeof(SOInvoice.refNbr).Name, invoice.RefNbr, "Persist error");                                      //No diagnostic

            case 1:
                throw new PXLockViolationException(typeof(SOInvoice), PXDBOperation.Insert, new object[] { invoice.RefNbr });                           //No diagnostic

            case 2:
                throw new PXException("Something bad happened");                                //Should report diagnostic

            case 3:
                throw new ArgumentOutOfRangeException(nameof(Mode));                            //No diagnostic

            case 4:
                throw new ArgumentNullException(nameof(Mode));                                  //No diagnostic

            case 5:
                throw new ArgumentException("Something bad happened");                          //No diagnostic

            case 6:
                throw new NotImplementedException();                                            //No diagnostic

            default:
                throw new NotSupportedException();                                              //No diagnostic
            }
        }
Пример #2
0
 public static void InitializeRow(SOInvoice row)
 {
     row.RefNbr = "<NEW>";
 }