Exemple #1
0
        private void modificaSalariatButton_Click(object sender, EventArgs e)
        {
            var form = new AdaugaSalariat(CalculatorViewModel.SalariatSelectat);

            if (form.ShowDialog() == DialogResult.Yes)
            {
                CalculatorViewModel.ModificaSalariat(form.Salariat);
                CalculatorViewModel.IncarcaSalariatii();
                SyncDataEvidenta();
            }
        }
Exemple #2
0
        private void adaugaSalariatButton_Click(object sender, EventArgs e)
        {
            var form = new AdaugaSalariat(null);

            if (form.ShowDialog() == DialogResult.Yes)
            {
                var result = CalculatorViewModel.AdaugaSalariat(form.Salariat);

                if (result > 0)
                {
                    CalculatorViewModel.IncarcaSalariatii();
                    SyncDataEvidenta();
                }
                else
                {
                    MessageBox.Show("Eroare!");
                }
            }
        }