示例#1
0
        //Добавление предприятия по нажатию "Действия" - "Добавить"
        private void AddTStrMenu_Click(object sender, EventArgs e)
        {
            AddCompanyForm form = new AddCompanyForm();

            form.ShowDialog();
            bindListToDataGridView(CompanyCollection.companies);
        }
示例#2
0
        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);
            }
        }
示例#4
0
 /// <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();
         }
     }
 }
示例#5
0
        private void btnAddCompany_Click(object sender, EventArgs e)
        {
            AddCompanyForm addCompanyForm = new AddCompanyForm(this);

            addCompanyForm.ShowDialog();
        }