Beispiel #1
0
        private void buttonMecanicUpdate_Click(object sender, EventArgs e)
        {
            string nume    = textBoxNumeMecanic.Text.ToString();
            string prenume = textBoxPrenumeMecanic.Text.ToString();
            int    id      = Int32.Parse(textBoxMecanicId.Text.ToString());

            Mecanics.Update(id, nume, prenume);
        }
Beispiel #2
0
        private void buttonAddMecanic_Click(object sender, EventArgs e)
        {
            string nume    = textBoxNumeMecanic.Text.ToString();
            string prenume = textBoxPrenumeMecanic.Text.ToString();

            try
            {
                Mecanics.Add(nume, prenume);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "Error");
            }
        }