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

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

            // or simply use column name instead of index
            //dr.Cells["id"].Value.ToString();
            frm.Show();
            frm.FeePaymentID.Text          = dr.Cells[0].Value.ToString();
            frm.cmbAdmissionNo.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.txtHostelName.Text         = dr.Cells[5].Value.ToString();
            frm.txtHostelFees.Text         = dr.Cells[6].Value.ToString();
            frm.PaymentDate.Text           = dr.Cells[7].Value.ToString();
            frm.cmbModeOfPayment.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;
        }
Esempio n. 2
0
        private void hostelFeePaymentToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            FrmHostelFeePayment frm = new FrmHostelFeePayment();

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

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