protected void btnSubmit_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                BEUser objBEUser = new BEUser();

                BUser objBUser = new BUser();

                objBEUser.strOldPassword = txtCurrentPassword.Text;

                objBEUser.strNewPassword = txtNewPassword.Text;

                objBEUser.strConfirmNewPassword = txtConfirmNewPassword.Text;

                objBEUser.StrUserId = Session[BaseClass.EnumPageSessions.USERID].ToString();

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

                objBEUser.StrUserName = Session["EmailID"].ToString();

                objBUser.BChangePassword(objBEUser);

                if (objBEUser.IntResult == 0)
                {
                    //ScriptManager.RegisterStartupScript(this, this.GetType(), "ShowSuccess", "alert('Updated Successfully')", true);

                    //lblSuccess.Text = "Updated Successfully";
                    lblSuccess.Text = Resources.ResMessages.MyProfile_PasswordUpdateSuccess;

                    try
                    {
                        BEMail objBEMail = new BEMail();
                        BMail  objBMail  = new BMail();
                        objBEMail.IntUserID       = objBEUser.IntUserID;
                        objBEMail.IntTransID      = 0;
                        objBEMail.StrTemplateName = BaseClass.EnumEmails.ChangePassword.ToString();

                        objBMail.BSendEmail(objBEMail);
                        // new BCommon().BSendEmail(objBEUser.IntUserID.ToString(), BaseClass.EnumEmails.ChangePassword.ToString());
                        // EmailMsg obj = new EmailMsg();
                        //obj.ChangePassword(objBEUser.IntUserID, objBEUser.StrUserName, objBEUser.strNewPassword);
                        // obj = null;
                    }
                    catch (Exception ex)
                    {
                        throw ex;
                    }
                }

                if (objBEUser.IntResult == 1)
                {
                    //  ScriptManager.RegisterStartupScript(this, this.GetType(), "ShowSuccess", "alert('Please enter valid Current Password')", true);

                    //lblSuccess.Text = "Please enter valid Current Password";
                    lblSuccess.Text = Resources.ResMessages.MyProfile_ValidCurrentPassword;
                }
            }
        }
        protected void btnReject_Click(object sender, EventArgs e)
        {
            try
            {
                if (Request.QueryString["type"].ToString() == "0")
                {
                    BECommon objBECommon = new BECommon();
                    BCommon  objBCommon  = new BCommon();
                    objBECommon.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString()));
                    objBCommon.BGetExamProviderDetails(objBECommon);
                    if (objBECommon.DsResult.Tables[0].Rows.Count > 0)
                    {
                        // objBECommon.StrEmailID = objBECommon.DsResult.Tables[0].Rows[0]["StudentEmail"].ToString();
                        objBECommon.IntUserID     = Convert.ToInt32(objBECommon.DsResult.Tables[0].Rows[0]["UserID"]);
                        objBECommon.IntProviderID = Convert.ToInt32(objBECommon.DsResult.Tables[0].Rows[0]["ProviderUserID"]);

                        //  objBECommon.strProviderEmailID = objBECommon.DsResult.Tables[0].Rows[0]["ExamProviderEmail"].ToString();
                    }
                    Approve_Transaction(0);
                    try
                    {
                        //EmailMsg obj = new EmailMsg();
                        //obj.ExamApprovedStudent(Convert.ToInt32(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())), "Rejected");
                        //obj.ExamApprovedProvider(Convert.ToInt32(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())), "Rejected");
                        //obj = null;
                        BEMail objBEMail = new BEMail();
                        BMail  objBMail  = new BMail();
                        objBEMail.IntTransID = objBECommon.IntTransID;
                        string FYI  = "FYI";
                        string mail = "Mail";
                        if (mail == "Mail")
                        {
                            //objBEMail.IntUserID = objBECommon.IntUserID;
                            //objBEMail.StrTemplateName = BaseClass.EnumEmails.ExamRejectedbyAuditor.ToString();
                            //objBMail.BSendEmail(objBEMail);
                        }

                        if (FYI == "FYI")
                        {
                            //objBEMail.IntUserID = objBECommon.IntProviderID;

                            //objBEMail.StrTemplateName = BaseClass.EnumEmails.ExamRejectedbyAuditorFYI.ToString();
                            //objBMail.BSendEmail(objBEMail);
                        }
                    }
                    catch (Exception ex)
                    {
                        throw ex;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #3
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                BEUser objBEUser = new BEUser();

                BUser objBUser = new BUser();

                objBEUser.strOldPassword = txtCurrentPassword.Text;

                objBEUser.strNewPassword = txtNewPassword.Text;

                objBEUser.strConfirmNewPassword = txtConfirmNewPassword.Text;

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

                objBEUser.StrUserName = Session["EmailID"].ToString();

                objBUser.BChangePassword(objBEUser);

                if (objBEUser.IntResult == 0)
                {
                    lblMessage.Text    = "<font color='#00C000'>" + Resources.ResMessages.MyProfile_PasswordUpdateSuccess;
                    tblContent.Visible = false;
                    btnSave.Visible    = false;
                    lblmandate.Visible = false;
                    imgOK.Visible      = true;

                    try
                    {
                        BEMail objBEMail = new BEMail();
                        BMail  objBMail  = new BMail();
                        objBEMail.IntUserID       = objBEUser.IntUserID;
                        objBEMail.IntTransID      = 0;
                        objBEMail.StrTemplateName = BaseClass.EnumEmails.ChangePassword.ToString();

                        objBMail.BSendEmail(objBEMail);
                    }
                    catch (Exception ex)
                    {
                        throw ex;
                    }
                }

                if (objBEUser.IntResult == 1)
                {
                    tblContent.Visible = true;
                    lblMessage.Text    = "<font color='Red'>" + Resources.ResMessages.MyProfile_ValidCurrentPassword;
                    lblmandate.Visible = true;
                    imgOK.Visible      = false;
                }
            }
        }
