コード例 #1
0
        protected void BindCourseAdminSpecificProviderCourses()
        {
            BECourseAdmin objBECourseAdmin = new BECourseAdmin();

            BCourseAdmin objBCourseAdmin = new BCourseAdmin();

            try
            {
                objBECourseAdmin.IntProviderID = Convert.ToInt32(ddlprovider.SelectedValue);
                objBECourseAdmin.IntUserID     = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString());

                objBCourseAdmin.BBindCourseAdminSpecificProviderCourses(objBECourseAdmin);
                if (objBECourseAdmin.DtResult != null && objBECourseAdmin.DtResult.Rows.Count > 0)
                {
                    rcbCourses.Items.Clear();
                    rcbCourses.DataSource     = objBECourseAdmin.DtResult;
                    rcbCourses.DataValueField = "CourseID";
                    rcbCourses.DataTextField  = "CourseName";
                    rcbCourses.DataBind();
                }
                else
                {
                    rcbCourses.Items.Clear();
                    rcbCourses.DataSource = null;
                    rcbCourses.DataBind();
                }
            }
            catch (Exception)
            {
            }
        }
コード例 #2
0
        protected void BindCourseAdminSpecificProviderCourses()
        {
            try
            {
                BECourseAdmin objBECourseAdmin = new BECourseAdmin();

                BCourseAdmin objBCourseAdmin = new BCourseAdmin();

                objBECourseAdmin.IntProviderID = Convert.ToInt32(ddlprovider.SelectedValue);
                objBECourseAdmin.IntUserID     = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString());

                objBCourseAdmin.BBindCourseAdminSpecificProviderCourses(objBECourseAdmin);
                if (objBECourseAdmin.DtResult != null && objBECourseAdmin.DtResult.Rows.Count > 0)
                {
                    ddlCourse.Items.Clear();
                    ddlCourse.AppendDataBoundItems = true;
                    ddlCourse.Items.Add(new RadComboBoxItem("--Select Course--", "-1"));
                    ddlCourse.DataSource     = objBECourseAdmin.DtResult.DefaultView;
                    ddlCourse.DataValueField = "CourseID";
                    ddlCourse.DataTextField  = "CourseName";
                    ddlCourse.DataBind();
                }
                else
                {
                    ddlCourse.Items.Clear();
                    ddlCourse.AppendDataBoundItems = true;
                    ddlCourse.Items.Add(new RadComboBoxItem("--Select Course--", "-1"));
                    ddlCourse.DataSource = null;
                    ddlCourse.DataBind();
                }
            }
            catch (Exception)
            {
            }
        }
コード例 #3
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            BECourseAdmin objBECourseAdmin = new BECourseAdmin();
            BCourseAdmin  objBCourseAdmin  = new BCourseAdmin();

            objBECourseAdmin.IntCourseID = Convert.ToInt32(Request.QueryString["CourseID"].ToString());
            objBCourseAdmin.BDeleteCourse(objBECourseAdmin);
            if (objBECourseAdmin.IntResult == 1)
            {
                lblInfo.Text      = Resources.AppMessages.Provider_DeleteCourse_Success_DeleteCourse;
                lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Success);
                ImgInfo.ImageUrl  = Resources.AppConfigurations.Image_Success;
                tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Success);
                trMessage.Visible = true;
                trDelete.Visible  = false;
            }
            if (objBECourseAdmin.IntResult == 0)
            {
                lblInfo.Text      = Resources.AppMessages.Provider_DeletCourse_Error_DeleteCoursePending;
                lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Error);
                ImgInfo.ImageUrl  = Resources.AppConfigurations.Image_Error;
                tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Error);
                trMessage.Visible = true;
            }
        }
コード例 #4
0
        protected void GetStudentDetails()
        {
            BECourseAdmin objBECourseAdmin = new BECourseAdmin();
            BCourseAdmin  objBCourseAdmin  = new BCourseAdmin();

            objBECourseAdmin.IntStudentID = Convert.ToInt32(AppSecurity.Decrypt(Request.QueryString["StudentID"].ToString()));
            objBCourseAdmin.BGetStudentDetails(objBECourseAdmin);
            if (objBECourseAdmin.DtResult != null)
            {
                if (objBECourseAdmin.DtResult.Rows.Count > 0)
                {
                    lblstudentfirstname.Text = objBECourseAdmin.DtResult.Rows[0]["studentName"].ToString();
                    lblEmail.Text            = objBECourseAdmin.DtResult.Rows[0]["EmailAddress"].ToString();
                    lblPhoneNumber.Text      = CommonFunctions.CheckNullValue(objBECourseAdmin.DtResult.Rows[0]["PhoneNumber"].ToString());
                    lblTimeZone.Text         = objBECourseAdmin.DtResult.Rows[0]["TimeZone"].ToString();
                    lblSpecialNeeds.Text     = objBECourseAdmin.DtResult.Rows[0]["SpecialNeeds"].ToString();
                    string imgpath = objBECourseAdmin.DtResult.Rows[0]["PhotoIdentity"].ToString();
                    if (imgpath != "")
                    {
                        //imgstudent.ImageUrl = "~/Student/Student_Identity/" + imgpath.Substring(3).ToString();
                        imgstudent.ImageUrl = new AppSecurity().ImageToBase64(imgpath.Substring(3).ToString());
                    }
                    if (objBECourseAdmin.DtResult.Rows[0]["Comments"] != DBNull.Value && objBECourseAdmin.DtResult.Rows[0]["Comments"].ToString() != string.Empty)
                    {
                        lblComments.Text = objBECourseAdmin.DtResult.Rows[0]["Comments"].ToString();
                    }
                    else
                    {
                        lblComments.Text = "N/A";
                    }
                }
            }
        }
