private void dataGridView5_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            DataGridViewRow dr = dataGridView5.SelectedRows[0];

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

            // or simply use column name instead of index
            //dr.Cells["id"].Value.ToString();
            frm.Show();
            frm.FeePaymentID.Text          = dr.Cells[0].Value.ToString();
            frm.AdmissionNo.Text           = dr.Cells[1].Value.ToString();
            frm.StudentName.Text           = dr.Cells[2].Value.ToString();
            frm.txtclass.Text              = dr.Cells[3].Value.ToString();
            frm.txtSection.Text            = dr.Cells[4].Value.ToString();
            frm.txtSourceLocation.Text     = dr.Cells[5].Value.ToString();
            frm.txtBusCharges.Text         = dr.Cells[6].Value.ToString();
            frm.PaymentDate.Text           = dr.Cells[7].Value.ToString();
            frm.txtModeOfPayment.Text      = dr.Cells[8].Value.ToString();
            frm.txtPaymentModeDetails.Text = dr.Cells[9].Value.ToString();
            frm.txtFine.Text          = dr.Cells[11].Value.ToString();
            frm.txtTotalPaid.Text     = dr.Cells[10].Value.ToString();
            frm.txtDueFees.Text       = dr.Cells[12].Value.ToString();
            frm.lblUser.Text          = lblUser.Text;
            frm.lblUserType.Text      = lblUserType.Text;
            frm.Delete.Enabled        = true;
            frm.Update_record.Enabled = true;

            frm.btnSave.Enabled = false;
            frm.Print.Enabled   = true;
        }
コード例 #2
0
        private void buaFeePaymentToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmBusFeePayment frm = new frmBusFeePayment();

            frm.lblUserType.Text = UserType.Text;
            frm.lblUser.Text     = User.Text;
            frm.Show();
        }
        private void FrmBusFeePaymentRecordcs_FormClosing(object sender, FormClosingEventArgs e)
        {
            this.Hide();
            frmBusFeePayment frm = new frmBusFeePayment();

            frm.lblUserType.Text = lblUserType.Text;
            frm.lblUser.Text     = lblUser.Text;
            frm.Show();
        }