示例#1
0
 public static Quiz_ExamStudent GetQuiz_StudentByStudentID(string StudentID)
 {
     Quiz_ExamStudent quiz_ExamStudent = new Quiz_ExamStudent();
     SqlQuiz_ExamStudentProvider sqlQuiz_ExamStudentProvider = new SqlQuiz_ExamStudentProvider();
     quiz_ExamStudent = sqlQuiz_ExamStudentProvider.GetQuiz_ExamStudentByStudentID(StudentID);
     return quiz_ExamStudent;
 }
示例#2
0
 public static Quiz_ExamStudent GetQuiz_STDExamDetailsBySTDExamDetailsID(int STDExamDetailsID)
 {
     Quiz_ExamStudent quiz_ExamStudent = new Quiz_ExamStudent();
     SqlQuiz_ExamStudentProvider sqlQuiz_ExamStudentProvider = new SqlQuiz_ExamStudentProvider();
     quiz_ExamStudent = sqlQuiz_ExamStudentProvider.GetQuiz_ExamStudentBySTDExamDetailsID(STDExamDetailsID);
     return quiz_ExamStudent;
 }
示例#3
0
 public static Quiz_ExamStudent GetQuiz_RowStatusByRowStatusID(int RowStatusID)
 {
     Quiz_ExamStudent quiz_ExamStudent = new Quiz_ExamStudent();
     SqlQuiz_ExamStudentProvider sqlQuiz_ExamStudentProvider = new SqlQuiz_ExamStudentProvider();
     quiz_ExamStudent = sqlQuiz_ExamStudentProvider.GetQuiz_ExamStudentByRowStatusID(RowStatusID);
     return quiz_ExamStudent;
 }
示例#4
0
 public static Quiz_ExamStudent GetQuiz_QuizExamByQuizExamID(int QuizExamID)
 {
     Quiz_ExamStudent quiz_ExamStudent = new Quiz_ExamStudent();
     SqlQuiz_ExamStudentProvider sqlQuiz_ExamStudentProvider = new SqlQuiz_ExamStudentProvider();
     quiz_ExamStudent = sqlQuiz_ExamStudentProvider.GetQuiz_ExamStudentByQuizExamID(QuizExamID);
     return quiz_ExamStudent;
 }
示例#5
0
 public static Quiz_ExamStudent GetQuiz_ClassSubjectByClassSubjectID(int ClassSubjectID)
 {
     Quiz_ExamStudent quiz_ExamStudent = new Quiz_ExamStudent();
     SqlQuiz_ExamStudentProvider sqlQuiz_ExamStudentProvider = new SqlQuiz_ExamStudentProvider();
     quiz_ExamStudent = sqlQuiz_ExamStudentProvider.GetQuiz_ExamStudentByClassSubjectID(ClassSubjectID);
     return quiz_ExamStudent;
 }
示例#6
0
 protected void btnUpdate_Click(object sender, EventArgs e)
 {
     Quiz_ExamStudent quiz_ExamStudent = new Quiz_ExamStudent ();
     quiz_ExamStudent.ExamStudentID=  int.Parse(Request.QueryString["ID"].ToString());
     quiz_ExamStudent.ExamStudentName=  txtExamStudentName.Text;
     quiz_ExamStudent.StudentID=  ddlStudentID.SelectedValue;
     quiz_ExamStudent.ClassSubjectID=  int.Parse(ddlClassSubjectID.SelectedValue);
     quiz_ExamStudent.STDExamDetailsID=  int.Parse(ddlSTDExamDetailsID.SelectedValue);
     quiz_ExamStudent.QuizExamID=  int.Parse(ddlQuizExamID.SelectedValue);
     quiz_ExamStudent.ExtraField1=  txtExtraField1.Text;
     quiz_ExamStudent.ExtraField2=  txtExtraField2.Text;
     quiz_ExamStudent.ExtraField3=  txtExtraField3.Text;
     quiz_ExamStudent.ExtraField4=  txtExtraField4.Text;
     quiz_ExamStudent.ExtraField5=  txtExtraField5.Text;
     quiz_ExamStudent.AddedBy=  "530038e1-cf38-4ddb-84a4-99b6974b4f9d";
     quiz_ExamStudent.AddedDate=  DateTime.Now;
     quiz_ExamStudent.UpdatedBy=  "530038e1-cf38-4ddb-84a4-99b6974b4f9d";
     quiz_ExamStudent.UpdateDate=  DateTime.Now;
     quiz_ExamStudent.RowStatusID=  int.Parse(ddlRowStatusID.SelectedValue);
     bool  resutl =Quiz_ExamStudentManager.UpdateQuiz_ExamStudent(quiz_ExamStudent);
     Response.Redirect("AdminDisplayQuiz_ExamStudent.aspx");
 }
