コード例 #1
0
        public Receipt CreateFakeReceipt(int receiptTypeID, ReceiptInvoice rctInvoice, int userId, int receiptStatusID, int wearehouse = 0)
        {
            Receipt receipt = new Receipt();

            receipt.AddNew();
            receipt.DateOfEntry   = DateTimeHelper.ServerDateTime;
            receipt.ReceiptTypeID = receiptTypeID;

            receipt.ReceiptTypeID = receiptTypeID;

            receipt.SavedByUserID = userId;
            receipt.WarehouseID   = wearehouse;

            receipt.ReceiptInvoiceID = rctInvoice.ID;
            receipt.STVOrInvoiceNo   = rctInvoice.STVOrInvoiceNo;

            receipt.SavedByUserID = userId;


            if (receipt.IsColumnNull("TransitTransferNo"))
            {
                receipt.TransitTransferNo = rctInvoice.TransitTransferNo;
            }
            receipt.InsurancePolicyNo = rctInvoice.InsurancePolicyNo;
            receipt.WayBillNo         = rctInvoice.WayBillNo;
            receipt.ReceiptStatusID   = receiptStatusID;
            receipt.Save();
            return(receipt);
        }
コード例 #2
0
        public Receipt CreateFakeReceipt(int receiptTypeID, ReceiptInvoice rctInvoice, int userId, int receiptStatusID, int wearehouse =0)
        {
            Receipt receipt = new Receipt();
            receipt.AddNew();
            receipt.DateOfEntry = DateTimeHelper.ServerDateTime;
            receipt.ReceiptTypeID = receiptTypeID;

            receipt.ReceiptTypeID = receiptTypeID;

            receipt.SavedByUserID = userId;
            receipt.WarehouseID = wearehouse;

            receipt.ReceiptInvoiceID = rctInvoice.ID;
            receipt.STVOrInvoiceNo = rctInvoice.STVOrInvoiceNo;

            receipt.SavedByUserID = userId;

            if (receipt.IsColumnNull("TransitTransferNo"))
            {
                receipt.TransitTransferNo = rctInvoice.TransitTransferNo;
            }
            receipt.InsurancePolicyNo = rctInvoice.InsurancePolicyNo;
            receipt.WayBillNo = rctInvoice.WayBillNo;
            receipt.ReceiptStatusID = receiptStatusID;
            receipt.Save();
            return receipt;
        }