Exemplo n.º 1
0
        private void SetSelectedTabButton(object sender)
        {
            Button b    = (Button)sender;
            string name = b.Name;

            switch (name)
            {
            case "btn_LOrders":
            {
                selectedTab = "lOrders";
                Orders frmLOrders = new Orders();
                frmLOrders.SetClient(selectedClientCode, selectedClientName);
                curTabForm = frmLOrders;
                break;
            }

            case "btn_LQuotes":
            {
                selectedTab = "lQuotes";
                Quotes frmLQuotes = new Quotes();
                frmLQuotes.SetClient(selectedClientCode, selectedClientName);
                curTabForm = frmLQuotes;
                break;
            }

            case "btn_LInvSend":
            {
                selectedTab = "lInvSend";
                Invoices_Send frmInvSend = new Invoices_Send();
                frmInvSend.SetClient(selectedClientCode, selectedClientName);
                curTabForm = frmInvSend;
                break;
            }

            case "btn_IOrders":
            {
                selectedTab = "iOrders";
                Int_Orders frmIOrders = new Int_Orders();
                frmIOrders.SetClient(selectedClientCode, selectedClientName);
                curTabForm = frmIOrders;
                break;
            }

            case "btn_IQuotes":
            {
                selectedTab = "iQuotes";
                Int_Quotes frmIQuotes = new Int_Quotes();
                frmIQuotes.SetClient(selectedClientCode, selectedClientName);
                curTabForm = frmIQuotes;
                break;
            }

            case "btn_IInvSend":
            {
                selectedTab = "iInvSend";
                Int_Invoices_Send frmIInvSend = new Int_Invoices_Send();
                frmIInvSend.SetClient(selectedClientCode, selectedClientName);
                curTabForm = frmIInvSend;
                break;
            }
            }
        }