private List <ModelStudentBankChallan> getStudentBankChallanStudentInfo()
        {
            BLLStudentFee objBLLStudentFee = new BLLStudentFee();
            List <ModelStudentBankChallan> lstModelStudentBankChallan = new List <ModelStudentBankChallan>();

            //Testing
            //string SearchCriteria = "Students.ClassId = 1 AND Students.SectionId = 1";

            lstModelStudentBankChallan = objBLLStudentFee.GetUnPaidFeeStudentListWithVoucher(SearchCriteriaParam, DuaDateParam, Convert.ToInt32(Session[iDAS.DAL.DALVariables.SchoolAccountId].ToString()));
            return(lstModelStudentBankChallan);
        }
        private List <ModelStudentFee> getStudentBankChallanFeeList()
        {
            BLLStudentFee          objBLLStudentFee   = new BLLStudentFee();
            List <ModelStudentFee> lstModelStudentFee = new List <ModelStudentFee>();

            //Testing
            //string SearchCriteria = "Students.ClassId = 1 AND Students.SectionId = 1";

            lstModelStudentFee = objBLLStudentFee.GetUnPaidFeeMonthsByDuaDateVoucher(DuaDateParam, Convert.ToDouble(Session[iDAS.DAL.DALVariables.SchoolAccountId].ToString()));
            return(lstModelStudentFee);
        }
Пример #3
0
        public ActionResult FeeVoucherPaidMark(string txtVourcherPaidDate, string strVoucherID)
        {
            //If Selected Class Is Not Empty
            if (string.IsNullOrEmpty(txtVourcherPaidDate))
            {
                return(Json(new { code = 1, css = "error", message = "Error occured ! Voucher Date not selected" }));
            }

            //If Selected Class Is Empty
            if (string.IsNullOrEmpty(strVoucherID.Trim()))
            {
                return(Json(new { code = 1, css = "error", message = "Error occured ! Voucher ID not selected" }));
            }

            //If Filter Expression Is Not Null Or Empty
            if (!string.IsNullOrEmpty(txtVourcherPaidDate.ToString()) && !string.IsNullOrEmpty(strVoucherID.ToString()))
            {
                //User Log
                DALUtility.InsertUserLog("Insert Fee Voucher manual entry. VoucherID : " + strVoucherID + " Voucher Paid Date : " + txtVourcherPaidDate + "", "StudentFee/FeeVoucherPaidMark", Convert.ToInt32(Session[DALVariables.UserAccountId].ToString()));
            }

            try
            {
                BLLStudentFee objBLLStudentFeet = new BLLStudentFee();
                int           result            = 0;
                result = objBLLStudentFeet.FeeVoucherFeePaidEntry(txtVourcherPaidDate, Convert.ToDouble(strVoucherID), Convert.ToDouble(Session[DALVariables.UserAccountId].ToString()));
                if (result > 0)
                {
                    Success("Fee successfully mark paid.");
                    return(Json(new { code = 1, css = "success", message = "Message ! Fee successfully mark paid." }));
                }
                else
                {
                    Error("Error occured while inserting voucher fee paid month record");

                    return(Json(new { code = 1, css = "error", message = "Message ! Error occured while creating fee vouchers" }));
                }
            }
            catch (Exception ex)
            {
                DALUtility.ErrorLog(ex.Message, "FeeVoucherPaidMark, StudentFee");
            }
            return(View());
        }
Пример #4
0
        public ActionResult GetStudentSingleFeeRecord(string feeID)
        {
            ModelStudentFee objModelStudentFee = new ModelStudentFee();

            if (!String.IsNullOrEmpty(feeID.Trim()))
            {
                try
                {
                    BLLStudentFee objBLLStudentFee = new BLLStudentFee();

                    objModelStudentFee = objBLLStudentFee.GetStudentSinngleFeeInfoByFeeId(Convert.ToDouble(feeID));
                }
                catch (Exception ex)
                {
                    DALUtility.ErrorLog(ex.Message, "StudentFeeController, GetStudentSingleFeeRecord");
                }
            }
            return(PartialView(customview("_EditStudentMonthlyFeeInfo", "StudentFee"), objModelStudentFee));
        }
