Example #1
0
        public JsonResult UpdateFeeHead(int ID, NewFeeHeading FeeHeading)
        {
            FeesController obj      = new FeesController();
            var            response = obj.UpdateFeeHead(ID, FeeHeading);

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
Example #2
0
        public JsonResult DeleteFeeHeads(int ID)
        {
            FeesController obj      = new FeesController();
            var            response = obj.DeleteFeeHead(ID);

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
Example #3
0
        public JsonResult GetFeeHeads()
        {
            FeesController       obj        = new FeesController();
            List <NewFeeHeading> objSession = obj.GetFeeHeads();

            return(Json(objSession, JsonRequestBehavior.AllowGet));
        }
Example #4
0
        public JsonResult AddFeeHead(NewFeeHeading FeeHeading)
        {
            FeesController obj      = new FeesController();
            var            response = obj.AddFeeHead(FeeHeading);

            return(Json(((SchoolApi.NewFeeHeading)(((System.Net.Http.ObjectContent)(response.Content)).Value)).FID, JsonRequestBehavior.AllowGet));
        }
Example #5
0
 public JsonResult GetAdmissionFee()
 {
     try
     {
         FeesController      obj      = new FeesController();
         List <AdmissionFee> objClass = obj.GetAdmissionFee();
         return(Json(objClass, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         Log.Error(ex.Message.ToString());
         return(null);
     }
 }
Example #6
0
 public JsonResult GetClassFeeDetail(string SelectedClass)
 {
     try
     {
         FeesController       obj      = new FeesController();
         List <NewFeeHeading> objClass = obj.GetNewFeeHeading(SelectedClass);
         return(Json(objClass, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         Log.Error(ex.Message.ToString());
         return(null);
     }
 }
Example #7
0
 public JsonResult DeleteStudentFee(int Id)
 {
     try
     {
         FeesController obj      = new FeesController();
         var            response = obj.Delete(Id);
         return(Json(response, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         Log.Error(ex.Message.ToString());
         return(null);
     }
 }
Example #8
0
 public JsonResult UpdateStFeeDetail(string AdmissionNo, StudentFeeDetail student)
 {
     try
     {
         FeesController obj      = new FeesController();
         var            response = obj.Put(AdmissionNo, student);
         return(Json(response, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         Log.Error(ex.Message.ToString());
         return(null);
     }
 }
Example #9
0
 public JsonResult AddStudentFeeDetail(StudentFeeDetail stFeeDetail)
 {
     try
     {
         FeesController obj      = new FeesController();
         var            response = obj.Post(stFeeDetail);
         return(Json(((SchoolApi.StudentFeeDetail)(((System.Net.Http.ObjectContent)(response.Content)).Value)), JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         Log.Error(ex.Message.ToString());
         return(null);
     }
 }
Example #10
0
 public JsonResult GetStudentFine(string AdmNo)
 {
     try
     {
         FeesController obj  = new FeesController();
         var            fine = obj.GetStudentFine(AdmNo);
         return(Json(fine, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         Log.Error(ex.Message.ToString());
         return(null);
     }
 }
Example #11
0
 public JsonResult GetStudentFeeDetail(string AdmNo, string Session)
 {
     try
     {
         FeesController          obj      = new FeesController();
         List <StudentFeeDetail> objClass = obj.GetStudentFeeDetail(AdmNo, Session);
         return(Json(objClass, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         Log.Error(ex.Message.ToString());
         return(null);
     }
 }
Example #12
0
 public JsonResult GetPendingFee(string ClassId, string Months)
 {
     try
     {
         FeesController          obj      = new FeesController();
         List <StudentFeeDetail> objClass = obj.GetPendingFee(ClassId, Months);
         var Jsonresult = Json(objClass, JsonRequestBehavior.AllowGet);
         Jsonresult.MaxJsonLength = int.MaxValue;
         return(Jsonresult);
     }
     catch (Exception ex)
     {
         Log.Error(ex.Message.ToString());
         return(null);
     }
 }
Example #13
0
 public JsonResult GetAllSubmitedFeeDetail(string Session)
 {
     try
     {
         FeesController          obj      = new FeesController();
         List <StudentFeeDetail> objClass = obj.GetAllSubmitedFeeDetail(Session);
         var jsonResult = Json(objClass, JsonRequestBehavior.AllowGet);
         jsonResult.MaxJsonLength = int.MaxValue;
         return(jsonResult);
     }
     catch (Exception ex)
     {
         Log.Error(ex.Message.ToString());
         return(null);
     }
 }
Example #14
0
        public async Task <ActionResult> PendingFeeSMS(string ClassId, string Months)
        {
            string                  Response    = string.Empty;
            FeesController          obj         = new FeesController();
            List <StudentFeeDetail> studentList = obj.GetPendingFee(ClassId, Months);

            foreach (var item in studentList)
            {
                if (!string.IsNullOrEmpty(item.Phone) && item.Status.ToUpper() == "PENDING")
                {
                    string msg    = string.Format(MessageTemplate.PendingFeeTemplate, item.Name, item.Class, item.Balance);
                    var    status = await SMS.SendSMSApi(msg, item.Phone);
                }
            }
            Response = "Pending status message sent to students.";
            return(Content(Response));
        }
Example #15
0
 public void Create()
 {
     _repository = new Mock <IFeeData>();
     _controller = new FeesController(_repository.Object);
 }