コード例 #5
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            BECourseAdmin objBEExamProvider = new BECourseAdmin();

            BCourseAdmin objBPrrovider = new BCourseAdmin();

            objBEExamProvider.IntEnrollID = Convert.ToInt32(Request.QueryString["EnrollmentID"].ToString());

            objBPrrovider.BDeleteEnrollmentStatus(objBEExamProvider);
            trMessage.Visible = true;
            if (objBEExamProvider.IntResult == 1)
            {
                lblInfo.Text      = Resources.AppMessages.Provider_DeleteEnrollment_Success_DeleteEnrollmentStatus;
                lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Success);
                btnDelete.Visible = false;
                btnCancel.Visible = false;
                ImgInfo.ImageUrl  = Resources.AppConfigurations.Image_Success;
                tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Success);
            }
            else
            {
                lblInfo.Text      = Resources.AppMessages.Provider_DeleteEnrollment_Error_DeleteEnrollmentStatus;
                lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Error);
                btnDelete.Visible = false;
                btnCancel.Visible = false;
                ImgInfo.ImageUrl  = Resources.AppConfigurations.Image_Error;
                tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Error);
            }
        }
コード例 #6
0
 protected void btnEnroll_Click(object sender, EventArgs e)
 {
     try
     {
         BECourseAdmin objBEExamProvider = new BECourseAdmin();
         BCourseAdmin  objBExamProvider  = new BCourseAdmin();
         objBEExamProvider.IntUserID   = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString());
         objBEExamProvider.IntCourseID = Convert.ToInt32(ddlCourse.SelectedValue.ToString());
         objBEExamProvider.IntExamID   = Convert.ToInt32(ddlStudents.SelectedValue.ToString());
         objBExamProvider.BEnrollStudent(objBEExamProvider);
         if (objBEExamProvider.IntResult.ToString() == "1")
         {
             lblSuccess.Visible = true;
             //lblSuccess.Text = "Student is enrolled for an exam successfully";
             lblSuccess.Text      = Resources.ResMessages.Provider_EnrollStudentSuccess;
             lblSuccess.ForeColor = System.Drawing.Color.Green;
             this.LoadDataTable();
         }
         else
         {
             lblSuccess.Visible = true;
             //lblSuccess.Text = "Student is already enrolled for this Exam";
             lblSuccess.Text      = Resources.ResMessages.Provider_EnrollStudentExam;
             lblSuccess.ForeColor = System.Drawing.Color.Red;
         }
     }
     catch
     {
     }
 }
コード例 #7
0
        protected void btnProceed_Click(object sender, EventArgs e)
        {
            try
            {
                if (Session["EP_Exam"] != null)
                {
                    BECourseAdmin objBEExamProvider = (BECourseAdmin)Session["EP_Exam"];
                    BCourseAdmin  objBExamProvider  = new BCourseAdmin();
                    objBEExamProvider.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString());


                    objBExamProvider.BSaveExamDetails(objBEExamProvider);
                    trSuccess.Visible   = true;
                    trButtons.Visible   = false;
                    trMessage.Visible   = true;
                    objBEExamProvider   = null;
                    objBEExamProvider   = null;
                    Session["EP_Exam"]  = null;
                    Session["DT_Notes"] = null;
                    Session["DT_Rules"] = null;
                    lblMsg.Text         = "<img src='../Images/yes.png' align='middle'/>&nbsp;<font color='#00C000'>" + Resources.ResMessages.Provider_ExamDetailsSuccess + "</font>";
                }
            }
            catch { }
        }
