Beispiel #1
0
    private void btnAddSupplier_Click(object sender, System.EventArgs e)
    {
        try
        {
            Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;
            Supplier oSupplier = new Supplier();
            string   strCompanyName;
            string   strPhone;

            strCompanyName = txtCompanyName.Text.Trim();
            strPhone       = txtPhone.Text.Trim();
            oSupplier.AddSupplier(strCompanyName, strPhone);
            sbrStatus.Text = "Added supplier: " + strCompanyName;
        }
        catch (Exception exp)
        {
            MessageBox.Show(exp.ToString(), this.Text, MessageBoxButtons.OK, MessageBoxIcon.None);
        }
        finally
        {
            Cursor.Current = System.Windows.Forms.Cursors.Default;
        }
    }