Example #1
0
        private void SalesBtn_Click(object sender, EventArgs e)
        {
            this.Hide();
            var saleModel = new SaleModel.AllSale()
            {
                AllSales = new List <Entities.Sale>()
                {
                    new Entities.Sale()
                    {
                        Product = new Entities.Product()
                        {
                            Name  = "Ps4", Barcode = Guid.NewGuid(),
                            Count = 100, Price = 400.5
                        },
                        AdditionalPercent = 10.5,
                        Discount          = 0.3,
                        CheckNumber       = Guid.NewGuid()
                    },
                    new Entities.Sale()
                    {
                        Product = new Entities.Product()
                        {
                            Name  = "Ps4", Barcode = Guid.NewGuid(),
                            Count = 100, Price = 400.5
                        },
                        AdditionalPercent = 10.5,
                        Discount          = 0.3,
                        CheckNumber       = Guid.NewGuid()
                    },
                    new Entities.Sale()
                    {
                        Product = new Entities.Product()
                        {
                            Name  = "Ps4", Barcode = Guid.NewGuid(),
                            Count = 100, Price = 400.5
                        },
                        AdditionalPercent = 10.5,
                        Discount          = 0.3,
                        CheckNumber       = Guid.NewGuid()
                    }
                }
            };
            var salePresenter = new SalePresenter.SalePresenter(new Form2(saleModel))
            {
            };

            salePresenter.ShowSales();
        }
 public Form2(SaleModel.AllSale Sales)
 {
     InitializeComponent();
     SaleModel = Sales;
 }