public void LoadBillWithStdId()
        {
            loadBillData.LoadBillWithStdIdFromDb(Int32.Parse(LoginUser.stdLogStudentId));

            foreach (var popBill in loadBillData.pubBillCollect)
            {
                lblTotalTuitionContainer.Text     = popBill.Bill_TotalAmount.ToString();
                lblDiscountContainer.Text         = $"{popBill.Bill_Discount.ToString()}%";
                lblTotalBalanceContainer.Text     = popBill.Bill_Balance.ToString();
                lblTotalPaymentMadeContainer.Text = popBill.Bill_PaymentMade.ToString();
                lblTuitionDueDateContainer.Text   = popBill.Bill_DueDate.ToString();
            }
        }
Ejemplo n.º 2
0
        private void LoadSelectedBill()
        {
            lblHiddenBillId.Text = "";
            loadSelectedBill     = new BillCollection();
            loadSelectedBill.LoadBillWithStdIdFromDb(selectedId);

            foreach (var popBill in loadSelectedBill.pubBillCollect)
            {
                lblHiddenBillId.Text = popBill.Bill_Id.ToString();
                lblTotalAmount.Text  = popBill.Bill_TotalAmount.ToString();
                lblDiscount.Text     = popBill.Bill_Discount.ToString();
                lblFinalAmount.Text  = popBill.Bill_FinalAmount.ToString();
                lblPaymentMade.Text  = popBill.Bill_PaymentMade.ToString();
                lblSemester.Text     = popBill.Bill_Semester;
                lblBalance.Text      = popBill.Bill_Balance.ToString();
                lblSchoolYr.Text     = popBill.Bill_SchoolYear;
            }
        }
        private void LoadLogStudents()
        {
            loadStudentData.LoadLogStudentsWithIdFromDb(LoginUser.stdLogStudentFname, LoginUser.stdLogStudentLname, Int32.Parse(LoginUser.stdLogStudentId));
            loadBillData.LoadBillWithStdIdFromDb(Int32.Parse(LoginUser.stdLogStudentId));

            foreach (var popStudents in loadStudentData.pubStudentCollect)
            {
                lblStudentNumberContainer.Text = popStudents.Std_Id.ToString();
                char middleName = popStudents.Std_MName.ToString().FirstOrDefault();
                lblStudentNameContainer.Text = $"{popStudents.Std_FName.ToString()} {middleName}. {popStudents.Std_LName}";
                lblCourseCodeContainer.Text  = popStudents.Std_CourseCode.ToString();
                lblYearContainer.Text        = popStudents.Std_Year.ToString();
                lblSectionContainer.Text     = popStudents.Std_Section.ToString();
            }
            foreach (var popBill in loadBillData.pubBillCollect)
            {
                lblSemesterContainer.Text   = popBill.Bill_Semester.ToString();
                lblSchoolYearContainer.Text = popBill.Bill_SchoolYear.ToString();
            }
        }
        private void LoadSelectedBill()
        {
            billId           = 0;
            loadSelectedBill = new BillCollection();
            loadSelectedBill.LoadBillWithStdIdFromDb(selectedId);

            foreach (var popBill in loadSelectedBill.pubBillCollect)
            {
                billId             = popBill.Bill_Id;
                txtAmount.Text     = popBill.Bill_TotalAmount.ToString();
                txtDiscount.Text   = popBill.Bill_Discount.ToString();
                txtFinal.Text      = popBill.Bill_FinalAmount.ToString();
                txtPayMade.Text    = popBill.Bill_PaymentMade.ToString();
                txtSemester.Text   = popBill.Bill_Semester;
                txtBalance.Text    = popBill.Bill_Balance.ToString();
                txtSchoolYear.Text = popBill.Bill_SchoolYear;
                billStatus         = popBill.Bill_Status;
                billDueDate        = popBill.Bill_DueDate;
                billDatePaid       = popBill.Bill_DatePaid;
            }
        }
        private void LoadStdBill()
        {
            loadBillData = new BillCollection();
            loadBillData.LoadBillWithStdIdFromDb(Int32.Parse(LoginUser.stdLogStudentId));

            foreach (var popBill in loadBillData.pubBillCollect)
            {
                if (DateTime.Parse(popBill.Bill_DueDate) < DateTime.Today)
                {
                    var setOldManage = new BillManager();
                    setOldManage.SetTuitionToOld(popBill.Bill_Id);
                    SetOldPart();
                    stop = true;
                    return;
                }
                lblTotalTuitionContainer.Text     = popBill.Bill_FinalAmount.ToString();
                lblDiscountContainer.Text         = $"{popBill.Bill_Discount.ToString()}%";
                lblTotalBalanceContainer.Text     = popBill.Bill_Balance.ToString();
                lblTotalPaymentMadeContainer.Text = popBill.Bill_PaymentMade.ToString();
                lblFullPaidDateContainer.Text     = popBill.Bill_DatePaid.ToString();
                lblTuitionDueDateContainer.Text   = popBill.Bill_DueDate.ToString();
                billId = popBill.Bill_Id;
            }
        }