Example #1
0
        protected int InsertObj_UserAllotedQuestions()
        {
            int    res        = 0;
            long   UserId     = 0;
            int    ModuleId   = 0;
            string Ip_Address = string.Empty;

            long.TryParse(Session["UserId"].ToString(), out UserId);
            int.TryParse(Session["ModuleId"].ToString(), out ModuleId);
            Ip_Address = Request.ServerVariables["REMOTE_ADDR"].ToString().Trim();

            UserDetails dac = new UserDetails();

            res = dac.InsertObj_UserAllotedQuestions(UserId, ModuleId, Ip_Address);
            dac = null;

            return(res);
        }
Example #2
0
        /// <summary>
        /// To insert the Obj test user details
        /// </summary>
        private long InsertObj_UserDetails(long CanId)
        {
            long UserId   = 0;
            int  ModuleId = 0;

            int.TryParse(Session["exammoduleid"].ToString(), out ModuleId);

            string userEmail             = Session["userEmail"].ToString();
            string examinerName          = Session["ExaminerName"].ToString();
            string alloted_questions_tbl = "NES_questions_common";
            string examCode = "LIB";

            if (ModuleId == 18)
            {
                alloted_questions_tbl = "EBSCO_questions_english";
                examCode = "T1_Technical_Test";
            }
            if (ModuleId == 21)
            {
                alloted_questions_tbl = "EBSCO_questions_software";
                examCode = "OOPs_Java";
            }
            if (ModuleId == 22)
            {
                alloted_questions_tbl = "EBSCO_questions_CSharp";
                examCode = "CSharp";
            }
            if (ModuleId == 23)
            {
                alloted_questions_tbl = "NES_questions_common";
                examCode = "ASP.NET_Developer";
            }
            if (ModuleId == 24)
            {
                alloted_questions_tbl = "EBSCO_questions_DB";
                examCode = "DB";
            }
            if (ModuleId == 25)
            {
                alloted_questions_tbl = "NES_questions_common";
                examCode = "ASP.NET_Developer";
            }
            if (ModuleId == 26)
            {
                alloted_questions_tbl = "EBSCO_questions_TSRep";
                examCode = "TSP_Rep";
            }
            if (ModuleId == 29)
            {
                alloted_questions_tbl = "NES_questions_common";
                examCode = "LIBR_References";
            }
            if (ModuleId == 30)
            {
                alloted_questions_tbl = "NES_questions_common";
                examCode = "LIBC1_CINAHL1";
            }
            if (ModuleId == 31)
            {
                alloted_questions_tbl = "NES_questions_common";
                examCode = "LIBC2_CINAHL2";
            }
            if (ModuleId == 32)
            {
                alloted_questions_tbl = "NES_questions_common";
                examCode = "LIB";
            }
            if (ModuleId == 35)
            {
                alloted_questions_tbl = "NES_questions_common";
                examCode = "Title_Loading";
            }
            if (ModuleId == 39) //PSP
            {
                alloted_questions_tbl = "NES_questions_common";
                examCode = "PSP";
            }
            //if (ModuleId == 41) //PCM
            //{
            //    alloted_questions_tbl = "NES_questions_common";
            //    examCode = "PCM";
            //}
            if (ModuleId == 45)
            {
                alloted_questions_tbl = "questions_english";
                examCode = "STE";
            }

            UserDetails dac = new UserDetails();

            UserId = dac.InsertObj_UserDetails(userEmail, examinerName, alloted_questions_tbl, examCode, ModuleId);
            if (UserId > 0)
            {
                string Ip_Address = Request.ServerVariables["REMOTE_ADDR"].ToString().Trim();
                int    res        = 0;
                res = dac.InsertObj_UserAllotedQuestions(UserId, ModuleId, Ip_Address);


                DateTime stdate  = Convert.ToDateTime(txtExamTime.Text + " " + ddlExamTime.SelectedValue);
                int      totTime = 20;
                int.TryParse(ddlTotMinutes.SelectedValue, out totTime);
                string linkId = GenerateRandomString(10);

                InsertCurrent_Candidates(UserId, ModuleId, CanId, stdate, totTime, linkId, Session["ExaminerName"].ToString());
            }
            dac = null;

            return(UserId);
        }