Exemple #1
0
 private void button9_Click(object sender, EventArgs e)
 {
     if (loadWin == 1)
     {
         AddRetailCus add = new AddRetailCus();
         add.Visible  = true;
         this.Visible = false;
     }
     else if (loadWin == 2)
     {
         AddSales add = new AddSales();
         add.Visible  = true;
         this.Visible = false;
     }
     else if (loadWin == 3)
     {
         AddSalesman add = new AddSalesman();
         add.Visible  = true;
         this.Visible = false;
     }
     else if (loadWin == 4)
     {
         AddSalesRate add = new AddSalesRate();
         add.Visible  = true;
         this.Visible = false;
     }
     else if (loadWin == 5)
     {
         SalesReturnHis add = new SalesReturnHis();
         add.Visible  = true;
         this.Visible = false;
     }
 }
Exemple #2
0
        private void button11_Click(object sender, EventArgs e)
        {
            if (loadWin == 1)
            {
                AddRetailCus updte = new AddRetailCus();
                updte.Visible = true;
                this.Visible  = false;

                //Form9 updte = new Form9();


                updte.CusID.Text   = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
                updte.NIC.Text     = this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
                updte.Shop.Text    = this.dataGridView1.CurrentRow.Cells[2].Value.ToString();
                updte.name.Text    = this.dataGridView1.CurrentRow.Cells[3].Value.ToString();
                updte.Address.Text = this.dataGridView1.CurrentRow.Cells[4].Value.ToString();
                updte.contact.Text = this.dataGridView1.CurrentRow.Cells[5].Value.ToString();
                updte.mail.Text    = this.dataGridView1.CurrentRow.Cells[6].Value.ToString();
                updte.Show();
            }
            else if (loadWin == 2)   //load sales info to update
            {
                AddSales updte = new AddSales();
                updte.Visible = true;
                this.Visible  = false;


                updte.lblRetailID.Text       = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
                updte.comboMonth.Text        = this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
                updte.textBoxshop.Text       = this.dataGridView1.CurrentRow.Cells[2].Value.ToString();
                updte.textBoxItm.Text        = this.dataGridView1.CurrentRow.Cells[3].Value.ToString();
                updte.textBoxSalesPrice.Text = this.dataGridView1.CurrentRow.Cells[4].Value.ToString();
                updte.textBoxQun.Text        = this.dataGridView1.CurrentRow.Cells[5].Value.ToString();
                updte.textBoxPrice.Text      = this.dataGridView1.CurrentRow.Cells[6].Value.ToString();
                updte.textBoxAdva.Text       = this.dataGridView1.CurrentRow.Cells[7].Value.ToString();
                updte.textBoxArrear.Text     = this.dataGridView1.CurrentRow.Cells[8].Value.ToString();
                updte.Show();
            }
            else if (loadWin == 3)
            {
                AddSalesman updte = new AddSalesman();
                updte.Visible = true;
                this.Visible  = false;

                updte.txtEmpID.Text  = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
                updte.textShops.Text = this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
                // updte.textRegion.Text = this.dataGridView1.CurrentRow.Cells[2].Value.ToString();
                updte.Show();
            }
            else if (loadWin == 4)
            {
                AddSalesRate updte = new AddSalesRate();
                updte.Visible = true;
                this.Visible  = false;

                updte.comMonth.Text    = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
                updte.text_Income.Text = this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
                updte.texRate.Text     = this.dataGridView1.CurrentRow.Cells[2].Value.ToString();
                updte.Show();
            }

            else if (loadWin == 5)
            {
                SalesReturnHis updte = new SalesReturnHis();
                updte.Visible = true;
                this.Visible  = false;

                updte.teRetailID.Text     = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
                updte.textDes.Text        = this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
                updte.textReallocate.Text = this.dataGridView1.CurrentRow.Cells[2].Value.ToString();
                updte.textLoss.Text       = this.dataGridView1.CurrentRow.Cells[3].Value.ToString();
                updte.Show();
            }
        }