public FeeDepositViewModel GetFeeDetailsByReceiptNo(long?ReceiptNo)
 {
     this._feeDepositViewModel = new FeeDepositViewModel();
     try
     {
         using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
         {
             sqlService.AddParameter("@ReceiptNo", SqlDbType.BigInt, ReceiptNo);
             using (SqlDataReader sqlDataReader = sqlService.ExecuteSPReader("dbo.USP_GetFeeDetailsByReceiptNo"))
             {
                 this._feeDepositViewModel.FeeDepositModel = sqlDataReader.MapToSingle <FeeDepositModel>();
                 sqlDataReader.NextResult();
                 this._feeDepositViewModel.ListFeeApplicable = sqlDataReader.MapToList <Class_Fee_Setting_Model>();
                 sqlDataReader.NextResult();
                 this._feeDepositViewModel.ListFeeDues = sqlDataReader.MapToList <MonthlyFeeGenerateModel>();
                 sqlDataReader.NextResult();
                 this._feeDepositViewModel.ListMonthlyTransaction = sqlDataReader.MapToList <MonthlyFeeDepositModel>();
                 sqlDataReader.NextResult();
                 this._feeDepositViewModel.ListStudentFine = sqlDataReader.MapToList <StudentFineModel>();
                 sqlDataReader.NextResult();
                 this._feeDepositViewModel.ListStudentFinePaid = sqlDataReader.MapToList <StudentFineModel>();
                 sqlDataReader.NextResult();
                 this._feeDepositViewModel.List_Fee_Deposited = sqlDataReader.MapToList <MonthlyFeeDepositModel>();
                 sqlDataReader.NextResult();
             }
         }
     }
     catch (Exception var_2_107)
     {
     }
     return(this._feeDepositViewModel);
 }
        public List <PurchasesFeeModel> GetPurchasesFeeList(DateTime PurchasesDate)
        {
            this._feeDepositViewModel = new FeeDepositViewModel();
            List <PurchasesFeeModel> result;

            using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
            {
                sqlService.AddParameter("@PurchasesDate", SqlDbType.Date, PurchasesDate);
                using (SqlDataReader sqlDataReader = sqlService.ExecuteSPReader("dbo.USP_GetPurchasesFeeList"))
                {
                    result = sqlDataReader.MapToList <PurchasesFeeModel>();
                }
            }
            return(result);
        }
        public bool CheckDuplicatePurchasesFee(long?StudentID, short FeeTypeID, DateTime PurchasesDate)
        {
            this._feeDepositViewModel = new FeeDepositViewModel();
            bool result;

            using (SqlService sqlService = new SqlService(ConnectionString.ConnectionStrings))
            {
                sqlService.AddParameter("@StudentID", SqlDbType.BigInt, StudentID);
                sqlService.AddParameter("@FeeTypeID", SqlDbType.SmallInt, FeeTypeID);
                sqlService.AddParameter("@PurchasesDate", SqlDbType.Date, PurchasesDate);
                string value = sqlService.ExecuteSPScalar("dbo.USP_CheckDuplicatePurchasesFee");
                result = (Convert.ToInt16(value) == 0);
            }
            return(result);
        }