public BillToIDsMaintenance(SqlDatabaseConnection databaseConnection, string databaseName, string userName)
 {
     InitializeComponent();
     databaseLabel.Text = "Database: " + databaseName;
     presenter          = new BMPresenter(databaseConnection, userName, this);
     presenter.Initialize();
 }
        private void CreateBtn_Click(object sender, EventArgs e)
        {
            vm.InputBillToID = BillToIDsTxt.Text.Trim();
            string msg = BMPresenter.ValidateBillToId(vm.InputBillToID);

            if (string.IsNullOrEmpty(msg))
            {
                if (DialogResult.Yes == MessageBox.Show(string.Format("Are you sure you want to create new BillToID: {0} ?", vm.InputBillToID)
                                                        , "Create BillToID"
                                                        , MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1))
                {
                    msg = presenter.Create(vm.InputBillToID);
                    DataTable dt = presenter.Search();
                    billToIdFlexGrid.DataSource = dt;
                    BillToIDsTxt.Text           = string.Empty;
                    MessageBox.Show(msg);
                }
            }
            else
            {
                MessageBox.Show(msg);
            }
        }