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()); }
public ActionResult GetBankChallanVoucher(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 { string reportURL = "../../ASPXReport/StudentBankChallanReport.aspx?Date=" + HttpUtility.UrlEncode(EncryptDecrypt.Encrypt(txtVourcherDueDate)) + "&Search=" + HttpUtility.UrlEncode(EncryptDecrypt.Encrypt(searchCriteria)); return(Json(new { code = 3, css = "success", message = "Message ! Reridecting report URL", linkUrl = reportURL })); } catch (Exception ex) { DALUtility.ErrorLog(ex.Message, "GenerateBulkFeeVouchers, StudentFee"); } return(View()); }
public ActionResult StudentFeeFollowUpReport(string dropDownClass, string dropDownSection, string dropDownReportTypeId, string dropDownCampusTypeId, string strReportTitle) { BLLStudentReports objBLLStudentReports = new BLLStudentReports(); ViewBag.dpReports = objBLLStudentReports.GetReportListDropdown(Convert.ToDouble(Session[DALVariables.SchoolAccountId]), 1); getdropdownData(); StringBuilder strSearchCriteria = new StringBuilder(); string searchCriteria = ""; //If Selected Class Is Empty if (!string.IsNullOrEmpty(dropDownCampusTypeId.Trim())) { int _selectedCampusTypeId = Convert.ToInt32(dropDownCampusTypeId.Trim()); if (_selectedCampusTypeId <= 0) { return(Json(new { code = 1, css = "error", message = "Error occured ! Campus Type 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 Report Type Is Empty if (!string.IsNullOrEmpty(dropDownReportTypeId.Trim())) { int _selectedClass = Convert.ToInt32(dropDownReportTypeId.Trim()); if (_selectedClass <= 0) { return(Json(new { code = 1, css = "error", message = "Error occured ! Report 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 { string reportURL = "../../ASPXReport/StudentFeeReport.aspx?Report=" + HttpUtility.UrlEncode(EncryptDecrypt.Encrypt(dropDownReportTypeId)) + "&CampId=" + HttpUtility.UrlEncode(EncryptDecrypt.Encrypt(dropDownCampusTypeId)) + "&Title=" + HttpUtility.UrlEncode(EncryptDecrypt.Encrypt(strReportTitle)) + "&Search=" + HttpUtility.UrlEncode(EncryptDecrypt.Encrypt(searchCriteria)); return(Json(new { code = 3, css = "success", message = "Message ! Reridecting report URL", linkUrl = reportURL })); } catch (Exception ex) { DALUtility.ErrorLog(ex.Message, "GenerateBulkFeeVouchers, StudentFee"); } return(View()); }
public ActionResult Search1(string ComputerCode, string RegNo, string StudentName, string FatherName, string StudentStatus, string dropDownClass, string dropDownSection) { StringBuilder strSearchCriteria = new StringBuilder(); string searchCriteria = ""; //If Computer Code Is Not Empty if ((!string.IsNullOrEmpty(RegNo.Trim()))) { strSearchCriteria.Append(" Students.RegNo =" + RegNo.Trim() + " AND "); } //If Computer Code Is Not Empty if ((!string.IsNullOrEmpty(ComputerCode.Trim()))) { strSearchCriteria.Append(" Students.ComputerCode =" + ComputerCode.Trim() + " AND "); } //If Student Name Is Not Empty if ((!string.IsNullOrEmpty(StudentName.Trim()))) { strSearchCriteria.Append(" (Students.StudentName LIKE '%" + StudentName.Trim() + "%') AND "); } //If Father Name Is Not Empty if ((!string.IsNullOrEmpty(FatherName.Trim()))) { strSearchCriteria.Append(" (Students.FatherName LIKE '%" + FatherName.Trim() + "%') AND "); } //If Student Statuse Is Not Empty if ((!string.IsNullOrEmpty(StudentStatus.Trim()))) { int _studentStaus = Convert.ToInt32(StudentStatus.Trim()); if (_studentStaus > 0) { strSearchCriteria.Append(" Students.Status = " + _studentStaus + " AND "); } } //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("Search Manage Short Code. Search Criteria - " + searchCriteria, "Student/Search", Convert.ToInt32(Session[DALVariables.UserAccountId].ToString())); } else { //User Log DALUtility.InsertUserLog("Search Manage Short Code. Search Criteria - Nothing", "Student/Search", Convert.ToInt32(Session[DALVariables.UserAccountId].ToString())); } try { List <ModelStudent> lstModelStudent = new List <ModelStudent>(); BLLStudent objBLLStudent = new BLLStudent(); lstModelStudent = objBLLStudent.GetStudentList(searchCriteria, Convert.ToInt32(Session[DALVariables.SchoolAccountId].ToString())); return(PartialView(customview("_SearchResultsPartial", "Student"), lstModelStudent)); } catch (Exception ex) { DALUtility.ErrorLog(ex.Message, "StudentController, Search1"); } return(PartialView("Error")); }
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()); }