예제 #1
0
        private void btnReturnItems_Click(object sender, EventArgs e)
        {
            //Send Checkout Items => Sell Form With Props (Refund)

            Sell sell = new Sell();

            sell.ReturnItems = true;

            foreach (CheckoutSaleLedger checkoutSaleLedger in flpnlCheckoutProducts.Controls)
            {
                ProductCheckout pc = new ProductCheckout();

                //Pass Props From CheckoutSaleLedger => ProductCheckout Then Add On Checkout
                pc.ProductName = checkoutSaleLedger.ProductName;
                pc.ProductID   = checkoutSaleLedger.ProductID;
                pc.ProductDiscountPercentage = checkoutSaleLedger.ProductDiscountPercentage;
                pc.ProductUnitPrice          = checkoutSaleLedger.ProductUnitPrice;
                pc.ProductQuantity           = checkoutSaleLedger.ProductQuantity;
                pc.ProductTag   = checkoutSaleLedger.ProductTag;
                pc.ProductToken = checkoutSaleLedger.ProductTag;
                pc.RootForm     = "SalesLedger";
                pc.ReturnItems  = true;

                sell.flpnl_Checkout.Controls.Add(pc);
            }

            //sell.Update();
            sell.Show();
            sell.RefundCheckout();
        }