Esempio n. 1
0
        private void dataGridView2_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            DataGridViewRow dr = dataGridView2.SelectedRows[0];

            this.Hide();
            frmFund frm = new frmFund();

            // or simply use column name instead of index
            //dr.Cells["id"].Value.ToString();
            frm.Show();
            frm.textBox1.Text    = dr.Cells[0].Value.ToString();
            frm.txtFundName.Text = dr.Cells[1].Value.ToString();
            frm.txtAccount.Text  = dr.Cells[2].Value.ToString();

            frm.txtplatform.Text   = dr.Cells[3].Value.ToString();
            frm.txtValue.Text      = dr.Cells[4].Value.ToString();
            frm.txtcountry.Text    = dr.Cells[5].Value.ToString();
            frm.txtStatus.Text     = dr.Cells[6].Value.ToString();
            frm.txtAssetClass.Text = dr.Cells[7].Value.ToString();
            frm.txtdate.Text       = dr.Cells[8].Value.ToString();
            frm.txtnotes.Text      = dr.Cells[9].Value.ToString();
            frm.lblUser.Text       = lblUser.Text;
            frm.lblUserType.Text   = lblUserType.Text;

            frm.btnUpdate.Enabled = true;
            frm.btnDelete.Enabled = true;
            frm.btnNew.Enabled    = true;
            frm.btnSave.Enabled   = false;
            frm.txtFundName.Focus();
        }
Esempio n. 2
0
        private void fundManagementToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            frmFund frm = new frmFund();

            frm.lblUser.Text     = User.Text;
            frm.lblUserType.Text = UserType.Text;

            frm.Show();
        }