private void scholarshipFeePaymentToolStripMenuItem_Click(object sender, EventArgs e) { frmScholarshippayment frm = new frmScholarshippayment(); frm.lblUserType.Text = UserType.Text; frm.lblUser.Text = User.Text; frm.Show(); }
private void frmScholarshipPaymentRecord_FormClosing(object sender, FormClosingEventArgs e) { this.Hide(); frmScholarshippayment frm = new frmScholarshippayment(); frm.lblUserType.Text = lblUserType.Text; frm.lblUser.Text = lblUser.Text; frm.Show(); }
private void dataGridView4_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) { try { DataGridViewRow dr = dataGridView4.SelectedRows[0]; this.Hide(); frmScholarshippayment frm = new frmScholarshippayment(); // or simply use column name instead of index //dr.Cells["id"].Value.ToString(); frm.Show(); frm.ScholarshipPaymentID.Text = dr.Cells[0].Value.ToString(); frm.ScholarshipID.Text = dr.Cells[1].Value.ToString(); frm.ScholarshipName.Text = dr.Cells[2].Value.ToString(); frm.Amount.Text = dr.Cells[3].Value.ToString(); frm.AdmissionNo.Text = dr.Cells[4].Value.ToString(); frm.txtStudentName.Text = dr.Cells[5].Value.ToString(); frm.txtclass.Text = dr.Cells[6].Value.ToString(); frm.txtSection.Text = dr.Cells[7].Value.ToString(); frm.PaymentDate.Text = dr.Cells[8].Value.ToString(); frm.ModeOfPayment.Text = dr.Cells[9].Value.ToString(); frm.PaymentModeDetails.Text = dr.Cells[10].Value.ToString(); frm.TotalPaid.Text = dr.Cells[11].Value.ToString(); frm.DuePayment.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.Print.Enabled = true; frm.btnSave.Enabled = false; } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }