Ejemplo n.º 1
0
        /// <summary>
        /// To insert cataloguing test user details
        /// </summary>
        private long InsertCat_UserDetails(long CanId, int RoleId)
        {
            long UserId   = 0;
            int  ModuleId = 0;

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

            string userEmail    = Session["userEmail"].ToString();
            string examinerName = Session["ExaminerName"].ToString();

            UserDetails dac = new UserDetails();

            UserId = dac.InsertCat_UserDetails(userEmail, examinerName, RoleId);
            if (UserId > 0)
            {
                DateTime stdate  = Convert.ToDateTime(txtExamTime.Text + " " + ddlExamTime.SelectedValue);
                int      totTime = 60;
                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);
        }
        private long InsertCat_UserDetails(int RoleId)
        {
            long UserId = 0;

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

            string userEmail    = Session["userEmail"].ToString();
            string examinerName = Session["ExaminerName"].ToString();

            UserDetails dac = new UserDetails();

            UserId = dac.InsertCat_UserDetails(userEmail, examinerName, RoleId);
            dac    = null;

            return(UserId);
        }