예제 #1
0
        public ActionResult SetupNewPassword(string MerchantEmail, string MerchantPassword)
        {
            if (!String.IsNullOrEmpty(MerchantEmail.Trim()) && !String.IsNullOrEmpty(MerchantPassword.Trim()))
            {
                try
                {
                    StringBuilder st     = new StringBuilder();
                    decimal       result = 0;

                    result = objBLLSchoolUser.UpdateMerchantUserPassword(MerchantEmail, MerchantPassword);
                    if (result > 0)
                    {
                        Success(string.Format("Password successfully recovered. Please login with your new password."));

                        return(RedirectToAction("Login", "User"));
                    }
                    else if (result == -2)
                    {
                        Error(string.Format("Not valid user. Please contact site Administrator for further details", MerchantEmail));

                        return(RedirectToAction("Login", "User"));
                    }
                    else
                    {
                        Error(string.Format("Error occured while Recovering your password {0}", MerchantEmail));
                        return(RedirectToAction("Login", "User"));
                    }
                }
                catch (Exception ex)
                {
                    DALUtility.ErrorLog(ex.Message, "ForgotPassword, Merchant");
                }
            }
            else
            {
                Error(string.Format("Please fill form correctly then Submit for processing."));
            }
            return(RedirectToAction("Login", "User"));
        }
예제 #2
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));
        }
        protected void Page_PreInit(object sender, EventArgs e)
        {
            try
            {
                crystalReportDocument = new ReportDocument();

                string strRptPath = Server.MapPath("~/") + "Reports//" + "BankChallanForm.rpt";
                crystalReportDocument.Load(strRptPath);
                List <ModelStudentFee> lstModelStudentFee = new List <ModelStudentFee>();
                if (!IsPostBack)
                {
                    crystalReportDocument.SetDataSource(getStudentBankChallanStudentInfo());
                    lstModelStudentFee = getStudentBankChallanFeeList();
                    crystalReportDocument.Subreports[0].SetDataSource(lstModelStudentFee);
                    crystalReportDocument.Subreports[1].SetDataSource(lstModelStudentFee);
                    crystalReportDocument.Subreports[2].SetDataSource(lstModelStudentFee);
                    //crystalReport.SetDataSource(dsStudentClass);
                    rptStudentBankChallan.Dispose();
                    rptStudentBankChallan.ReportSource = crystalReportDocument;
                }
                else
                {
                    crystalReportDocument.SetDataSource(getStudentBankChallanStudentInfo());
                    lstModelStudentFee = getStudentBankChallanFeeList();
                    crystalReportDocument.Subreports[0].SetDataSource(lstModelStudentFee);
                    crystalReportDocument.Subreports[1].SetDataSource(lstModelStudentFee);
                    crystalReportDocument.Subreports[2].SetDataSource(lstModelStudentFee);
                    //getStudentBankChallanFeeList()
                    rptStudentBankChallan.Dispose();
                    rptStudentBankChallan.ReportSource = crystalReportDocument;
                }
            }
            catch (Exception ex)
            {
                DALUtility.ErrorLog(ex.Message, "StudentBankChallanReport.aspx.cs, Page_PreInit");
            }
        }
예제 #4
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));
        }
예제 #5
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));
        }
예제 #6
0
        public ActionResult FormWebForm(ModelAdminPage objModelAdminPage)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    if (Session[DALVariables.AdminUserNo] == null)
                    {
                        return(RedirectToAction("Login", "Admin"));
                    }

                    bllAdminPages = new BLLAdminPages();
                    decimal result = 0;
                    objModelAdminPage.AdminPageAddedBy = Convert.ToDouble(Session[DALVariables.AdminUserNo]);
                    result = bllAdminPages.InsertAdminPage(objModelAdminPage);
                    if (result > 0)
                    {
                        return(View());
                    }
                    else
                    {
                        ModelState.AddModelError("", "Error occured while adding Admin page");
                        return(View());
                    }
                }
                catch (Exception ex)
                {
                    DALUtility.ErrorLog(ex.Message, "AdminController, Login");
                }
            }
            else
            {
                ModelState.AddModelError("", "Check error of form; Please correct to continue!");
            }
            return(View());
        }
예제 #7
0
        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());
        }
예제 #8
0
        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());
        }