Example #4
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                BEUser objBEUser = new BEUser();
                BUser  objBUser  = new BUser();
                objBEUser.strOldPassword        = txtCurrentPassword.Text;
                objBEUser.strNewPassword        = txtNewPassword.Text;
                objBEUser.strConfirmNewPassword = txtConfirmNewPassword.Text;
                objBEUser.IntUserID             = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]);

                objBEUser.StrUserName = Session["EmailID"].ToString();

                objBUser.BChangePassword(objBEUser);

                if (objBEUser.IntResult == 0)
                {
                    //  lblUpdated.Text = "Password Updated Successfully";
                    lblUpdated.Text = Resources.ResMessages.MyProfile_PasswordUpdateSuccess;
                    lblsucc.Visible = false;
                    try
                    {
                        BEMail objBEMail = new BEMail();
                        BMail  objBMail  = new BMail();
                        objBEMail.IntUserID       = objBEUser.IntUserID;
                        objBEMail.IntTransID      = 0;
                        objBEMail.StrTemplateName = BaseClass.EnumEmails.ChangePassword.ToString();

                        objBMail.BSendEmail(objBEMail);
                    }
                    catch (Exception ex)
                    {
                        throw ex;
                    }
                }

                if (objBEUser.IntResult == 1)
                {
                    //lblUpdated.Text = "Please enter valid Current Password";
                    lblUpdated.Text = Resources.ResMessages.MyProfile_ValidCurrentPassword;
                }
            }
            else
            {
                lblUpdated.Text = string.Empty;
            }
        }
