コード例 #1
0
        /// <summary>
        /// 更新POItems
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="docNo"></param>
        public virtual void UpdatePOItem(APInvoicePOItemInfo entity, int docNo)
        {
            DataCommand command = DataCommandManager.GetDataCommand("UpdateAPInvoicePOItem");

            command.SetParameterValue("@DocNo", docNo);
            command.SetParameterValue("@PoNo", entity.PoNo);
            command.SetParameterValue("@PoWarehouseNo", entity.PoStockSysNo ?? 0);
            command.SetParameterValue("@PoCurrency", 1);
            command.SetParameterValue("@PoAmt", entity.PoAmt ?? 0);
            command.SetParameterValue("@EIMSNo", entity.EIMSNo);
            if (entity.EIMSAmt == null)
            {
                entity.EIMSAmt = 0;
            }
            command.SetParameterValue("@EIMSAmt", entity.EIMSAmt);
            if (entity.EIMSNetAmt == null)
            {
                entity.EIMSNetAmt = 0;
            }
            command.SetParameterValue("@EIMSNetAmt", entity.EIMSNetAmt);
            command.SetParameterValue("@EIMSNetTaxAmt", entity.EIMSNetTaxAmt);
            command.SetParameterValue("@PoNetAmt", entity.PoNetAmt);
            command.SetParameterValue("@PaymentAmt", entity.PaymentAmt ?? 0);
            command.SetParameterValue("@PoBaselineDate", entity.PoBaselineDate);
            command.SetParameterValue("@PoPaymentTerm", entity.PoPaymentTerm);
            command.SetParameterValue("@Status", entity.Status);
            command.SetParameterValue("@EditDate", DateTime.Now);
            command.SetParameterValueAsCurrentUserAcct("@EditUser");
            command.SetParameterValue("@OrderType", (int)entity.OrderType);
            command.SetParameterValue("@BatchNumber", entity.BatchNumber);
            command.SetParameterValue("@PayableTaxAmt", entity.PayableTaxAmt);

            command.ExecuteNonQuery();
        }
コード例 #2
0
        /// <summary>
        /// 检查POItem状态是否为有效
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public virtual bool CheckPOItemAudit(APInvoicePOItemInfo entity)
        {
            DataCommand command = DataCommandManager.GetDataCommand("CheckPOItemAudit");

            command.SetParameterValue("@OrderType", entity.OrderType);
            command.SetParameterValue("@PONo", entity.PoNo);
            command.SetParameterValue("@BatchNumber", entity.BatchNumber);
            return(Convert.ToInt32(command.ExecuteScalar()) > 0);
        }