Пример #1
0
        //Change Pending
        public Fee GetFee(int FeeID, string currSY)
        {
            List<Fee> flist = new List<Fee>();
            flist = GetAllFees();
            Fee fee = new Fee();
            fee = flist.Find(a => a.FeeID == FeeID && a.SYImplemented == currSY);

            return fee;
        }
Пример #2
0
 public List<Fee> GetAllFees()
 {
     List<Fee> flist = new List<Fee>();
     foreach (FeeBDO fbdo in flogic.GetAllFees())
     {
         Fee f = new Fee();
         TranslateFeeBDOToFee(fbdo, f);
         flist.Add(f);
     }
     return flist;
 }
Пример #3
0
        public void TranslateFeeToFeeBDO(Fee f, FeeBDO fbdo)
        {
            fbdo.Deactivated = f.Deactivated;
            fbdo.FeeID = f.FeeID;
            fbdo.FeeDescription = f.FeeDescription;
            fbdo.NumPay = f.NumPay;
            fbdo.DiscountFullPay = f.DiscountFullPay;
            fbdo.Amount = f.Amount;
            fbdo.GradeLevel = f.GradeLevel;
            fbdo.SYImplemented = f.SYImplemented;

        }
Пример #4
0
        private void gvFees_SelectionChanged(object sender, EventArgs e)
        {
            int selectedIndex = gvFees.CurrentRow.Index;


            if (selectedIndex >= 0)
            {
                string bID = gvFees.Rows[selectedIndex].Cells["FeeID"].Value.ToString();
                List<Fee> fee = new List<Fee>();
                fee = feeList.FindAll(x => x.FeeID.ToString() == bID);

                feeSelected = new Fee();
                feeSelected = (Fee)fee[0];
            }

        }
Пример #5
0
        private void Save() {
            IFeeService feeService = new FeeService();
            Boolean ret = false;
            string message = String.Empty;
            string dis = txtDiscount.Text.ToString();
            float discount = (float.Parse(dis))/100f;
            Fee fee = new Fee()
            {
                NumPay = Int32.Parse(txtNumPay.Text),
                FeeDescription = txtDescription.Text,
                Amount = double.Parse(txtAmount.Text),
                SYImplemented = cmbSY.SelectedValue.ToString(),
                GradeLevel = cmbGradeLevel.SelectedValue.ToString(),
                DiscountFullPay = discount
            };
            if (Op.Equals("new"))
            {
                if (ExistingFees.Exists(t => t.FeeDescription == fee.FeeDescription && t.GradeLevel == fee.GradeLevel && t.SYImplemented == fee.SYImplemented))
                {
                    MessageBox.Show(this, "Fee for the Grade Level already Exists", "Fee Exists");
                }
                else
                    ret = feeService.CreateFee(ref fee, ref message);
                    Log("C", "Fees", fee);
                if (ret)
                    MessageBox.Show(this, "Saved Successfully");
                else
                    MessageBox.Show(this, "Error Saving");


                this.Close();
            }
            else if (Op.Equals("edit"))
                {
                    fee.FeeID = SelectedFee.FeeID;
                    ret = feeService.UpdateFee(ref fee, ref message);
                Log("U", "Fees", fee);
                if (ret)
                    MessageBox.Show(this, "Saved Successfully");
                else
                    MessageBox.Show(this, "Error Saving");

                this.Close();
            }
                     
        }
Пример #6
0
        public void TranslateFeeBDOToFee(FeeBDO fbdo, Fee f)
        {
            GradeLevelService gService = new GradeLevelService();
            if (fbdo != null)
            {
                f.Deactivated = fbdo.Deactivated;
                f.FeeID = fbdo.FeeID;
                f.FeeDescription = fbdo.FeeDescription;
                fbdo.NumPay = fbdo.NumPay ?? 0;
                f.NumPay = (int)fbdo.NumPay;
                fbdo.DiscountFullPay = fbdo.DiscountFullPay ?? 0;
                f.DiscountFullPay = (float)fbdo.DiscountFullPay;
                f.Amount = fbdo.Amount;
                //gService.
                f.GradeLev = gService.GetGradeLevel(fbdo.GradeLevel);
                f.GradeLevel = fbdo.GradeLevel;
                f.SYImplemented = fbdo.SYImplemented;
            }

        }
Пример #7
0
 public bool UpdateFee(ref Fee fee, ref string message)
 {
     FeeBDO fbdo = new FeeBDO();
     TranslateFeeToFeeBDO(fee, fbdo);
     return flogic.UpdateFee(ref fbdo, ref message);
 }
Пример #8
0
 public Fee GetFeeForAll(string currSY)
 {
     Fee fee = new Fee();
     TranslateFeeBDOToFee(flogic.GetFeeForAll(currSY), fee);
     return fee;
 }
Пример #9
0
 private List<Fee> ToFeeList(List<FeeBDO> fbList)
 {
     List<Fee> fList = new List<Fee>();
     foreach (FeeBDO fb in fbList)
     {
         Fee f = new Fee();
         TranslateFeeBDOToFee(fb, f);
         fList.Add(f);
     }
     return fList;
 }
Пример #10
0
        public List<StudentAssessment> AssessMe(StudentEnrollment student)
        {
            FeeService fs = new FeeService();
            List<Fee> feeList = new List<Fee>();
            Fee FeeforAll = new Fee();
            feeList = fs.GetAllFeesForGradeLevel(student.GradeLevel, student.SY);
            FeeforAll = fs.GetFeeForAll(student.SY);
            if (FeeforAll.Amount != null)
                feeList.Add(FeeforAll);
            foreach (Fee f in feeList)
            {
                StudentAssessmentBDO sabdo = new StudentAssessmentBDO()
                {
                    StudentSY = student.StudentSY,
                    FeeID = f.FeeID,
                    DiscountId = student.DiscountId
                };

                sal.AssessStudent(sabdo);
            }
            return GetStudentAssessment(student.StudentId, student.SY);
        }