Example #5
0
        protected void RadScheduler1_AppointmentDelete(object sender, SchedulerCancelEventArgs e)
        {
            try
            {
                lblMsg.Text = string.Empty;
                int       iID          = Convert.ToInt32(e.Appointment.ID);
                BEStudent objBEStudent = new BEStudent();
                objBEStudent.IntTransID = iID;
                objBEStudent.IntUserID  = Convert.ToInt32(Session[EnumPageSessions.USERID]);
                BStudent objBStudent = new BStudent();
                objBStudent.BDeleteAppointment(objBEStudent);
                Bind_GetBookedExamSlots();

                if (objBEStudent.DtResult.Rows.Count > 0 && objBEStudent.DtResult != null)
                {
                    if (Convert.ToInt32(objBEStudent.DtResult.Rows[0]["Result"]) != 1)
                    {
                        lblMsg.Text = "<img src='../Images/no.png'align='middle'/>&nbsp;<font color='red'>" + Resources.ResMessages.AppointmentDelete + "</font>";
                    }

                    else
                    {
                        lblMsg.Text = "<img src='../Images/yes.png'align='middle'/>&nbsp;<font color='#00C000'>" + "Exam (Exam ID: " + iID + ")" + Resources.ResMessages.AppointmentDeleteSuccess + "</font>";
                        try
                        {
                            BEMail objBEMail = new BEMail();
                            BMail  objBMail  = new BMail();
                            objBEMail.IntUserID       = 0;
                            objBEMail.IntTransID      = Convert.ToInt64(iID.ToString());
                            objBEMail.StrTemplateName = BaseClass.EnumEmails.ExamCancelConfirmation.ToString();

                            objBMail.BSendEmail(objBEMail);
                        }
                        catch (Exception ex)
                        {
                            throw ex;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #6
0
 public void DSendMail(BEMail objBEMail)
 {
     try
     {
         SqlParameter[] objSqlParam = new SqlParameter[3];
         objSqlParam[0]       = new SqlParameter("@StudentID", SqlDbType.Int);
         objSqlParam[0].Value = objBEMail.IntUserID;
         objSqlParam[1]       = new SqlParameter("@TransID", SqlDbType.BigInt);
         objSqlParam[1].Value = objBEMail.IntTransID;
         objSqlParam[2]       = new SqlParameter("@TemplateName", SqlDbType.VarChar, 100);
         objSqlParam[2].Value = objBEMail.StrTemplateName;
         SQLHelper.ExecuteNonQuery(DConConfig.ConnectionString, CommandType.StoredProcedure, StoredProcedures.USP_SendEmail, objSqlParam);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        protected void btnReset_Click(object sender, EventArgs e)
        {
            BEAdmin objBEAdmin = new BEAdmin();
            BAdmin  objBAdmin  = new BAdmin();

            objBEAdmin.IntStudentID      = Convert.ToInt32(Request.QueryString["StudentID"].ToString());
            objBEAdmin.StrRandomPassword = GetRandomPassword(Length);
            objBAdmin.BUpdatePassword(objBEAdmin);
            if (objBEAdmin.IntResult == 1)
            {
                try
                {
                    BEMail objBEMail = new BEMail();
                    BMail  objBMail  = new BMail();
                    objBEMail.IntUserID       = objBEAdmin.IntStudentID;
                    objBEMail.IntTransID      = 0;
                    objBEMail.StrTemplateName = BaseClass.EnumEmails.ForgotPassword.ToString();
                    objBMail.BSendEmail(objBEMail);
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                trMessage.Visible = true;
                lblInfo.Text      = Resources.AppMessages.Admin_Reset_Success_Reset;
                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
            {
                trMessage.Visible = true;
                lblInfo.Text      = Resources.AppMessages.Admin_Reset_Error_ResetStudent;
                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);
            }
        }
        protected void btnApprove_Click(object sender, EventArgs e)
        {
            string strTransID = string.Empty;

            //foreach (GridViewRow row in gvAuditorInbox.Rows)
            //{
            //    CheckBox chk = (CheckBox)row.Cells[0].FindControl("chkSelect");
            //    if (chk.Checked == true)
            //    {
            //        Label lbl = (Label)row.Cells[1].FindControl("lblExamID");
            //        strTransID = strTransID + lbl.Text.ToString() + "$";
            //    }
            //}

            foreach (GridDataItem item in gvAuditorInbox.Items)
            {
                CheckBox chk = (CheckBox)item.Cells[0].FindControl("chkSelect");
                if (chk.Checked == true)
                {
                    Label lbl = (Label)item.Cells[1].FindControl("lblExamID");
                    strTransID = strTransID + lbl.Text.ToString() + "$";
                }
            }
            if (strTransID != string.Empty)
            {
                strTransID = strTransID.Substring(0, strTransID.Length - 1);
                BEAuditor objBEAuditor = new BEAuditor();
                BAuditor  objBAuditor  = new BAuditor();
                objBEAuditor.strTransID    = strTransID;
                objBEAuditor.IntEmployeeID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]);
                objBAuditor.BApproveTransaction(objBEAuditor);
                objBEAuditor = null;
                objBAuditor  = null;
                //foreach (GridDataItem item in gvAuditorInbox.Items)
                //{
                //    CheckBox chk = (CheckBox)item.Cells[0].FindControl("chkSelect");
                //    //EmailMsg obj;
                //    if (chk.Checked == true)
                //    {
                BEAuditor objBEAuditor1 = new BEAuditor();
                BAuditor  objBAuditor1  = new BAuditor();
                objBEAuditor1.strTransID = strTransID;

                objBAuditor1.BGetAuditorProviderDetails(objBEAuditor1);
                if (objBEAuditor1.DsResult.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < objBEAuditor1.DsResult.Tables[0].Rows.Count; i++)
                    {
                        DataTable objDT = new DataTable();

                        objDT = objBEAuditor1.DsResult.Tables[0];

                        objBEAuditor1.IntUserID = Convert.ToInt32(objDT.Rows[i]["ExamProviderID"]);

                        objBEAuditor1.IntProviderID = Convert.ToInt32(objDT.Rows[i]["UserID"]);

                        objBEAuditor1.IntTransID = Convert.ToInt64(objDT.Rows[i]["TransID"]);


                        BEMail objBEMail = new BEMail();
                        BMail  objBMail  = new BMail();
                        objBEMail.IntTransID = objBEAuditor1.IntTransID;
                        string FYI = "FYI";
                        //string mail = "Mail";
                        //if (mail == "Mail")
                        //{
                        //    objBEMail.IntUserID = objBEAuditor1.IntUserID;
                        //    objBEMail.StrTemplateName = BaseClass.EnumEmails.ExamApprovedbyAuditor.ToString();
                        //    objBMail.BSendEmail(objBEMail);

                        //}

                        if (FYI == "FYI")
                        {
                            BECommon objBECommon = new BECommon();
                            BCommon  objBCommon  = new BCommon();
                            objBECommon.IntTransID = objBEAuditor1.IntTransID;
                            objBCommon.BAuditorCheckEmailForApproval(objBECommon);

                            if (objBECommon.IntstatusFlag == 1)
                            {
                                objBEMail.IntUserID = objBEAuditor1.IntUserID;

                                objBEMail.StrTemplateName = BaseClass.EnumEmails.ExamApprovedbyAuditorFYI.ToString();
                                objBMail.BSendEmail(objBEMail);
                            }
                        }
                    }



                    // Label lbl = (Label)item.Cells[1].FindControl("lblExamID");
                }


                lblSuccess.Text = Resources.ResMessages.Audit_TransApprove;

                // this.LoadData();
                gvAuditorInbox.Rebind();
            }

            else
            {
                lblSuccess.Text = Resources.ResMessages.Audit_TransSelect;
            }
        }
Example #9
0
 public void BSendEmail(BEMail objBEMail)
 {
     new DMail().DSendMail(objBEMail);
 }
Example #10
0
        protected void btnConfirm_Click(object sender, EventArgs e)
        {
            if (Request.QueryString["type"].ToString() == "1")
            {
                if (Request.QueryString["status"] != null && Request.QueryString["status"].ToString() != string.Empty)
                {
                    string status = AppSecurity.Decrypt(Request.QueryString["status"].ToString());
                    if (status == "Approve")
                    {
                        BEProctor objBEProctor = new BEProctor();
                        BProctor  objBProctor  = new BProctor();
                        objBEProctor.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString()));
                        objBEProctor.IntUserID  = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]);
                        objBEProctor.IntFlag    = 0;
                        objBEProctor.strStatus  = status;
                        objBProctor.BProctorApproveExam(objBEProctor);
                        //try
                        //{
                        //    StreamingServer.ServiceSoapClient client = new StreamingServer.ServiceSoapClient();
                        //    client.StopStreaming("", AppSecurity.Decrypt(Request.QueryString["TransID"].ToString()));
                        //}
                        //catch
                        //{
                        //}
                        btnConfirm.Visible = false;
                        btnBack.Visible    = false;
                        imgtick.Visible    = true;
                        lblSuccess.Text    = Resources.ResMessages.Proctor_ExamApprove;
                        try
                        {
                            BEMail objBEMail = new BEMail();
                            BMail  objBMail  = new BMail();
                            objBEMail.IntUserID       = 0;
                            objBEMail.IntTransID      = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString()));
                            objBEMail.StrTemplateName = BaseClass.EnumEmails.ExamApprovalConfirmation.ToString();

                            objBMail.BSendEmail(objBEMail);
                        }
                        catch (Exception)
                        {
                            //throw ex;
                        }
                    }
                    else if (status == "Close")
                    {
                        BEProctor objBEProctor = new BEProctor();
                        BProctor  objBProctor  = new BProctor();
                        objBEProctor.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString()));
                        objBEProctor.IntUserID  = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]);
                        objBEProctor.IntFlag    = 0;
                        objBEProctor.strStatus  = status;
                        objBProctor.BProctorApproveExam(objBEProctor);
                        //try
                        //{
                        //    StreamingServer.ServiceSoapClient client = new StreamingServer.ServiceSoapClient();
                        //    client.StopStreaming("", AppSecurity.Decrypt(Request.QueryString["TransID"].ToString()));
                        //}
                        //catch
                        //{
                        //}
                        btnConfirm.Visible = false;
                        btnBack.Visible    = false;
                        imgtick.Visible    = true;
                        lblSuccess.Text    = Resources.ResMessages.Proctor_ExamClose;
                        try
                        {
                            BEMail objBEMail = new BEMail();
                            BMail  objBMail  = new BMail();
                            objBEMail.IntUserID       = 0;
                            objBEMail.IntTransID      = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString()));
                            objBEMail.StrTemplateName = BaseClass.EnumEmails.ExamApprovalConfirmation.ToString();

                            objBMail.BSendEmail(objBEMail);
                        }
                        catch (Exception)
                        {
                            //throw ex;
                        }
                    }
                    else if (status == "Incomplete")
                    {
                        BEProctor objBEProctor = new BEProctor();
                        BProctor  objBProctor  = new BProctor();
                        objBEProctor.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString()));
                        objBEProctor.IntUserID  = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]);
                        objBEProctor.IntFlag    = 0;
                        objBEProctor.strStatus  = status;
                        objBProctor.BProctorApproveExam(objBEProctor);
                        //try
                        //{
                        //    StreamingServer.ServiceSoapClient client = new StreamingServer.ServiceSoapClient();
                        //    client.StopStreaming("", AppSecurity.Decrypt(Request.QueryString["TransID"].ToString()));
                        //}
                        //catch
                        //{
                        //}
                        btnConfirm.Visible = false;
                        btnBack.Visible    = false;
                        imgtick.Visible    = true;
                        lblSuccess.Text    = Resources.ResMessages.Proctor_ExamIncomplete;
                        try
                        {
                            BEMail objBEMail = new BEMail();
                            BMail  objBMail  = new BMail();
                            objBEMail.IntUserID       = 0;
                            objBEMail.IntTransID      = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString()));
                            objBEMail.StrTemplateName = BaseClass.EnumEmails.ExamApprovalConfirmation.ToString();

                            objBMail.BSendEmail(objBEMail);
                        }
                        catch (Exception)
                        {
                            //throw ex;
                        }
                    }
                    //status = "";
                }
            }
        }
        protected void btnRegistration_Click(object sender, EventArgs e)
        {
            try
            {
                if (Page.IsValid)
                {
                    BStudent  objBStudent  = new BStudent();
                    BEStudent objBEStudent = new BEStudent()
                    {
                        strFirstName            = txtFirstName.Text.Trim(),
                        strLastName             = txtLastName.Text.Trim(),
                        strPassword             = txtPassword.Text.Trim(),
                        strConfirmPassword      = txtConfirmPassword.Text.Trim(),
                        strUserName             = txtUserName.Text.Trim(),
                        strGender               = ddlGender.SelectedValue,
                        strphoneNumber          = txtPhoneNumber.Text,
                        strTimeZone             = ddlTimeZone.SelectedValue,
                        strQuestion1            = ddlSecurityQuestion1.SelectedValue,
                        strPrefferedPhoneNumber = txtPrefferedPhoneNumber.Text,
                        strAnswer1              = txtAnswer1.Text,
                        strQuestion2            = ddlSecurityQuestion2.SelectedValue,
                        strAnswer2              = txtAnswer2.Text,
                        strQuestion3            = ddlSecurityQuestion3.SelectedValue,
                        strAnswer3              = txtAnswer3.Text,
                    };



                    if (IdentificationFileUpload.HasFile)
                    {
                        string strpath             = Server.MapPath(System.Configuration.ConfigurationManager.AppSettings["UploadedDocumentsLocation"]);
                        string strOriginalFileName = IdentificationFileUpload.FileName;
                        string strUploadFileName   = CommonFunctions.generateUploadFileName(IdentificationFileUpload.FileName);
                        string strTotalPath        = strpath + '\\' + strUploadFileName;
                        string pathex = Path.GetExtension(strTotalPath);
                        if (pathex.ToLower() == ".jpg" || pathex.ToLower() == ".gif" || pathex.ToLower() == ".png" || pathex.ToLower() == ".bmp" || pathex.ToLower() == ".pdf")
                        {
                            IdentificationFileUpload.SaveAs(strTotalPath);
                        }
                        else
                        {
                            ScriptManager.RegisterStartupScript(this, this.GetType(), "ShowFailure", "alert('" + Resources.ResMessages.Reg_Validuploadfiles + "')", true);
                            return;
                        }

                        //if (IdentificationFileUpload.PostedFile.ContentLength > 1024000)
                        //{
                        //    ScriptManager.RegisterStartupScript(this, this.GetType(), "ShowFail", "alert('" + Resources.ResMessages.Reg_Uploadfilesize + "')", true);
                        //    File.Delete(strTotalPath);
                        //    return;
                        //}

                        //System.Drawing.Image image = System.Drawing.Image.FromFile(strTotalPath);
                        //int width = 0;
                        //int height = 0;
                        //if (image != null)
                        //{
                        //    width = image.Width;
                        //    height = image.Height;
                        //    if (height > 300)
                        //    {
                        //        ScriptManager.RegisterStartupScript(this, this.GetType(), "ShowFailure", "alert('" + Resources.ResMessages.Reg_Uploadfileheight + "')", true);
                        //        image.Dispose();
                        //        File.Delete(strTotalPath);
                        //        return;
                        //    }
                        //}
                        objBEStudent.strUploadPath       = strUploadFileName;
                        objBEStudent.strOriginalFileName = strOriginalFileName;

                        objBStudent.BStudentRegistration(objBEStudent);

                        if (objBEStudent.IntResult == 0)
                        {
                            lblMessage.Text = Resources.ResMessages.Reg_UserExists;
                            this.ClearFields();
                        }
                        else if (objBEStudent.IntResult == 1)
                        {
                            lblMessage.Text = Resources.ResMessages.Reg_StudentRegSuccess;
                            this.ClearFields();
                            try
                            {
                                BEMail objBEMail = new BEMail();
                                BMail  objBMail  = new BMail();
                                if (objBEStudent.IntUserID != 0)
                                {
                                    objBEMail.IntUserID = objBEStudent.IntUserID;
                                }
                                else
                                {
                                    objBEMail.IntUserID = 0;
                                }
                                objBEMail.IntTransID      = 0;
                                objBEMail.StrTemplateName = BaseClass.EnumEmails.StudentRegistrationConfirmation.ToString();
                                objBMail.BSendEmail(objBEMail);
                            }
                            catch (Exception ex)
                            {
                                throw ex;
                            }
                            this.ClearFields();
                        }
                        else if (objBEStudent.IntResult == 9)
                        {
                            lblMessage.Text = Resources.ResMessages.Reg_StudentRegFail;
                            lblMessage.Text = Resources.ResMessages.Reg_NoStudentDet;
                            this.ClearFields();
                        }
                    }
                    else
                    {
                        objBEStudent.strUploadPath       = string.Empty;
                        objBEStudent.strOriginalFileName = string.Empty;
                        lblMessage.Text = "Please upload the valid file";
                    }
                }
            }
            catch (Exception)
            {
                // ErrorLog.WriteError(Ex);
            }
        }
        protected void btnForGotPassword_Click(object sender, EventArgs e)
        {
            try
            {
                RequiredFieldValidator1.Text = string.Empty;
                RequiredFieldValidator2.Text = string.Empty;
                lblInvalid.Text = string.Empty;
                BEUser objBEUser = new BEUser();
                BUser  objBUser  = new BUser();
                if (txtEmailID.Text.Trim() != "")
                {
                    objBEUser.StrEmailID = txtEmailID.Text.Trim();
                }
                else
                {
                    lblInvalidEmailAddress.Text = "<font color='Red'>" + Resources.ResMessages.Login_InvalidEmailID;
                    lblEmailAddressSuccess.Text = "";
                    this.Clear();
                    objBEUser.StrEmailID = null;
                    return;
                }
                lblInvalidEmailAddress.Text = "";
                objBEUser.StrRandomPassword = GetRandomPassword(Length);
                objBUser.BForgotPassword(objBEUser);
                if (objBEUser.IntResult == 1)
                {
                    try
                    {
                        BEMail objBEMail = new BEMail();
                        BMail  objBMail  = new BMail();
                        objBEMail.IntUserID       = objBEUser.IntUserID;
                        objBEMail.IntTransID      = 0;
                        objBEMail.StrTemplateName = BaseClass.EnumEmails.ForgotPassword.ToString();
                        objBMail.BSendEmail(objBEMail);
                    }
                    catch (Exception ex)
                    {
                        throw ex;
                    }
                    if (objBEUser.StrEmailID != "")
                    {
                        lblEmailAddressSuccess.Text = "<font color='#00C000'>" + Resources.ResMessages.Login_EmailSuccess + " " + objBEUser.StrEmailID;
                    }

                    else
                    {
                        lblEmailAddressSuccess.Text = "No email address is registered.Please update your Email address.";
                    }
                    this.Clear();
                }
                else
                {
                    lblInvalidEmailAddress.Text = "<font color='Red'>" + Resources.ResMessages.Login_EmailVerify;
                    lblEmailAddressSuccess.Text = "";
                    this.Clear();
                }
            }
            catch (Exception)
            {
                // ErrorLog.WriteError(Ex);
            }
        }
        protected void btnConfirm_Click(object sender, EventArgs e)
        {
            try
            {
                if (Session["Student_Exam"] != null && Request.QueryString["Type"] == "Schedule")
                {
                    BStudent  objBStudent  = new BStudent();
                    BEStudent objBEStudent = (BEStudent)Session["Student_Exam"];
                    objBEStudent.IntUserID   = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString());
                    objBEStudent.strUserName = Session["EmailID"].ToString();
                    objBEStudent.dtExam      = Convert.ToDateTime(lblDAte.Text.ToString() + " " + lblSlot.Text.ToString());
                    objBEStudent.strTimeZone = Session["SchTime"].ToString();
                    objBStudent.BScheduleAnExam(objBEStudent);
                    trButtons.Visible     = false;
                    trMessage.Visible     = true;
                    Session["TimeZoneID"] = Session["SchTime"].ToString();
                    switch (Session["SchTime"].ToString())
                    {
                    case "1": Session["TimeZone"] = "CT";
                        break;

                    case "2": Session["TimeZone"] = "ET";
                        break;

                    case "3": Session["TimeZone"] = "PT";
                        break;

                    case "4": Session["TimeZone"] = "MT";
                        break;
                    }
                    LinkButton lblTzone = this.Master.FindControl("lbtnTimeZone") as LinkButton;
                    lblTzone.Text = "[ " + Session["TimeZone"].ToString() + " ]";
                    //lblMsg.Text = "Your Exam is Scheduled Successfully. An email has been sent to you providing instructions";
                    lblMsg.Text           = Resources.ResMessages.Student_ExamdetConfirmSchedule;
                    lblTransactionID.Text = objBEStudent.IntTransID.ToString();
                    //try
                    //{
                    //    EmailMsg obj = new EmailMsg();
                    //    obj.StudentExamReceipt(Convert.ToInt32(objBEStudent.IntTransID.ToString()), objBEStudent.IntUserID, objBEStudent.strUserName);
                    //    obj = null;
                    //}
                    //catch
                    //{
                    //}

                    try
                    {
                        BEMail objBEMail = new BEMail();
                        BMail  objBMail  = new BMail();
                        objBEMail.IntUserID       = 0;
                        objBEMail.IntTransID      = objBEStudent.IntTransID;
                        objBEMail.StrTemplateName = BaseClass.EnumEmails.StudentExamReceipt.ToString();

                        //objBMail.BSendEmail(objBEMail);
                        //objBEMail.StrTemplateName = BaseClass.EnumEmails.ExamConfirmationProctorFYI.ToString();

                        objBMail.BSendEmail(objBEMail);
                    }
                    catch (Exception ex)
                    {
                        throw ex;
                    }
                }
                else if (Session["Student_ReExam"] != null && Request.QueryString["Type"] == "Schedule")
                {
                    BStudent  objBStudent  = new BStudent();
                    BEStudent objBEStudent = (BEStudent)Session["Student_ReExam"];
                    objBEStudent.dtExam      = Convert.ToDateTime(Request.QueryString["ScheduleDetails"].ToString());
                    objBEStudent.IntTransID  = Convert.ToInt64(lblTransactionID.Text.Trim().ToString());
                    objBEStudent.IntUserID   = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString());
                    objBEStudent.strUserName = Session["EmailID"].ToString();
                    objBEStudent.strTimeZone = Session["SchTime"].ToString();
                    objBStudent.BReScheduleAnExam(objBEStudent);
                    trButtons.Visible     = false;
                    trMessage.Visible     = true;
                    Session["TimeZoneID"] = Session["SchTime"].ToString();
                    switch (Session["SchTime"].ToString())
                    {
                    case "1": Session["TimeZone"] = "CT";
                        break;

                    case "2": Session["TimeZone"] = "ET";
                        break;

                    case "3": Session["TimeZone"] = "PT";
                        break;

                    case "4": Session["TimeZone"] = "MT";
                        break;
                    }
                    LinkButton lblTzone = this.Master.FindControl("lbtnTimeZone") as LinkButton;
                    lblTzone.Text = "[ " + Session["TimeZone"].ToString() + " ]";
                    //lblMsg.Text = "Your Exam is ReScheduled Successfully. An email has been sent to you providing instructions";
                    lblMsg.Text = Resources.ResMessages.Student_ExamdetConfirmReSchedule;

                    try
                    {
                        BEMail objBEMail = new BEMail();
                        BMail  objBMail  = new BMail();
                        objBEMail.IntUserID       = 0;
                        objBEMail.IntTransID      = Convert.ToInt64(lblTransactionID.Text.Trim().ToString());
                        objBEMail.StrTemplateName = BaseClass.EnumEmails.ReScheduleConfirmation.ToString();

                        //objBMail.BSendEmail(objBEMail);
                        //objBEMail.StrTemplateName = BaseClass.EnumEmails.ReScheduleConfirmationProctorFYI.ToString();

                        objBMail.BSendEmail(objBEMail);
                    }
                    catch (Exception ex)
                    {
                        throw ex;
                    }
                    //try
                    //{
                    //    EmailMsg obj = new EmailMsg();
                    //    obj.StudentExamRescheduleReceipt(Convert.ToInt32(AppSecurity.Decrypt(Request.QueryString["ReTransID"].ToString())), objBEStudent.IntUserID, objBEStudent.strUserName);
                    //    obj = null;
                    //}
                    //catch
                    //{
                    //}
                }
            }
            catch (Exception)
            {
                //  ErrorLog.WriteError(Ex);
            }
        }
