예제 #1
0
        private void dgvSectionBefore_DoubleClick_1(object sender, EventArgs e)
        {
            frmAssesment frmAssesment = new frmAssesment();

            if (dgvSectionBefore.SelectedRows.Count > 0)
            {
                //clear list
                studProfiles.Clear();
                //pass value
                studProfile.StudGOCNo = dgvSectionBefore.CurrentRow.Cells[0].FormattedValue.ToString();
                studProfiles          = studProfile.GetByGOCNoToEdit();

                foreach (var item in studProfiles)
                {
                    //pass variable to form Assesment
                    frmAssesment.StudName   = item.StudLastName + ", " + item.StudFirstName + " " + item.StudMiddleName;
                    frmAssesment.LRN        = item.StudLRN;
                    frmAssesment.GradeLevel = item.StudGradeLevel;
                    frmAssesment.Track      = item.Track;
                    frmAssesment.RegNo      = item.StudRegistrationNo;
                    frmAssesment.Strand     = item.StudStrand;
                    frmAssesment.Voucher    = item.VoucherType;
                    frmAssesment.GOCNo      = item.StudGOCNo;
                    frmAssesment.partialPay = item.PartialPayment;
                    frmAssesment.theSection = item.Section;

                    frmAssesment.cmbMOP.Visible = false;
                    frmAssesment.label8.Visible = false;
                }
            }

            MainWindow mainwin = (MainWindow)Application.OpenForms["MainWindow"];

            mainwin.dispanel.Controls.Clear();
            frmAssesment.TopLevel   = false;
            frmAssesment.AutoScroll = true;
            mainwin.dispanel.Controls.Add(frmAssesment);

            frmAssesment.Reset();

            frmAssesment.LoadSchoolYear();

            frmAssesment.LoadTuitionFee();
            frmAssesment.LoadAssesMiscFees();
            frmAssesment.LoadAssesOtherFees();
            frmAssesment.TotalTuition();

            frmAssesment.ComputeVoucher();
            frmAssesment.GetDownPayment();

            frmAssesment.LoadSubject();
            frmAssesment.EnableMOP();

            frmAssesment.Show();
        }
예제 #2
0
        private void SelectData()
        {
            LoadMe();
            CheckBalance();
            if (dgvSearch.SelectedRows.Count > 0)
            {
                //clear list
                studProfiles.Clear();
                //pass value
                studProfile.Id = Int32.Parse(dgvSearch.CurrentRow.Cells[0].FormattedValue.ToString());
                studProfiles   = studProfile.GetById();

                foreach (var item in studProfiles)
                {
                    //pass variable to form Assesment
                    frmAssesment.StudName   = item.StudLastName + ", " + item.StudFirstName + " " + item.StudMiddleName;
                    frmAssesment.LRN        = item.StudLRN;
                    frmAssesment.GradeLevel = item.StudGradeLevel;
                    frmAssesment.Track      = item.Track;
                    frmAssesment.RegNo      = item.StudRegistrationNo;
                    frmAssesment.Strand     = item.StudStrand;
                    frmAssesment.Voucher    = item.VoucherType;
                    frmAssesment.GOCNo      = item.StudGOCNo;
                    frmAssesment.partialPay = item.PartialPayment;
                    frmAssesment.fullPay    = item.FullPayment;
                    frmAssesment.theSection = item.Section;
                }

                if (frmAssesment.partialPay.Equals("0") && frmAssesment.fullPay.Equals("0"))
                {
                    #region Payment
                    //set up before form load
                    //STATIC
                    //show assesment
                    if (frmAssesment.Strand == "STEM")
                    {
                        frmAssesment.LoadAssesOtherFeesSTRAND_ICT();
                        // MessageBox.Show("STEM");
                    }
                    else if (frmAssesment.Strand == "TVL - ICT")
                    {
                        frmAssesment.LoadAssesOtherFeesSTRAND_STEM();
                    }
                    else
                    {
                        frmAssesment.LoadAssesOtherFees();
                    }

                    MainWindow mainwin = (MainWindow)Application.OpenForms["MainWindow"];
                    mainwin.dispanel.Controls.Clear();
                    frmAssesment.TopLevel   = false;
                    frmAssesment.AutoScroll = true;
                    mainwin.dispanel.Controls.Add(frmAssesment);

                    frmAssesment.Reset();
                    frmAssesment.LoadSchoolYear();
                    frmAssesment.LoadTuitionFee();
                    frmAssesment.LoadAssesMiscFees();
                    frmAssesment.TotalTuition();
                    frmAssesment.ComputeVoucher();
                    frmAssesment.GetDownPayment();
                    frmAssesment.LoadSubject();
                    frmAssesment.EnableMOP();



                    frmAssesment.Show();
                    frmAssesment.checkPayment();

                    #endregion
                }
                else
                {
                    LoadMe();
                    #region Payment
                    //set up before form load
                    //STATIC
                    //show assesment
                    if (frmAssesment.Strand == "STEM")
                    {
                        frmAssesment.LoadAssesOtherFeesSTRAND_ICT();
                        // MessageBox.Show("STEM");
                    }
                    else if (frmAssesment.Strand == "TVL - ICT")
                    {
                        frmAssesment.LoadAssesOtherFeesSTRAND_STEM();
                    }
                    else
                    {
                        frmAssesment.LoadAssesOtherFees();
                    }

                    MainWindow mainwin = (MainWindow)Application.OpenForms["MainWindow"];
                    mainwin.dispanel.Controls.Clear();
                    frmAssesment.TopLevel   = false;
                    frmAssesment.AutoScroll = true;
                    mainwin.dispanel.Controls.Add(frmAssesment);

                    frmAssesment.Reset();
                    frmAssesment.LoadSchoolYear();
                    frmAssesment.LoadTuitionFee();
                    frmAssesment.LoadAssesMiscFees();
                    frmAssesment.TotalTuition();
                    frmAssesment.ComputeVoucher();
                    frmAssesment.GetDownPayment();
                    frmAssesment.LoadSubject();
                    frmAssesment.EnableMOP();



                    frmAssesment.Show();
                    frmAssesment.checkPayment();
                    //frmAssesment.computeDgv();
                }
            }
        }