示例#1
0
        private void EditStaff()
        {
            var staffEditForm = new StaffEditForm(SelectedStaff);

            staffEditForm.ShowDialog();
            staffService.UpdateStaff(SelectedStaff);
            UpdateTableRows(staffs);
        }
示例#2
0
        private void addButton_Click(object sender, EventArgs e)
        {
            if (staffs == null)
            {
                staffs = new List <Staff>();
            }
            StaffEditForm staffEditForm = new StaffEditForm();

            staffEditForm.ShowDialog();
            if (staffEditForm.staff != null)
            {
                var staff = staffService.AddStaff(staffEditForm.staff);
                staffs.Add(staff);
                UpdateTableRows(staffs);
            }
        }