Example #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            String Bank_Resp_Code = string.Empty;

            if (!IsPostBack)
            {
                if (Request.Form["Bank_Resp_Code"] != null)
                {
                    Bank_Resp_Code = Request.Form["Bank_Resp_Code"].ToString();
                }
                else
                {
                    Bank_Resp_Code = "0";
                }

                if (Bank_Resp_Code == "100")
                {
                    if (Session["BESTUDENT"] != null)
                    {
                        #region CreateTransaction
                        BEStudent objBEStudent = (BEStudent)Session["BESTUDENT"];
                        if (objBEStudent.IntScheduleID == 0)
                        {
                            new BStudent().BStudent_ScheduleExamOnDemand(objBEStudent);
                            lblTransID.Text = objBEStudent.DsResult.Tables[0].Rows[0]["ID"].ToString();
                            try
                            {
                                //if (Session["Isproctorless"] != null)
                                //{

                                //    if (Convert.ToInt32(Session["Isproctorless"]) != 1)
                                //    {
                                BEMail objBEMail = new BEMail();
                                BMail  objBMail  = new BMail();
                                objBEMail.IntUserID       = 0;
                                objBEMail.IntTransID      = Convert.ToInt64(objBEStudent.DsResult.Tables[0].Rows[0]["ID"]);
                                objBEMail.StrTemplateName = BaseClass.EnumEmails.StudentExamReceipt.ToString();
                                objBMail.BSendEmail(objBEMail);
                                //    }
                                //}
                                //else
                                //{
                                //    BEMail objBEMail = new BEMail();
                                //    BMail objBMail = new BMail();
                                //    objBEMail.IntUserID = 0;
                                //    objBEMail.IntTransID = Convert.ToInt32(objBEStudent.DsResult.Tables[0].Rows[0]["ID"]);
                                //    objBEMail.StrTemplateName = BaseClass.EnumEmails.StudentExamReceipt.ToString();
                                //    objBMail.BSendEmail(objBEMail);
                                //}
                            }
                            catch (Exception)
                            {
                            }
                            this.BindExamDetails(Convert.ToInt64(objBEStudent.DsResult.Tables[0].Rows[0]["ID"].ToString()));
                            this.LogPayments(Convert.ToInt64(objBEStudent.DsResult.Tables[0].Rows[0]["ID"].ToString()), objBEStudent.decExamFee + objBEStudent.PerHourFee, objBEStudent.decOnDemandFee);
                            this.GetAllRules(Convert.ToInt64(lblTransID.Text));
                            lblInfo.Text = "<img src='../Images/yes.png'align='middle'/>&nbsp;<font color='#00C000'>" + "Your Exam appointment is successfully scheduled.";
                        }
                        else
                        {
                            new BStudent().BStudent_ReScheduleExamOnDemand(objBEStudent);
                            lblTransID.Text = objBEStudent.IntScheduleID.ToString();
                            try
                            {
                                BEMail objBEMail = new BEMail();
                                BMail  objBMail  = new BMail();
                                objBEMail.IntUserID       = 0;
                                objBEMail.IntTransID      = Convert.ToInt64(objBEStudent.IntScheduleID);
                                objBEMail.StrTemplateName = BaseClass.EnumEmails.ReScheduleConfirmation.ToString();
                                objBMail.BSendEmail(objBEMail);
                            }
                            catch (Exception ex)
                            {
                                throw ex;
                            }
                            this.BindExamDetails(objBEStudent.IntScheduleID);
                            this.LogRePaymentDetails(objBEStudent.IntScheduleID, objBEStudent.decExamFee + objBEStudent.PerHourFee, objBEStudent.decOnDemandFee);
                            this.GetAllRules(Convert.ToInt64(lblTransID.Text));
                            lblInfo.Text = "<img src='../Images/yes.png'align='middle'/>&nbsp;<font color='#00C000'>" + "Your Exam appointment is successfully rescheduled.";
                        }

                        trSuccess.Visible        = true;
                        trSuccessInfo.Visible    = true;
                        trSuccessButtons.Visible = true;
                        trError.Visible          = false;
                        Session["BESTUDENT"]     = null;
                        HideBeginExam();
                        #endregion
                    }
                    else
                    {
                        trSuccess.Visible        = false;
                        trSuccessInfo.Visible    = false;
                        trSuccessButtons.Visible = false;
                        trError.Visible          = true;
                        //HideBeginExam();
                        /* new code*/
                        // trbeginexam.Visible = false;
                        // trPLExam.Visible = false;
                        trSuccessInfo.Visible     = false;
                        trSuccessButtons.Visible  = true;
                        Session["Isproctorless"]  = null;
                        Session["Flowcheck"]      = null;
                        Session["NonProctorExam"] = null;

                        /*new code end*/
                    }
                }
                else
                {
                    trSuccess.Visible        = false;
                    trSuccessInfo.Visible    = false;
                    trSuccessButtons.Visible = false;
                    trError.Visible          = true;
                    //HideBeginExam();
                    /* new code*/
                    //trbeginexam.Visible = false;
                    // trPLExam.Visible = false;
                    trSuccessInfo.Visible     = false;
                    trSuccessButtons.Visible  = true;
                    Session["Isproctorless"]  = null;
                    Session["Flowcheck"]      = null;
                    Session["NonProctorExam"] = null;

                    /*new code end*/
                }
            }
        }
