protected virtual void Copy(ARSPCommnDocResult aDst, ARSalesPerTran aSrc)
 {
     aDst.RefNbr      = aSrc.RefNbr;
     aDst.DocType     = aSrc.DocType;
     aDst.AdjdDocType = (aSrc.AdjdDocType != ARDocType.Undefined)? aSrc.AdjdDocType: String.Empty;
     aDst.AdjdRefNbr  = aSrc.AdjdRefNbr;
     aDst.AdjNbr      = aSrc.AdjNbr;
     aDst.CommnPct    = aSrc.CommnPct;
     aDst.CommnAmt    = aSrc.CommnAmt;
     aDst.CommnblAmt  = aSrc.CommnblAmt;
 }
Exemplo n.º 2
0
        protected virtual void SalesPerson_RowDeleting(PXCache cache, PXRowDeletingEventArgs e)
        {
            SalesPerson row = (SalesPerson)e.Row;
            PXSelectBase <ARSalesPerTran> sel = new PXSelect <ARSalesPerTran, Where <ARSalesPerTran.salespersonID, Equal <Required <ARSalesPerTran.salespersonID> > > >(this);
            ARSalesPerTran tran = (ARSalesPerTran)sel.View.SelectSingle(row.SalesPersonID);

            if (tran != null)
            {
                throw new PXException(Messages.SalesPersonWithHistoryMayNotBeDeleted);
            }
        }