コード例 #1
0
 private void btnEditNode_Click(object sender, EventArgs e)
 {
     using (DepartmentView departmentView = new DepartmentView(_mainViewModel.DepartmentID, _mainViewModel.CompanyID))
     {
         departmentView.ShowDialog();
         if (departmentView.DialogResult == DialogResult.OK)
         {
             SetAllDataSource();
         }
     }
 }
コード例 #2
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     using (DepartmentView departmentView = new DepartmentView(0))
     {
         departmentView.ShowDialog();
         if (departmentView.DialogResult == DialogResult.OK)
         {
             dgwCompany.DataSource = _companyViewModel.GetAllCompanies();
             dgwCompany.DataMember = "Company";
         }
     }
 }