示例#7
0
 private void showQuiz_ExamStudentData()
 {
     Quiz_ExamStudent quiz_ExamStudent  = new Quiz_ExamStudent ();
      	quiz_ExamStudent = Quiz_ExamStudentManager.GetQuiz_ExamStudentByExamStudentID(Int32.Parse(Request.QueryString["ID"]));
      	txtExamStudentName.Text =quiz_ExamStudent.ExamStudentName.ToString();
      	ddlStudentID.SelectedValue  =quiz_ExamStudent.StudentID.ToString();
      	ddlClassSubjectID.SelectedValue  =quiz_ExamStudent.ClassSubjectID.ToString();
      	ddlSTDExamDetailsID.SelectedValue  =quiz_ExamStudent.STDExamDetailsID.ToString();
      	ddlQuizExamID.SelectedValue  =quiz_ExamStudent.QuizExamID.ToString();
      	txtExtraField1.Text =quiz_ExamStudent.ExtraField1.ToString();
      	txtExtraField2.Text =quiz_ExamStudent.ExtraField2.ToString();
      	txtExtraField3.Text =quiz_ExamStudent.ExtraField3.ToString();
      	txtExtraField4.Text =quiz_ExamStudent.ExtraField4.ToString();
      	txtExtraField5.Text =quiz_ExamStudent.ExtraField5.ToString();
      	ddlRowStatusID.SelectedValue  =quiz_ExamStudent.RowStatusID.ToString();
 }
示例#8
0
    public bool UpdateQuiz_ExamStudent(Quiz_ExamStudent quiz_ExamStudent)
    {
        using (SqlConnection connection = new SqlConnection(this.ConnectionString))
        {
            SqlCommand cmd = new SqlCommand("UpdateQuiz_ExamStudent", connection);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@ExamStudentID", SqlDbType.Int).Value = quiz_ExamStudent.ExamStudentID;
            cmd.Parameters.Add("@ExamStudentName", SqlDbType.NVarChar).Value = quiz_ExamStudent.ExamStudentName;
            cmd.Parameters.Add("@StudentID", SqlDbType.NVarChar).Value = quiz_ExamStudent.StudentID;
            cmd.Parameters.Add("@ClassSubjectID", SqlDbType.Int).Value = quiz_ExamStudent.ClassSubjectID;
            cmd.Parameters.Add("@STDExamDetailsID", SqlDbType.Int).Value = quiz_ExamStudent.STDExamDetailsID;
            cmd.Parameters.Add("@QuizExamID", SqlDbType.Int).Value = quiz_ExamStudent.QuizExamID;
            cmd.Parameters.Add("@ExtraField1", SqlDbType.NVarChar).Value = quiz_ExamStudent.ExtraField1;
            cmd.Parameters.Add("@ExtraField2", SqlDbType.NVarChar).Value = quiz_ExamStudent.ExtraField2;
            cmd.Parameters.Add("@ExtraField3", SqlDbType.NVarChar).Value = quiz_ExamStudent.ExtraField3;
            cmd.Parameters.Add("@ExtraField4", SqlDbType.NVarChar).Value = quiz_ExamStudent.ExtraField4;
            cmd.Parameters.Add("@ExtraField5", SqlDbType.NVarChar).Value = quiz_ExamStudent.ExtraField5;
            cmd.Parameters.Add("@UpdatedBy", SqlDbType.NVarChar).Value = quiz_ExamStudent.UpdatedBy;
            cmd.Parameters.Add("@UpdateDate", SqlDbType.DateTime).Value = quiz_ExamStudent.UpdateDate;
            cmd.Parameters.Add("@RowStatusID", SqlDbType.Int).Value = quiz_ExamStudent.RowStatusID;
            connection.Open();

            int result = cmd.ExecuteNonQuery();
            return result == 1;
        }
    }
示例#9
0
    public Quiz_ExamStudent GetQuiz_ExamStudentFromReader(IDataReader reader)
    {
        try
        {
            Quiz_ExamStudent quiz_ExamStudent = new Quiz_ExamStudent
                (

                     DataAccessObject.IsNULL<int>(reader["ExamStudentID"]),
                     DataAccessObject.IsNULL<string>(reader["ExamStudentName"]),
                     DataAccessObject.IsNULL<string>(reader["StudentID"].ToString()),
                     DataAccessObject.IsNULL<int>(reader["ClassSubjectID"]),
                     DataAccessObject.IsNULL<int>(reader["STDExamDetailsID"]),
                     DataAccessObject.IsNULL<int>(reader["QuizExamID"]),
                     DataAccessObject.IsNULL<string>(reader["ExtraField1"]),
                     DataAccessObject.IsNULL<string>(reader["ExtraField2"]),
                     DataAccessObject.IsNULL<string>(reader["ExtraField3"]),
                     DataAccessObject.IsNULL<string>(reader["ExtraField4"]),
                     DataAccessObject.IsNULL<string>(reader["ExtraField5"]),
                     DataAccessObject.IsNULL<string>(reader["AddedBy"].ToString()),
                     DataAccessObject.IsNULL<DateTime>(reader["AddedDate"]),
                     DataAccessObject.IsNULL<string>(reader["UpdatedBy"].ToString()),
                     DataAccessObject.IsNULL<DateTime>(reader["UpdateDate"]),
                     DataAccessObject.IsNULL<int>(reader["RowStatusID"])
                );
             return quiz_ExamStudent;
        }
        catch(Exception ex)
        {
            return null;
        }
    }
