//Добавление предприятия по нажатию "Действия" - "Добавить" private void AddTStrMenu_Click(object sender, EventArgs e) { AddCompanyForm form = new AddCompanyForm(); form.ShowDialog(); bindListToDataGridView(CompanyCollection.companies); }
private void btnAddCompany_btnClick(object sender, EventArgs e) { AddCompanyForm addCompanyFRM = new AddCompanyForm(); addCompanyFRM.ShowDialog(this); RefreshMainForm(); }
private void btnAddCompany_Click(object sender, EventArgs e) { var dialog = new AddCompanyForm(); if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.Yes) { this.companyTableAdapter.Fill(farmManageDataSet.Company); } }
/// <summary> /// Add a company to the list /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cmdAdd_Click(object sender, EventArgs e) { using (var form = new AddCompanyForm()) { var result = form.ShowDialog(); if (result == DialogResult.OK) { List <CompanyObject> newCompanies = form.ReturnCompanies; foreach (var company in newCompanies) { _bindingList.Add(company); } _companiesManager.SaveChangesToFile(); ReloadContent(); } } }
private void btnAddCompany_Click(object sender, EventArgs e) { AddCompanyForm addCompanyForm = new AddCompanyForm(this); addCompanyForm.ShowDialog(); }