/// <summary> /// Edit current customer in dialog window /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gridView_KeyDown(object sender, KeyEventArgs e) { if (e.KeyData == Keys.Enter) { e.Handled = true; var countries = _operations.GetCountries(); countries.Insert(0, new CountryItem() { CountryIdentifier = 0, CountyName = "Select" }); var contactTitles = _operations.GetContactTypes(); contactTitles.Insert(0, new ContactType() { ContactTypeIdentifier = 0, ContactTitle = "Select" }); var f = new CustomerEditorForm(countries, contactTitles); try { if (f.ShowDialog() == DialogResult.OK) { } } finally { f.Dispose(); } } }
protected void EditBy(Customer customer) { EditorFormTitle = "EDIT"; Customer = customer; CustomerEditorForm.Show(); }
protected void btnCreate_Click() { EditorFormTitle = "ADD"; Customer = new Customer(); CustomerEditorForm.Show(); }
void CustomerViewer_Open(object sender, EventArgs e) { Customer customer = customerList[listView.SelectedIndices[0]]; CustomerEditorForm editor = GetEditor <CustomerEditorForm>(customer); editor.SetUpdateMode(customer); ShowEditorAsync(editor); }
void CustomerViewer_New(object sender, EventArgs e) { Customer customer = new Customer(RhspDataID.Generate()); CustomerEditorForm editor = new CustomerEditorForm(); editor.SetCreateMode(customer); ShowEditorAsync(editor); }
protected async void SaveOrUpdated() { CustomerEditorForm.Close(); await DisplayData(); StateHasChanged(); }
private void btnNewCustomer_Click(object sender, EventArgs e) { CustomerEditorForm editor = Bootstrapper.Resolve <CustomerEditorForm>(); editor.ShowDialog(this); btnSearch.PerformClick(); }
private void cmsEditData_Click(object sender, EventArgs e) { if (_selectedCustomer != null) { CustomerEditorForm editor = Bootstrapper.Resolve <CustomerEditorForm>(); editor.SelectedCustomer = _selectedCustomer; editor.ShowDialog(this); btnSearch.PerformClick(); } }