コード例 #8
0
        protected void BindCourseName()
        {
            try
            {
                BECourseAdmin objBECourseAdmin = new BECourseAdmin();
                BCourseAdmin  objBCourseAdmin  = new BCourseAdmin();
                objBECourseAdmin.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString());
                objBCourseAdmin.BGetProviderCourseDetails(objBECourseAdmin);
                if (objBECourseAdmin.DtResult.Rows.Count > 0)
                {
                    ddlCourse.AppendDataBoundItems = true;
                    ddlCourse.Items.Add(new RadComboBoxItem("--Select Course--", "-1"));
                    ddlCourse.DataSource     = objBECourseAdmin.DtResult;
                    ddlCourse.DataValueField = "CourseID";
                    ddlCourse.DataTextField  = "CourseName";
                    ddlCourse.DataBind();
                }
                else
                {
                    ddlCourse.Items.Clear();
                    ddlCourse.AppendDataBoundItems = true;
                    ddlCourse.Items.Add(new RadComboBoxItem("--Select Course--", "-1"));
                    ddlCourse.DataSource = null;
                    ddlCourse.DataBind();
                }
            }

            catch (Exception Ex)
            {
                ErrorHandlers.ErrorLog.WriteError(Ex);
            }
        }
コード例 #9
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            BECourseAdmin objBECourseAdmin = new BECourseAdmin();
            BCourseAdmin  objBCourseAdmin  = new BCourseAdmin();

            objBECourseAdmin.strFirstName = txtFirstName.Text;
            lblFirstName.Text             = txtFirstName.Text;
            objBECourseAdmin.strLastName  = txtLastName.Text;
            lblLastName.Text = txtLastName.Text;
            objBECourseAdmin.strEmailAddress = txtEmailAddress.Text;
            lblEmailAddress.Text             = txtEmailAddress.Text;
            objBECourseAdmin.StrComments     = txtcomments.Value;
            lblComments.Text               = txtcomments.Value;
            lblNewCourse.Text              = rcbNewCourses.SelectedItem.Text.ToString();
            objBECourseAdmin.IntCourseID   = Convert.ToInt32(rcbNewCourses.SelectedValue);
            objBECourseAdmin.IntProviderID = Convert.ToInt32(ddlprovider1.SelectedValue);
            objBECourseAdmin.strPassword   = GetRandomPassword(Length);

            objBECourseAdmin.strUserName = txtUserID.Text;
            lblUserName.Text             = txtUserID.Text;
            trMessage.Visible            = true;
            if (ChkSpecialNeeds.Checked == true)
            {
                objBECourseAdmin.strSpecialNeeds = true;
                lblSpecialNeeds.Text             = "Yes";
            }
            else
            {
                objBECourseAdmin.strSpecialNeeds = false;
                lblSpecialNeeds.Text             = "No";
            }
            objBCourseAdmin.BAddStudent(objBECourseAdmin);
            if (objBECourseAdmin.IntResult == 0)
            {
                lblInfo.Text      = Resources.AppMessages.Provider_AddStudent_Error_AddStudent;
                lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Error);
                ImgInfo.ImageUrl  = Resources.AppConfigurations.Image_Error;
                tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Error);
                trAddStudent.Visible                = true;
                trAddStudentConfirm.Visible         = false;
                trEnrollStudent.Visible             = false;
                trEnrollStudentConfirmation.Visible = false;
            }

            if (objBECourseAdmin.IntResult == 1)
            {
                lblInfo.Text      = Resources.AppMessages.Provider_AddStudent_Success_AddStudent;
                lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Success);
                ImgInfo.ImageUrl  = Resources.AppConfigurations.Image_Success;
                tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Success);
                trAddStudent.Visible                = false;
                trAddStudentConfirm.Visible         = true;
                trEnrollStudent.Visible             = false;
                trEnrollStudentConfirmation.Visible = false;
            }
        }
コード例 #10
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                BECourseAdmin objBECourseAdmin = new BECourseAdmin();
                BCourseAdmin  objBCourseAdmin  = new BCourseAdmin();
                objBECourseAdmin.IntCourseID = Convert.ToInt32(Request.QueryString["CourseID"]);
                objBECourseAdmin.strCourseID = TxtCourseID.Text;
                lblCourseID.Text             = TxtCourseID.Text;

                objBECourseAdmin.strCourseName = txtCourseName.Text;
                lblCourse.Text = txtCourseName.Text;
                objBECourseAdmin.IntstatusFlag = Convert.ToInt32(ddlStatus.SelectedValue.ToString());
                if (ddlStatus.SelectedValue.ToString() == "1")
                {
                    lblStatus.Text = "Active";
                }
                else
                {
                    lblStatus.Text = "Inactive";
                }
                objBECourseAdmin.IntUserID = Convert.ToInt32(Session[EnumPageSessions.USERID].ToString());
                objBCourseAdmin.BUpdateCourseDetails(objBECourseAdmin);
                trMessage.Visible = true;
                if (objBECourseAdmin.IntResult == 1)
                {
                    lblInfo.Text      = Resources.AppMessages.Provider_EditCourse_Success_CourseUpdated;
                    lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Success);
                    ImgInfo.ImageUrl  = Resources.AppConfigurations.Image_Success;
                    tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Success);
                    trView.Visible        = true;
                    trEdit.Visible        = false;
                    lblModifiedDate1.Text = DateTime.Now.ToShortDateString();
                }
                else if (objBECourseAdmin.IntResult == 0)
                {
                    lblInfo.Text      = Resources.AppMessages.Provider_EditCourse_Error_CourseExists;
                    lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Error);
                    ImgInfo.ImageUrl  = Resources.AppConfigurations.Image_Error;
                    tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Error);
                }
                else if (objBECourseAdmin.IntResult == 2)
                {
                    lblInfo.Text      = Resources.AppMessages.Provider_EditCourse_Error_PendingExams;
                    lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Error);
                    ImgInfo.ImageUrl  = Resources.AppConfigurations.Image_Error;
                    tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Error);
                }
            }
            catch (Exception Ex)
            {
                ErrorHandlers.ErrorLog.WriteError(Ex);
            }
        }
コード例 #11
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                BECourseAdmin objBEExamProvider = new BECourseAdmin();

                BCourseAdmin objBExamProvider = new BCourseAdmin();

                objBEExamProvider.IntStudentID = Convert.ToInt32(Session["studentid"]);

                objBEExamProvider.strFirstName = lblstudentfirstname.Text;

                objBEExamProvider.strLastName = lblStudentLastName.Text;

                //objBEExamProvider.strGenderName = ddlGender.SelectedValue;

                objBEExamProvider.strEmailAddress = lblEmailID.Text;

                //  objBEExamProvider.strRoleName = lblrole.Text;

                objBEExamProvider.strPhoneNumber = txtPhoneNumber.Text;

                objBEExamProvider.strTimeZone = ddlTimeZone.SelectedValue;

                objBEExamProvider.strSpecialNeeds1 = ddlSpecialNeeds.SelectedValue;

                objBEExamProvider.StrComments = txtcomments.Value;

                objBExamProvider.BUpdateStudentDetails(objBEExamProvider);

                if (objBEExamProvider.IntResult == 1)
                {
                    imgSuccess.Visible = true;
                    trUpdate.Visible   = true;
                    EnableDetails();
                    //lblMsg.Text = "Student Details Updated Successfully";
                    lblMsg.Text       = Resources.ResMessages.Provider_StudentUpdateSuccess;
                    lblMsg.ForeColor  = System.Drawing.Color.Green;
                    imgCancel.Visible = true;
                    imgUpdate.Visible = false;
                }

                else
                {
                    //lblMsg.Text = "Please enter Valid Details";
                    lblMsg.Text       = Resources.ResMessages.Provider_StudentUpdateFail;
                    lblMsg.ForeColor  = System.Drawing.Color.Red;
                    imgCancel.Visible = true;
                    imgUpdate.Visible = false;
                }
            }
        }
コード例 #12
0
 protected void gvTransDetails_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
 {
     try
     {
         BECourseAdmin objBECourseAdmin = new BECourseAdmin();
         BCourseAdmin  objBCourseAdmin  = new BCourseAdmin();
         objBECourseAdmin.IntStudentID = Convert.ToInt32(AppSecurity.Decrypt(Request.QueryString["StudentID"].ToString()));
         objBECourseAdmin.IntUserID    = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]);
         objBCourseAdmin.BGetStudentTransactionsByLoggedInCourseAdminCourses(objBECourseAdmin);
         gvTransDetails.DataSource = objBECourseAdmin.DtResult;
     }
     catch (Exception) { }
 }
コード例 #13
0
 protected void BindExistingExamDetails()
 {
     try
     {
         BECourseAdmin objBEExamProvider = new BECourseAdmin();
         BCourseAdmin  objBExamProvider  = new BCourseAdmin();
         objBEExamProvider.IntUserID     = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString());
         objBEExamProvider.strCourseName = string.Empty;;
         objBEExamProvider.strExamName   = string.Empty;;
         objBExamProvider.BGetExistingExamDetails(objBEExamProvider);
         gvExamDetails.DataSource = objBEExamProvider.DtResult;
     }
     catch (Exception)
     {
     }
 }
        protected void BindStudents()
        {
            BECourseAdmin objBEAdmin = new BECourseAdmin();
            BCourseAdmin  objBAdmin  = new BCourseAdmin();

            objBEAdmin.IntCourseID = Convert.ToInt32(Request.QueryString["Courseid"].ToString());
            objBAdmin.BGetStudentsNotInCourse(objBEAdmin);
            if (objBEAdmin.DtResult.Rows.Count > 0)
            {
                rcbStudent.AppendDataBoundItems = true;
                //rcbStudent.Items.Add(new RadComboBoxItem("--Select Student--", "-1"));
                rcbStudent.DataSource     = objBEAdmin.DtResult;
                rcbStudent.DataTextField  = "StudentName";
                rcbStudent.DataValueField = "StudentID";
                rcbStudent.DataBind();
            }
        }