示例#10
0
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        try
        {

            //add Std_ExamDetails
            STD_ExamDetails sTD_ExamDetails = new STD_ExamDetails();
            sTD_ExamDetails.ExamID = int.Parse(ddlSTDExamID.SelectedValue);
            sTD_ExamDetails.ExamTypeID = 0;
            sTD_ExamDetails.ExamDetailsName = "Online Quiz "+ ddlClassID.SelectedItem.Text +" for "+ddlSubjectID.SelectedItem.Text;
            sTD_ExamDetails.ExtraField1 = "";
            sTD_ExamDetails.ExtraField2 = "";
            sTD_ExamDetails.ExtraField3 = "";
            sTD_ExamDetails.ExtraField4 = "";
            sTD_ExamDetails.ExtraField5 = "";
            sTD_ExamDetails.AddedBy = Profile.card_id;
            sTD_ExamDetails.AddedDate = DateTime.Now;
            sTD_ExamDetails.UpdatedBy = Profile.card_id;
            sTD_ExamDetails.UpdatedDate = DateTime.Now;
            sTD_ExamDetails.RowStatusID = 1;
            sTD_ExamDetails.TotalMarks = decimal.Parse(ddlQuizExamID.SelectedItem.Text.Split('(')[1].Split('=')[1].Split(' ')[0]);//CAT - MA 2 - Set-1 (Marks=4 )
            sTD_ExamDetails.ExamDetailsID = STD_ExamDetailsManager.InsertSTD_ExamDetails(sTD_ExamDetails);

            foreach (GridViewRow gvr in gvStudents.Rows)
            {
                HiddenField hfStudentID = (HiddenField)gvr.FindControl("hfStudentID");

                int QuizExamID = int.Parse(ddlQuizExamID.SelectedValue);
                string ExamStudentName = ddlQuizExamID.SelectedItem.Text;

                if (!chkAllStudentSameExam.Checked)
                {
                    DropDownList ddlStudentQuizExamID = (DropDownList)gvr.FindControl("ddlStudentQuizExamID");

                    if (ddlStudentQuizExamID.SelectedIndex == 0)//jodi ddl selected na theke then o e student er nam e exam hobe na
                    {
                        continue;
                    }

                    QuizExamID = int.Parse(ddlStudentQuizExamID.SelectedValue);
                    ExamStudentName = ddlStudentQuizExamID.SelectedItem.Text;
                }

                Quiz_ExamStudent quiz_ExamStudent = new Quiz_ExamStudent();
                //	quiz_ExamStudent.ExamStudentID=  int.Parse(ddlExamStudentID.SelectedValue);
                quiz_ExamStudent.ExamStudentName = ExamStudentName;
                quiz_ExamStudent.StudentID = hfStudentID.Value;
                quiz_ExamStudent.ClassSubjectID = int.Parse(ddlSubjectID.SelectedValue);
                quiz_ExamStudent.STDExamDetailsID = sTD_ExamDetails.ExamDetailsID;
                quiz_ExamStudent.QuizExamID = QuizExamID;
                quiz_ExamStudent.ExtraField1 = "";
                quiz_ExamStudent.ExtraField2 = "";
                quiz_ExamStudent.ExtraField3 = "";
                quiz_ExamStudent.ExtraField4 = "";
                quiz_ExamStudent.ExtraField5 = "";
                quiz_ExamStudent.AddedBy = Profile.card_id;
                quiz_ExamStudent.AddedDate = DateTime.Now;
                quiz_ExamStudent.UpdatedBy = Profile.card_id;
                quiz_ExamStudent.UpdateDate = DateTime.Now;
                quiz_ExamStudent.RowStatusID = 1;
                quiz_ExamStudent.ExamStudentID = Quiz_ExamStudentManager.InsertQuiz_ExamStudent(quiz_ExamStudent);
            }
        }

        catch(Exception ex)
        {
        }
    }
示例#11
0
 public static int InsertQuiz_ExamStudent(Quiz_ExamStudent quiz_ExamStudent)
 {
     SqlQuiz_ExamStudentProvider sqlQuiz_ExamStudentProvider = new SqlQuiz_ExamStudentProvider();
     return sqlQuiz_ExamStudentProvider.InsertQuiz_ExamStudent(quiz_ExamStudent);
 }
示例#12
0
 public static bool UpdateQuiz_ExamStudent(Quiz_ExamStudent quiz_ExamStudent)
 {
     SqlQuiz_ExamStudentProvider sqlQuiz_ExamStudentProvider = new SqlQuiz_ExamStudentProvider();
     return sqlQuiz_ExamStudentProvider.UpdateQuiz_ExamStudent(quiz_ExamStudent);
 }