Пример #5
0
        public ActionResult GetAdvanceStudentFeeRecord(string studentID)
        {
            ModelStudent objModelStudent = new ModelStudent();

            if (!String.IsNullOrEmpty(studentID.Trim()))
            {
                try
                {
                    BLLStudentFee objBLLStudentFee = new BLLStudentFee();

                    objModelStudent = objBLLStudentFee.GetStudentFeeInfoById(Convert.ToDecimal(studentID));
                }
                catch (Exception ex)
                {
                    DALUtility.ErrorLog(ex.Message, "StudentFeeController, GetStudentSingleFeeRecord");
                }
            }
            return(PartialView(customview("_AdvanceFeeInsertion", "StudentFee"), objModelStudent));
        }
Пример #6
0
        public JsonResult GetFeeMonthByYear()
        {
            string strString = "";

            try
            {
                BLLStudentFee objBLLStudentFee = new BLLStudentFee();


                DataTable dtFeeMonth = objBLLStudentFee.getFeeMonthsByYearDP();
                for (int j = 0; j < dtFeeMonth.Rows.Count; j++)
                {
                    strString += Convert.ToString(dtFeeMonth.Rows[j]["FeeMonthid"]) + "," + Convert.ToString(dtFeeMonth.Rows[j]["FeeMonth"]) + '~';
                }
            }

            catch (Exception ex)
            {
                DALUtility.ErrorLog(ex.Message, "StudentFeeController, BulkFeeInsertion");
            }
            return(Json(strString, JsonRequestBehavior.AllowGet));
        }
Пример #7
0
        public ActionResult UpdateStudentMonthlyFeeRecord(ModelStudentFee objModelStudentFee)
        {
            if (ModelState.IsValid)
            {
                if (objModelStudentFee != null)
                {
                    try
                    {
                        BLLStudentFee objBLLStudentFee = new BLLStudentFee();

                        int _updateResult = 0;
                        _updateResult = objBLLStudentFee.UpdateStudentSinngleFeeInfoByFeeId(objModelStudentFee);

                        if (_updateResult > 0)
                        {
                            ModelStudent objModelStudent = new ModelStudent();

                            objBLLStudentFee = new BLLStudentFee();
                            objModelStudent  = objBLLStudentFee.GetStudentFeeInfoById(Convert.ToDecimal(objModelStudentFee.StudentId));
                            Success("Fee Record Successfully Updated");
                            return(PartialView(customview("_GetFormStudentFeeInfo", "StudentFee"), objModelStudent));
                        }
                        else
                        {
                            Error("Error occured while updating your fee record");
                            return(PartialView(customview("_EditStudentMonthlyFeeInfo", "StudentFee"), objModelStudentFee));
                        }
                    }
                    catch (Exception ex)
                    {
                        DALUtility.ErrorLog(ex.Message, "StudentFeeController, UpdateStudentMonthlyFeeRecord");
                    }
                }
            }
            Error("Record not Updated");
            return(PartialView(customview("_EditStudentMonthlyFeeInfo", "StudentFee"), objModelStudentFee));
        }
Пример #8
0
        public JsonResult AdvanceFeeInserTion(List <FeeViewModel> StudentIndividualFeesInsertion)
        {
            decimal       result;
            string        message          = "";
            BLLStudentFee objBLLStudentFee = new BLLStudentFee();

            foreach (var item in StudentIndividualFeesInsertion)
            {
                if (item.studentId > 0 && item.FeeMonth > 0)
                {
                    try
                    {
                        item.SchoolAccountId = Convert.ToInt32(Session[DALVariables.SchoolAccountId]);

                        result = objBLLStudentFee.InsertStudentMonthlyAdvanceFeeByStudentId(item.studentId, item.FeeMonth, item.AdmissionFee, item.ReAdmissin, item.RegistrationFee, item.ComputerFee, item.Fine, item.ExamFee, item.GenatorFee, item.FeeDate, item.SchoolAccountId);
                        if (result > 0)
                        {
                            message = "Success";
                        }
                        else
                        {
                            message = "Failed";
                        }
                    }
                    catch (Exception ex)
                    {
                        DALUtility.ErrorLog(ex.Message, "StudentFeeController, GetStudentSingleFeeRecord");
                    }
                }
                else
                {
                    message = "Error1";
                }
            }

            return(Json(message, JsonRequestBehavior.AllowGet));
        }
Пример #9
0
        public ActionResult SaveBulkFeeInsertion(string dropDownClass, string dropDownSection, string dropDownMonthFee, string RegistrationFee, string Addmission, string AddmissionFee, string ReAdmission, string ComputerFee, string Fine, string ExamFee, string GeneratorFee)
        {
            try
            {
                BindDropdownlist();
                BLLStudentFee objBLLStudentFee  = new BLLStudentFee();
                int           ClassId           = CheckObjNull(dropDownClass);
                int           SectionId         = CheckObjNull(dropDownSection);
                int           dpSelectFeeMonth  = CheckObjNull(dropDownMonthFee);
                int           insertResult      = 0;
                StringBuilder strSearchCriteria = new StringBuilder();
                string        searchCriteria    = "";

                if (dpSelectFeeMonth <= 0)
                {
                    //Error("Fee month not selected. Please select proper fee month then again try to insert bulk fee record");
                    return(Json(new { code = 1, css = "error", message = "Fee month not selected. Please select proper fee month then again try to insert bulk fee record" }));
                    //return View();
                }
                if (ClassId <= 0 && SectionId > 0)
                {
                    //Error("Must Select Class. Please select proper class before selecting section then again try to insert bulk fee record");
                    return(Json(new { code = 1, css = "error", message = "Must Select Class. Please select proper class before selecting section then again try to insert bulk fee record" }));
                    //return View();
                }
                //If Selected Class Is Not Empty
                if ((!string.IsNullOrEmpty(dropDownClass.Trim())))
                {
                    int _selectedClass = Convert.ToInt32(dropDownClass.Trim());
                    if (_selectedClass > 0)
                    {
                        strSearchCriteria.Append(" Students.ClassId = " + _selectedClass + " AND ");
                    }
                }

                //If Class Section Is Not Empty
                if ((!string.IsNullOrEmpty(dropDownSection.Trim())))
                {
                    int _selectedSection = Convert.ToInt32(dropDownSection.Trim());
                    if (_selectedSection > 0)
                    {
                        strSearchCriteria.Append(" Students.SectionId = " + _selectedSection + " AND ");
                    }
                }

                //If Filter Expression Is Not Null Or Empty
                if ((!string.IsNullOrEmpty(strSearchCriteria.ToString())))
                {
                    //Set Filter Expression
                    searchCriteria = strSearchCriteria.ToString().Remove(strSearchCriteria.ToString().Length - 4, 4);
                }

                ModelStudentFee objModelStudentFee = new ModelStudentFee();
                objModelStudentFee.RegistrationFee = CheckObjNull(RegistrationFee);
                objModelStudentFee.Admission       = CheckObjNull(Addmission);
                objModelStudentFee.AdmissionFee    = CheckObjNull(AddmissionFee);
                objModelStudentFee.ReAdmissionFee  = CheckObjNull(ReAdmission);
                objModelStudentFee.GeneratorFee    = CheckObjNull(GeneratorFee);
                objModelStudentFee.Fine            = CheckObjNull(Fine);
                objModelStudentFee.ExamFee         = CheckObjNull(ExamFee);
                objModelStudentFee.ComputerFee     = CheckObjNull(ComputerFee);

                insertResult = objBLLStudentFee.InsertBulkStudentMonthlyFee(objModelStudentFee, searchCriteria, dpSelectFeeMonth);
                if (insertResult > 0)
                {
                    //Success("Total Record :" + insertResult + " was Successfully Inserted for the Selected Month");
                    return(Json(new { code = 1, css = "error", message = "Total Record :" + insertResult + " was Successfully Inserted for the Selected Month" }));
                    // return RedirectToAction("SaveBulkFeeInsertion");
                    // return View();
                }
            }
            catch (Exception ex)
            {
                DALUtility.ErrorLog(ex.Message, "StudentFeeController, BulkFeeInsertion");
            }

            return(View());
            // return PartialView(customview("_BulkFeesPartialForm","StudentFee"));
        }
Пример #10
0
        public ActionResult GenerateBulkFeeVouchers(string txtVourcherDueDate, string dropDownClass, string dropDownSection)
        {
            getdropdownData();

            StringBuilder strSearchCriteria = new StringBuilder();
            string        searchCriteria    = "";

            //If Selected Class Is Not Empty
            if (string.IsNullOrEmpty(txtVourcherDueDate))
            {
                return(Json(new { code = 1, css = "error", message = "Error occured ! Voucher Date not selected" }));
            }

            //If Selected Class Is Empty
            if (!string.IsNullOrEmpty(dropDownClass.Trim()))
            {
                int _selectedClass = Convert.ToInt32(dropDownClass.Trim());
                if (_selectedClass <= 0)
                {
                    return(Json(new { code = 1, css = "error", message = "Error occured ! Class not selected" }));
                }
            }

            //If Selected Class Is Not Empty
            if ((!string.IsNullOrEmpty(dropDownClass.Trim())))
            {
                int _selectedClass = Convert.ToInt32(dropDownClass.Trim());
                if (_selectedClass > 0)
                {
                    strSearchCriteria.Append(" Students.ClassId = " + _selectedClass + " AND ");
                }
            }

            //If Class Section Is Not Empty
            if ((!string.IsNullOrEmpty(dropDownSection.Trim())))
            {
                int _selectedSection = Convert.ToInt32(dropDownSection.Trim());
                if (_selectedSection > 0)
                {
                    strSearchCriteria.Append(" Students.SectionId = " + _selectedSection + " AND ");
                }
            }

            //strSearchCriteria.Append(" ServiceTypeCategoryId = " + CategoryId + " AND ");

            //If Filter Expression Is Not Null Or Empty
            if ((!string.IsNullOrEmpty(strSearchCriteria.ToString())))
            {
                //Set Filter Expression
                searchCriteria = strSearchCriteria.ToString().Remove(strSearchCriteria.ToString().Length - 4, 4);

                //User Log
                DALUtility.InsertUserLog("Generate Bulk Fee Voucher. Search Criteria - " + searchCriteria, "Student/Search", Convert.ToInt32(Session[DALVariables.UserAccountId].ToString()));
            }
            else
            {
                //User Log
                DALUtility.InsertUserLog("Generate Bulk Fee Voucher. Search Criteria - Nothing", "Student/Search", Convert.ToInt32(Session[DALVariables.UserAccountId].ToString()));
            }

            try
            {
                BLLStudentFee objBLLStudentFeet = new BLLStudentFee();
                int           result            = 0;
                Session[DALVariables.SearchCriteria] = searchCriteria;
                result = objBLLStudentFeet.GenerateMonthlyFeeVoucher(searchCriteria, Convert.ToInt32(Session[DALVariables.SchoolAccountId].ToString()), txtVourcherDueDate, Convert.ToInt32(Session[DALVariables.UserAccountId].ToString()));
                if (result > 0)
                {
                    Success("Fee Vouchers successfully generated, For printing please move Get Bank Challan page");
                    return(Json(new { code = 1, css = "success", message = "Message ! Fee Vouchers successfully generated, For printing please move Get Bank Challan page" }));
                }
                else
                {
                    Error("Error occured while creating fee vouchers");

                    return(Json(new { code = 1, css = "error", message = "Message ! Error occured while creating fee vouchers" }));
                }
            }
            catch (Exception ex)
            {
                DALUtility.ErrorLog(ex.Message, "GenerateBulkFeeVouchers, StudentFee");
            }
            return(View());
        }