Ejemplo n.º 1
2
 public void TranslateGradeLevelToGradeLevelBDO(GradeLevel gl, GradeLevelBDO g)
 {
     FeeService fs = new FeeService();
     TraitService ts = new TraitService();
     g.Description = gl.Description;
     g.GradeLev = gl.GradeLev;
     g.Category = gl.Category;
     g.StudentFees = fs.ToFeeBDOList(gl.StudentFees);
     //  g.Traits = ts.ToTraitBDOList(gl.Traits);
 }
Ejemplo n.º 2
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));
        }
Ejemplo n.º 3
0
        public void TranslateGradeLevelToGradeLevelBDO(GradeLevel gl, GradeLevelBDO g)
        {
            FeeService   fs = new FeeService();
            TraitService ts = new TraitService();

            g.Description = gl.Description;
            g.GradeLev    = gl.GradeLev;
            g.Category    = gl.Category;
            g.StudentFees = fs.ToFeeBDOList(gl.StudentFees);
            //  g.Traits = ts.ToTraitBDOList(gl.Traits);
        }
Ejemplo n.º 4
0
        private void LoadMe(object sender, EventArgs e)
        {
            IFeeService feeService = new FeeService();
            gradeLevels = new List<GradeLevel>(feeService.GetAllGradeLevels());
            schoolYears = new List<SchoolYear>(feeService.GetLastFiveSY());

            cmbGradeLevel.DataSource = gradeLevels;
            cmbGradeLevel.ValueMember = "GradeLev";
            cmbGradeLevel.DisplayMember = "Description";

            cmbSY.DataSource = schoolYears;
            cmbSY.ValueMember = "SY";
            cmbSY.DisplayMember = "SY";


        }
Ejemplo n.º 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();
            }
                     
        }
Ejemplo n.º 6
0
        public List <Fee> GetStudentFees(StudentEnrollment student)
        {
            FeeService fs      = new FeeService();
            List <Fee> feeList = new List <Fee>();

            //Changed
            feeList = fs.GetAllFeesForGradeLevel(student.GradeLevel, student.SY);
            feeList.Add(fs.GetFeeForAll(student.SY));
            foreach (Fee f in feeList)
            {
                StudentAssessmentBDO sabdo = new StudentAssessmentBDO()
                {
                    StudentSY  = student.StudentSY,
                    FeeID      = f.FeeID,
                    DiscountId = student.DiscountId
                };
            }
            return(feeList);
        }
Ejemplo n.º 7
0
        public void LoadStudentFees()
        {
            IFeeService feeService = new FeeService();
            string message = String.Empty;
            try
            {
                var fees = feeService.GetAllFees();
                feeList = new List<Fee>(fees);
                gvFees.DataSource = feeList;
                gvFees.Refresh();

                if (gvFees.RowCount != 0)
                    gvFees.Rows[0].IsSelected = true;
            }
            catch (Exception ex)
            {
                message = "Error Loading Fees List";
                MessageBox.Show(ex.ToString());
            }

        }
Ejemplo n.º 8
0
        public List <Fee> GetAllFees()
        {
            FeeService fs = new FeeService();

            return(fs.GetAllFees());
        }
Ejemplo n.º 9
0
 public List<Fee> GetAllFees()
 {
     FeeService fs = new FeeService();
     return fs.GetAllFees();
 }
Ejemplo n.º 10
0
        private void LoadMe() {
          IFeeService feeService = new FeeService();
            ExistingFees = new List<Fee>(feeService.GetAllFees());
            gradeLevels = new List<GradeLevel>(feeService.GetAllGradeLevels());
            schoolYears = new List<SchoolYear>(feeService.GetLastFiveSY());
           
            cmbGradeLevel.DataSource = gradeLevels;
            cmbGradeLevel.ValueMember = "GradeLev";
            cmbGradeLevel.DisplayMember = "Description";
            cmbSY.DataSource = schoolYears;
            cmbSY.ValueMember = "SY";
            cmbSY.DisplayMember = "SY";

            txtAmount.Text ="0.00";
            txtDescription.Text = String.Empty;
            txtDiscount.Text = "0";
            txtNumPay.Text = "1";

        }
Ejemplo n.º 11
0
 public List<Fee> GetStudentFees(StudentEnrollment student)
 {
     FeeService fs = new FeeService();
     List<Fee> feeList = new List<Fee>();
     //Changed
     feeList = fs.GetAllFeesForGradeLevel(student.GradeLevel, student.SY);
     feeList.Add(fs.GetFeeForAll(student.SY));
     foreach (Fee f in feeList)
     {
         StudentAssessmentBDO sabdo = new StudentAssessmentBDO()
         {
             StudentSY = student.StudentSY,
             FeeID = f.FeeID,
             DiscountId = student.DiscountId
         };
     }
     return feeList;
 }
Ejemplo n.º 12
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);
        }