Example #1
0
 public void searcF()
 {
     foreach (Control ctrl in mainContainer.Controls)
     {
         ctrl.Dispose();
     }
     mainContainer.Controls.Add(new formFurnizor());
     tabele.Furnizor       x   = new tabele.Furnizor();
     metodeTabele.metodele str = new metodeTabele.metodele();
     x = str.readFurnizor(cautaToken.Text.ToString());
     MessageBox.Show(x.CodFurnizor.ToString());
 }
Example #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            switch (dbToken.Text.ToString())
            {
            case "Furnizor":

                String                Nume = cautaToken.Text.ToString();
                tabele.Furnizor       fur  = new tabele.Furnizor();
                metodeTabele.metodele met  = new metodeTabele.metodele();
                fur = met.readFurnizor(Nume);
                MessageBox.Show(fur.CodFurnizor.ToString());
                foreach (Control ctrl in mainContainer.Controls)
                {
                    ctrl.Dispose();
                }
                formFurnizor k = new formFurnizor();
                mainContainer.Controls.Add(k);
                k.AutoPopulate(fur);



                break;

            case "Produs":
                searcP();
                break;

            case "Client":
                searcC();
                break;

            case "Utilizator":
                searcU();
                break;
            }
        }