示例#1
0
        private void btn_add_Click(object sender, EventArgs e)
        {
            var obj = new MaintenancePerson(Action.Add);

            obj.DefineControlVisible(new User());

            obj.ShowDialog();

            DisplayUsers();
        }
示例#2
0
        private void btn_edit_Click(object sender, EventArgs e)
        {
            var selectedId = (int)UserData.SelectedRows[0].Cells[0].Value;

            var user = GetUser(selectedId);

            var obj = new MaintenancePerson(Action.Edit, user);

            obj.DefineControlVisible(new User());

            obj.ShowDialog();

            DisplayUsers();
        }