Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
        public AddUpdateFunds(frmFunds _frmFunds)
        {
            ThefrmFunds = _frmFunds;

            InitializeComponent();

            fundsData = new connRecordkeeperData();
        }
Ejemplo n.º 3
0
 private void btnFormFunds_Click(object sender, EventArgs e)
 {
     frmFunds objFrmFund = new frmFunds(this);
     objFrmFund.Show();
 }