コード例 #1
0
        }       //	prepare

        /// <summary>
        /// Perform Process.
        /// </summary>
        /// <returns>Message </returns>
        protected override String DoIt()
        {
            int To_C_Invoice_ID = GetRecord_ID();

            log.Info("From C_Invoice_ID=" + _C_Invoice_ID + " to " + To_C_Invoice_ID);
            if (To_C_Invoice_ID == 0)
            {
                throw new Exception("Target C_Invoice_ID == 0");
            }
            if (_C_Invoice_ID == 0)
            {
                throw new Exception("Source C_Invoice_ID == 0");
            }
            VAdvantage.Model.MInvoice from = new VAdvantage.Model.MInvoice(GetCtx(), _C_Invoice_ID, null);
            VAdvantage.Model.MInvoice to   = new VAdvantage.Model.MInvoice(GetCtx(), To_C_Invoice_ID, null);
            //
            int no = to.CopyLinesFrom(from, false, false);

            //
            return("@Copied@=" + no);
        } //	doIt