private void FeePaymentRecord_FormClosing(object sender, FormClosingEventArgs e)
        {
            this.Hide();
            frmFeesPayment form2 = new frmFeesPayment();

            form2.label23.Text = label13.Text;
            form2.label24.Text = label14.Text;
            form2.Show();
        }
コード例 #2
0
        private void feePaymentToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            this.Hide();
            frmFeesPayment form2 = new frmFeesPayment();

            form2.label23.Text = UserType.Text;
            form2.label24.Text = User.Text;
            form2.Show();
        }
 private void dataGridView5_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     try
     {
         DataGridViewRow dr = dataGridView5.SelectedRows[0];
         this.Hide();
         frmFeesPayment frm = new frmFeesPayment();
         // 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.FeeID.Text              = dr.Cells[5].Value.ToString();
         frm.FDCourse.Text           = dr.Cells[3].Value.ToString();
         frm.FDBranch.Text           = dr.Cells[4].Value.ToString();
         frm.Semester.Text           = dr.Cells[6].Value.ToString();
         frm.TutionFees.Text         = dr.Cells[7].Value.ToString();
         frm.LibraryFees.Text        = dr.Cells[8].Value.ToString();
         frm.UDFees.Text             = dr.Cells[9].Value.ToString();
         frm.USFees.Text             = dr.Cells[10].Value.ToString();
         frm.CautionMoney.Text       = dr.Cells[11].Value.ToString();
         frm.OtherFees.Text          = dr.Cells[12].Value.ToString();
         frm.TotalFees.Text          = dr.Cells[13].Value.ToString();
         frm.PaymentDate.Text        = dr.Cells[14].Value.ToString();
         frm.ModeOfPayment.Text      = dr.Cells[15].Value.ToString();
         frm.PaymentModeDetails.Text = dr.Cells[16].Value.ToString();
         frm.TotalPaid.Text          = dr.Cells[17].Value.ToString();
         frm.Fine.Text    = dr.Cells[18].Value.ToString();
         frm.DueFees.Text = dr.Cells[19].Value.ToString();
         if (label13.Text == "Admin")
         {
             frm.Delete.Enabled        = true;
             frm.Update_record.Enabled = true;
             frm.Print.Enabled         = true;
             frm.btnSave.Enabled       = false;
             frm.label23.Text          = label13.Text;
             frm.label24.Text          = label14.Text;
         }
         else
         {
             frm.Delete.Enabled        = false;
             frm.Update_record.Enabled = false;
             frm.Print.Enabled         = true;
             frm.btnSave.Enabled       = false;
             frm.label23.Text          = label13.Text;
             frm.label24.Text          = label14.Text;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }