예제 #1
0
        public void loadPaymentTypes()
        {
            tcPaymentTypes.TabPages.Clear();
            dtPaymentTypes = paymenttypec.loadPaymentType("payment");
            foreach (DataRow row in dtPaymentTypes.Rows)
            {
                TabPage tp = new TabPage();
                tp.Text = row["description"].ToString();
                tp.Name = "tp_" + row["description"].ToString().Replace(" ", "");


                Panel panel = new Panel();
                panel.Name = "pn_" + row["description"].ToString().Replace(" ", "");
                panel.Dock = DockStyle.Fill;

                tp.Controls.Add(panel);
                tcPaymentTypes.TabPages.Add(tp);
            }

            DataRow   row2      = dtPaymentTypes.Rows[0];
            string    pnName    = "pn_" + row2["description"].ToString().Replace(" ", "");
            Panel     panelFind = this.Controls.Find(pnName, true).FirstOrDefault() as Panel;
            forSAPIP2 forsapip2 = new forSAPIP2(gSalesType, gForType);

            forsapip2.TopLevel = false;
            panelFind.Controls.Clear();
            panelFind.Controls.Add(forsapip2);
            forsapip2.BringToFront();
            forsapip2.Show();
            cTabs = 0;
        }
예제 #2
0
 private void tcPaymentTypes_SelectedIndexChanged(object sender, EventArgs e)
 {
     //loop mo tabpages then pass mo sa forsapip2 yung text
     if (cTabs <= 0)
     {
         string    description = tcPaymentTypes.SelectedTab.Text;
         string    pnName      = "pn_" + description.Replace(" ", "");
         string    code        = findPaymentTypesData(description);
         Panel     panelFind   = this.Controls.Find(pnName, true).FirstOrDefault() as Panel;
         forSAPIP2 forsapip2   = new forSAPIP2(gSalesType, gForType);
         forsapip2.TopLevel = false;
         panelFind.Controls.Clear();
         panelFind.Controls.Add(forsapip2);
         forsapip2.BringToFront();
         forsapip2.Show();
     }
 }
예제 #3
0
 private void tcCashSales_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (tcCashSales.SelectedIndex.Equals(0))
     {
         PendingOrder2 pendingOrder = new PendingOrder2("CASH", "for Payment");
         showForm(panelCSPayment, pendingOrder);
     }
     else if (tcCashSales.SelectedIndex.Equals(1))
     {
         PendingOrder2 pendingOrder = new PendingOrder2("CASH", "for SAP");
         showForm(panelCSSAP, pendingOrder);
     }
     else if (tcCashSales.SelectedIndex.Equals(2))
     {
         forSAPIP2 forsapip = new forSAPIP2("CASH", "for SAP IP");
         showForm(panelCSIP, forsapip);
     }
 }
예제 #4
0
 private void tcAgentSales_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (tcAgentSales.SelectedIndex.Equals(1))
     {
         PendingOrder2 pendingOrder = new PendingOrder2("Agent AR Sales", "for Payment");
         showForm(panelAgentSalesPayment, pendingOrder);
     }
     else if (tcAgentSales.SelectedIndex.Equals(0))
     {
         PendingOrder2 pendingOrder = new PendingOrder2("Agent AR Sales", "for Confirmation");
         showForm(panelAgentSalesConfirmation, pendingOrder);
     }
     else if (tcAgentSales.SelectedIndex.Equals(2))
     {
         PendingOrder2 pendingOrder = new PendingOrder2("Agent AR Sales", "for SAP");
         showForm(panelAgentSalesSAP, pendingOrder);
     }
     else if (tcAgentSales.SelectedIndex.Equals(3))
     {
         forSAPIP2 forsapip = new forSAPIP2("Agent AR Sales", "for SAP IP");
         showForm(panelAgentSalesSAPIP, forsapip);
     }
 }