예제 #1
0
 public void bindExamDetails(int?id)
 {
     try
     {
         getexamById_Result objExam = new getexamById_Result();
         objExam           = objBalExam.GetexamById(id);
         lblHead.InnerText = objExam.Name;
     }
     catch (Exception ex)
     {
         com.Loginsert(HttpContext.Current.Request.Url.AbsolutePath, "bindExamDetails", ex.StackTrace, ex.Message);
     }
 }
예제 #2
0
 public void bindExamDetails(int?id)
 {
     try
     {
         getexamById_Result objExam = new getexamById_Result();
         objExam                 = objBalExam.GetexamById(id);
         txtExamName.Text        = objExam.Name;
         txtnoOFQuestion.Text    = Convert.ToString(objExam.noofQestion);
         ddlCourse.SelectedValue = Convert.ToString(objExam.CoruserId);
         isActive.Checked        = objExam.Isactive;
     }
     catch (Exception ex)
     {
         com.Loginsert(HttpContext.Current.Request.Url.AbsolutePath, "bindCourseDetails", ex.StackTrace, ex.Message);
     }
 }
예제 #3
0
 public getexamById_Result GetexamById(int?id)
 {
     try
     {
         getexamById_Result objexam = new getexamById_Result();
         using (aspccEntities db = new aspccEntities())
         {
             objexam = db.getexamById(id).FirstOrDefault();
             return(objexam);
         }
     }
     catch (Exception ex)
     {
         com.Loginsert("DalGetexamById", "GetexamById", ex.StackTrace, ex.Message);
         return(null);
     }
 }
예제 #4
0
        public void ExamQuestionListByExamId(int examId)
        {
            try
            {
                getexamById_Result objExam = new getexamById_Result();
                objExam = objBalExam.GetexamById(Examid);
                printhdHead.InnerText = h3Exmaname.InnerText = objExam.Name;
                List <getExamQuestionListByExamId_Result> ExamQuestionist = new List <getExamQuestionListByExamId_Result>();
                ExamQuestionist = objBalExam.getExamQuestionListByExamId(examId);

                string html  = " <table>  ";
                string style = "text- lign:justify; padding: 0px 10px 5px 10px; margin - left: 50px; ";
                //string borderTopBotstyle = "'border-bottom:1px solid;border-top:1px solid;'";
                //string borderBotstyle = "'border-bottom:1px solid;'";
                string borderTopBotstyle = string.Empty;
                string borderBotstyle    = string.Empty;

                foreach (var que in ExamQuestionist)
                {
                    html += "<tr style=" + borderTopBotstyle + " class='trTopBorder'><td colspan='4'><b><label>" + "(  " + que.RowID + " )" + " " + que.Question + " </label></b></td></tr>";
                    html += "<tr><td width = '500px' >";
                    html += "<label style=" + style + ">" + "1  " + que.Option1 + "</label></td>";
                    html += "<td width = '500px' >";
                    html += "<label style=" + style + ">" + "2  " + que.Option2 + "</label></td></tr>";
                    html += "<tr><td width = '500px' >";
                    html += "<label style=" + style + ">" + "3  " + que.Option3 + "</label></td>";
                    html += "<td width = '500px' >";
                    html += "<label style=" + style + ">" + "4  " + que.Option4 + "</label></td></tr>";
                    html += "<tr style=" + borderBotstyle + "><td colspan='4' >";
                    html += "<label style='text - align: justify;'>" + "Correct Ans. " + que.CorrectAns + "</label></td></tr>";
                }
                html += "</table>";

                divquestion.InnerHtml = html;
            }
            catch (Exception ex)
            {
                com.Loginsert(HttpContext.Current.Request.Url.AbsolutePath, "ExamQuestionListByExamId", ex.StackTrace, ex.Message);
            }
        }