示例#1
0
 private void EditDepartmentBtn_Click(object sender, EventArgs e)
 {
     if (dataGridDepartments.CurrentCell != null)
     {
         var editDepartmentFrm = new EditDepartmentForm(this, dataGridDepartments);
         editDepartmentFrm.ShowDialog();
     }
 }
        public IActionResult Edit(EditDepartmentForm form)
        {
            if (!RoleIs(Role.Administrator))
            {
                return(Forbid());
            }


            return(Form(
                       form,
                       () => this.RedirectToAction(x => x.View(form.Id.Value)),
                       () => View(form)));
        }
示例#3
0
        private void DepartmentList_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            EditDepartmentForm f = new EditDepartmentForm(DepartmentList.SelectedItem as Department);

            f.ShowDialog();
        }