Esempio n. 1
0
 private void frmOffClass_Edit_Initialized(object sender, EventArgs e)
 {
     if (OfferClass_.LoadComboBox(ref this.cmbID))
     {
         this.Close();
     }
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
        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();
        }
Esempio n. 4
0
        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();
            }
        }