예제 #9
0
        protected void Page_PreInit(object sender, EventArgs e)
        {
            try
            {
                crystalReportDocument = new ReportDocument();

                string strRptPath = Server.MapPath("~/") + "Reports//" + DALCommonFormData.GetReportFileNamePath(ReportTypeID);
                crystalReportDocument.Load(strRptPath);

                ModelReportInfo lstModelReportInfo = new ModelReportInfo();
                lstModelReportInfo = getStudentBankChallanStudentInfo(ReportTypeID);
                ParameterFields        paramFields = new ParameterFields();
                ParameterField         paramField;
                ParameterDiscreteValue paramDiscreteValue;

                if (!String.IsNullOrEmpty(lstModelReportInfo.SchoolTitleForReport))
                {
                    paramField               = new ParameterField();
                    paramField.Name          = "SchoolNameTitle";
                    paramDiscreteValue       = new ParameterDiscreteValue();
                    paramDiscreteValue.Value = lstModelReportInfo.SchoolTitleForReport;
                    paramField.CurrentValues.Add(paramDiscreteValue);
                    //Add the paramField to paramFields
                    paramFields.Add(paramField);
                }

                if (!String.IsNullOrEmpty(lstModelReportInfo.SchoolAddressForReport))
                {
                    paramField               = new ParameterField();
                    paramField.Name          = "SchoolAddress";
                    paramDiscreteValue       = new ParameterDiscreteValue();
                    paramDiscreteValue.Value = lstModelReportInfo.SchoolAddressForReport;
                    paramField.CurrentValues.Add(paramDiscreteValue);
                    //Add the paramField to paramFields
                    paramFields.Add(paramField);
                }

                paramField               = new ParameterField();
                paramField.Name          = "ReportTitle";
                paramDiscreteValue       = new ParameterDiscreteValue();
                paramDiscreteValue.Value = ReportTitle;
                paramField.CurrentValues.Add(paramDiscreteValue);
                //Add the paramField to paramFields
                paramFields.Add(paramField);

                if (!IsPostBack)
                {
                    rptStudentList.ParameterFieldInfo = paramFields;
                    crystalReportDocument.SetDataSource(getStudentInfoBySearch());
                    //crystalReport.SetDataSource(dsStudentClass);
                    rptStudentList.Dispose();
                    rptStudentList.ReportSource = crystalReportDocument;
                }
                else
                {
                    rptStudentList.ParameterFieldInfo = paramFields;
                    crystalReportDocument.SetDataSource(getStudentInfoBySearch());
                    //getStudentBankChallanFeeList()
                    rptStudentList.Dispose();
                    rptStudentList.ReportSource = crystalReportDocument;
                }
            }
            catch (Exception ex)
            {
                DALUtility.ErrorLog(ex.Message, "StudentBankChallanReport.aspx.cs, Page_PreInit");
            }
        }
예제 #10
0
        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"));
        }
예제 #11
0
        public double Forgot_Password(double UserId, string strNewPassword)
        {
            try
            {
                //Get the Email Template
                ModelEmailTemplate objModelEmailTemplate = GetEmailTemplates("ADMIN_FORGOT_PASSWORD");
                string             StrEmailText          = null;
                string             strHeaderText         = null;
                string             strEmailSender        = null;
                string             strSMTP              = null;
                string             StrUsername          = null;
                string             StrPassword          = null;
                string             strAdminUserEmail    = null;
                string             strAdminUserFullName = null;
                string             strAdminUserName     = null;
                BLLAdminUser       objDALAdminUser      = new BLLAdminUser();

                DataTable dtUserDetails = objDALAdminUser.GetAdminUserDetailsByUserNo(UserId);

                //Get Mail Data Based on User prefered Language Type
                strHeaderText = objModelEmailTemplate.EmailEN;

                //Get Data Based on Language
                StrEmailText = objModelEmailTemplate.EmailTextEN;

                strAdminUserEmail    = dtUserDetails.Rows[0]["AdminUserEmail"].ToString();
                strAdminUserFullName = dtUserDetails.Rows[0]["AdminUserFirstName"].ToString() + " " + dtUserDetails.Rows[0]["AdminUserLastName"].ToString();
                strAdminUserName     = dtUserDetails.Rows[0]["AdminUserName"].ToString();

                //Get SMTP Username Password
                strSMTP        = objModelEmailTemplate.EmailSMTP;
                StrUsername    = objModelEmailTemplate.EmailUserName;
                StrPassword    = objModelEmailTemplate.Emailpassword;
                strEmailSender = objModelEmailTemplate.EmailSender;

                Hashtable shs = new Hashtable();
                shs["[$body]"] = StrEmailText;
                string strHeaderBody = DALUtility.StringReplace(strHeaderText, shs);

                //Set the Replace text for the Email body with user Details Details
                Hashtable hsh = new Hashtable();
                hsh["[$AdminName]"] = strAdminUserFullName;
                hsh["[$password]"]  = strNewPassword;
                hsh["[$username]"]  = strAdminUserName;

                //Get the Email body by Replacing Text in Template
                string strEmailBody = DALUtility.StringReplace(strHeaderBody, hsh);

                //Send Email

                if ((BLLEmail.SendEmail(strAdminUserEmail, objModelEmailTemplate.EmailSender, objModelEmailTemplate.EmailSubjectEN, strEmailBody, objModelEmailTemplate.EmailSMTP, objModelEmailTemplate.EmailUserName, objModelEmailTemplate.Emailpassword) > 0))
                {
                    return(1);
                }
            }
            catch (Exception ex)
            {
                DALUtility.ErrorLog(ex.Message, "Forgot_Password");
            }

            return(0);
        }
