private void frmOffClass_Edit_Initialized(object sender, EventArgs e) { if (OfferClass_.LoadComboBox(ref this.cmbID)) { this.Close(); } }
private void btmCreate_Click(object sender, RoutedEventArgs e) { if (CheckControls.VerifyIfTextboxIsNull(txtName, txtNotes)) { MessageBox.Show("Please, fill all Textboxes!", "Atention", MessageBoxButton.OK, MessageBoxImage.Information); Close(); } OfferClass_.Create(this.txtName.Text, txtNotes.Text); CheckControls.ClearTextBox(ref txtName, ref txtNotes); }
private void btmDone_Click(object sender, RoutedEventArgs e) { if (CheckControls.VerifyIfTextboxIsNull(this.txtName)) { this.Close(); } if (OfferClass_.Edit(ID, this.txtName, txtNotes)) { this.Close(); } CheckControls.ClearTextBox(ref this.txtName, ref this.txtNotes); IISM.MF_Forms.OfferClass.OffClass_Edit OpenW = new IISM.MF_Forms.OfferClass.OffClass_Edit(); OpenW.Show(); this.Close(); }
private void cmbID_SelectionChanged(object sender, SelectionChangedEventArgs e) { try { ID = Convert.ToInt32(cmbID.SelectedValue.ToString()); CheckControls.ClearTextBox(ref this.txtName); if (OfferClass_.LoadWindow(ID, ref this.txtName, ref this.txtNotes)) { this.Close(); } } catch (Exception) { MessageBox.Show("Error, please try again.", "Error", MessageBoxButton.OK, MessageBoxImage.Error); this.Close(); } }