Example #15
0
        protected void Schedule_Reschedule_Click(object sender, EventArgs e)
        {
            if (Session["update"].ToString() == ViewState["update"].ToString())
            {
                if (EditedAppointment == null)
                {
                    Appointment aptToInsert  = GetBasicAppointmentFromForm();
                    BEStudent   objBEStudent = new BEStudent()
                    {
                        IntUserID   = Convert.ToInt32(Session[EnumPageSessions.USERID]),
                        IntCourseID = int.Parse(drpCourse.SelectedValue),
                        IntExamID   = int.Parse(drpExam.SelectedValue),
                        dtExam      = aptToInsert.Start
                    };

                    TimeSpan ts    = objBEStudent.dtExam - DateTime.Now;
                    int      hours = ts.Hours;
                    objBEStudent.intHours = hours;
                    new BStudent().BStudent_GetAmountForDemandSchedule(objBEStudent);
                    decimal amount = objBEStudent.decAmount;

                    Session["StudentExamDetails"] = objBEStudent;
                    Response.Redirect("NewPayment.aspx?Type=F&" + "ExamFeeAmount=" + amount, false);

                    new BStudent().BStudent_OnDemandScheduleExam(objBEStudent);

                    if (objBEStudent.DsResult != null)
                    {
                        if (Convert.ToInt32(objBEStudent.DsResult.Tables[0].Rows[0]["Result"]) == 1)
                        {
                            BEStudent obj = new BEStudent();
                            obj.IntExamID  = Convert.ToInt32(drpExam.SelectedValue);
                            obj.IntTransID = 0;
                            BStudent obj1 = new BStudent();
                            obj1.BGetExamStartEndDates(obj);
                            string StartDate = string.Empty;
                            string EndDate   = string.Empty;
                            if (obj.DtResult != null && obj.DtResult.Rows.Count > 0)
                            {
                                StartDate = obj.DtResult.Rows[0]["ExamStartDate"].ToString();
                                EndDate   = obj.DtResult.Rows[0]["ExamEndDate"].ToString();
                            }
                            lblMsg.Text = "<img src='../Images/no.png'align='middle'/>&nbsp;<font color='red'>" + "\"" + drpCourse.SelectedItem.Text.ToString() + "- " + drpExam.SelectedItem.Text.ToString() + "\"" + Resources.ResMessages.Schedule_ExamStartEndDateValidation + " " + StartDate + " and " + EndDate + "</font>";
                        }
                        else if (Convert.ToInt32(objBEStudent.DsResult.Tables[0].Rows[0]["Result"]) == 2)
                        {
                            lblMsg.Text = "<img src='../Images/no.png'align='middle'/>&nbsp;<font color='red'>" + Resources.ResMessages.Schedule_24hoursValidation + "</font>";
                        }
                        else if (Convert.ToInt32(objBEStudent.DsResult.Tables[0].Rows[0]["Result"]) == 3)
                        {
                            lblMsg.Text = "<img src='../Images/no.png'align='middle'/>&nbsp;<font color='red'>" + Resources.ResMessages.Schedule_PriorDateValidation + "</font>";
                        }
                        else if (Convert.ToInt32(objBEStudent.DsResult.Tables[0].Rows[0]["Result"]) == 4)
                        {
                            lblMsg.Text = "<img src='../Images/yes.png' align='middle'/>&nbsp;<font color='#00C000'>" + Resources.ResMessages.Schedule_Confirmation + " " + objBEStudent.DsResult.Tables[0].Rows[0]["ID"] + Resources.ResMessages.Schedule_Confirmation1 + "</font>";
                        }
                        else if (Convert.ToInt32(objBEStudent.DsResult.Tables[0].Rows[0]["Result"]) == 5)
                        {
                            lblMsg.Text = "<img src='../Images/no.png'align='middle'/>&nbsp;<font color='red'>" + Resources.ResMessages.Schedule_TimeWindowValidation + "</font>";
                        }
                        else if (Convert.ToInt32(objBEStudent.DsResult.Tables[0].Rows[0]["Result"]) == 6)
                        {
                            objBEStudent.IntExamID   = Convert.ToInt32(drpExam.SelectedValue);
                            objBEStudent.IntUserID   = Convert.ToInt32(Session[EnumPageSessions.USERID]);
                            objBEStudent.IntCourseID = Convert.ToInt32(drpCourse.SelectedValue);
                            new BStudent().BGetExamScheduledDate(objBEStudent);
                            if (objBEStudent.DtResult != null && objBEStudent.DtResult.Rows.Count > 0)
                            {
                                lblMsg.Text = "<img src='../Images/no.png'align='middle'/>&nbsp;<font color='red'>" + "\"" + drpCourse.SelectedItem.Text.ToString() + "- " + drpExam.SelectedItem.Text.ToString() + "\" " + Resources.ResMessages.Student_ExamAlreadyExists + " " + objBEStudent.DtResult.Rows[0]["ExamDate"].ToString() + " at " + objBEStudent.DtResult.Rows[0]["Time"].ToString() + "</font>";
                            }
                            else
                            {
                                lblMsg.Text = "<img src='../Images/no.png'align='middle'/>&nbsp;<font color='red'>" + "\"" + drpCourse.SelectedItem.Text.ToString() + "- " + drpExam.SelectedItem.Text.ToString() + "\"" + Resources.ResMessages.Student_ExamAlreadyExistsElse + "</font>";
                            }
                        }
                    }

                    try
                    {
                        BEMail objBEMail = new BEMail();
                        BMail  objBMail  = new BMail();
                        objBEMail.IntUserID       = 0;
                        objBEMail.IntTransID      = Convert.ToInt64(objBEStudent.DsResult.Tables[0].Rows[0]["ID"]);
                        objBEMail.StrTemplateName = BaseClass.EnumEmails.StudentExamReceipt.ToString();

                        //objBMail.BSendEmail(objBEMail);
                        //objBEMail.StrTemplateName = BaseClass.EnumEmails.ExamConfirmationProctorFYI.ToString();
                        // objBMail.BSendEmail(objBEMail);
                    }
                    catch (Exception ex)
                    {
                        throw ex;
                    }
                }
                else
                {
                    Appointment aptOriginal  = EditedAppointment;
                    Appointment aptToUpdate  = GetAppointmentFromForm(aptOriginal.Clone());
                    BEStudent   objBEStudent = new BEStudent()
                    {
                        IntUserID      = Convert.ToInt32(Session[EnumPageSessions.USERID]),
                        IntScheduleID  = Convert.ToInt32(aptToUpdate.ID.ToString()),
                        dtExam         = aptToUpdate.Start,
                        strDescription = aptToUpdate.Description
                    };
                    new BStudent().BStudent_UpdateScheduleExam(objBEStudent);
                    if (objBEStudent.DsResult != null)
                    {
                        if (Convert.ToInt32(objBEStudent.DsResult.Tables[0].Rows[0]["Result"]) == 1)
                        {
                            BEStudent obj = new BEStudent();
                            obj.IntExamID  = 0;
                            obj.IntTransID = Convert.ToInt64(aptToUpdate.ID.ToString());
                            BStudent obj1 = new BStudent();
                            obj1.BGetExamStartEndDates(obj);
                            string StartDate = string.Empty;
                            string EndDate   = string.Empty;
                            if (obj.DtResult != null && obj.DtResult.Rows.Count > 0)
                            {
                                StartDate = obj.DtResult.Rows[0]["ExamStartDate"].ToString();
                                EndDate   = obj.DtResult.Rows[0]["ExamEndDate"].ToString();
                            }

                            lblMsg.Text = "<img src='../Images/no.png'align='middle'/>&nbsp;<font color='red'>" + Resources.ResMessages.Reschedule_ExamStartEndDateValidation + " " + StartDate + " and " + EndDate + "</font>";

                            //lblMsg.Text = "<img src='../Images/no.png'align='middle'/>&nbsp;<font color='red'><b>" + Resources.ResMessages.Reschedule_ExamStartEndDateValidation + "</b></font>";
                        }
                        else if (Convert.ToInt32(objBEStudent.DsResult.Tables[0].Rows[0]["Result"]) == 2)
                        {
                            lblMsg.Text = "<img src='../Images/no.png'align='middle'/>&nbsp;<font color='red'>" + Resources.ResMessages.Reschedule_24hoursValidation + "</font>";
                        }
                        else if (Convert.ToInt32(objBEStudent.DsResult.Tables[0].Rows[0]["Result"]) == 3)
                        {
                            lblMsg.Text = "<img src='../Images/no.png'align='middle'/>&nbsp;<font color='red'>" + Resources.ResMessages.Reschedule_PriorDateValidation + "</font>";
                        }
                        else if (Convert.ToInt32(objBEStudent.DsResult.Tables[0].Rows[0]["Result"]) == 4)
                        {
                            // lblMsg.Text = "<img src='../Images/yes.png' align='middle'/>&nbsp;<font color='#00C000'><b>" + Resources.ResMessages.Reschedule_Confirmation + "</b></font>";
                            lblMsg.Text = "<img src='../Images/yes.png' align='middle'/>&nbsp;<font color='#00C000'>" + Resources.ResMessages.Reschedule_Confirmation + " " + aptToUpdate.ID.ToString() + Resources.ResMessages.Reschedule_Confirmation1 + "</font>";
                        }
                        else if (Convert.ToInt32(objBEStudent.DsResult.Tables[0].Rows[0]["Result"]) == 5)
                        {
                            lblMsg.Text = "<img src='../Images/no.png'align='middle'/>&nbsp;<font color='red'>" + Resources.ResMessages.Reschedule_TimeWindowValidation + "</font>";
                        }
                        else if (Convert.ToInt32(objBEStudent.DsResult.Tables[0].Rows[0]["Result"]) == 6)
                        {
                            lblMsg.Text = "<img src='../Images/no.png'align='middle'/>&nbsp;<font color='red'>" + Resources.ResMessages.Reschedule_ExamProgressValidation + "</font>";
                        }
                    }

                    try
                    {
                        BEMail objBEMail = new BEMail();
                        BMail  objBMail  = new BMail();
                        objBEMail.IntUserID       = 0;
                        objBEMail.IntTransID      = Convert.ToInt64(aptToUpdate.ID.ToString());
                        objBEMail.StrTemplateName = BaseClass.EnumEmails.ReScheduleConfirmation.ToString();

                        //objBMail.BSendEmail(objBEMail);
                        //objBEMail.StrTemplateName = BaseClass.EnumEmails.ReScheduleConfirmationProctorFYI.ToString();

                        objBMail.BSendEmail(objBEMail);
                    }
                    catch (Exception ex)
                    {
                        throw ex;
                    }
                }

                lblCourse.Text = string.Empty;
                //lblExam.Text = string.Empty;
                EditedAppointmentID = "";
                Bind_GetBookedExamSlots();
                Session["update"] = Server.UrlEncode(System.DateTime.Now.ToString());
            }
            else
            {
                lblMsg.Text = string.Empty;
            }
        }