Beispiel #1
0
        private void addContractorButton_Click(object sender, EventArgs e)
        {
            AddEditContractor af = new AddEditContractor();

            af.ShowDialog();

            if (af.WasDbUpdated)
            {
                if (!reloadContractorsListWorker.IsBusy)
                {
                    ToggleLoadAnimation();
                    reloadContractorsListWorker.RunWorkerAsync();
                    wasDbUpdated = true;
                }
            }
        }
Beispiel #2
0
        private void editContractorButton_Click(object sender, EventArgs e)
        {
            Contractor selectedContractor = contractorsTable.SelectedRows[0].DataBoundItem as Contractor;

            AddEditContractor af = new AddEditContractor(selectedContractor);

            af.ShowDialog();

            if (af.WasDbUpdated)
            {
                if (!reloadContractorsListWorker.IsBusy)
                {
                    ToggleLoadAnimation();
                    reloadContractorsListWorker.RunWorkerAsync();
                    wasDbUpdated = true;
                }
            }
        }