예제 #12
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"));
        }
예제 #13
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());
        }
예제 #14
0
        protected void Page_PreInit(object sender, EventArgs e)
        {
            try
            {
                crystalReportDocument = new ReportDocument();

                string strRptPath = Server.MapPath("~/") + "Reports//" + "StudentListWithParameter.rpt";
                crystalReportDocument.Load(strRptPath);
                ParameterFields                  paramFields = new ParameterFields();
                ParameterField                   paramField;
                ParameterDiscreteValue           paramDiscreteValue;
                List <ModelStudentDynamicReport> lstModelStudentDynamicReport = new List <ModelStudentDynamicReport>();
                bool isStudentIdColumn        = paramStudentId;
                bool isComputerCodeColumn     = paramComputerCode;
                bool isStudentNameColumn      = true;
                bool isClassDateOfBirthColumn = paramDateOfBirth;
                if (isStudentIdColumn)
                {
                    paramField               = new ParameterField();
                    paramField.Name          = "StudentID";
                    paramDiscreteValue       = new ParameterDiscreteValue();
                    paramDiscreteValue.Value = "StudentID";
                    paramField.CurrentValues.Add(paramDiscreteValue);
                    //Add the paramField to paramFields
                    paramFields.Add(paramField);
                }
                if (isStudentNameColumn)
                {
                    paramField               = new ParameterField();
                    paramField.Name          = "StudentName";
                    paramDiscreteValue       = new ParameterDiscreteValue();
                    paramDiscreteValue.Value = "StudentName";
                    paramField.CurrentValues.Add(paramDiscreteValue);
                    //Add the paramField to paramFields
                    paramFields.Add(paramField);
                }
                if (isComputerCodeColumn)
                {
                    paramField               = new ParameterField();
                    paramField.Name          = "ComputerCode";
                    paramDiscreteValue       = new ParameterDiscreteValue();
                    paramDiscreteValue.Value = "ComputerCode";
                    paramField.CurrentValues.Add(paramDiscreteValue);
                    //Add the paramField to paramFields
                    paramFields.Add(paramField);
                }
                if (isClassDateOfBirthColumn)
                {
                    paramField               = new ParameterField();
                    paramField.Name          = "DateOfBirth";
                    paramDiscreteValue       = new ParameterDiscreteValue();
                    paramDiscreteValue.Value = "DateOfBirth";
                    paramField.CurrentValues.Add(paramDiscreteValue);
                    //Add the paramField to paramFields
                    paramFields.Add(paramField);
                }

                if (!IsPostBack)
                {
                    //lstModelStudentDynamicReport = getStudentList();
                    rptStudentList.ParameterFieldInfo = paramFields;
                    //DataSet Ds = new DataSet();
                    //Ds.Tables.Add(getStudentListTable(isStudentIdColumn, isComputerCodeColumn, isStudentNameColumn, isClassDateOfBirthColumn));
                    crystalReportDocument.SetDataSource(getStudentListTable(isStudentIdColumn, isComputerCodeColumn, isStudentNameColumn, isClassDateOfBirthColumn));
                    rptStudentList.Dispose();
                    rptStudentList.ReportSource = crystalReportDocument;
                }
                else
                {
                    //lstModelStudentDynamicReport = getStudentList();
                    rptStudentList.ParameterFieldInfo = paramFields;
                    //DataSet Ds = new DataSet();
                    //Ds.Tables.Add(getStudentListTable(isStudentIdColumn, isComputerCodeColumn, isStudentNameColumn, isClassDateOfBirthColumn));
                    crystalReportDocument.SetDataSource(getStudentListTable(isStudentIdColumn, isComputerCodeColumn, isStudentNameColumn, isClassDateOfBirthColumn));
                    rptStudentList.Dispose();
                    rptStudentList.ReportSource = crystalReportDocument;
                }
            }
            catch (Exception ex)
            {
                DALUtility.ErrorLog(ex.Message, "StudentBankChallanReport.aspx.cs, Page_PreInit");
            }
        }
