Ejemplo n.º 1
0
        private void classFeePaymentToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            frmClassFeePaymentcs frm = new frmClassFeePaymentcs();

            frm.lblUserType.Text = UserType.Text;
            frm.lblUser.Text     = User.Text;
            frm.Show();
        }
Ejemplo n.º 2
0
 private void CourseFeePayment_Record_Search__FormClosing(object sender, FormClosingEventArgs e)
 {
     this.Hide();
    frmClassFeePaymentcs frm = new frmClassFeePaymentcs();
    frm.lblUserType.Text = lblUserType.Text;
    frm.lblUser.Text = lblUser.Text;
    frm.Show();
 }
Ejemplo n.º 3
0
        private void DataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                DataGridViewRow dr = DataGridView1.SelectedRows[0];
                this.Hide();
                frmClassFeePaymentcs frm = new frmClassFeePaymentcs();
                frm.Show();

           
                frm.txtFee.Text = dr.Cells[1].Value.ToString();
                frm.txtPreviousDue.Text = dr.Cells[10].Value.ToString();
                frm.txtFine.Text = dr.Cells[11].Value.ToString();
                frm.txtGrandTotal.Text = dr.Cells[12].Value.ToString();
                frm.txtTotalPaid.Text = dr.Cells[13].Value.ToString();
                frm.cmbPaymentMode.Text = dr.Cells[14].Value.ToString();
                frm.txtPaymentModeDetails.Text = dr.Cells[15].Value.ToString();
                frm.dtpPaymentDate.Text = dr.Cells[16].Value.ToString();
                frm.txtCurrentDue.Text = dr.Cells[17].Value.ToString();
               frm.lblUser.Text = lblUser.Text;
                frm.lblUserType.Text = lblUserType.Text;
                frm.btnDelete.Enabled = true;
                frm.btnUpdate_record.Enabled = true;
                frm.btnSave.Enabled = false;
               // frm.dataGridView2.Visibl = true;
                frm.DataGridView1.Visible = true;
                frm.btnAdd.Enabled = false;
              
                con = new SqlConnection(cs.DBcon);
                con.Open();
                cmd = new SqlCommand("SELECT RTRIM(ID) as [Fee ID],RTRIM(Feename) as [Fee Name],RTRIM(CourseFeePayment_Join.Fee) as [Fee],RTRIM(Month) as [Month] from CourseFeePayment,CourseFeePayment_Join,Fee where CourseFeePayment.ID=CourseFeePayment_Join.PaymentID and Fee.ID=CourseFeePayment_Join.FeeID and CourseFeePayment.ID='" + dr.Cells[0].Value + "' order by Month",con);
                rdr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
             
                frm.DataGridView1.Rows.Clear();
                while (rdr.Read() == true)
                {
                    frm.DataGridView1.Rows.Add(rdr[0], rdr[1], rdr[2]);
                }
              
                con.Close();
                //frm.Calculate2();
                //frm.Calculate1();
              
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

        }
Ejemplo n.º 4
0
 private void frmStudentRecordSearch_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (label4.Text == "Student Record")
     {
         this.Hide();
         frmClassFeePaymentcs frm = new frmClassFeePaymentcs();
         frm.lblUserType.Text = lblUserType.Text;
         frm.lblUser.Text     = lblUser.Text;
         frm.Show();
     }
     else
     {
         this.Hide();
         Frm_student frm = new Frm_student();
         frm.lblUserType.Text = lblUserType.Text;
         frm.lblUser.Text     = lblUser.Text;
         frm.Show();
     }
 }
Ejemplo n.º 5
0
        private void DataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                if (label4.Text == "Student Record")
                {
                    DataGridViewRow dr = DataGridView1.SelectedRows[0];
                    this.Hide();
                    frmClassFeePaymentcs frm = new  frmClassFeePaymentcs();
                    frm.Show();
                    frm.txtAdmissionNo.Text   = dr.Cells[2].Value.ToString();
                    frm.txtEnrollmentNo.Text  = dr.Cells[3].Value.ToString();
                    frm.txtSession.Text       = dr.Cells[15].Value.ToString();
                    frm.txtStudentName.Text   = dr.Cells[4].Value.ToString();
                    frm.txtClass.Text         = dr.Cells[18].Value.ToString();
                    frm.txtSection.Text       = dr.Cells[19].Value.ToString();
                    frm.txtSchoolName.Text    = dr.Cells[1].Value.ToString();
                    frm.lblUser.Text          = lblUser.Text;
                    frm.lblUserType.Text      = lblUserType.Text;
                    frm.cmbMonth.Enabled      = true;
                    frm.DataGridView1.Enabled = true;
                    frm.groupBox5.Enabled     = true;
                    frm.groupBox4.Enabled     = true;
                    frm.GetData();

                    frm.btnDelete.Enabled        = false;
                    frm.btnUpdate_record.Enabled = false;

                    frm.btnSave.Enabled = true;
                    label4.Text         = "";
                }
                else
                {
                    DataGridViewRow dr = DataGridView1.SelectedRows[0];
                    this.Hide();
                    Frm_student frm = new Frm_student();
                    frm.Show();
                    frm.txtSchoolID.Text         = dr.Cells[0].Value.ToString();
                    frm.cmbSchoolName.Text       = dr.Cells[1].Value.ToString();
                    frm.txtAdmissionNo.Text      = dr.Cells[2].Value.ToString();
                    frm.txtEnrollmentNo.Text     = dr.Cells[3].Value.ToString();
                    frm.txtStudentName.Text      = dr.Cells[4].Value.ToString();
                    frm.txtFathername.Text       = dr.Cells[5].Value.ToString();
                    frm.txtMotherName.Text       = dr.Cells[6].Value.ToString();
                    frm.txtFatherContactNo.Text  = dr.Cells[7].Value.ToString();
                    frm.txtPermanentAddress.Text = dr.Cells[8].Value.ToString();
                    frm.txtTemrorayAddress.Text  = dr.Cells[9].Value.ToString();
                    frm.txtContactNo.Text        = dr.Cells[10].Value.ToString();
                    frm.txtEmailID.Text          = dr.Cells[11].Value.ToString();
                    frm.dtpDOB.Text           = dr.Cells[12].Value.ToString();
                    frm.txtGender.Text        = dr.Cells[13].Value.ToString();
                    frm.dtpAdmissionDate.Text = dr.Cells[14].Value.ToString();
                    frm.txtSession.Text       = dr.Cells[15].Value.ToString();
                    frm.cmbCategory.Text      = dr.Cells[16].Value.ToString();
                    frm.cmbReligion.Text      = dr.Cells[17].Value.ToString();
                    frm.cmbStatus.Text        = dr.Cells[20].Value.ToString();
                    frm.txtNationality.Text   = dr.Cells[21].Value.ToString();
                    frm.cmbClass.Text         = dr.Cells[18].Value.ToString();
                    frm.CmbSection.Text       = dr.Cells[19].Value.ToString();
                    byte[]       data = (byte[])dr.Cells[22].Value;
                    MemoryStream ms   = new MemoryStream(data);
                    frm.Picture.Image            = Image.FromStream(ms);
                    frm.lblUser.Text             = lblUser.Text;
                    frm.lblUserType.Text         = lblUserType.Text;
                    frm.btnSave.Enabled          = false;
                    frm.btnDelete.Enabled        = true;
                    frm.btnUpdate_record.Enabled = true;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }