示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (WorkerManager.CheckWorker(tbFirstName.Text, tbLastName.Text, tbPhone.Text, tbSalary.Text))
            {
                if (WorkerManager.isEditWorker)
                {
                    WorkerManager.EditWorker(tbFirstName.Text, tbLastName.Text, tbPhone.Text, Convert.ToDecimal(tbSalary.Text));
                }
                else
                {
                    WorkerManager.AddNewWorker(tbFirstName.Text, tbLastName.Text, tbPhone.Text, Convert.ToDecimal(tbSalary.Text));
                }

                var workerList = new WorkerList();
                this.Hide();
                workerList.Show();
            }
        }