コード例 #15
0
 protected void GetCourseDetails()
 {
     try
     {
         BECourseAdmin objBECourseAdmin = new BECourseAdmin();
         BCourseAdmin  objBCourseAdmin  = new BCourseAdmin();
         objBECourseAdmin.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString());
         objBCourseAdmin.BGetCourseDetails(objBECourseAdmin);
         gvCourseDetails.DataSource = objBECourseAdmin.DsResult;
         objBECourseAdmin           = null;
         objBCourseAdmin            = null;
     }
     catch (Exception Ex)
     {
         ErrorHandlers.ErrorLog.WriteError(Ex);
     }
 }
コード例 #16
0
 protected void GetExamDetails(RadGrid rdExams, string strCourseID)
 {
     try
     {
         BECourseAdmin objBECourseAdmin = new BECourseAdmin();
         BCourseAdmin  objBExamProvider = new BCourseAdmin();
         objBECourseAdmin.IntCourseID = Convert.ToInt32(strCourseID);
         objBECourseAdmin.IntUserID   = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString());
         objBExamProvider.BGetExamDetails(objBECourseAdmin);
         rdExams.DataSource = objBECourseAdmin.DtResult;
         rdExams.Rebind();
     }
     catch (Exception Ex)
     {
         ErrorHandlers.ErrorLog.WriteError(Ex);
     }
 }
コード例 #17
0
 protected void GetStudentName()
 {
     try
     {
         BECourseAdmin objBECourseAdmin = new BECourseAdmin();
         BCourseAdmin  objBCourseAdmin  = new BCourseAdmin();
         objBECourseAdmin.IntStudentID = Convert.ToInt32(Request.QueryString["StudentID"].ToString());
         objBCourseAdmin.BGetStudentName(objBECourseAdmin);
         if (objBECourseAdmin.DtResult != null && objBECourseAdmin.DtResult.Rows.Count > 0)
         {
             lblStudentName.Text = objBECourseAdmin.DtResult.Rows[0]["StudentName"].ToString();
         }
     }
     catch (Exception Ex)
     {
         ErrorHandlers.ErrorLog.WriteError(Ex);
     }
 }
コード例 #18
0
        protected void getProviderNewCourses()
        {
            BECourseAdmin objBECourseAdmin = new BECourseAdmin();
            BCourseAdmin  objBCourseAdmin  = new BCourseAdmin();

            objBECourseAdmin.IntProviderID = Convert.ToInt32(Session[EnumPageSessions.USERID]);
            objBCourseAdmin.BGetProviderCourses(objBECourseAdmin);
            if (objBECourseAdmin.DtResult != null && objBECourseAdmin.DtResult.Rows.Count > 0)
            {
                rcbNewCourses.DataSource = objBECourseAdmin.DtResult;
                rcbNewCourses.DataBind();
            }
            else
            {
                rcbNewCourses.DataSource = new string[] { };
                rcbNewCourses.DataBind();
            }
        }
コード例 #19
0
        protected void getSelectedExamDetails()
        {
            try
            {
                BECourseAdmin objBECourseAdmin = new BECourseAdmin();
                BCourseAdmin  objBCourseAdmin  = new BCourseAdmin();
                objBECourseAdmin.IntExamID = Convert.ToInt32(Request.QueryString["ExamID"].ToString());
                objBCourseAdmin.BGetSelectedExamDetails(objBECourseAdmin);
                lblExamName.Text    = objBECourseAdmin.DsResult.Tables[0].Rows[0]["ExamName"].ToString();
                lblStatusValue.Text = objBECourseAdmin.DsResult.Tables[0].Rows[0]["Status"].ToString();

                objBECourseAdmin = null;
                objBCourseAdmin  = null;
            }
            catch (Exception Ex)
            {
                ErrorHandlers.ErrorLog.WriteError(Ex);
            }
        }
