예제 #1
0
 public void searcU()
 {
     foreach (Control ctrl in mainContainer.Controls)
     {
         ctrl.Dispose();
     }
     mainContainer.Controls.Add(new formUser());
     tabele.User           x   = new tabele.User();
     metodeTabele.metodele str = new metodeTabele.metodele();
     //x = str.readFurnizor(cautaToken.Text.ToString());
 }
예제 #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            tabele.User req = new tabele.User();
            try
            {
                req.Nume = NumeTextEdit.Text.ToString();
                req.Pass = PassTextEdit.Text.ToString();

                if (req.Nume.Length * req.Pass.Length == 0)
                {
                    throw new ArgumentException("Camp necompletat!");
                }
                else
                {
                    metodeTabele.metodele add = new metodeTabele.metodele();
                    add.addOne(req);
                    MessageBox.Show("Operatiune efectuata cu succes.");
                }
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }
        }