Exemplo n.º 1
0
        public JsonResult SelectSDicipline()
        {
            ChoiceFillingRepository _objRepository          = new ChoiceFillingRepository();
            List <mStudent_Ch_SelectedDisciplines> _listDPL = new List <mStudent_Ch_SelectedDisciplines>();

            try
            {
                DataSet _ds = _objRepository.SELECT_tbl_Student_Ch_SelecedDiscipline(Session["studentid"].ToString(), Session["ApplicationNo"].ToString());
                if (_ds != null)
                {
                    if (_ds.Tables[0].Rows.Count > 0)
                    {
                        foreach (DataRow _dr in _ds.Tables[0].Rows)
                        {
                            _listDPL.Add(new mStudent_Ch_SelectedDisciplines
                            {
                                Discipline_ID      = _dr["Discipline_ID"].ToString(),
                                ProgrammeLevel_IDs = _dr["ProgrammeLevel_IDs"].ToString()
                            });
                        }
                    }
                }
            }
            catch (System.Exception)
            {
                throw;
            }
            return(Json(new
            {
                sd = _listDPL
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
Exemplo n.º 2
0
        public JsonResult Insert_InstituteList(ChoiceFilling _obj)
        {
            ChoiceFillingRepository objRep = new ChoiceFillingRepository();

            _obj.studentid = Session["studentid"].ToString();
            _obj.CreatedBy = Session["studentid"].ToString();
            _obj.CreatedIp = Session["localIP"].ToString();
            DataSet _ds  = objRep.Insert_InstituteList_New(_obj);
            bool    flag = true;

            if (_ds != null)
            {
                if (_ds.Tables[0].Rows.Count > 0)
                {
                    if (_ds.Tables[0].Rows[0]["FLAG"].ToString() == "0")
                    {
                        flag = false;
                    }
                }
            }
            return(Json(new
            {
                flag = flag
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
Exemplo n.º 3
0
        public JsonResult UpdateSequenceNumber_swap_move(ChoiceFilling obj)
        {
            ChoiceFillingRepository objRep = new ChoiceFillingRepository();
            //obj.Type = "SWAP";
            string localIP = "?";

            localIP       = Request.ServerVariables["REMOTE_ADDR"].ToString();
            obj.CreatedIp = localIP;
            obj.studentid = Session["studentid"].ToString();
            DataSet _ds  = objRep.UpdateSequenceNumber_swap_move(obj);
            bool    flag = true;

            if (_ds != null)
            {
                if (_ds.Tables[0].Rows.Count > 0)
                {
                    if (_ds.Tables[0].Rows[0]["FLAG"].ToString() == "0")
                    {
                        flag = false;
                    }
                }
            }
            return(Json(new
            {
                flag = flag
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
Exemplo n.º 4
0
        public JsonResult SelectStdCh()
        {
            mStudent_Ch_Choice_Filling_Save _obj = new mStudent_Ch_Choice_Filling_Save();
            string Code = string.Empty, Message = string.Empty;

            if (Session["ApplicationNo"] != null)
            {
                if (Session["ApplicationNo"].ToString() != "")
                {
                    _obj.ApplicationNo = Session["ApplicationNo"].ToString();
                }
            }
            _obj.studentid = Session["studentid"].ToString();
            List <mStudent_Ch_Choice_Filling_Saved_List> _list = new List <mStudent_Ch_Choice_Filling_Saved_List>();

            try
            {
                ChoiceFillingRepository _objRepository = new ChoiceFillingRepository();
                DataSet _ds = _objRepository.SELECT_tbl_Student_Ch_Choice_Filling(_obj);
                if (_ds != null)
                {
                    if (_ds.Tables[0].Rows.Count > 0)
                    {
                        foreach (DataRow _dr in _ds.Tables[0].Rows)
                        {
                            _list.Add(new mStudent_Ch_Choice_Filling_Saved_List
                            {
                                id                  = _dr["ID"].ToString(),
                                InstituteName       = _dr["InstituteName"].ToString(),
                                InstituteCourseName = _dr["Coursename"].ToString(),
                                InstituteType       = _dr["InstituteType"].ToString(),
                                Discipline          = _dr["Discipline"].ToString(),
                                ProgramLevel        = _dr["ProgramLevel"].ToString(),
                                Coursename          = _dr["Coursename"].ToString(),
                                Specialization      = _dr["Specialization"].ToString(),
                                SequenceNumber      = _dr["SequenceNumber"].ToString()
                            });
                        }
                    }
                }
            }
            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
            {
                List = _list,
                c = Code,
                m = Message
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
Exemplo n.º 5
0
        public JsonResult SelectProgramLevel()
        {
            ChoiceFillingRepository _objRepository = new ChoiceFillingRepository();
            string SelectedProgramlevel            = "";

            try
            {
                DataSet _ds = _objRepository.SELECT_tbl_Student_Ch_SelecedDiscipline(Session["studentid"].ToString(), Session["ApplicationNo"].ToString());
                if (_ds != null)
                {
                    if (_ds.Tables[0].Rows.Count > 0)
                    {
                        foreach (DataRow _dr in _ds.Tables[0].Rows)
                        {
                            SelectedProgramlevel = _dr["SelectedProgramlevel"].ToString();
                        }
                    }
                }
            }
            catch (System.Exception)
            {
                throw;
            }
            return(Json(new
            {
                sd = SelectedProgramlevel
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
Exemplo n.º 6
0
        public JsonResult Select()
        {
            TestCentreRegitration _obj = new TestCentreRegitration
            {
                Type = "SELECT"
            };
            ChoiceFillingRepository objRep = new ChoiceFillingRepository();

            _obj.studentid = Session["studentid"].ToString();
            DataSet ds = objRep.Opr_TestCentreRegitration(_obj);
            List <TestCentreRegitration> _list = new List <TestCentreRegitration>();

            if (ds != null)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow row in ds.Tables[0].Rows)
                    {
                        _list.Add(new TestCentreRegitration
                        {
                            FatherName  = row["FatherName"].ToString(),
                            TestCountry = row["TestCountry"].ToString(),
                            TestCity    = row["TestCity"].ToString()
                        });
                    }
                }
            }
            return(Json(new
            {
                List = _list
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
Exemplo n.º 7
0
        public JsonResult SaveStudentBasic(TestCentreRegitration _obj)
        {
            _obj.Type      = "INSERT";
            _obj.studentid = Session["studentid"].ToString();
            _obj.CreatedIP = Session["localIP"].ToString();
            ChoiceFillingRepository objRepository = new ChoiceFillingRepository();
            DataSet _ds  = objRepository.Opr_TestCentreRegitration(_obj);
            bool    flag = true;

            if (_ds != null)
            {
                if (_ds.Tables[0].Rows.Count > 0)
                {
                    if (_ds.Tables[0].Rows[0]["Counts"].ToString() == "0")
                    {
                        flag = false;
                    }
                }
            }
            return(Json(new
            {
                flag = flag
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
Exemplo n.º 8
0
        public void selectDropdown()
        {
            StudentRepository  _objNationality = new StudentRepository();
            DataSet            ds           = _objNationality.select_form_load_student();
            List <Nationality> _Nationality = new List <Nationality>();
            List <Country>     _Country     = new List <Country>();
            List <Country>     _TestCountry = new List <Country>();
            List <TestCity>    _TestCity    = new List <TestCity>();

            if (ds != null)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow row in ds.Tables[0].Rows)
                    {
                        Nationality _objpro = new Nationality();
                        _objpro.Nationality_id   = (row["Nationality_id"].ToString());
                        _objpro.Nationality_Name = row["Nationality"].ToString();
                        _Nationality.Add(_objpro);
                    }
                }
                if (ds.Tables[1].Rows.Count > 0)
                {
                    foreach (DataRow row in ds.Tables[1].Rows)
                    {
                        Country _objcountry = new Country();
                        _objcountry.Country_id   = (row["Country_id"].ToString());
                        _objcountry.Country_Name = row["Country_Name"].ToString();
                        _objcountry.country_code = row["country_code"].ToString() + " (" + row["Country_Name"].ToString() + ")";
                        _Country.Add(_objcountry);
                    }
                }
            }
            ViewBag.Nationality = _Nationality;
            ViewBag.Country     = _Country;

            ChoiceFillingRepository _objRepo = new ChoiceFillingRepository();
            TestCentreRegitration   _obj     = new TestCentreRegitration
            {
                Type = "SELECTDRP"
            };
            DataSet _ds2 = _objRepo.Opr_TestCentreRegitration(_obj);

            if (_ds2 != null)
            {
                if (_ds2.Tables[0].Rows.Count > 0)
                {
                    ViewBag.TestCountry = _ds2.Tables[0];
                }

                if (_ds2.Tables[1].Rows.Count > 0)
                {
                    ViewBag.TestCity = _ds2.Tables[1];
                }
            }
        }
Exemplo n.º 9
0
        public JsonResult CheckBasic(mStudent_Ch_Basic _obj)
        {
            string Message = string.Empty, Code = string.Empty;

            try
            {
                ChoiceFillingRepository _objRepository = new ChoiceFillingRepository();
                string localIP = "?";
                localIP        = Request.ServerVariables["REMOTE_ADDR"].ToString();
                _obj.CreatedIP = localIP;
                if (Session["ApplicationNo"] != null)
                {
                    if (Session["ApplicationNo"].ToString() != "")
                    {
                        _obj.ApplicationNo = Session["ApplicationNo"].ToString();
                    }
                }
                _obj.studentid = Session["studentid"].ToString();
                DataSet _ds = _objRepository.CHECK_tbl_Student_Ch_Basic(_obj);
                if (_ds != null)
                {
                    if (_ds.Tables[0].Rows.Count > 0)
                    {
                        DataRow _dr = _ds.Tables[0].Rows[0];
                        if (_dr["EC_FLAG"].ToString().ToLower() == "true" && _dr["AE_FLAG"].ToString().ToLower() == "true")
                        {
                            Message = "Details has been saved successfully!";
                            Code    = "success";
                        }
                        else
                        {
                            Message = "Any change will reset your filled course choices. More course choice might be available. Do you want to proceed?";
                            Code    = "changes";
                        }
                    }
                    else
                    {
                        Message = "Error from server side. Kindly refresh the page and try again.";
                        Code    = "servererror";
                    }
                }
            }
            catch (System.Exception)
            {
                throw;
            }
            return(Json(new
            {
                m = Message,
                c = Code
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
Exemplo n.º 10
0
        public JsonResult SaveProgramLevel(mStudent_Ch_Basic _obj)
        {
            string Message = string.Empty, Code = string.Empty;

            try
            {
                ChoiceFillingRepository _objRepository = new ChoiceFillingRepository();
                string localIP = "?";
                localIP        = Request.ServerVariables["REMOTE_ADDR"].ToString();
                _obj.CreatedIP = localIP;
                if (Session["ApplicationNo"] != null)
                {
                    if (Session["ApplicationNo"].ToString() != "")
                    {
                        _obj.ApplicationNo = Session["ApplicationNo"].ToString();
                    }
                }
                _obj.studentid = Session["studentid"].ToString();
                DataSet _ds = _objRepository.INSERT_UPDATE_tbl_Student_Ch_SelectProgramLevel(_obj);
                if (_ds != null)
                {
                    if (_ds.Tables[0].Rows.Count > 0)
                    {
                        Message = "Program Level(s) have been saved successfully!";
                        Code    = "success";
                    }
                    else
                    {
                        Message = "Error from server side. Kindly refresh the page and try again.";
                        Code    = "servererror";
                    }
                }
            }
            catch (NullReferenceException)
            {
                Message = "Your session has been expired. Kindly login again.";
                Code    = "sessionexpired";
            }
            catch (Exception)
            {
                Message = "Error from server side. Kindly refresh the page and try again.";
                Code    = "servererror";
            }
            return(Json(new
            {
                m = Message,
                c = Code
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
Exemplo n.º 11
0
        // GET: admission/IndSATSelection
        public ActionResult Index()
        {
            if (Convert.ToDateTime(Session["submitchoiceDate"].ToString()) > Convert.ToDateTime("2020-04-30 23:59:59"))
            {
                return(Redirect("~/admission/Dashboard/"));
            }
            if (DateTime.Now > Convert.ToDateTime("2020-05-15 23:59:59"))
            {
                return(Redirect("~/admission/Dashboard/"));
            }
            if (Session["IsTestCentreCountry"].ToString().ToLower() != "true")
            {
                Session["IndSAT_ERROR_FLAG"] = "false";
                return(Redirect("~/admission/Dashboard"));
            }
            ChoiceFillingRepository _objRepository = new ChoiceFillingRepository();
            DataSet _ds = _objRepository.Opr_TestCentreRegitration(new TestCentreRegitration
            {
                Type      = "SELECT",
                studentid = Session["studentid"].ToString()
            });

            if (_ds != null)
            {
                if (_ds.Tables[0].Rows.Count > 0)
                {
                    return(Redirect("~/admission/Dashboard/ViewDetails?d=IndSATSelection"));
                }
                if (_ds.Tables[1].Rows.Count > 0)
                {
                    if (_ds.Tables[1].Rows[0]["IsTestCentreCountry"].ToString().ToLower() == "false")
                    {
                        Session["IndSAT_ERROR_FLAG"] = "Ind-SAT Examination is only being conducated for the students who belong to the contries: <strong>Nepal, Ethiopia, Bangladesh, Bhutan, Uganda, Tanzania, Rwanda, Sri Lanka, Kenya, Zambia, Indonesia</strong> and <strong>Mauritius</strong>.";
                        return(Redirect("~/admission/Dashboard"));
                    }
                }
                if (_ds.Tables[2].Rows.Count > 0)
                {
                    if (_ds.Tables[2].Rows[0]["DontAllowIndSAT"].ToString().ToLower() != "0")
                    {
                        Session["IndSAT_ERROR_FLAG"] = "Ind-SAT Examination Centre Selection is not allowed for PhD or Integrated PhD students.";
                        return(Redirect("~/admission/Dashboard"));
                    }
                }
            }
            selectDropdown();
            return(View());
        }
Exemplo n.º 12
0
        public JsonResult DeleteStdCh(string id = "0")
        {
            mStudent_Ch_Choice_Filling_Save _obj = new mStudent_Ch_Choice_Filling_Save();
            string Code = string.Empty, Message = string.Empty;

            if (Session["ApplicationNo"] != null)
            {
                if (Session["ApplicationNo"].ToString() != "")
                {
                    _obj.ApplicationNo = Session["ApplicationNo"].ToString();
                }
            }
            _obj.studentid = Session["studentid"].ToString();
            List <mStudent_Ch_Choice_Filling_Saved_List> _list = new List <mStudent_Ch_Choice_Filling_Saved_List>();

            try
            {
                ChoiceFillingRepository _objRepository = new ChoiceFillingRepository();
                DataSet _ds = _objRepository.DELETE_tbl_Student_Ch_Choice_Filling(id, Session["ApplicationNo"].ToString(), Session["studentid"].ToString());
                if (_ds != null)
                {
                    if (_ds.Tables[0].Rows.Count > 0)
                    {
                        Code    = "success";
                        Message = "Choice has been deleted successfully.";
                    }
                }
            }
            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
            {
                List = _list,
                c = Code,
                m = Message
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
        public ActionResult Index()
        {
            ChoiceFillingRepository _objRepository = new ChoiceFillingRepository();
            DataSet _ds = _objRepository.SELECT_tbl_Student_Ch_Basic(Session["studentid"].ToString());

            if (_ds != null)
            {
                if (_ds.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow _dr in _ds.Tables[0].Rows)
                    {
                        Session["ApplicationNo"] = _dr["ApplicationNo"].ToString();
                    }
                }
            }
            return(View());
        }
Exemplo n.º 14
0
        public JsonResult student_submit_choice_filling(ChoiceFilling obj)
        {
            ChoiceFillingRepository objRep = new ChoiceFillingRepository();
            //obj.Type = "SWAP";
            string localIP = "?";

            localIP       = Request.ServerVariables["REMOTE_ADDR"].ToString();
            obj.CreatedIp = localIP;
            obj.studentid = Session["studentid"].ToString();
            DataSet   _ds           = objRep.student_submit_choice_filling(obj);
            bool      flag          = true;
            SendEmail _objseedemail = new SendEmail();

            if (_ds != null)
            {
                if (_ds.Tables[0].Rows.Count > 0)
                {
                    if (_ds.Tables[0].Rows[0]["FLAG"].ToString() == "0")
                    {
                        flag = false;
                    }
                    else
                    {
                        string        strform  = System.Configuration.ConfigurationManager.AppSettings["Emailusername"];
                        string        Subject  = "Study in India";
                        StringBuilder MailBody = new StringBuilder();
                        MailBody.Append("<br/>Dear Candidate, " + Session["studentname"].ToString() + ",<br/>");
                        MailBody.Append("<br/>Thank you for choosing Study in India!");
                        MailBody.Append("<br/>You have successfully submitted your choices for institutes.");
                        MailBody.Append("<br/>Results of the counseling will be shared with you shortly.");
                        MailBody.Append("<br/><br/><br/>Best,<br/>");
                        MailBody.Append("Study in India Team<br/>");
                        string bcc = "";
                        string cc  = "";
                        _objseedemail.SendEmailInBackgroundThread(strform, Session["Email"].ToString(), bcc, cc, Subject, MailBody.ToString(), "", true);
                    }
                }
            }
            return(Json(new
            {
                flag = flag
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
Exemplo n.º 15
0
        public JsonResult ResetChoiceFilling(mStudent_Ch_Basic _obj)
        {
            string Message = string.Empty, Code = string.Empty;

            try
            {
                ChoiceFillingRepository _objRepository = new ChoiceFillingRepository();
                string localIP = "?";
                localIP        = Request.ServerVariables["REMOTE_ADDR"].ToString();
                _obj.CreatedIP = localIP;
                if (Session["ApplicationNo"] != null)
                {
                    if (Session["ApplicationNo"].ToString() != "")
                    {
                        _obj.ApplicationNo = Session["ApplicationNo"].ToString();
                    }
                }
                _obj.studentid = Session["studentid"].ToString();
                DataSet _ds = _objRepository.RESET_tbl_Student_Ch_Choice_Filling(_obj);
                if (_ds != null)
                {
                    if (_ds.Tables[0].Rows.Count > 0)
                    {
                        Message = "Reset succcessfully!";
                        Code    = "success";
                    }
                    else
                    {
                        Message = "Error from server side. Kindly refresh the page and try again.";
                        Code    = "servererror";
                    }
                }
            }
            catch (System.Exception)
            {
                throw;
            }
            return(Json(new
            {
                m = Message,
                c = Code
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
Exemplo n.º 16
0
        public JsonResult SaveUploadDocs(string Docs = "")
        {
            TempData.Keep("studentid");
            TempData.Keep("ApplicationNo");
            string Message = string.Empty, Code = string.Empty;

            try
            {
                ChoiceFillingRepository _objRepository = new ChoiceFillingRepository();
                string localIP = "?";
                localIP = Request.ServerVariables["REMOTE_ADDR"].ToString();
                DataSet _ds = _objRepository.INSERT_UPDATE_tbl_Student_Ch_Doc_Upload(TempData.Peek("ApplicationNo").ToString(), TempData.Peek("studentid").ToString(), Docs, localIP);
                if (_ds != null)
                {
                    if (_ds.Tables[0].Rows.Count > 0)
                    {
                        Message = "Documents have been uploaded!";
                        Code    = "success";
                    }
                    else
                    {
                        Message = "Error from server side. Kindly refresh the page and try again.";
                        Code    = "servererror";
                    }
                }
            }
            catch (NullReferenceException)
            {
                Message = "Your session has been expired. Kindly login again.";
                Code    = "sessionexpired";
            }
            catch (Exception)
            {
                Message = "Error from server side. Kindly refresh the page and try again.";
                Code    = "servererror";
            }
            return(Json(new
            {
                m = Message,
                c = Code
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
Exemplo n.º 17
0
        public JsonResult SelectPL(string Discipline_ID)
        {
            string Code = string.Empty, Message = string.Empty;
            List <mProgrammeLevel> _list = new List <mProgrammeLevel>();

            try
            {
                //ProgrammeLevel_Repository _objRepo = new ProgrammeLevel_Repository();
                ChoiceFillingRepository _objRepo = new ChoiceFillingRepository();
                DataSet _ds = _objRepo.SELECT_PROGRAMELEVEL_FROM_DISCIPLINE_FOR_CH(Session["studentid"].ToString(), Session["ApplicationNo"].ToString(), Discipline_ID, "ChoiceFilling");
                if (_ds != null)
                {
                    if (_ds.Tables[0].Rows.Count > 0)
                    {
                        foreach (DataRow _dr in _ds.Tables[0].Rows)
                        {
                            _list.Add(new mProgrammeLevel
                            {
                                ProgramLevel_Id = _dr["ProgramLevel_Id"].ToString(),
                                ProgramLevel    = _dr["ProgramLevel"].ToString()
                            });
                        }
                    }
                }
            }
            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
            {
                List = _list,
                c = Code,
                m = Message
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
Exemplo n.º 18
0
        public JsonResult SubmitChoices()
        {
            string Message = string.Empty, Code = string.Empty;

            try
            {
                ChoiceFillingRepository _objRepository = new ChoiceFillingRepository();
                string localIP = "?";
                localIP = Request.ServerVariables["REMOTE_ADDR"].ToString();
                DataSet _ds = _objRepository.Submit_Student_Ch(Session["studentid"].ToString(), localIP);
                if (_ds != null)
                {
                    if (_ds.Tables[0].Rows.Count > 0)
                    {
                        Session["submitChoiceFill"] = "True";
                        Message = "Your Choices have been successfully submitted..!!!";
                        Code    = "success";
                    }
                    else
                    {
                        Message = "Error from server side. Kindly refresh the page and try again.";
                        Code    = "servererror";
                    }
                }
            }
            catch (NullReferenceException)
            {
                Message = "Your session has been expired. Kindly login again.";
                Code    = "sessionexpired";
            }
            catch (Exception)
            {
                Message = "Error from server side. Kindly refresh the page and try again.";
                Code    = "servererror";
            }
            return(Json(new
            {
                m = Message,
                c = Code
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
Exemplo n.º 19
0
        public JsonResult SelectInstitute(ChoiceFilling obj)
        {
            ChoiceFillingRepository objRep = new ChoiceFillingRepository();

            obj.Type      = "GridDetails";
            obj.studentid = Session["studentid"].ToString();
            obj.CreatedBy = Session["studentid"].ToString();
            DataSet ds = objRep.Select_InstituteList(obj);
            List <ChoiceFilling> _list = new List <ChoiceFilling>();

            if (ds != null)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow row in ds.Tables[0].Rows)
                    {
                        ChoiceFilling objChoice = new ChoiceFilling();
                        //objChoice.ID = row["ID"].ToString();
                        objChoice.tbl_InstituteCourse_ID = row["tbl_InstituteCourse_ID"].ToString();
                        objChoice.InstituteID            = row["InstituteId"].ToString();
                        //objChoice.Discipline = row["Discipline"].ToString();
                        objChoice.Natureofcourse = row["Natureofcourse"].ToString();
                        //objChoice.ProgramLevel = row["ProgramLevel"].ToString();
                        //   objChoice.BranchName = row["BranchName"].ToString();
                        objChoice.InstituteName = row["InstituteName"].ToString();
                        // objChoice.DisplayName = row["DisplayName"].ToString();
                        objChoice.state_name   = row["state_name"].ToString();
                        objChoice.G1SeatWaiver = row["G1SeatWaiver"].ToString();
                        objChoice.G2SeatWaiver = row["G2SeatWaiver"].ToString();
                        objChoice.G3SeatWaiver = row["G3SeatWaiver"].ToString();
                        objChoice.G4SeatWaiver = row["G4SeatWaiver"].ToString();
                        _list.Add(objChoice);
                    }
                }
            }
            return(Json(new
            {
                List = _list
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
Exemplo n.º 20
0
        public JsonResult update_StudentChoiceFilling(string ID = "")
        {
            bool flag = false;
            ChoiceFillingRepository objRep = new ChoiceFillingRepository();
            DataSet _ds = objRep.update_StudentChoiceFilling(ID, Session["studentid"].ToString());

            if (_ds != null)
            {
                if (_ds.Tables[0].Rows.Count > 0)
                {
                    if (_ds.Tables[0].Rows[0]["FLAG"].ToString() == "1")
                    {
                        flag = true;
                    }
                }
            }
            return(Json(new
            {
                flag = flag
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
Exemplo n.º 21
0
        public JsonResult SWAPRank(mStudent_Ch_Choice_Filling_Swap obj)
        {
            ChoiceFillingRepository objRep = new ChoiceFillingRepository();

            //obj.Type = "SWAP";
            if (Session["ApplicationNo"] != null)
            {
                if (Session["ApplicationNo"].ToString() != "")
                {
                    obj.ApplicationNo = Session["ApplicationNo"].ToString();
                }
            }
            string localIP = "?";

            localIP       = Request.ServerVariables["REMOTE_ADDR"].ToString();
            obj.CreatedIp = localIP;
            obj.studentid = Session["studentid"].ToString();
            DataSet _ds  = objRep.SWAP_tbl_Student_Ch_Choice_Filling(obj);
            bool    flag = true;

            if (_ds != null)
            {
                if (_ds.Tables[0].Rows.Count > 0)
                {
                    if (_ds.Tables[0].Rows[0]["FLAG"].ToString() == "0")
                    {
                        flag = false;
                    }
                }
            }
            return(Json(new
            {
                flag = flag
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
Exemplo n.º 22
0
        public JsonResult SaveBasic(mStudent_Ch_Basic _obj)
        {
            //bool flag = false;
            string Message = string.Empty, Code = string.Empty;

            try
            {
                ChoiceFillingRepository _objRepository = new ChoiceFillingRepository();
                string localIP = "?";
                localIP        = Request.ServerVariables["REMOTE_ADDR"].ToString();
                _obj.CreatedIP = localIP;
                if (Session["ApplicationNo"] != null)
                {
                    if (Session["ApplicationNo"].ToString() != "")
                    {
                        _obj.ApplicationNo = Session["ApplicationNo"].ToString();
                    }
                }
                DataTable _dt  = DeserializeJsonToDataTable(_obj.EduQualifications);
                bool      flag = true;
                if (_dt != null)
                {
                    string[] EQIDs = new string[10];
                    int      index = 0;
                    foreach (DataRow _dr in _dt.Rows)
                    {
                        EQIDs[index++] = _dr["EQID"].ToString();
                    }
                    foreach (DataRow _dr in _dt.Rows)
                    {
                        if (_dr["EQD"].ToString() != "")
                        {
                            var a1 = _dr["EQD"].ToString().Split(',');
                            foreach (string str1 in a1)
                            {
                                var  a2    = str1.Split('|');
                                bool flag2 = false;
                                foreach (string str2 in a2)
                                {
                                    if (EQIDs.Contains(str2))
                                    {
                                        flag2 = true;
                                    }
                                }
                                if (!flag2)
                                {
                                    flag = false;
                                }
                            }
                        }
                    }
                }
                if (flag)
                {
                    _obj.studentid = Session["studentid"].ToString();
                    DataSet _ds = _objRepository.INSERT_UPDATE_tbl_Student_Ch_Basic(_obj);
                    if (_ds != null)
                    {
                        if (_ds.Tables[0].Rows.Count > 0)
                        {
                            Session["ApplicationNo"] = _ds.Tables[0].Rows[0]["ApplicationNo"].ToString();
                            Message = "Details has been saved successfully!";
                            Code    = "success";
                            //flag = true;
                        }
                        else
                        {
                            Message = "Error from server side. Kindly refresh the page and try again.!";
                            Code    = "servererror";
                        }
                    }
                }
                else
                {
                    Message = "Kinldy add all relevant qualification's score first.";
                    Code    = "servererror";
                }
            }
            catch (NullReferenceException)
            {
                Message = "Your session has been expired. Kindly login again.";
                Code    = "sessionexpired";
            }
            catch (Exception)
            {
                Message = "Error from server side. Kindly refresh the page and try again.!!";
                Code    = "servererror";
            }
            return(Json(new
            {
                m = Message,
                c = Code
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
Exemplo n.º 23
0
        public JsonResult SelectStudentBasic()
        {
            Student_Register  _obj   = new Student_Register();
            StudentRepository objRep = new StudentRepository();

            _obj.studentid = Session["studentid"].ToString();
            DataSet ds = objRep.Select_Student_Information(_obj);
            List <Student_Register>       _list        = new List <Student_Register>();
            List <Student_AddressDetails> _listAddress = new List <Student_AddressDetails>();

            if (ds != null)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow row in ds.Tables[0].Rows)
                    {
                        Student_Register objBasic = new Student_Register();
                        objBasic.studentid         = row["studentid"].ToString();
                        objBasic.FirstName         = row["FirstName"].ToString();
                        objBasic.LastName          = row["LastName"].ToString();
                        objBasic.MiddleName        = row["MiddleName"].ToString();
                        objBasic.DateOfBirth       = row["DateOfBirth"].ToString();
                        objBasic.Gender            = row["Gender"].ToString();
                        objBasic.Email             = row["Email"].ToString();
                        objBasic.Mobile            = row["Mobile"].ToString();
                        objBasic.CountryCode       = row["CountryCode"].ToString();
                        objBasic.Nationality       = row["Nationality"].ToString();
                        objBasic.Country           = row["CountryID"].ToString();
                        objBasic.CountryToStay     = row["CountryToStay"].ToString();
                        objBasic.student_path      = row["student_path"].ToString();
                        objBasic.bCopyAddress      = row["bCopyAddress"].ToString();
                        objBasic.ApplyingForCourse = row["ApplyingForCourse"].ToString();
                        Session["studentname"]     = row["FirstName"].ToString() + ' ' + row["MiddleName"].ToString() + ' ' + row["LastName"].ToString();
                        _list.Add(objBasic);
                    }
                }
            }
            TestCentreRegitration _obj1 = new TestCentreRegitration
            {
                Type      = "SELECT",
                studentid = Session["studentid"].ToString()
            };
            ChoiceFillingRepository objRep1 = new ChoiceFillingRepository();
            DataSet ds1 = objRep1.Opr_TestCentreRegitration(_obj1);
            List <TestCentreRegitration> _list1 = new List <TestCentreRegitration>();

            if (ds1 != null)
            {
                if (ds1.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow row in ds1.Tables[0].Rows)
                    {
                        _list1.Add(new TestCentreRegitration
                        {
                            FatherName  = row["FatherName"].ToString(),
                            TestCountry = row["TestCountry"].ToString(),
                            TestCity    = row["TestCity"].ToString()
                        });
                    }
                }
            }
            return(Json(new
            {
                List = _list,
                List1 = _list1
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
        // GET: admission/Dashboard
        #region Dashboard Views
        public ActionResult Index()
        {
            DashboardRepository      _objRepository = new DashboardRepository();
            DataSet                  _ds            = _objRepository.Get_Dashboard_Data(Session["studentid"].ToString());
            List <Student_dashbaord> _list          = new List <Student_dashbaord>();

            if (_ds != null)
            {
                if (_ds.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow _dr in _ds.Tables[0].Rows)
                    {
                        Student_dashbaord _Obj = new Student_dashbaord();
                        _Obj.FirstName             = _dr["FirstName"].ToString();
                        _Obj.Mobile                = _dr["Mobile"].ToString();
                        _Obj.Email                 = _dr["Email"].ToString();
                        _Obj.DateOfBirth           = _dr["DateOfBirth"].ToString();
                        _Obj.Nationality           = _dr["Nationality"].ToString();
                        _Obj.PassportNo            = _dr["PassportNo"].ToString();
                        _Obj.CitizenshipNumber     = _dr["CitizenshipNumber"].ToString();
                        _Obj.Residential           = _dr["Residential"].ToString();
                        _Obj.Permanent             = _dr["Permanent"].ToString();
                        _Obj.StudentRefrenceDetail = _dr["StudentRefrenceDetail"].ToString();
                        _Obj.Disciplinelist        = _dr["Disciplinelist"].ToString();
                        _Obj.TotalChoicefill       = _dr["TotalChoicefill"].ToString();
                        _Obj.Doc_required          = _dr["Doc_required"].ToString();
                        _Obj.Uploded_doc           = _dr["Uploded_doc"].ToString();
                        _Obj.finalSubmit           = _dr["finalSubmit"].ToString();
                        _Obj.IndSATCenter          = _dr["IndSATCenter"].ToString();
                        if (Session["CountryID"].ToString() == "252")
                        {
                            Session["IndSATCenter"] = "False";
                        }
                        else
                        {
                            Session["IndSATCenter"] = _dr["IndSATCenter"].ToString();
                        }

                        ViewBag.DocumentVerified = _dr["DocumentVerified"].ToString();

                        _list.Add(_Obj);
                    }
                }
            }
            ViewBag.StudentdDashboard = _list;

            ChoiceFillingRepository _objRepo = new ChoiceFillingRepository();

            _ds = _objRepo.Opr_TestCentreRegitration(new TestCentreRegitration
            {
                Type      = "SELECT",
                studentid = Session["studentid"].ToString()
            });
            if (_ds != null)
            {
                if (_ds.Tables[0].Rows.Count > 0)
                {
                    ViewBag.IndSATFilled = "True";
                }
            }

            return(View());
        }
        public JsonResult UploadDocs(StudentDocumentVerification _obj)
        {
            // mStudent_Ch_Doc_Upload _obj = new mStudent_Ch_Doc_Upload();
            string Message = string.Empty, Code = string.Empty, Error = string.Empty;

            try
            {
                string path     = "";
                string filename = "";
                string fname    = "";
                if (_obj.For == "Upload")
                {
                    if (Request.Files.Count > 0)
                    {
                        if (Request.Files[0].ContentLength > 0)
                        {
                            HttpFileCollectionBase files = Request.Files;
                            path     = AppDomain.CurrentDomain.BaseDirectory + "Uploads/studentDocument/" + Session["studentid"].ToString() + "/" + Session["ApplicationNo"].ToString() + "/";
                            filename = Path.GetFileName(Request.Files[0].FileName);
                            HttpPostedFileBase file = files[0];
                            _obj.name = _obj.name.Trim().Replace(" / ", "_");
                            _obj.name = _obj.name.Trim().Replace("/", "");
                            _obj.name = _obj.name.Trim().Replace(" ", "");
                            _obj.name = _obj.name.Trim().Replace("//", "_");
                            _obj.name = _obj.name.Trim().Replace("(", "_");
                            _obj.name = _obj.name.Trim().Replace(")", "_");
                            _obj.name = _obj.name.Trim().Replace(",", "");
                            filename  = _obj.name + "_" + Session["ApplicationNo"].ToString() + Path.GetExtension(file.FileName);
                            if (!Directory.Exists(path))
                            {
                                Directory.CreateDirectory(path);
                            }
                            else
                            {
                                string[] curentfiles = Directory.GetFiles(path);
                                foreach (string curentfile in curentfiles)
                                {
                                    if (curentfile.IndexOf(filename) >= 0)
                                    {
                                        System.IO.File.Delete(curentfile);
                                    }
                                }
                            }

                            fname = Path.Combine(Server.MapPath("~/Uploads/studentDocument/" + Session["studentid"].ToString() + "/" + Session["ApplicationNo"].ToString() + "/"), filename);
                            file.SaveAs(fname);
                            _obj.Path = "Uploads/studentDocument/" + Session["studentid"].ToString() + "/" + Session["ApplicationNo"].ToString() + "/" + filename;
                        }
                        else
                        {
                            Message   = "Error from server side. Kindly refresh the page and try again.";
                            Code      = "servererror";
                            _obj.Path = "";
                        }
                    }
                    else
                    {
                        Message   = "Error from server side. Kindly refresh the page and try again.";
                        Code      = "servererror";
                        _obj.Path = "";
                    }
                }
                else if (_obj.For == "EQ")
                {
                }
                else if (_obj.For == "AE")
                {
                }
                _obj.Type      = "UPDATE";
                _obj.studentid = Session["studentid"].ToString();
                ChoiceFillingRepository _objRepo = new ChoiceFillingRepository();
                DataSet _ds = _objRepo.Opr_DocumentUpload(_obj);
                if (_ds != null)
                {
                    if (_ds.Tables[0].Rows.Count > 0)
                    {
                        if (_ds.Tables[0].Rows[0]["COUNTS"].ToString() == "1")
                        {
                            Message = "Document uploaded successfully!";
                            Code    = "success";
                        }
                        else if (_ds.Tables[0].Rows[0]["COUNTS"].ToString() == "-1")
                        {
                            Message = "Timeout!";
                            Code    = "timeout";
                        }
                        else
                        {
                            Message = "Error from server side. Kindly refresh the page and try again.";
                            Code    = "servererror";
                        }
                    }
                    else
                    {
                        Message = "Error from server side. Kindly refresh the page and try again.";
                        Code    = "servererror";
                    }
                }
                else
                {
                    Message = "Error from server side. Kindly refresh the page and try again.";
                    Code    = "servererror";
                }
            }
            catch (NullReferenceException)
            {
                Message = "Your session has been expired. Kindly login again.";
                Code    = "sessionexpired";
            }
            catch (Exception ex)
            {
                Error   = ex.Message;
                Message = "Error from server side. Kindly refresh the page and try again.";
                Code    = "servererror";
            }

            return(Json(new
            {
                m = Message,
                c = Code,
                p = _obj.Path,
                e = Error
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }
Exemplo n.º 26
0
        public ActionResult SelectInstitutePaging(ChoiceFilling obj)
        {
            var    draw   = Request.Form.GetValues("draw").FirstOrDefault();
            var    start  = Request.Form.GetValues("start").FirstOrDefault();
            var    length = Request.Form.GetValues("length").FirstOrDefault();
            string search = Request.Form.GetValues("search[value]").FirstOrDefault();
            // var data="";
            int pageSize = length != null?Convert.ToInt32(length) : 0;

            int skip = start != null?Convert.ToInt32(start) : 0;

            int recordsTotal = 0;
            ChoiceFillingRepository objRep = new ChoiceFillingRepository();

            obj.Type      = "GridDetails";
            obj.studentid = Session["studentid"].ToString();
            obj.CreatedBy = Session["studentid"].ToString();
            List <ChoiceFilling> _list = new List <ChoiceFilling>();
            DataSet ds = objRep.Select_InstituteList(obj);

            if (ds != null)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow row in ds.Tables[0].Rows)
                    {
                        ChoiceFilling objChoice = new ChoiceFilling();
                        objChoice.tbl_InstituteCourse_ID = row["tbl_InstituteCourse_ID"].ToString();
                        objChoice.InstituteID            = row["InstituteId"].ToString();
                        objChoice.Natureofcourse         = row["Natureofcourse"].ToString();
                        objChoice.InstituteName          = row["InstituteName"].ToString();
                        objChoice.state_name             = row["state_name"].ToString();
                        objChoice.G1SeatWaiver           = row["G1SeatWaiver"].ToString();
                        objChoice.G2SeatWaiver           = row["G2SeatWaiver"].ToString();
                        objChoice.G3SeatWaiver           = row["G3SeatWaiver"].ToString();
                        objChoice.G4SeatWaiver           = row["G4SeatWaiver"].ToString();
                        _list.Add(objChoice);
                    }
                }
            }
            List <ChoiceFilling> list = new List <ChoiceFilling>();

            if (search == null)
            {
                list = _list;
            }
            else
            {
                // simulate search
                foreach (ChoiceFilling dataItem in _list)
                {
                    if (dataItem.InstituteName.ToUpper().Contains(search.ToUpper()) ||
                        dataItem.Natureofcourse.ToString().Contains(search.ToUpper()))
                    {
                        list.Add(dataItem);
                    }
                }
            }
            var v = list;

            recordsTotal = v.Count();
            var data = v.Skip(skip).Take(pageSize).ToList();

            return(Json(new { draw = draw, recordsFiltered = recordsTotal, recordsTotal = recordsTotal, data = data }, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 27
0
        public JsonResult SelectBasic()
        {
            List <mStudent_Ch_Basic>    _listSCHB      = new List <mStudent_Ch_Basic>();
            List <mStudent_Ch_Basic_EC> _listSCHBEC    = new List <mStudent_Ch_Basic_EC>();
            List <mStudent_Ch_Basic_AE> _listSCHBAE    = new List <mStudent_Ch_Basic_AE>();
            ChoiceFillingRepository     _objRepository = new ChoiceFillingRepository();

            try
            {
                DataSet _ds = _objRepository.SELECT_tbl_Student_Ch_Basic(Session["studentid"].ToString());
                if (_ds != null)
                {
                    if (_ds.Tables[0].Rows.Count > 0)
                    {
                        foreach (DataRow _dr in _ds.Tables[0].Rows)
                        {
                            Session["ApplicationNo"] = _dr["ApplicationNo"].ToString();
                            _listSCHB.Add(new mStudent_Ch_Basic
                            {
                                ID            = _dr["ID"].ToString(),
                                studentid     = _dr["studentid"].ToString(),
                                ApplicationNo = _dr["ApplicationNo"].ToString()
                            });
                        }
                    }
                    if (_ds.Tables[1].Rows.Count > 0)
                    {
                        foreach (DataRow _dr in _ds.Tables[1].Rows)
                        {
                            _listSCHBEC.Add(new mStudent_Ch_Basic_EC
                            {
                                ID          = _dr["ID"].ToString(),
                                EQName      = _dr["EQName"].ToString(),
                                IsGiven     = _dr["IsGiven"].ToString(),
                                EQID        = _dr["EQID"].ToString(),
                                MainPart    = _dr["MainPart"].ToString(),
                                DeciamlPart = _dr["DeciamlPart"].ToString()
                            });
                        }
                    }
                    if (_ds.Tables[2].Rows.Count > 0)
                    {
                        foreach (DataRow _dr in _ds.Tables[2].Rows)
                        {
                            _listSCHBAE.Add(new mStudent_Ch_Basic_AE
                            {
                                ID     = _dr["ID"].ToString(),
                                AEName = _dr["AEName"].ToString(),
                                AEID   = _dr["AEID"].ToString(),
                                Score  = _dr["Score"].ToString()
                            });
                        }
                    }
                }
            }
            catch (System.Exception)
            {
                throw;
            }
            return(Json(new
            {
                List = _listSCHB,
                ListEC = _listSCHBEC,
                ListAE = _listSCHBAE
            },
                        JsonRequestBehavior.AllowGet
                        ));
        }