コード例 #20
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                BECourseAdmin objBECourseAdmin = new BECourseAdmin();
                BCourseAdmin  objBCourseAdmin  = new BCourseAdmin();
                objBECourseAdmin.IntUserID    = Convert.ToInt32(ddlprovider.SelectedValue);
                objBECourseAdmin.IntCourseID  = Convert.ToInt32(ddlCourse.SelectedValue);
                objBECourseAdmin.IntStudentID = Convert.ToInt32(Request.QueryString["StudentID"].ToString());
                lblCourse.Text     = ddlCourse.SelectedItem.Text;
                lblInstructor.Text = ddlprovider.SelectedItem.Text;
                objBCourseAdmin.BProviderEnrollStudentCourse(objBECourseAdmin);
                trMessage.Visible = true;
                if (objBECourseAdmin.IntResult.ToString() == "1")
                {
                    lblInfo.Text      = Resources.AppMessages.Provider_Enrollment_Success_AddEnrollment;
                    lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Success);
                    ImgInfo.ImageUrl  = Resources.AppConfigurations.Image_Success;
                    tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Success);
                    lblCourse.Visible     = true;
                    ddlCourse.Visible     = false;
                    lblInstructor.Visible = true;
                    ddlprovider.Visible   = false;
                    trUpdate.Visible      = false;
                }

                else
                {
                    lblInfo.Text      = Resources.AppMessages.Provider_Enrollment_Error_AddEnrollment;
                    lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Error);
                    ImgInfo.ImageUrl  = Resources.AppConfigurations.Image_Error;
                    tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Error);
                    lblCourse.Visible = false;
                    ddlCourse.Visible = true;
                    trUpdate.Visible  = true;
                }
            }

            catch (Exception Ex)
            {
                ErrorHandlers.ErrorLog.WriteError(Ex);
            }
        }
コード例 #21
0
        protected void checkInstructorTimeZone()
        {
            BECourseAdmin objBEProvider = new BECourseAdmin();

            BCourseAdmin objBProvider = new BCourseAdmin();

            objBEProvider.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]);

            objBProvider.BCheckTimeZone(objBEProvider);

            if (objBEProvider.IntResult == 1)
            {
                lblMsg.Visible = true;
            }

            else
            {
                lblMsg.Visible = false;
            }
        }
        protected void GetCourseDetails()
        {
            try
            {
                BECourseAdmin objBEAdmin = new BECourseAdmin();
                BCourseAdmin  objBAdmin  = new BCourseAdmin();

                objBEAdmin.IntCourseID   = Convert.ToInt32(Request.QueryString["Courseid"].ToString());
                objBEAdmin.IntProviderID = Convert.ToInt32(Request.QueryString["InstructorID"].ToString());
                objBAdmin.BGetCourseDetailsbyProvider(objBEAdmin);
                if (objBEAdmin.DtResult != null && objBEAdmin.DtResult.Rows.Count > 0)
                {
                    lblInstructor.Text = objBEAdmin.DtResult.Rows[0]["ProviderName"].ToString();
                    lblCourse.Text     = objBEAdmin.DtResult.Rows[0]["CourseName"].ToString();
                }
            }
            catch (Exception Ex)
            {
                ErrorHandlers.ErrorLog.WriteError(Ex);
            }
        }
コード例 #23
0
 protected void BindDropdowns()
 {
     try
     {
         BECourseAdmin objBEExamProvider = new BECourseAdmin();
         BCourseAdmin  objBExamProvider  = new BCourseAdmin();
         objBEExamProvider.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString());
         objBExamProvider.BGetStudentsAndCourses(objBEExamProvider);
         ddlStudents.DataSource     = objBEExamProvider.DsResult.Tables[0];
         ddlStudents.DataValueField = "UserId";
         ddlStudents.DataTextField  = "UserName";
         ddlStudents.DataBind();
         ddlCourse.DataSource     = objBEExamProvider.DsResult.Tables[1];
         ddlCourse.DataValueField = "CourseID";
         ddlCourse.DataTextField  = "CourseName";
         ddlCourse.DataBind();
     }
     catch
     {
     }
 }
コード例 #24
0
        protected void btnConfirm_Click(object sender, EventArgs e)
        {
            BECourseAdmin objBEProvider = new BECourseAdmin();
            BCourseAdmin  objBProvider  = new BCourseAdmin();

            objBEProvider.IntStudentID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.StudentID].ToString());
            objBProvider.BDeleteStudent(objBEProvider);

            if (objBEProvider.DsResult != null && objBEProvider.DsResult.Tables[0].Rows.Count > 0)
            {
                if (Convert.ToBoolean(objBEProvider.DsResult.Tables[0].Rows[0][0]))
                {
                    imgtick.Visible    = true;
                    lblMsg.Visible     = true;
                    btnConfirm.Visible = false;
                    btnBack.Visible    = false;
                    //lblMsg.Text = "Student deleted successfully";
                    lblMsg.Text = Resources.ResMessages.Provider_UserDelSuccess;
                }
                else
                {
                    imgtick.Visible    = false;
                    lblMsg.Visible     = true;
                    btnConfirm.Visible = true;
                    btnBack.Visible    = true;
                    //lblMsg.Text = "Deletion failed as Student has pending exams";
                    lblMsg.Text = Resources.ResMessages.Provider_UserDelPending;
                }
            }

            else
            {
                imgtick.Visible    = false;
                lblMsg.Visible     = true;
                btnConfirm.Visible = true;
                btnBack.Visible    = true;
                //lblMsg.Text = "Student Deletion failed.Please try again.";
                lblMsg.Text = Resources.ResMessages.Provider_UserDelFail;
            }
        }
