Beispiel #1
0
        private void button10_Click(object sender, EventArgs e)
        {
            if (dataGridView1.Rows.Count > 0)
            {
                double tf          = 0;
                double mf          = 0;
                double total       = 0;
                double disc        = 0;
                string roomname    = "";
                string sectionname = "";
                double upon        = 0;
                string sno         = dataGridView1.SelectedRows[0].Cells[0].Value.ToString();
                string grade       = dataGridView1.SelectedRows[0].Cells[12].Value.ToString();
                string fullname    = dataGridView1.SelectedRows[0].Cells[1].Value.ToString() + " " +
                                     dataGridView1.SelectedRows[0].Cells[3].Value.ToString() + " " +
                                     dataGridView1.SelectedRows[0].Cells[2].Value.ToString();
                int sectid = studentEnrolledController.getSchedId(sno);

                string mod    = StudentBalance.getModOfPayment(sno);
                string yrName = yearController.getSyActivated();

                double neededTopay = StudentBalance.getNeedToPay(sno);
                tf    = tfController.getTfPriceGrade(grade, mod);
                mf    = mfController.getMiscFeeForGrade(grade);
                disc  = StudentBalance.getDisc(sno);
                upon  = StudentBalance.getUponPay(sno);
                total = (tf + mf) - disc;
                string endDate  = enrollSchedule.getEnrollSched()[2];
                string tfPhp    = "₱ " + tf;
                string mfPhp    = "₱ " + mf;
                string discPhp  = disc == 0 ? "₱ 0" : "₱ " + disc;
                string totalPhp = "₱ " + total;
                string uponPhp  = mod == "Fullpayment" ? "" : "Upon Enrollment : ₱ " + upon;
                string detailMf = mfController.getInfoMiscForGrade(grade);
                roomname    = SchedSectionController.roomname(sectid);
                sectionname = sectionController.getSectionName(sectid);

                DataSet ds = new DataSet();

                // MessageBox.Show(endDate);
                SchedSectionController.getStudSchedDataSet(sectid, ref ds);
                string   dueDates  = mod == "Fullpayment" ? "Upon Enrollment : " + DateTime.ParseExact(endDate, "dd/MM/yyyy", provider).ToString("MMMM,dd") + " - " + totalPhp : setDueDates(mod, endDate, neededTopay);
                string[] dataParam = new string[13];
                dataParam[0]  = fullname;
                dataParam[1]  = roomname;
                dataParam[2]  = yrName;
                dataParam[3]  = sectionname;
                dataParam[4]  = sno;
                dataParam[5]  = tfPhp;
                dataParam[6]  = mfPhp;
                dataParam[7]  = mod;
                dataParam[8]  = detailMf;
                dataParam[9]  = totalPhp;
                dataParam[10] = discPhp;
                dataParam[11] = dueDates;
                dataParam[12] = uponPhp;
                assestmentFormRep frm = new assestmentFormRep(ds, dataParam);
                frm.Show();
            }
        }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (comboBox1.SelectedIndex > -1)
            {
                sno = "STUD-" + textBox1.Text.Trim();
                studentsDetailsArgs = studentsDetails.searchAllDetails2(sno, selectedYrid);
                textBox2.Text       = studentsDetailsArgs[1] + " " + studentsDetailsArgs[3] + " " + studentsDetailsArgs[2];
                textBox3.Text       = studentsDetailsArgs[12];
                studentBalance.fillDataGridBalance(ref dataGridView1, sno, selectedYrid);
                neededTopay = studentBalance.getNeedToPay(sno, selectedYrid);

                textBox6.Text = String.Format("PHP " + "{0:0.00}", neededTopay);
                if (textBox2.Text.Trim() == "")
                {
                    MessageBox.Show("No Student Number found");
                }
            }
            else
            {
                MessageBox.Show("Select a year");
            }
        }