예제 #15
0
        public decimal InsertTwitterScrappedData(ModelTwitterFeeds objModelTwitterFeeds)
        {
            decimal TwitterPageId       = 0;
            decimal twitterFeedDetailId = 0;

            try
            {
                SqlParameter[] paramTwitterFeeds = new SqlParameter[9];
                paramTwitterFeeds[0] = new SqlParameter("@FeedId", objModelTwitterFeeds.FeedId);
                paramTwitterFeeds[1] = new SqlParameter("@UserPageId", objModelTwitterFeeds.UserPageId);
                paramTwitterFeeds[2] = new SqlParameter("@UserPageTitle", objModelTwitterFeeds.UserPageTitle);
                paramTwitterFeeds[3] = new SqlParameter("@UserScreenName", objModelTwitterFeeds.UserScreenName);
                paramTwitterFeeds[4] = new SqlParameter("@UserPageDesc", objModelTwitterFeeds.UserPageDesc);
                paramTwitterFeeds[5] = new SqlParameter("@UserPageLanguage", objModelTwitterFeeds.UserPageLanguage);
                paramTwitterFeeds[6] = new SqlParameter("@UserPageFollowers", objModelTwitterFeeds.UserPageFollowers);
                paramTwitterFeeds[7] = new SqlParameter("@UserPageCoverImageURL", objModelTwitterFeeds.UserPageCoverImageURL);
                paramTwitterFeeds[8] = new SqlParameter("@UserPageLogoImage", objModelTwitterFeeds.UserPageLogoImage);

                TwitterPageId = DALCommon.ExecuteNonQueryReturnIdentity("[sp_Admin_InsertTwitterFeedsData]", paramTwitterFeeds);

                if (TwitterPageId > 0)
                {
                    if (objModelTwitterFeeds.TwitterFeedDetails.Count > 0)
                    {
                        foreach (ModelTwitterFeedsDetails Tweet in objModelTwitterFeeds.TwitterFeedDetails)
                        {
                            SqlParameter[] paramFeedsDetails = new SqlParameter[7];
                            paramFeedsDetails[0] = new SqlParameter("@TwitterPageId", TwitterPageId);
                            paramFeedsDetails[1] = new SqlParameter("@TweetPostedId", Tweet.FeedPostedtId);
                            paramFeedsDetails[2] = new SqlParameter("@TweetPostedDate", Tweet.FeedPostDate);
                            paramFeedsDetails[3] = new SqlParameter("@TweetFeedDetailPageURL", Tweet.FeedDetailPageURL);
                            paramFeedsDetails[4] = new SqlParameter("@TweetShortText", Tweet.FeedText);
                            paramFeedsDetails[5] = new SqlParameter("@TweetDetailText", Tweet.FeedTextDetail);

                            if (Tweet.FeedMultimediaList != null && Tweet.FeedMultimediaList.Count > 0)
                            {
                                paramFeedsDetails[6] = new SqlParameter("@IsMultiMedia", true);
                            }
                            else
                            {
                                paramFeedsDetails[6] = new SqlParameter("@IsMultiMedia", false);
                            }

                            twitterFeedDetailId = DALCommon.ExecuteNonQueryReturnIdentity("[sp_Admin_InsertTwitterFeedDataDetails]", paramFeedsDetails);

                            if (Tweet.FeedMultimediaList.Count > 0 && twitterFeedDetailId > 0)
                            {
                                foreach (ModelFeedMultimedia multimediaFile in Tweet.FeedMultimediaList)
                                {
                                    SqlParameter[] parammultimediaFile = new SqlParameter[4];
                                    parammultimediaFile[0] = new SqlParameter("@TwitterFeedDetailId", twitterFeedDetailId);
                                    parammultimediaFile[1] = new SqlParameter("@MultiMediaType", multimediaFile.MultiMediaType);
                                    parammultimediaFile[2] = new SqlParameter("@MultiMediaURL", multimediaFile.MultiMediaURL);
                                    parammultimediaFile[3] = new SqlParameter("@MultiMediaExtension", multimediaFile.MultiMediaExtension);

                                    DALCommon.ExecuteNonQueryReturnIdentity("[sp_Admin_InsertTwitterFeedMultiMedia]", parammultimediaFile);
                                }
                            }
                        }
                    }
                }
                return(twitterFeedDetailId);
            }
            catch (Exception ex)
            {
                DALUtility.ErrorLog(ex.Message, "BLLFeed, InsertTwitterScrappedData");
            }
            return(twitterFeedDetailId);
        }
