示例#1
0
        private void pictureBoxBell_Click(object sender, EventArgs e)
        {
            try
            {
                XtraTabPage xtraTabPagePS = getTabPage(xtraTabControlPointSale, "xtraTabPagePOS");
                if (xtraTabPagePS == null)
                {
                    xtraTabControlMainContainer.TabPages.Add(xtraTabPagePOS);

                    xtraTabControlMainContainer.SelectedTabPage = xtraTabPagePOS;
                }
                XtraTabPage xtraTabPage = getTabPage(xtraTabControlPointSale, "tabPageProductsDetailsReport");
                //if (xtraTabPage == null)
                //{
                tabPageProductsDetailsReport.Name = "tabPageProductsDetailsReport";
                tabPageProductsDetailsReport.Text = "تفاصيل فاتورة";
                panelProductsDetailsReport.Name   = "panelProductsDetailsReport";
                panelProductsDetailsReport.Dock   = DockStyle.Fill;

                ProductsDetailsReport                 = new ProductsDetails_Report(this, delegateID, billNum);
                ProductsDetailsReport.Size            = new Size(1109, 660);
                ProductsDetailsReport.TopLevel        = false;
                ProductsDetailsReport.FormBorderStyle = FormBorderStyle.None;
                ProductsDetailsReport.Dock            = DockStyle.Fill;
                //}
                panelProductsDetailsReport.Controls.Clear();
                panelProductsDetailsReport.Controls.Add(ProductsDetailsReport);
                tabPageProductsDetailsReport.Controls.Add(panelProductsDetailsReport);
                xtraTabControlPointSale.TabPages.Add(tabPageProductsDetailsReport);
                ProductsDetailsReport.Show();
                xtraTabControlPointSale.SelectedTabPage = tabPageProductsDetailsReport;
                //}
                //else
                //{
                //    xtraTabControlPointSale.SelectedTabPage = tabPageProductsDetailsReport;
                //}
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
示例#2
0
        private void xtraTabControlPointSale_SelectedPageChanged(object sender, TabPageChangedEventArgs e)
        {
            try
            {
                if (xtraTabControlPointSale.SelectedTabPage == tabPageCustomerReport)
                {
                    CustomerReport.search();
                }

                //else if (xtraTabControlPointSale.SelectedTabPage == Customer_Report.MainTabPagePrintCustomer)
                //{
                //    if (loadedPrintCustomer)
                //    {
                //        Customer_Report.customerPrint.display();
                //    }
                //}
                else if (xtraTabControlPointSale.SelectedTabPage == tabPageProductsDetailsReport)
                {
                    panelProductsDetailsReport.Dock = DockStyle.Fill;

                    ProductsDetailsReport                 = new ProductsDetails_Report(this, delegateID, billNum);
                    ProductsDetailsReport.TopLevel        = false;
                    ProductsDetailsReport.FormBorderStyle = FormBorderStyle.None;
                    ProductsDetailsReport.Dock            = DockStyle.Fill;

                    panelProductsDetailsReport.Controls.Clear();
                    panelProductsDetailsReport.Controls.Add(ProductsDetailsReport);
                    tabPageProductsDetailsReport.Controls.Add(panelProductsDetailsReport);
                    ProductsDetailsReport.Show();
                    xtraTabControlPointSale.SelectedTabPage = tabPageProductsDetailsReport;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }