Пример #1
0
        private void frmBusFeePaymentRecord1_FormClosing(object sender, FormClosingEventArgs e)
        {
            this.Hide();
            frmBusFeePayment frm = new frmBusFeePayment();

            frm.label3.Text = label13.Text;
            frm.label4.Text = label14.Text;
            frm.Show();
        }
        private void busFeePaymentToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            this.Hide();
            frmBusFeePayment frm = new frmBusFeePayment();

            frm.label3.Text = UserType.Text;
            frm.label4.Text = User.Text;
            frm.Show();
        }
Пример #3
0
        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.ScholarNo.Text          = dr.Cells[1].Value.ToString();
            frm.StudentName.Text        = dr.Cells[2].Value.ToString();
            frm.Course.Text             = dr.Cells[3].Value.ToString();
            frm.Branch.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.ModeOfPayment.Text      = dr.Cells[8].Value.ToString();
            frm.PaymentModeDetails.Text = dr.Cells[9].Value.ToString();
            frm.Fine.Text      = dr.Cells[11].Value.ToString();
            frm.TotalPaid.Text = dr.Cells[10].Value.ToString();
            frm.DueFees.Text   = dr.Cells[12].Value.ToString();
            if (label13.Text == "Admin")
            {
                frm.Delete.Enabled        = true;
                frm.Update_record.Enabled = true;
                frm.label3.Text           = label13.Text;
                frm.label4.Text           = label14.Text;
                frm.btnSave.Enabled       = false;
                frm.Print.Enabled         = true;
            }
            else
            {
                frm.Delete.Enabled        = false;
                frm.Update_record.Enabled = false;
                frm.label3.Text           = label13.Text;
                frm.label4.Text           = label14.Text;
                frm.btnSave.Enabled       = false;
                frm.Print.Enabled         = true;
            }
        }