Example #1
0
 public List <DTO.LABURNUM.COM.FeeReportingResultModel> SearchStudentReporting(DTO.LABURNUM.COM.FeeReportingModel model)
 {
     if (new FrontEndApi.ApiClientApi().IsClientValid(model.ApiClientModel.UserName, model.ApiClientModel.Password))
     {
         List <DTO.LABURNUM.COM.FeeReportingResultModel> report = new List <DTO.LABURNUM.COM.FeeReportingResultModel> ();
         List <API.LABURNUM.COM.StudentFee> dbStudentFee        = new FrontEndApi.StudentFeeApi().GetStudentFeeByAdvanceSearch(new DTO.LABURNUM.COM.StudentFeeModel()
         {
             AcademicYearId = model.AcademicYearId, StudentId = model.StudentId
         });
         List <API.LABURNUM.COM.StudentFeeDetail> dbstudentFeeDetails = new FrontEndApi.StudentFeeDetailApi().GetStudentFeeDetailByAdvanceSearch(new DTO.LABURNUM.COM.StudentFeeDetailModel()
         {
             AcademicYearId = model.AcademicYearId, StudentId = model.StudentId
         });
         if (dbStudentFee.Count > 0)
         {
             report = new Component.FeeReportingResultModelHelper().GetFeeReportingResultModel(dbStudentFee[0], dbstudentFeeDetails);
         }
         //report.MonthlyFeeDetails = new StudentFeeDetailHelper(new FrontEndApi.StudentFeeDetailApi().GetStudentFeeDetailByAdvanceSearch(new DTO.LABURNUM.COM.StudentFeeDetailModel() { AcademicYearId = model.AcademicYearId, StudentId = model.StudentId })).Map();
         //double y = 0;
         //foreach (DTO.LABURNUM.COM.StudentFeeDetailModel item in report.MonthlyFeeDetails)
         //{
         //    y = y + item.TotalPayableAmount;
         //}
         //report.TotalPaidOnMonthly = y;
         return(report);
     }
     else
     {
         return(null);
     }
 }
Example #2
0
        public long Add(DTO.LABURNUM.COM.StudentFeeModel model)
        {
            if (new FrontEndApi.ApiClientApi().IsClientValid(model.ApiClientModel.UserName, model.ApiClientModel.Password))
            {
                long cstatus = 0;
                if (model.ChequePaidAmount > 0)
                {
                    cstatus = DTO.LABURNUM.COM.Utility.ChequeStatusMaster.GetChequeStatusMasterId(DTO.LABURNUM.COM.Utility.EnumChequeStatusMaster.SUBMITTED);
                }
                else
                {
                    cstatus = model.ChequeStatus.GetValueOrDefault();
                }
                long studentFeeDetailsId = new FrontEndApi.StudentFeeDetailApi().Add(new DTO.LABURNUM.COM.StudentFeeDetailModel()
                {
                    CollectedById    = model.CollectedById,
                    AcademicYearId   = model.AcademicYearId,
                    DiscountAmount   = model.DiscountAmount,
                    DiscountRemarks  = model.DiscountRemarks,
                    StudentId        = model.StudentId,
                    ClassId          = model.ClassId,
                    SectionId        = model.SectionId,
                    PayForTheMonth   = new Component.Utility().GetISTDateTime().Month,
                    CashPaidAmount   = model.CashPaidAmount,
                    ChequePaidAmount = model.ChequePaidAmount,
                    BankId           = model.BankId,
                    ChequeDate       = model.ChequeDate.GetValueOrDefault(),
                    ChequeNumber     = model.ChequeNumber,
                    PendingFee       = model.PendingFee,
                    ChequeStatus     = cstatus
                });
                long studentfeeId = new FrontEndApi.StudentFeeApi().Add(model);
                if (Component.Constants.DEFAULTVALUE.ISMAILSENDSTART)
                {
                    sendmail(studentFeeDetailsId);
                }

                return(studentFeeDetailsId);
            }
            else
            {
                return(-1);
            }
        }