コード例 #25
0
        protected void GetEnrollStudentDetails()
        {
            BECourseAdmin objBEProvider = new BECourseAdmin();
            BCourseAdmin  objBProvider  = new BCourseAdmin();

            objBEProvider.IntEnrollID = Convert.ToInt32(Request.QueryString["EnrollmentID"].ToString());
            objBProvider.BGetEnrollStudentDetails(objBEProvider);
            if (objBEProvider.DsResult.Tables[0].Rows.Count > 0)
            {
                lblStudentName.Text  = objBEProvider.DsResult.Tables[0].Rows[0]["StudentName"].ToString();
                lblEmailAddress.Text = objBEProvider.DsResult.Tables[0].Rows[0]["EmailAddress"].ToString();
                lblCourseName.Text   = objBEProvider.DsResult.Tables[0].Rows[0]["CourseName"].ToString();
                if (objBEProvider.DsResult.Tables[0].Rows[0]["EnrollmentStatus"].ToString() == "True")
                {
                    lblStatus.Text = "Active";
                }
                if (objBEProvider.DsResult.Tables[0].Rows[0]["EnrollmentStatus"].ToString() == "False")
                {
                    lblStatus.Text = "InActive";
                }
            }
        }
コード例 #26
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                BECourseAdmin objBECourseAdmin = new BECourseAdmin();
                BCourseAdmin  objBCourseAdmin  = new BCourseAdmin();

                objBECourseAdmin.strCourseID   = txtCourseID.Text.Trim().ToString();
                lblCourseID.Text               = txtCourseID.Text.Trim().ToString();
                objBECourseAdmin.strCourseName = txtCourseName.Text.Trim().ToString();
                lblCourseName.Text             = txtCourseName.Text.Trim().ToString();
                objBECourseAdmin.IntUserID     = Convert.ToInt32(ddlprovider.SelectedValue);
                objBCourseAdmin.BAddCourse(objBECourseAdmin);
                trMessage.Visible = true;

                if (objBECourseAdmin.IntResult == 1)
                {
                    lblInfo.Text      = Resources.AppMessages.Provider_AddCourse_Success_AddCourse;
                    lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Success);
                    ImgInfo.ImageUrl  = Resources.AppConfigurations.Image_Success;
                    tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Success);
                    trAddCourse.Visible        = false;
                    trAddCourseConfirm.Visible = true;
                }
                else
                {
                    lblInfo.Text      = Resources.AppMessages.Provider_AddCourse_Error_AddCourse;
                    lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Error);
                    ImgInfo.ImageUrl  = Resources.AppConfigurations.Image_Error;
                    tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Error);
                    trAddCourse.Visible        = true;
                    trAddCourseConfirm.Visible = false;
                }
            }
            catch (Exception Ex)
            {
                ErrorHandlers.ErrorLog.WriteError(Ex);
            }
        }
コード例 #27
0
        protected void btnsearch_Click(object sender, EventArgs e)
        {
            BECourseAdmin objBECourseAdmin = new BECourseAdmin();
            BCourseAdmin  objBCourseAdmin  = new BCourseAdmin();

            if (txtCourseID.Text == "")
            {
                objBECourseAdmin.strCourseID = DBNull.Value.ToString();
            }
            else
            {
                objBECourseAdmin.strCourseID = txtCourseID.Text;
            }
            if (txtcoursename.Text == "")
            {
                objBECourseAdmin.strCourseName = DBNull.Value.ToString();
            }
            else
            {
                objBECourseAdmin.strCourseName = txtcoursename.Text;
            }
            // objBEAdmin.strLastName = txtlastname.Text;
            if (txtinstructorname.Text == "")
            {
                objBECourseAdmin.strStudentName = DBNull.Value.ToString();
            }
            else
            {
                objBECourseAdmin.strStudentName = txtinstructorname.Text;
            }

            objBECourseAdmin.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString());
            // objBEAdmin.strEmailAddress = txtemail.Text;
            objBCourseAdmin.BGetCourseAdminDetails(objBECourseAdmin);
            gvCourseDetails.DataSource = objBECourseAdmin.DtResult;
            gvCourseDetails.DataBind();
            objBECourseAdmin = null;
        }
