コード例 #1
0
        public HtmlSelect FetchCollegeWiseConfirmedFacultyListNew(string UniID, string InstID, string ddlFacDescID)
        {
            InstituteRepository oInstituteRepository = new InstituteRepository();
            HtmlSelect          htmlSel     = new HtmlSelect();
            DataTable           listFaculty = oInstituteRepository.AssignedConfirmedFaculties(UniID, InstID.Split('|')[0]);

            try
            {
                if (listFaculty != null)
                {
                    htmlSel.ID = ddlFacDescID;
                    htmlSel.Attributes.Add("class", "selectbox");
                    htmlSel.Attributes.Add("onchange", "setValue(hid_Fac_id,this.value);FillCourse(this.value);ClearDropDowns(1,5)");

                    htmlSel.DataSource     = listFaculty;
                    htmlSel.DataTextField  = "Fac_Desc";
                    htmlSel.DataValueField = "pk_Fac_ID";
                    htmlSel.DataBind();
                    ListItem li = new ListItem("--- Select ---", "-1");
                    htmlSel.Items.Insert(0, li);
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }

            return(htmlSel);
        }
コード例 #2
0
        public HtmlSelect FetchCoursePartWiseCoursePartChildList(string UniID, string InstID, string FacID, string CrID, string MoLrnID, string PtrnID, string BrnID, string CrPrDetails_ID, string HtmlSelCrBrnID)
        {
            InstituteRepository oInstituteRepository = new InstituteRepository();
            DataTable           dt      = oInstituteRepository.AssignCoursePartTerm(UniID, InstID, FacID, CrID, MoLrnID, PtrnID, BrnID, CrPrDetails_ID);
            HtmlSelect          htmlSel = new HtmlSelect();

            htmlSel.ID = HtmlSelCrBrnID;
            htmlSel.Attributes.Add("class", "selectbox");


            // htmlSel.Attributes.Add("onchange", "FetchCourseMoLrnPtrnBrnWiseCoursePartList('tdCrPrDesc', hidUniID.value, hidFacID.value, hidCrID.value, hidMoLrnID.value, hidPtrnID.value, hidBrnID.value, 'ddlCrPrDesc'); ");//ClearDropDowns(5," + levelflag + ");");

            //htmlSel.Attributes.Add("onchange", "setValue('hidCrPrID',this.value);");
            htmlSel.Attributes.Add("onchange", "setCrPartTerm(this.value);");
            //hCrPart.Attributes.Add("onchange", "setCrPart(this.value);");
            htmlSel.DataSource     = dt;
            htmlSel.DataTextField  = "text";
            htmlSel.DataValueField = "value";
            htmlSel.Style.Add("width", "230px");
            htmlSel.DataBind();
            ListItem li = new ListItem("--- Select ---", "-1");

            htmlSel.Items.Insert(0, li);

            return(htmlSel);
        }
コード例 #3
0
        public JsonResult SelectApproveReject(string studentid = "", string choiceid = "")
        {
            InstituteRepository _objRepository = new InstituteRepository();

            DataSet _ds = _objRepository.Addmiited_Student_List("", "SelectApproveSeat", "", "", studentid, "", Session["InstituteID"].ToString(), "", "", "", "", "");

            string SeatApprove = "", SeatApproveReason = "", IsRequireSkypeInterview = "", IsSkypeInterviewComplete = "", IsStudentAcceptSeat = ""; /*SkypeInterviewRemarks = "",*/

            if (_ds != null)
            {
                if (_ds.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow _dr in _ds.Tables[0].Rows)
                    {
                        SeatApprove              = _dr["SeatApprove"].ToString();
                        SeatApproveReason        = _dr["SeatApproveReason"].ToString();
                        IsRequireSkypeInterview  = _dr["IsRequireSkypeInterview"].ToString();
                        IsSkypeInterviewComplete = _dr["IsSkypeInterviewComplete"].ToString();
                        IsStudentAcceptSeat      = _dr["IsStudentAcceptSeat"].ToString();
                        //SkypeInterviewRemarks = _dr["SkypeInterviewRemarks"].ToString();
                    }
                }
            }
            return(Json(new
            {
                SeatApprove = SeatApprove,
                SeatApproveReason = SeatApproveReason,
                IsRequireSkypeInterview = IsRequireSkypeInterview,
                IsSkypeInterviewComplete = IsSkypeInterviewComplete,
                IsStudentAcceptSeat = IsStudentAcceptSeat
                                      // SkypeInterviewRemarks = SkypeInterviewRemarks
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
コード例 #4
0
        public ActionResult Index(string u = "")
        {
            ViewBag.InstituteAvailable = "No";
            try
            {
                string InstituteID = StringCipher.Decrypt(u);
                InstituteRepository _objRepository = new InstituteRepository();
                DataSet             _dsInstituteListForGeneration = _objRepository.Select_Institute_By_InstituteID(InstituteID);
                if (_dsInstituteListForGeneration != null)
                {
                    if (_dsInstituteListForGeneration.Tables[0].Rows.Count > 0)
                    {
                        foreach (DataRow _dr in _dsInstituteListForGeneration.Tables[0].Rows)
                        {
                            ViewBag.ID            = _dr["ID"].ToString();
                            ViewBag.InstituteID   = _dr["InstituteID"].ToString();
                            ViewBag.InstituteName = _dr["InstituteName"].ToString();

                            ViewBag.InstituteAvailable = "Yes";
                        }
                    }
                }
            }
            catch (Exception)
            {
                ViewBag.InstituteAvailable = "No";
            }
            return(View());
        }
コード例 #5
0
        public ActionResult ViewNicheDetails(string instituteid = "", string For = "", string Category = null, string NicheCourseId = null)
        {
            if (instituteid == "")
            {
                TempData["instituteid"] = "";
            }
            else
            {
                TempData["instituteid"] = instituteid;
            }
            if (NicheCourseId == "")
            {
                TempData["NicheCourseId"] = "";
            }
            else
            {
                TempData["NicheCourseId"] = NicheCourseId;
            }
            TempData.Keep("NicheCourseId");
            InstituteRepository _objRepository = new InstituteRepository();
            DataSet             _ds            = _objRepository.Select_Institute_By_InstituteID(instituteid);
            string InstituteName = "[Institute Name]";
            string TotalCourses  = "0";
            string TotalSeats    = "0";
            string IsNICHECourse = "0";

            if (_ds != null)
            {
                if (_ds.Tables[0].Rows.Count > 0)
                {
                    DataRow _dr = _ds.Tables[0].Rows[0];
                    InstituteName = _dr["InstituteName"].ToString() + ", " + _dr["City"].ToString().Trim();
                    IsNICHECourse = _dr["IsNicheAllowed"].ToString().Trim();
                }
                if (_ds.Tables[1].Rows.Count > 0)
                {
                    DataRow _dr = _ds.Tables[1].Rows[0];
                    TotalCourses = _dr["TotalCourses"].ToString();
                    TotalSeats   = _dr["TotalSeats"].ToString();
                }
            }
            ViewBag.InstituteName     = InstituteName;
            TempData["TotalCourses"]  = TotalCourses;
            TempData["TotalSeats"]    = TotalSeats;
            TempData["IsNICHECourse"] = IsNICHECourse;
            TempData.Keep("instituteid");
            ViewBag.DetailsFor = For;
            if (Category == "")
            {
                TempData["Category"] = "";
            }
            else
            {
                TempData["Category"] = Category;
            }
            return(View());
        }
コード例 #6
0
        public JsonResult Select_Institute_Details()
        {
            List <InstituteMaster> _list          = new List <InstituteMaster>();
            InstituteRepository    _objRepository = new InstituteRepository();
            //using (IInstituteMaster _objRepository = new RInstituteMaster())
            //{
            DataSet ds = _objRepository.Search_Institute_By_Id(Session["InstituteID"].ToString());

            if (ds != null)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow row in ds.Tables[0].Rows)
                    {
                        InstituteMaster _objList = new InstituteMaster();
                        _objList.ID            = row["ID"].ToString();
                        _objList.InstituteID   = row["InstituteID"].ToString();
                        _objList.InstituteName = row["InstituteName"].ToString();
                        _objList.Email         = row["Email"].ToString();
                        _objList.Address       = row["Address"].ToString();
                        _objList.State         = row["State"].ToString();
                        _objList.City          = row["City"].ToString();
                        _objList.Pin           = row["Pin"].ToString();
                        _objList.YOE           = row["YOE"].ToString();
                        _objList.Description   = row["Description"].ToString();
                        //_objList.History = row["History"].ToString();
                        //_objList.Awards = row["Awards"].ToString();
                        //_objList.Fellows = row["Fellows"].ToString();
                        //_objList.News = row["News"].ToString();
                        //_objList.Area = row["Area"].ToString();
                        //_objList.ProgramOffered = row["ProgramOffered"].ToString();
                        _objList.IsSubmited         = row["IsSubmited"].ToString();
                        _objList.Description        = row["Description"].ToString();
                        _objList.AcademicCourses    = row["AcademicCourses"].ToString();
                        _objList.AreaOfExcellence   = row["AreaOfExcellence"].ToString();
                        _objList.ResearchCapability = row["ResearchCapability"].ToString();
                        // _objList.FacultyOverview = row["FacultyOverview"].ToString();
                        _objList.NotableResearchPublication = row["NotableResearchPublication"].ToString();
                        _objList.NIRFRanking          = row["NIRFRanking"].ToString();
                        _objList.NBANAACAccreditation = row["NBANAACAccreditation"].ToString();
                        _objList.instituteweburl      = row["instituteweburl"].ToString();
                        _list.Add(_objList);
                    }
                }
                //  }
            }
            return(Json(new
            {
                List = _list
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
コード例 #7
0
        // GET: Institute/LandingPage
        public ActionResult Index(string InstituteID = "", string User_id = "0")
        {
            InstituteRepository _objRepository = new InstituteRepository();
            InstituteMaster     _obj           = new InstituteMaster();

            _obj.InstituteID = InstituteID;
            DataSet ds = _objRepository.Login_Institute(_obj);

            if (ds != null)
            {
                Session["IsChangePwd"] = null;
                if (ds.Tables[0].Rows.Count > 0)
                {
                    DataRow dr = ds.Tables[0].Rows[0];
                    Session["InstituteID"]    = dr["InstituteID"].ToString();
                    Session["InstituteName"]  = dr["InstituteName"].ToString();
                    Session["Email"]          = dr["Email"].ToString();
                    Session["User_id"]        = User_id;
                    Session["IsAdminFLag"]    = "True";
                    Session["IsAdminEdit"]    = "True";
                    Session["IsNicheAllowed"] = dr["IsNicheAllowed"].ToString();
                    string localIP = "?";
                    localIP                     = Request.ServerVariables["REMOTE_ADDR"].ToString();
                    Session["localIP"]          = localIP;
                    Session["InstituteType"]    = dr["InstituteType"].ToString();
                    Session["ParticipatedYear"] = ConfigurationManager.AppSettings["ParticipatedYear"].ToString();
                }
                if (ds.Tables[1].Rows.Count > 0)
                {
                    foreach (DataRow _dr in ds.Tables[1].Rows)
                    {
                        Session["AR_StartDate"] = _dr["MinDate"].ToString();
                        Session["AR_EndDate"]   = _dr["MaxDate"].ToString();
                    }
                }
                if (ds.Tables[2].Rows.Count > 0)
                {
                    foreach (DataRow _dr in ds.Tables[2].Rows)
                    {
                        Session["ParticipatedYear"] = _dr["ParticipatedYear"].ToString();
                    }
                }
                else
                {
                    Session["ParticipatedYear"] = "";
                }
            }
            //return RedirectToAction("Index", "Dashboard", new { area = "Institute" });
            return(Redirect("~/Institute/ParticipationYears"));
        }
コード例 #8
0
        // GET: Institute/Dashboard
        public ActionResult Index()
        {
            InstituteRepository _objRepository = new InstituteRepository();
            DataSet             _ds            = _objRepository.Get_Dashboard_Data(Session["InstituteID"].ToString(), ConfigurationManager.AppSettings["ParticipatedYear"].ToString());

            if (_ds != null)
            {
                if (_ds.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow _dr in _ds.Tables[0].Rows)
                    {
                        ViewBag.InstituteProfile      = _dr["InstituteProfile"].ToString();
                        ViewBag.Courses               = _dr["Courses"].ToString();
                        ViewBag.NicheCourses          = _dr["NicheCourses"].ToString();
                        ViewBag.Campus                = _dr["Campus"].ToString();
                        ViewBag.CostOfLiving          = _dr["CostOfLiving"].ToString();
                        ViewBag.InternationalStudents = _dr["InternationalStudents"].ToString();
                        ViewBag.FacultyAlumni         = _dr["FacultyAlumni"].ToString();
                        ViewBag.HowToReach            = _dr["HowToReach"].ToString();
                        ViewBag.Gallery               = _dr["Gallery"].ToString();
                    }
                }
                if (_ds.Tables[1].Rows.Count > 0)
                {
                    foreach (DataRow _dr in _ds.Tables[1].Rows)
                    {
                        ViewBag.HeadName   = _dr["HeadPrefix"].ToString() + " " + _dr["HeadFirstName"].ToString() + " " + _dr["HeadLastName"].ToString() + " (" + _dr["HeadDesignation"].ToString() + ")";
                        ViewBag.HeadEmail  = _dr["HeadEmail"].ToString();
                        ViewBag.HeadMobile = _dr["HeadMobile"].ToString();
                        ViewBag.HeadPhone  = _dr["HeadPhone"].ToString();

                        ViewBag.NodalName   = _dr["NodalPrefix"].ToString() + " " + _dr["NodalFirstName"].ToString() + " " + _dr["NodalLastName"].ToString() + " (" + _dr["NodalDesignation"].ToString() + ")";
                        ViewBag.NodalEmail  = _dr["NodalEmail"].ToString();
                        ViewBag.NodalMobile = _dr["NodalMobile"].ToString();
                        ViewBag.NodalPhone  = _dr["NodalPhone"].ToString();
                    }
                }
            }

            //ViewBag.InstituteProfile = "100";
            //ViewBag.Courses = "10";
            //ViewBag.Campus = "35";
            //ViewBag.CostOfLiving = "33";
            //ViewBag.InternationalStudents = "65";
            //ViewBag.FacultyAlumni = "70";
            //ViewBag.HowToReach = "19";
            //ViewBag.Gallery = "80";

            return(View());
        }
コード例 #9
0
        public HtmlSelect FillAssignedCourses(string Uni_ID, string InstId, string FacultyID, string CourseNm)
        {
            DataTable dtCr = new DataTable();

            dtCr = InstituteRepository.InstituteWiseAllAssignedCourse(Uni_ID, InstId, FacultyID);
            HtmlSelect hCourseNm = new HtmlSelect();

            hCourseNm.ID = CourseNm;
            hCourseNm.Attributes.Add("class", "selectbox");
            hCourseNm.Attributes.Add("onchange", "FillCrPrDD(this.value);");
            clsCommon common = new clsCommon();

            common.fillDropDown(hCourseNm, dtCr, "", "Text", "value", "---- Select ----");
            dtCr.Dispose();
            return(hCourseNm);
        }
コード例 #10
0
        public ActionResult SkypeInterview(string id = "", string u = "")
        {
            if (Convert.ToDateTime(Session["AR_StartDate"].ToString()) <= DateTime.Now && Convert.ToDateTime(Session["AR_EndDate"].ToString()) >= DateTime.Now)
            {
            }
            else
            {
                return(RedirectToAction("Index", "Dashboard", new { Area = "Institute" }));
            }
            TempData.Keep("ProgrammeLevel");
            //Session["InstituteID"] = "SII-I-0207";
            try
            {
                ViewBag.id = id;
                ViewBag.U  = StringCipher.Decrypt(u);
                InstituteRepository _objRepo = new InstituteRepository();
                DataSet             _ds      = _objRepo.SKYPE_INTERVIEW_PHASE2_ALLOTED_STUDENTS_SELECT(ViewBag.U);
                if (_ds != null)
                {
                    if (_ds.Tables[0].Rows.Count > 0)
                    {
                        DataRow _dr = _ds.Tables[0].Rows[0];
                        if (_dr["SkypeInterviewStatus"] != null)
                        {
                            if (_dr["SkypeInterviewStatus"].ToString() != "")
                            {
                                ViewBag.SkypeInterviewStatus = _dr["SkypeInterviewStatus"].ToString();
                            }
                        }
                        if (_dr["SkypeInterviewDate"] != null)
                        {
                            if (_dr["SkypeInterviewDate"].ToString() != "")
                            {
                                ViewBag.SkypeInterviewDate = Convert.ToDateTime(_dr["SkypeInterviewDate"].ToString()).ToString("dd-MM-yyyy");
                            }
                        }
                    }
                }
            }
            catch (Exception)
            {
                throw;
                //return RedirectToAction("StudentsList", "AdmittedStudent", new { Area = "Institute" });
            }

            return(View());
        }
コード例 #11
0
        public HtmlSelect FillCoursePart(string UniID, string InstID, string CrMoLrnPtrnID, string CrPart)
        {
            DataTable dtCp = new DataTable();

            //dtCp = CourseRepository.coursewiseCourseParts(CrMoLrnPtrnID);
            dtCp = InstituteRepository.Get_AllCoursePartOnly(UniID, InstID, CrMoLrnPtrnID);
            HtmlSelect hCrPart = new HtmlSelect();

            hCrPart.ID = CrPart;
            hCrPart.Attributes.Add("class", "selectbox");
            hCrPart.Attributes.Add("onchange", "setCrPart(this.value);");
            clsCommon common = new clsCommon();

            common.fillDropDown(hCrPart, dtCp, "", "Text", "value", "---- Select ----");
            dtCp.Dispose();
            return(hCrPart);
        }
コード例 #12
0
        // GET: Admin/PreviewInstitute
        public ActionResult Index(string instituteid = "", string Name = "")
        {
            TempData["InstituteID"]   = instituteid;
            TempData["InstituteName"] = Name;
            InstituteRepository _objRepository = new InstituteRepository();
            DataSet             _ds            = _objRepository.Get_Dashboard_Data(instituteid);

            if (_ds != null)
            {
                if (_ds.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow _dr in _ds.Tables[0].Rows)
                    {
                        ViewBag.InstituteProfile      = _dr["InstituteProfile"].ToString();
                        ViewBag.Courses               = _dr["Courses"].ToString();
                        ViewBag.NicheCourses          = _dr["NicheCourses"].ToString();
                        ViewBag.Campus                = _dr["Campus"].ToString();
                        ViewBag.CostOfLiving          = _dr["CostOfLiving"].ToString();
                        ViewBag.InternationalStudents = _dr["InternationalStudents"].ToString();
                        ViewBag.FacultyAlumni         = _dr["FacultyAlumni"].ToString();
                        ViewBag.HowToReach            = _dr["HowToReach"].ToString();
                        ViewBag.Gallery               = _dr["Gallery"].ToString();
                    }
                }
                if (_ds.Tables[1].Rows.Count > 0)
                {
                    foreach (DataRow _dr in _ds.Tables[1].Rows)
                    {
                        ViewBag.HeadName   = _dr["HeadPrefix"].ToString() + " " + _dr["HeadFirstName"].ToString() + " " + _dr["HeadLastName"].ToString() + " (" + _dr["HeadDesignation"].ToString() + ")";
                        ViewBag.HeadEmail  = _dr["HeadEmail"].ToString();
                        ViewBag.HeadMobile = _dr["HeadMobile"].ToString();
                        ViewBag.HeadPhone  = _dr["HeadPhone"].ToString();

                        ViewBag.NodalName   = _dr["NodalPrefix"].ToString() + " " + _dr["NodalFirstName"].ToString() + " " + _dr["NodalLastName"].ToString() + " (" + _dr["NodalDesignation"].ToString() + ")";
                        ViewBag.NodalEmail  = _dr["NodalEmail"].ToString();
                        ViewBag.NodalMobile = _dr["NodalMobile"].ToString();
                        ViewBag.NodalPhone  = _dr["NodalPhone"].ToString();
                    }
                }
            }
            TempData.Keep("InstituteID");
            TempData.Keep("InstituteName");
            return(View());
        }
コード例 #13
0
        public JsonResult UpdateApproveReject(string studentid = "", string choiceid = "", string SeatApprove = "", string SeatApproveReason = "", string IsRequireSkypeInterview = "", string SkypeInterviewRemarks = "", string IsSkypeInterviewComplete = "", string IsStudentAcceptSeat = "")
        {
            InstituteRepository _objRepository = new InstituteRepository();
            DataSet             _ds            = _objRepository.Addmiited_Student_List("", "ApproveSeat", "", "", studentid, "", Session["InstituteID"].ToString(), choiceid, SeatApprove, SeatApproveReason, IsRequireSkypeInterview, SkypeInterviewRemarks, IsSkypeInterviewComplete, IsStudentAcceptSeat);
            bool flag = false;

            if (_ds != null)
            {
                if (_ds.Tables[0].Rows.Count > 0)
                {
                    flag = true;
                }
            }
            return(Json(new
            {
                Flag = flag
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
コード例 #14
0
        public JsonResult FillDowndowns(string Type = "", string Discipline_ID = "0", string ProgramLevel_Id = "0", string Qualification_ID = "0")
        {
            string Code = string.Empty, Message = string.Empty;
            List <InstituteSearchDropdowns> _list = new List <InstituteSearchDropdowns>();

            try
            {
                InstituteRepository _objRepo = new InstituteRepository();
                DataSet             _ds      = _objRepo.SELECT_INSTITUTE_SEARCH_DROPDOWNS(Type, Discipline_ID, ProgramLevel_Id, Qualification_ID);
                if (_ds != null)
                {
                    if (_ds.Tables[0].Rows.Count > 0)
                    {
                        foreach (DataRow _dr in _ds.Tables[0].Rows)
                        {
                            _list.Add(new InstituteSearchDropdowns
                            {
                                Id    = _dr["ID"].ToString(),
                                Value = _dr["VALUE"].ToString()
                            });
                        }
                    }
                }
            }
            catch (NullReferenceException)
            {
                throw;
            }
            catch (Exception)
            {
                throw;
            }
            return(Json(new
            {
                List = _list,
                c = Code,
                m = Message
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
コード例 #15
0
#pragma warning disable SCS0016 // Controller method is vulnerable to CSRF
        public JsonResult ParticipateInCurrentYear()
#pragma warning restore SCS0016 // Controller method is vulnerable to CSRF
        {
            string Code = string.Empty, Message = string.Empty, Error = string.Empty;

            try
            {
                Session["localIP"] = "";
                InstituteRepository _objRepository = new InstituteRepository();
                DataSet             _ds            = _objRepository.SP_PARTICIPATE_INSTITUTE(Session["InstituteID"].ToString(), Session["localIP"].ToString(), ConfigurationManager.AppSettings["ParticipatedYear"].ToString());
                if (_ds != null)
                {
                    if (_ds.Tables[0].Rows.Count > 0)
                    {
                        Session["ParticipatedYear"] = ConfigurationManager.AppSettings["ParticipatedYear"].ToString();
                        Message = "Successfully participated in " + ConfigurationManager.AppSettings["ParticipatedYear"].ToString() + "!";
                        Code    = "success";
                    }
                }
            }
            catch (NullReferenceException ex)
            {
                Message = "Your session has been expired. Kindly login again.";
                Code    = "sessionexpired";
                Error   = ex.Message;
            }
            catch (Exception ex)
            {
                Message = "Error from server side. Kindly refresh the page and try again.";
                Code    = "servererror";
                Error   = ex.Message;
            }
            return(Json(new
            {
                c = Code,
                m = Message,
                e = Error
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
コード例 #16
0
        public JsonResult SaveSkypeInterview(string id = "", string SkypeInterviewStatus = "", string SkypeInterviewDate = "")
        {
            string Code = string.Empty, Message = string.Empty, Error = string.Empty;

            try
            {
                InstituteRepository _objRepo = new InstituteRepository();
                DataSet             _ds      = _objRepo.SKYPE_INTERVIEW_PHASE2_ALLOTED_STUDENTS(id, Session["InstituteID"].ToString(), SkypeInterviewStatus, SkypeInterviewDate);
                if (_ds != null)
                {
                    if (_ds.Tables[0].Rows.Count > 0)
                    {
                        Message = "Interview scheduled!";
                        Code    = "success";
                    }
                    else
                    {
                        Message = "Error from server side. Kindly refresh the page and try again.!";
                        Code    = "servererror";
                    }
                }
            }
            catch (NullReferenceException)
            {
                Code    = "error";
                Message = "Your session has been expired. Kindly refresh and try again.";
            }
            catch (Exception)
            {
                Code    = "error";
                Message = "Error from server side. Kindly refresh and try again.";
            }

            return(Json(new
            {
                c = Code,
                m = Message
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
コード例 #17
0
        public JsonResult Save_Institute_Details(InstituteMaster _obj)
        {
            bool flag       = false;
            bool flagExists = false;

            try
            {
                InstituteRepository _objRepository = new InstituteRepository();
                string localIP = "?";
                localIP         = Request.ServerVariables["REMOTE_ADDR"].ToString();
                _obj.ModifiedIP = localIP;
                _obj.Edited_by  = Session["User_id"].ToString();
                DataSet _ds = _objRepository.Update_Institute_Details(_obj);
                if (_ds != null)
                {
                    if (_ds.Tables[0].Rows.Count > 0)
                    {
                        if (_ds.Tables[0].Rows[0]["FLAG"].ToString() == "-1")
                        {
                            flagExists = true;
                        }
                        else if (_ds.Tables[0].Rows[0]["FLAG"].ToString() == "1")
                        {
                            flag = true;
                        }
                    }
                }
            }
            catch (System.Exception)
            {
                throw;
            }
            return(Json(new
            {
                flag = flag,
                flagExists = flagExists
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
コード例 #18
0
        public HtmlSelect FillTaluka(string DistrictID, string Taluka, int i)
        {
            DataTable dt = new DataTable();

            dt = InstituteRepository.displayTalukaWithinDistrict(DistrictID, "E");
            HtmlSelect hTaluka = new HtmlSelect();

            hTaluka.ID = Taluka;
            hTaluka.Attributes.Add("class", "selectbox");
            if (i == 0)  //for all drop downs except for 'OfficeIncharge' in OtherInformation
            {
                hTaluka.Attributes.Add("onblur", "setTaluka(this.value);");
            }
            else        //for drop down of 'OfficeIncharge' in OtherInformation
            {
                hTaluka.Attributes.Add("onblur", "setTalukaSec(this.value);");
            }
            clsCommon common = new clsCommon();

            common.fillDropDown(hTaluka, dt, "", "Text", "Value", "---- Select ----");
            dt.Dispose();
            return(hTaluka);
        }
コード例 #19
0
        public HtmlSelect FillDistrict(string StateID, string District, int i)
        {
            DataTable dt = new DataTable();

            dt = InstituteRepository.stateWiseDistricts(StateID, "E");
            HtmlSelect hDistrict = new HtmlSelect();

            hDistrict.ID = District;
            hDistrict.Attributes.Add("class", "selectbox");
            if (i == 0) //for all drop downs except for 'OfficeIncharge' in OtherInformation
            {
                hDistrict.Attributes.Add("onchange", "FillTalukaDD(this.value);");
            }
            else      //for drop down of 'OfficeIncharge' in OtherInformation
            {
                hDistrict.Attributes.Add("onchange", "FillTalukaDDSec(this.value);");
            }
            clsCommon common = new clsCommon();

            common.fillDropDown(hDistrict, dt, "", "Text", "Value", "---- Select ----");
            dt.Dispose();
            return(hDistrict);
        }
コード例 #20
0
        public ActionResult Clicked(string username, string password)
        {
            Debug.WriteLine("One");


            //creating a user record

            /*
             * var u = new User()
             * {
             *  Name = "Yash",
             *  UserName = "******",
             *  Pass = "******",
             *  Designation = "HOD",
             *  Proposals = new List<Proposals>()
             *  {
             *      new Proposals()
             *      {
             *          Index = null,
             *          Title =  null,
             *          Institute= null,
             *          Dept= null,
             *          Course= null,
             *          Semester= null,
             *          Sub_type= null,
             *          Sub_code= null,
             *          Others_CC_text = null,
             *          Others_CC_file=null,
             *          Full_syll= null,
             *          Abstract= null,
             *          Objectives= null,
             *          Outcome= null,
             *          References= null,
             *          Incl_sem= null,
             *          Incl_sub_type= null,
             *          Others_CR_text=null,
             *          Others_CR_file=null,
             *          Present_split= null,
             *          Proposed_split= null,
             *          Present_nomenclature = null,
             *          New_nomenclature = null,
             *          With_effect_from=null,
             *          Modification_requested =null,
             *          Present_eligibility = null,
             *          Proposed_eligibility = null,
             *          Others_CS_text = null,
             *          Others_CS_file = null,
             *          Proposed_cname= null,
             *          Adm_capacity= null,
             *          Proposed_curriculum= null,
             *          Proposed_distribution = null
             *      }
             *  }
             * };
             */
            //Working COde for insertion
            //-----------
            //User a = _repositoryUser.InsertPost(u);
            //ViewBag.Result = a.ToJson().ToString();
            //-----------

            //working code
            //---------------------

            /*
             * string res = null;
             * List<User> a = _repositoryUser.SelectAll();
             * foreach( User s in a)
             * {
             *  if(res == null)
             *      res = s.ToJson().ToString();
             *  else
             *      res = res + s.ToJson().ToString();
             * }
             * ViewBag.Result = res;
             */
            //---------------------


            //Working Code for querying
            //-----------------

            /*
             * string res = null;
             * List<User> a = _repositoryUser.Filter("{UserName: '******', Pass:'******'}");
             * if (a == null)
             *  ViewBag.Result = "NotFound";
             * else
             * {
             *  foreach (User s in a)
             *  {
             *      if (res == null)
             *          res = s.ToJson().ToString();
             *      else
             *          res = res + s.ToJson().ToString();
             *  }
             *  if (res == null)
             *      ViewBag.Result = "NotFound";
             *  else
             *      ViewBag.Result = res;
             * }
             * ViewBag.Result = a.ToString();
             *
             * ViewBag.xyz = a.ToJson().ToString();
             */

            //-------------------
            string Entered_Uname = username;
            string Entered_Pass  = password;

            Debug.WriteLine("Two");
            if (Entered_Uname == null || Entered_Pass == null)
            {
                //return JavaScript(alert("please enter username and password"));
                Debug.WriteLine("Three");
                return(Content("<script language = 'javascript' type = 'text/javascript'>alert('please enter username and password'); window.location.href = 'login'</script>"));
            }
            Debug.WriteLine("Four");
            User curr_user = null;

            try
            {
                Debug.WriteLine("Five");
                List <User> Hits = _repositoryUser.Filter("{UserName: '******', Pass: '******'}");
                if (Hits == null)
                {
                    //ViewBag.Result = "Error!!";
                    Debug.WriteLine("Error");
                    return(Content("<script language = 'javascript' type = 'text/javascript'>alert('ERROR!!'); window.location.href = 'login'</script>"));
                }
                else
                {
                    foreach (User s in Hits)
                    {
                        if (s.ToJson().ToString() == null)
                        {
                            //ViewBag.Result = "Invalid Login";
                            Debug.WriteLine("Invalid");
                            return(Content("<script language = 'javascript' type = 'text/javascript'>alert('ERROR!!'); window.location.href = 'login'</script>"));
                        }
                        else
                        {
                            ViewBag.Result = "Welcome " + s.Name.ToString();
                            string UserName = s.UserName.ToString();
                            TempData["UserName"] = s.UserName;
                            Session["UserName"]  = s.UserName;
                            Session["Name"]      = s.Name;
                            //Session["Institute"] = s.Institute;
                            InstituteRepository i = new InstituteRepository();
                            Session["Institute"] = i.GetInstitute(s.Institute);
                            Session["Ins_id"]    = i.GetIns_Id(s.Institute);
                            return(RedirectToAction("Index", "Main"));
                        }
                    }
                }
            }
            catch (Exception e)
            {
                string error = e.ToString();
                return(Content("<script language = 'javascript' type = 'text/javascript'>alert('" + e + "'); window.location.href = 'login'</script>"));
            }

            /*
             * if (username.Equals("robby") && password.Equals("singh"))
             * {
             * // ViewBag.Result = "Right";
             *
             * }
             * else
             * {
             *  //ViewBag.Result = "Wrong";
             * }*/
            return(Content("<script language = 'javascript' type = 'text/javascript'>alert('Wrong Username/Password!!'); window.location.href = 'login'</script>"));
            //return View("login");
        }
コード例 #21
0
        private void SelectDropdowns()
        {
            string Code = string.Empty, Message = string.Empty;
            List <InstituteSearchDropdowns> _listDiscipline = new List <InstituteSearchDropdowns>();
            List <InstituteSearchDropdowns> _listProgrammeLevel = new List <InstituteSearchDropdowns>();
            List <InstituteSearchDropdowns> _listQualification = new List <InstituteSearchDropdowns>();
            List <InstituteSearchDropdowns> _listCourseOfStudy = new List <InstituteSearchDropdowns>();
            List <InstituteSearchDropdowns> _listInstituteType = new List <InstituteSearchDropdowns>();

            try
            {
                InstituteRepository _objRepo = new InstituteRepository();
                DataSet             _ds      = _objRepo.SELECT_INSTITUTE_SEARCH_DROPDOWNS("Dropdowns", "", "", "");
                if (_ds != null)
                {
                    if (_ds.Tables[0].Rows.Count > 0)
                    {
                        foreach (DataRow _dr in _ds.Tables[0].Rows)
                        {
                            _listDiscipline.Add(new InstituteSearchDropdowns
                            {
                                Id    = _dr["ID"].ToString(),
                                Value = _dr["VALUE"].ToString()
                            });
                        }
                    }
                    if (_ds.Tables[1].Rows.Count > 0)
                    {
                        foreach (DataRow _dr in _ds.Tables[1].Rows)
                        {
                            _listProgrammeLevel.Add(new InstituteSearchDropdowns
                            {
                                Id    = _dr["ID"].ToString(),
                                Value = _dr["VALUE"].ToString()
                            });
                        }
                    }
                    if (_ds.Tables[2].Rows.Count > 0)
                    {
                        foreach (DataRow _dr in _ds.Tables[2].Rows)
                        {
                            _listQualification.Add(new InstituteSearchDropdowns
                            {
                                Id    = _dr["ID"].ToString(),
                                Value = _dr["VALUE"].ToString()
                            });
                        }
                    }
                    if (_ds.Tables[3].Rows.Count > 0)
                    {
                        foreach (DataRow _dr in _ds.Tables[3].Rows)
                        {
                            _listCourseOfStudy.Add(new InstituteSearchDropdowns
                            {
                                Id    = _dr["ID"].ToString(),
                                Value = _dr["VALUE"].ToString()
                            });
                        }
                    }
                    if (_ds.Tables[4].Rows.Count > 0)
                    {
                        foreach (DataRow _dr in _ds.Tables[4].Rows)
                        {
                            _listInstituteType.Add(new InstituteSearchDropdowns
                            {
                                Id    = _dr["ID"].ToString(),
                                Value = _dr["VALUE"].ToString()
                            });
                        }
                    }
                }
            }
            catch (NullReferenceException)
            {
                throw;
            }
            catch (Exception)
            {
                throw;
            }
            ViewBag.Disciplines    = _listDiscipline;
            ViewBag.ProgrammeLevel = _listProgrammeLevel;
            ViewBag.Qualification  = _listQualification;
            ViewBag.CourseOfStudy  = _listCourseOfStudy;
            ViewBag.InstituteType  = _listInstituteType;
        }
コード例 #22
0
        public JsonResult CheckLogin(InstituteMaster _obj)
        {
            bool flagCaptcha         = false;
            bool flagLogin           = false;
            bool flagPasswordChanged = true;
            bool flagValidID         = false;

            try
            {
                if (this.Session["CaptchaImageText"].ToString() == _obj.Captchastr)
                {
                    flagCaptcha = true;
                    InstituteRepository _objRepository = new InstituteRepository();
                    DataSet             ds             = _objRepository.Login_Institute(_obj);
                    if (ds != null)
                    {
                        Session["IsChangePwd"] = null;
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            flagValidID = true;
                            DataRow dr       = ds.Tables[0].Rows[0];
                            string  Password = dr["Password"].ToString();
                            string  random   = "";
                            if (dr["DefaultPassword"] != null)
                            {
                                random = dr["DefaultPassword"].ToString();
                            }
                            if (dr["IsPasswordChanged"].ToString().ToLower() == "true")
                            {
                                //nvNHsQGCNC3Ph/TQRX3dbd4BnGKtXFV/Ow==
                                string PASSWORD = _obj.Password;
                                string MD5      = Helper.VerifyHash(PASSWORD, "MD5", Password).ToString();
                                string SHA1     = Helper.VerifyHash(PASSWORD, "SHA1", Password).ToString();
                                string sha256   = Helper.VerifyHash(PASSWORD, "SHA256", Password).ToString();
                                string sha384   = Helper.VerifyHash(PASSWORD, "SHA384", Password).ToString();
                                string sha512   = Helper.VerifyHash(PASSWORD, "SHA512", Password).ToString();
                                if (MD5 != "True" || SHA1 == "True" || sha256 == "True" || sha384 == "True" || sha512 == "True")
                                {
                                    TempData["old_password"] = PASSWORD;
                                    flagLogin = true;
                                }
                            }
                            else
                            {
                                if (random != "")
                                {
                                    if (random == _obj.Password)
                                    {
                                        flagLogin                = true;
                                        flagPasswordChanged      = false;
                                        TempData["old_password"] = random;
                                    }
                                }
                            }
                            if (flagLogin)
                            {
                                Session["InstituteID"]   = dr["InstituteID"].ToString();
                                Session["InstituteName"] = dr["InstituteName"].ToString();
                                Session["Email"]         = dr["Email"].ToString();
                                string localIP = "?";
                                localIP                     = Request.ServerVariables["REMOTE_ADDR"].ToString();
                                Session["localIP"]          = localIP;
                                Session["User_id"]          = "0";
                                Session["IsAdminFLag"]      = dr["IsAdminFLag"].ToString();
                                Session["IsAdminEdit"]      = dr["IsAdminEdit"].ToString();
                                Session["IsNicheAllowed"]   = dr["IsNicheAllowed"].ToString();
                                Session["InstituteType"]    = dr["InstituteType"].ToString();
                                Session["ParticipatedYear"] = ConfigurationManager.AppSettings["ParticipatedYear"].ToString();
                                flagLogin                   = true;
                            }
                        }
                        if (flagLogin)
                        {
                            if (ds.Tables[1].Rows.Count > 0)
                            {
                                foreach (DataRow _dr in ds.Tables[1].Rows)
                                {
                                    Session["AR_StartDate"] = _dr["MinDate"].ToString();
                                    Session["AR_EndDate"]   = _dr["MaxDate"].ToString();
                                }
                            }
                            if (ds.Tables[2].Rows.Count > 0)
                            {
                                foreach (DataRow _dr in ds.Tables[2].Rows)
                                {
                                    Session["ParticipatedYear"] = _dr["ParticipatedYear"].ToString();
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(Json(new
            {
                flagCaptcha = flagCaptcha,
                flagLogin = flagLogin,
                flagPasswordChanged = flagPasswordChanged,
                flagValidID = flagValidID
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
コード例 #23
0
 public InstituteController()
 {
     instituteRepository         = new InstituteRepository();
     admissionCriteriaRepository = new AdmissionCriteriaRepository();
 }
コード例 #24
0
        public JsonResult Save_Nodal_Head_Details(mNodalHeadOfficers _obj)
        {
            string flag = "0";

            try
            {
                #region Encript Password
                Random rn = new Random();
#pragma warning disable SCS0005 // Weak random generator
                int month = rn.Next(1, 6);
#pragma warning restore SCS0005 // Weak random generator
                StringBuilder hashPassword = new StringBuilder();
                string        new_password = _obj.Password;
                switch (month)
                {
                case 1:
                    hashPassword.Append(Helper.ComputeHash(new_password, "MD5", null));
                    break;

                case 2:
                    hashPassword.Append(Helper.ComputeHash(new_password, "SHA1", null));
                    break;

                case 3:
                    hashPassword.Append(Helper.ComputeHash(new_password, "SHA256", null));
                    break;

                case 4:
                    hashPassword.Append(Helper.ComputeHash(new_password, "SHA384", null));
                    break;

                case 5:
                    hashPassword.Append(Helper.ComputeHash(new_password, "SHA512", null));
                    break;
                }
                _obj.Password = hashPassword.ToString();
                #endregion
                //_obj.Password = StringCipher.Encrypt(_obj.Password);
                InstituteRepository _objRepository = new InstituteRepository();
                string localIP = "?";
                localIP        = Request.ServerVariables["REMOTE_ADDR"].ToString();
                _obj.CreatedIP = localIP;
                DataSet _ds = _objRepository.Save_Preamble_Data(_obj);
                if (_ds != null)
                {
                    if (_ds.Tables[0].Rows.Count > 0)
                    {
                        flag = _ds.Tables[0].Rows[0]["FLAG"].ToString();
                    }
                }
            }
            catch (System.Exception)
            {
                throw;
            }
            return(Json(new
            {
                flag = flag
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
コード例 #25
0
        public JsonResult Check_And_ChangePassword(InstituteMaster _obj)
        {
            bool flagCheckPassword = false;
            bool flagCaptcha       = false;
            bool flagPwdChanged    = false;

            if (this.Session["CaptchaImageText"].ToString() == _obj.Captchastr)
            {
                flagCaptcha      = true;
                _obj.InstituteID = Session["InstituteID"].ToString();
                InstituteRepository _objRepository = new InstituteRepository();
                DataSet             ds             = _objRepository.Login_Institute(_obj);
                if (ds != null)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        DataRow dr             = ds.Tables[0].Rows[0];
                        string  actualPassword = dr["Password"].ToString();
                        string  random         = "";
                        if (dr["DefaultPassword"] != null)
                        {
                            random = dr["DefaultPassword"].ToString();
                        }
                        if (dr["IsPasswordChanged"].ToString().ToLower() == "true")
                        {
                            string password = _obj.DefaultPassword;
                            string MD5      = Helper.VerifyHash(password, "MD5", actualPassword).ToString();
                            string SHA1     = Helper.VerifyHash(password, "SHA1", actualPassword).ToString();
                            string sha256   = Helper.VerifyHash(password, "SHA256", actualPassword).ToString();
                            string sha384   = Helper.VerifyHash(password, "SHA384", actualPassword).ToString();
                            string sha512   = Helper.VerifyHash(password, "SHA512", actualPassword).ToString();

                            if (MD5 == "True" || SHA1 == "True" || sha256 == "True" || sha384 == "True" || sha512 == "True")
                            {
                                flagCheckPassword = true;
                            }
                        }
                        else
                        {
                            if (random != "")
                            {
                                if (random == _obj.DefaultPassword)
                                {
                                    flagCheckPassword = true;
                                }
                            }
                        }
                        if (flagCheckPassword)
                        {
                            Random rn = new Random();
#pragma warning disable SCS0005 // Weak random generator
                            int month = rn.Next(1, 6);
#pragma warning restore SCS0005 // Weak random generator
                            StringBuilder hashPassword = new StringBuilder();
                            string        new_password = _obj.Password;
                            switch (month)
                            {
                            case 1:
                                hashPassword.Append(Helper.ComputeHash(new_password, "MD5", null));
                                break;

                            case 2:
                                hashPassword.Append(Helper.ComputeHash(new_password, "SHA1", null));
                                break;

                            case 3:
                                hashPassword.Append(Helper.ComputeHash(new_password, "SHA256", null));
                                break;

                            case 4:
                                hashPassword.Append(Helper.ComputeHash(new_password, "SHA384", null));
                                break;

                            case 5:
                                hashPassword.Append(Helper.ComputeHash(new_password, "SHA512", null));
                                break;
                            }
                            _obj.Password = hashPassword.ToString();
                            DataSet _dsChngPwd = _objRepository.Institute_password_change(_obj);
                            if (_dsChngPwd != null)
                            {
                                if (_dsChngPwd.Tables[0].Rows.Count > 0)
                                {
                                    flagPwdChanged = true;
                                    Session["IsPasswordChanged"] = "true";
                                }
                            }
                        }
                    }
                }
            }
            return(Json(new
            {
                flagCaptcha = flagCaptcha,
                flagPwdChanged = flagPwdChanged
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
コード例 #26
0
        public JsonResult ForgotPassword(InstituteMaster _obj)
        {
            bool   flag        = false;
            bool   flagHead    = false;
            bool   flagCaptcha = false;
            string Email       = "";
            string Error       = string.Empty;
            InstituteRepository _objRepository = new InstituteRepository();

            try
            {
                if (this.Session["CaptchaImageText"].ToString() == _obj.Captchastr)
                {
                    flagCaptcha = true;
                    string password = Membership.GeneratePassword(8, 1);
                    _obj.DefaultPassword = password;
                    DataSet   ds            = _objRepository.InstituteForgotPassword(_obj);
                    SendEmail _objseedemail = new SendEmail();
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        if (ds.Tables[0].Rows[0]["COUNTS"].ToString() == "1")
                        {
                            //string strform = System.Configuration.ConfigurationManager.AppSettings["Emailusername"];
                            string strform = string.Empty;
                            #region Code to send mails simultaneously in a loop (By Amit: 14-06-2019 11:45 AM)
                            if (System.Web.HttpContext.Current.Application["UserCountForMail"] == null)
                            {
                                System.Web.HttpContext.Current.Application["UserCountForMail"] = 1;
                            }
                            else
                            {
                            }
                            int UserCountForMail = Convert.ToInt32(System.Web.HttpContext.Current.Application["UserCountForMail"]);
                            if (UserCountForMail < 4)
                            {
                                UserCountForMail++;
                            }
                            else
                            {
                                UserCountForMail = 1;
                            }

                            System.Web.HttpContext.Current.Application["UserCountForMail"] = UserCountForMail;
                            if (System.Web.HttpContext.Current.Application["UserCountForMail"] == null)
                            {
                                System.Web.HttpContext.Current.Application["UserCountForMail"] = 1;
                            }
                            else
                            {
                            }
                            //int UserCountForMail = Convert.ToInt32(System.Web.HttpContext.Current.Application["UserCountForMail"]);
                            if (UserCountForMail < 4)
                            {
                                UserCountForMail++;
                            }
                            else
                            {
                                UserCountForMail = 1;
                            }
                            if (System.Web.HttpContext.Current.Application["UserCountForMail"] == null)
                            {
                                System.Web.HttpContext.Current.Application["UserCountForMail"] = 1;
                            }
                            if (UserCountForMail == 1)
                            {
                                strform = System.Configuration.ConfigurationManager.AppSettings["Emailusername1"];
                            }
                            else if (UserCountForMail == 2)
                            {
                                strform = System.Configuration.ConfigurationManager.AppSettings["Emailusername2"];
                            }
                            else if (UserCountForMail == 3)
                            {
                                strform = System.Configuration.ConfigurationManager.AppSettings["Emailusername3"];
                            }
                            else if (UserCountForMail == 4)
                            {
                                strform = System.Configuration.ConfigurationManager.AppSettings["Emailusername4"];
                            }

                            #endregion
                            string        Subject  = "Forgot Password: Study in India";
                            StringBuilder MailBody = new StringBuilder();
                            MailBody.Append("<br/>Dear Sir/Madam <br/>");
                            MailBody.Append("<br/>You may now login with below credentials:");
                            MailBody.Append("<br/>Username: "******"InstituteID"].ToString());
                            MailBody.Append("<br/>Password: "******"<br/><br/><a target='_blank' href='" + FullyQualifiedApplicationPath(ControllerContext.RequestContext.HttpContext.Request) + "admission/login' style='color:blue;'>click here</a> to reset your Student Portal password." + "<br/>");
                            MailBody.Append("<br/>Please note: This is an auto generated email.<br/>");
                            MailBody.Append("<br/>Regards,<br/>");
                            MailBody.Append("Team Study in India (SII)<br/>");
                            string bcc = "";
                            string cc  = "";
                            Email = ds.Tables[0].Rows[0]["Email"].ToString();
                            //Email = "*****@*****.**";
                            //_objseedemail.SendEmailInBackgroundThread(strform, Email, bcc, cc, Subject, MailBody.ToString(), "", true);
                            _objseedemail.SendEmailForRegistration(strform, Email, bcc, cc, Subject, MailBody.ToString(), "", true);
                            flag     = true;
                            flagHead = true;
                        }
                        else if (ds.Tables[0].Rows[0]["COUNTS"].ToString() == "-1")
                        {
                            flag     = true;
                            flagHead = false;
                        }
                        else
                        {
                            flag = false;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                //throw;
                Error = ex.Message;
            }
            return(Json(new
            {
                flag = flag,
                flagCaptcha = flagCaptcha,
                flagHead = flagHead,
                Email = Email,
                e = Error
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
コード例 #27
0
        public JsonResult ListOfStudents(string PL = "", string StartIndex = "", string PageSize = "", string SearchByText = "")
        {
            string Code = string.Empty, Message = string.Empty, Error = string.Empty;

            try
            {
                InstituteRepository          _objRepo = new InstituteRepository();
                DataSet                      _ds      = _objRepo.SELECT_PHASE2_ALLOTED_STUDENTS_FOR_INSTITUTES(Session["InstituteID"].ToString(), "PrgList", PL, StartIndex, PageSize, SearchByText);
                List <mAdmittedStudentsList> _list    = new List <mAdmittedStudentsList>();
                if (_ds != null)
                {
                    if (_ds.Tables[0].Rows.Count > 0)
                    {
                        foreach (DataRow _dr in _ds.Tables[0].Rows)
                        {
                            _list.Add(new mAdmittedStudentsList
                            {
                                ID                        = _dr["ID"].ToString(),
                                StudentName               = _dr["StudentName"].ToString(),
                                Email                     = _dr["Email"].ToString(),
                                Mobile                    = _dr["Mobile"].ToString(),
                                Country_Name              = _dr["Country_Name"].ToString(),
                                Discipline                = _dr["Discipline"].ToString(),
                                ProgrammeLevel            = _dr["ProgrammeLevel"].ToString(),
                                Qualification             = _dr["Qualification"].ToString(),
                                CourseOfStudy             = _dr["CourseOfStudy"].ToString(),
                                Nationality               = _dr["Nationality"].ToString(),
                                StudentID                 = _dr["StudentID"].ToString(),
                                StudentGender             = _dr["StudentGender"].ToString(),
                                IsSeatAlloted             = _dr["IsSeatAlloted"].ToString(),
                                InstituteID_Alloted       = _dr["InstituteID_Alloted"].ToString(),
                                InstituteCourseID_Alloted = _dr["InstituteCourseID_Alloted"].ToString(),
                                InstituteName             = _dr["InstituteName"].ToString(),
                                FeeWaiver                 = _dr["FeeWaiver"].ToString(),
                                FeeWaiverRemarks          = _dr["FeeWaiverRemarks"].ToString(),
                                ProgramLevel              = _dr["ProgramLevel"].ToString(),
                                ISApprovebyInstitute      = _dr["ISApprovebyInstitute"].ToString(),
                                ApprovebyInstituteRemarks = _dr["ApprovebyInstituteRemarks"].ToString(),
                                ApprovebyInstituteDate    = _dr["ApprovebyInstituteDate"].ToString(),
                                Doc_AllotmentLetter       = _dr["Doc_AllotmentLetter"].ToString(),
                                SkypeInterviewRequired    = _dr["SkypeInterviewRequired"].ToString(),
                                SkypeInterviewDate        = _dr["SkypeInterviewDate"].ToString(),
                                SkypeInterviewStatus      = _dr["SkypeInterviewStatus"].ToString(),
                                StudentStatus             = _dr["StudentStatus"].ToString(),
                                StudentStatusRemarks      = _dr["StudentStatusRemarks"].ToString(),
                                ApplicationNo             = _dr["ApplicationNo"].ToString()
                            });
                        }
                        Message = "Student has been approved successfully!";
                        Code    = "success";
                    }
                    else
                    {
                        Message = "Error from server side. Kindly refresh the page and try again.!";
                        Code    = "servererror";
                    }
                }
            }
            catch (NullReferenceException)
            {
                Code    = "error";
                Message = "Your session has been expired. Kindly refresh and try again.";
            }
            catch (Exception)
            {
                Code    = "error";
                Message = "Error from server side. Kindly refresh and try again.";
            }

            return(Json(new
            {
                c = Code,
                m = Message
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
コード例 #28
0
 public DropDownController()
 {
     _repositoryIns = new InstituteRepository();
     allIns         = _repositoryIns.GetInstitutes();
     formModal      = new FormModal();
 }
コード例 #29
0
 public HomeController()
 {
     instituteRepository = new InstituteRepository();
     newsRepository      = new NewsRepository();
 }
コード例 #30
0
        // GET: Institute/GenerateDataForMail
        public ActionResult Index()
        {
            InstituteRepository _objRepository = new InstituteRepository();
            DataSet             _dsInstituteListForGeneration = _objRepository.Select_All_Institutes();

            if (_dsInstituteListForGeneration != null)
            {
                if (_dsInstituteListForGeneration.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow _dr in _dsInstituteListForGeneration.Tables[0].Rows)
                    {
                        string InstituteID = "SII-I-" + (Convert.ToInt32(_dr["ID"].ToString())).ToString("D4");

                        string AccessURL = "";
                        AccessURL = FullyQualifiedApplicationPath(ControllerContext.RequestContext.HttpContext.Request) + "Institute/Preamble/Index?u=" + StringCipher.Encrypt(InstituteID);

                        #region Generate Random Password
                        Random        random      = new Random();
                        string        combination = "123456789ABCDEFGHJKMNPQRSTUVWXYZabcdefghjkmnpqrstuvwxyz";
                        StringBuilder captcha     = new StringBuilder();
                        for (int i = 0; i < 8; i++)
#pragma warning disable SCS0005 // Weak random generator
                        {
                            captcha.Append(combination[random.Next(combination.Length)]);
                        }
#pragma warning restore SCS0005 // Weak random generator
                        string DefaultPassword = captcha.ToString();
                        #endregion

                        DataSet _ds = _objRepository.Update_Institute_Data_For_MailSending(_dr["ID"].ToString(), InstituteID, AccessURL, DefaultPassword);
                    }
                }
            }

            DataSet _dsInstituteListForMailSending = _objRepository.Select_All_Institutes();
            if (_dsInstituteListForMailSending != null)
            {
                if (_dsInstituteListForMailSending.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow _dr in _dsInstituteListForMailSending.Tables[0].Rows)
                    {
                        string strform = "*****@*****.**"; //System.Configuration.ConfigurationManager.AppSettings["formemail"];
                        string Subject = "Registered successfully for Study In India";
                        //string strTo = "*****@*****.**";
                        string strTo = _dr["Email"].ToString();

                        SendEmail     _objseedemail = new SendEmail();
                        StringBuilder MailBody      = new StringBuilder();
                        MailBody.Append("<br/>Dear Sir/Madam,<br/>");
                        MailBody.Append("<br/>Greetings from Study in India!<br/>");
                        MailBody.Append("<br/>Please ");
                        MailBody.Append("<a target='_blank' href='" + _dr["AccessURL"].ToString() + "' style='color:blue;'>click here</a>");
                        MailBody.Append(" to open Instiute form to fill for Study In India!" + "<br/>");
                        MailBody.Append("Your Login Details:" + "<br/>");
                        MailBody.Append("InstituteID: " + _dr["InstituteID"].ToString() + "<br/>");
                        MailBody.Append("First time Password: "******"DefaultPassword"].ToString() + "<br/><br/>");
                        MailBody.Append("<br/>Please note: This is an auto generated email. In case of any technical queries please contact: <br/>");
                        MailBody.Append("<br/>Regards,<br/>");
                        MailBody.Append("Study in India<br/>");
                        string bcc = "";
                        string cc  = "";
                        _objseedemail.SendEmailInBackgroundThread(strform, strTo, bcc, cc, Subject, MailBody.ToString(), "", true);
                        //flagSent = true;
                    }
                }
            }
            ViewBag.Data = _dsInstituteListForMailSending;
            return(View());
        }