예제 #16
0
        public ActionResult Login(string SchoolAccountId, string UserEmail, string UserPassword)
        {
            if (ModelState.IsValid)
            {
                if (string.IsNullOrEmpty(UserEmail.Trim()))
                {
                    Error("User Email not filled not correctly");
                    //ModelState.AddModelError("", "UserEmail not filled not correctly");
                    return(View());
                }
                else if (string.IsNullOrEmpty(UserPassword.Trim()))
                {
                    Error("Must fill password field");
                    //ModelState.AddModelError("", "Must fill password field");
                    return(View());
                }

                try
                {
                    ModelSchoolUserAccount objSchoolUserAccount = new ModelSchoolUserAccount();
                    DataTable userDetails = new DataTable();
                    userDetails = objBLLSchoolUser.GetSchoolUserDetailsByLogin(SchoolAccountId, UserEmail.Trim(), UserPassword.Trim());
                    if (userDetails.Rows.Count > 0)
                    {
                        objSchoolUserAccount.SchoolAccountId  = Convert.ToInt32(userDetails.Rows[0]["SchoolAccountId"]);
                        objSchoolUserAccount.UserAccountId    = Convert.ToInt32(userDetails.Rows[0]["UserAccountId"]);
                        objSchoolUserAccount.UserFName        = Convert.ToString(userDetails.Rows[0]["UserFName"]);
                        objSchoolUserAccount.UserLName        = Convert.ToString(userDetails.Rows[0]["UserLName"]);
                        objSchoolUserAccount.UserEmail        = Convert.ToString(userDetails.Rows[0]["UserEmail"]);
                        objSchoolUserAccount.UserProfileImage = Convert.ToString(userDetails.Rows[0]["UserProfileImage"]);
                        objSchoolUserAccount.UseAccountStatus = Convert.ToInt32(userDetails.Rows[0]["UseAccountStatus"]);
                        objSchoolUserAccount.SchoolAccount.SchoolProfileLogo = Convert.ToString(userDetails.Rows[0]["UserProfileImage"]);

                        if (objSchoolUserAccount.UseAccountStatus == 2)
                        {
                            return(RedirectToAction("AccountInfo", "User"));
                        }
                        else if (objSchoolUserAccount.UseAccountStatus == 4)
                        {
                            return(RedirectToAction("AccountBlocked", "User"));
                        }
                        else if (objSchoolUserAccount.UseAccountStatus == 3)
                        {
                            Session[DALVariables.SchoolAccountId]   = objSchoolUserAccount.SchoolAccountId;
                            Session[DALVariables.UserAccountId]     = objSchoolUserAccount.UserAccountId;
                            Session[DALVariables.UserName]          = objSchoolUserAccount.UserFName + " " + objSchoolUserAccount.UserLName;
                            Session[DALVariables.UserEmail]         = objSchoolUserAccount.UserEmail;
                            Session[DALVariables.SchoolProfileLogo] = objSchoolUserAccount.SchoolAccount.SchoolProfileLogo;
                            Session[DALVariables.ProfileImage]      = objSchoolUserAccount.UserProfileImage;
                            Session[DALVariables.AccountType]       = 2;

                            return(RedirectToAction("Home", "User"));
                        }
                        else
                        {
                            return(RedirectToAction("AccountPendingVerify", "User"));
                        }
                    }
                    Error("No User Found ! , Re-check login details");
                    //ModelState.AddModelError("", "No User Found ! , Re-check login details");
                    return(View());
                }
                catch (Exception ex)
                {
                    DALUtility.ErrorLog(ex.Message, "UserController, Login");
                }
            }
            else
            {
                Error("No User Found ! , Re-check login details");
                //ModelState.AddModelError("", "Fill form Correctly; Please correct to continue!");
            }
            return(View());
        }