コード例 #28
0
        protected void btnStudentSave_Click(object sender, EventArgs e)
        {
            trMessage.Visible   = true;
            lblStudentName.Text = rcbStudents.SelectedItem.Text.ToString();
            lblCourseName.Text  = rcbCourses.SelectedItem.Text.ToString();
            lblInstructor.Text  = ddlprovider.SelectedItem.Text.ToString();


            BECourseAdmin objBECourseAdmin = new BECourseAdmin();
            BCourseAdmin  objBCourseAdmin  = new BCourseAdmin();

            objBECourseAdmin.IntStudentID = Convert.ToInt32(rcbStudents.SelectedValue);
            objBECourseAdmin.IntCourseID  = Convert.ToInt32(rcbCourses.SelectedValue);
            objBECourseAdmin.IntUserID    = Convert.ToInt32(ddlprovider.SelectedValue);
            //Session[BaseClass.EnumPageSessions.USERID].ToString()

            objBCourseAdmin.BProviderEnrollStudent(objBECourseAdmin);
            if (objBECourseAdmin.IntResult.ToString() == "1")
            {
                lblInfo.Text                        = Resources.AppMessages.Provider_AddStudent_Success_AddStudent;
                lblInfo.ForeColor                   = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Success);
                ImgInfo.ImageUrl                    = Resources.AppConfigurations.Image_Success;
                trAddStudent.Visible                = false;
                trAddStudentConfirm.Visible         = false;
                trEnrollStudent.Visible             = false;
                trEnrollStudentConfirmation.Visible = true;
            }
            else
            {
                lblInfo.Text                        = "Selected course already enrolled by selected student";
                lblInfo.ForeColor                   = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Error);
                ImgInfo.ImageUrl                    = Resources.AppConfigurations.Image_Error;
                trAddStudent.Visible                = false;
                trAddStudentConfirm.Visible         = false;
                trEnrollStudent.Visible             = true;
                trEnrollStudentConfirmation.Visible = false;
            }
        }
コード例 #29
0
        protected void GetEnrollStudentDetails()
        {
            BECourseAdmin objBEProvider = new BECourseAdmin();
            BCourseAdmin  objBProvider  = new BCourseAdmin();

            objBEProvider.IntEnrollID = Convert.ToInt32(Request.QueryString["EnrollmentID"].ToString());
            objBProvider.BGetEnrollStudentDetails(objBEProvider);
            if (objBEProvider.DsResult.Tables[0].Rows.Count > 0)
            {
                lblStudentName.Text  = objBEProvider.DsResult.Tables[0].Rows[0]["StudentName"].ToString();
                lblEmailAddress.Text = objBEProvider.DsResult.Tables[0].Rows[0]["EmailAddress"].ToString();
                lblCourseName.Text   = objBEProvider.DsResult.Tables[0].Rows[0]["CourseName"].ToString();
                string status = objBEProvider.DsResult.Tables[0].Rows[0]["EnrollmentStatus"].ToString();
                if (status.ToLower() == "false")
                {
                    ddlStatus.SelectedValue = "0";
                }
                else if (status.ToLower() == "true")
                {
                    ddlStatus.SelectedValue = "1";
                }
            }
        }
コード例 #30
0
        protected void btnConfirm_Click(object sender, EventArgs e)
        {
            BECourseAdmin objBEProvider = new BECourseAdmin();
            BCourseAdmin  objBProvider  = new BCourseAdmin();

            objBEProvider.IntStudentID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.StudentID].ToString());
            objBProvider.BDeleteStudent(objBEProvider);
            trMessage.Visible = true;
            if (objBEProvider.DsResult != null && objBEProvider.DsResult.Tables[0].Rows.Count > 0)
            {
                if (Convert.ToBoolean(objBEProvider.DsResult.Tables[0].Rows[0][0]))
                {
                    trUpdate.Visible = false;

                    lblInfo.Text      = Resources.AppMessages.Provider_DeletStudent_Success_StudentDeleted;
                    lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Success);
                    ImgInfo.ImageUrl  = Resources.AppConfigurations.Image_Success;
                    tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Success);
                }
                else
                {
                    trUpdate.Visible = true;

                    lblInfo.Text      = Resources.AppMessages.Provider_DeletStudent_Error_DeleteStudentPending;
                    lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Error);
                    ImgInfo.ImageUrl  = Resources.AppConfigurations.Image_Error;
                    tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Error);
                }
            }

            else
            {
                trUpdate.Visible  = true;
                lblInfo.Text      = Resources.AppMessages.Provider_DeletStudent_Error_DeleteStudent;
                lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Error);
            }
        }