private void btnOKAddfunds_Click(object sender, EventArgs e) { frmFunds objfrmfundToAdd = new frmFunds(ThefrmMain); cmbFundNumber.Visible = false; //insert funds funds = new Fund(); funds.FundName = txtFundName.Text; if (string.IsNullOrEmpty(this.txtFundName.Text)) { throw new ArgumentNullException("fund name can't be null"); } else fundsData.insert(funds); //add funid in combobox DataTable dt3 = fundsData.FillcmbFundNumber(); cmbFundNumber.DisplayMember = "FundID"; this.cmbFundNumber.DataSource = dt3; this.Close(); try { // dt.Rows.Add(dataGridFunds.NewRowIndex,txtFundName.Text); // dataGridFunds.DataSource = dt; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public AddUpdateFunds(frmFunds _frmFunds) { ThefrmFunds = _frmFunds; InitializeComponent(); fundsData = new connRecordkeeperData(); }
private void btnFormFunds_Click(object sender, EventArgs e) { frmFunds objFrmFund = new frmFunds(this); objFrmFund.Show(); }