Example #1
0
 public bool EditClassFee(ClassFee classFee)
 {
     try
     {
         DataModel.ClassFee classfee = _feeDataAccess.ClassFeeById(classFee.Id);
         if (classfee != null)
         {
             classfee.ClassId        = classFee.ClassId;
             classfee.FeeTypeId      = classFee.FeeTypeId;
             classfee.FeeAmount      = classFee.FeeAmount;
             classfee.FineAmount     = classFee.FineAmount;
             classfee.DiscountAmount = classFee.DiscountAmount;
             classfee.FeeDueDate     = _schoolFeeDueDate;
             classfee.Description    = classFee.Description;
             classfee.StatusId       = classFee.StatusId;
             classfee.ModifiedBy     = _username;
             classfee.ModifiedDate   = DateTime.UtcNow;
         }
         var result      = _feeDataAccess.EditClassFee(classfee);
         var returnValue = result > 0 ? true : false;
         return(returnValue);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #2
0
 public bool AddClassFee(ClassFee classFee)
 {
     try
     {
         var classFees = new DataModel.ClassFee
         {
             Id             = Guid.NewGuid(),
             ClassId        = classFee.ClassId,
             FeeTypeId      = classFee.FeeTypeId,
             FeeAmount      = classFee.FeeAmount,
             FineAmount     = classFee.FineAmount,
             DiscountAmount = classFee.DiscountAmount,
             FeeDueDate     = _schoolFeeDueDate,
             Description    = classFee.Description,
             StatusId       = classFee.StatusId,
             CreatedBy      = _username,
             CreatedDate    = DateTime.UtcNow
         };
         var result      = _feeDataAccess.AddClassFee(classFees);
         var returnValue = result > 0 ? true : false;
         return(returnValue);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #3
0
 public bool DeleteClassFee(Guid classfeeId)
 {
     try
     {
         DataModel.ClassFee classfee = _feeDataAccess.ClassFeeById(classfeeId);
         if (classfee != null)
         {
             classfee.StatusId     = Guid.Parse(Constants.INACTIVESTATUS);
             classfee.ModifiedBy   = _username;
             classfee.ModifiedDate = DateTime.UtcNow;
         }
         var result      = _feeDataAccess.DeleteClassFee(classfee);
         var returnValue = result > 0 ? true : false;
         return(returnValue);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }