コード例 #1
0
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     var departmentToDelete = new Department
     {
         Id = DepartmentId
     };
     _departmentManager.Delete(departmentToDelete);
     Response.Redirect("DepartmentManagementPanel.aspx");
 }
コード例 #2
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     var newDepartment = new Department
     {
         Code = txtDepartmentCode.Text,
         Description = txtDescription.Text.Trim(),
         Type = DepartmentType,
         UId = Guid.NewGuid(),
         Id = DepartmentId
     };
     _departmentManager.Save(newDepartment);
     Response.Redirect("DepartmentManagementPanel.aspx");
 }