protected void btnSaveTimeZone_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                BUser  objBUser  = new BUser();
                BEUser objBEUser = new BEUser();
                objBEUser.StrFirstName = txtFirstName.Text;
                objBEUser.StrLastName  = txtLastName.Text;
                objBEUser.StrEmail     = txtEmail.Text;
                //objBEUser.StrGender = ddlGender.SelectedValue;

                objBEUser.strTimeZone = ddlTimeZone.SelectedValue;
                objBEUser.IntUserID   = Convert.ToInt32(Session[EnumPageSessions.USERID]);

                objBUser.BUpdateTimeZone(objBEUser);

                if (objBEUser.IntResult == 1)
                {
                    Session["TimeZoneID"] = ddlTimeZone.SelectedValue.ToString();
                    Session["TimeZone"]   = ddlTimeZone.SelectedItem.Text.ToString();
                    LinkButton lbtnTimeZone = this.Master.FindControl("lbtnTimeZone") as LinkButton;
                    //Label lblDate = this.Master.FindControl("lblDate") as Label;

                    //lbtnTimeZone.Text = "[ " + Session["TimeZone"].ToString() + " ]";
                    BECommon objBECommon = new BECommon();
                    BCommon  objBCommon  = new BCommon();
                    objBECommon.iTimeZoneID = Convert.ToInt32(Session["TimeZoneID"]);
                    objBCommon.BGetTimeDelay(objBECommon);
                    //lblDate.Text = "Date: " + DateTime.UtcNow.AddMinutes(objBECommon.IntResult).ToString();
                    //lblsucc.Text = "Time Zone has been updated successfully.";
                    string[] strtimezone = Session["TimeZone"].ToString().Split('(');
                    lbtnTimeZone.Text   = strtimezone[0].ToString() + " : " + DateTime.UtcNow.AddMinutes(objBECommon.IntResult).ToString("MM/dd/yyyy HH:mm tt");
                    Session["UserName"] = txtFirstName.Text + " " + txtLastName.Text + " [ Auditor ]";
                    Label lblUserName = this.Master.FindControl("lblUser") as Label;
                    lblUserName.Text = txtFirstName.Text + " " + txtLastName.Text + " [ Auditor ]";

                    lblsucc.Text = "<img src='../Images/yes.png' align='middle'/>&nbsp;<font color='#00C000'>" + Resources.ResMessages.MyProfile_TimeZoneUpdateSuccess + "</font>";
                }
                else
                {
                    lblsucc.Text = "<img src='../Images/no.png'align='middle'/>&nbsp;<font color='red'>" + Resources.ResMessages.MyProfile_TimeZoneUpdateFailed + "</font>";
                }
                BindTimeZone();
                //BindGender();
                BindDemographicDetails();
                lblTimeZone.Visible  = true;
                lblFirstName.Visible = true;
                lblLastName.Visible  = true;
                lblEmail.Visible     = true;
                //lblGender.Visible = true;
                ddlTimeZone.Visible = false;
                //ddlGender.Visible = false;
                txtFirstName.Visible   = false;
                txtLastName.Visible    = false;
                txtEmail.Visible       = false;
                tdSaveTimeZone.Visible = false;
                tdEditTimeZon.Visible  = true;
                // Response.Redirect("myprofile.aspx");
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session[BaseClass.EnumPageSessions.USERID] != null)
            {
                lblUser.Text = Session["UserName"].ToString();
            }
            else
            {
                Response.Redirect(BaseClass.EnumAppPage.LOGIN, false);
            }

            if (Session["TimeZone"] != null)
            {
                //lblDate.Text = "Date: " + CommonFunctions.GetTime(DateTime.UtcNow, Session["TimeZone"].ToString()).ToString();
                BECommon objBECommon = new BECommon();
                BCommon  objBCommon  = new BCommon();
                objBECommon.iTimeZoneID = Convert.ToInt32(Session["TimeZoneID"]);
                objBCommon.BGetTimeDelay(objBECommon);
                lblDate.Text      = "Date: " + DateTime.UtcNow.AddMinutes(objBECommon.IntResult).ToString();
                lbtnTimeZone.Text = "[ " + Session["TimeZone"].ToString() + " ]";
                // lblTimeZone.Text = "[ <b>Time Zone : </b>" + Session["TimeZone"].ToString() + " ]";
            }


            else
            {
                Response.Redirect(BaseClass.EnumAppPage.LOGIN, false);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BECommon objBECommon = new BECommon();
                BCommon  objBCommon  = new BCommon();
                objBECommon.iTimeZoneID = Convert.ToInt32(Session["TimeZoneID"].ToString());
                objBCommon.BGetTimeDelay(objBECommon);
                dtpstartdate.SelectedDate = DateTime.UtcNow.AddMinutes(objBECommon.IntResult);
                dtpEnddate.SelectedDate   = DateTime.UtcNow.AddMinutes(objBECommon.IntResult);
            }

            this.Page.Title = EnumPageTitles.APPNAME + EnumPageTitles.EXAMPROVIDER_EXAMPROVIDERREPORTS;
            ((LinkButton)this.Page.Master.FindControl("lnkReports")).CssClass = "main_menu_active";

            if (Request.QueryString != null && Request.QueryString.ToString() != null)
            {
                int intReportID = Convert.ToInt32(AppSecurity.Decrypt(Request.QueryString["ReportID"].ToString()));
                int intTypeID   = Convert.ToInt32(AppSecurity.Decrypt(Request.QueryString["ReportTypeID"].ToString()));


                if (intTypeID == 1)
                {
                    trSearchCriteria1.Visible = true;
                    // trSearchCriteria2.Visible = false;
                }
                else
                {
                    trSearchCriteria1.Visible = false;
                    // trSearchCriteria2.Visible = true;
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session[BaseClass.EnumPageSessions.USERID] != null)
            {
                lblUser.Text = Session["UserName"].ToString();
            }
            else
            {
                Response.Redirect(BaseClass.EnumAppPage.LOGIN, false);
            }

            if (Session["RoleID"].ToString() != "4")
            {
                Response.Redirect(BaseClass.EnumAppPage.ERRORMESSAGE, true);
            }

            if (Session["TimeZone"] != null)
            {
                BECommon objBECommon = new BECommon();
                BCommon  objBCommon  = new BCommon();
                objBECommon.iTimeZoneID = Convert.ToInt32(Session["TimeZoneID"]);
                objBCommon.BGetTimeDelay(objBECommon);
                //lblDate.Text = "Date: " + CommonFunctions.GetTime(DateTime.UtcNow, Session["TimeZone"].ToString()).ToString();
                //lblDate.Text = "Date: " + DateTime.UtcNow.AddMinutes(objBECommon.IntResult).ToString();
                //lbtnTimeZone.Text = "[ " + Session["TimeZone"].ToString() + " ]";
                //lblTimeZone.Text = "[ <b>Time Zone : </b>" + Session["TimeZone"].ToString() + " ]";
                string[] strtimezone = Session["TimeZone"].ToString().Split('(');
                lbtnTimeZone.Text = strtimezone[0].ToString() + " : " + DateTime.UtcNow.AddMinutes(objBECommon.IntResult).ToString("MM/dd/yyyy HH:mm tt");
            }
            else
            {
                Response.Redirect(BaseClass.EnumAppPage.LOGIN, false);
            }
        }
        public DateTime GetUserCurrentTime()
        {
            BECommon objBECommon = new BECommon();
            BCommon  objBCommon  = new BCommon();

            objBECommon.iTimeZoneID = Convert.ToInt32(Session["TimeZoneID"]);
            objBCommon.BGetTimeDelay(objBECommon);
            return(DateTime.Parse(DateTime.UtcNow.AddMinutes(objBECommon.IntResult).ToString("MM/dd/yyyy HH:mm tt")));
        }
        protected void btnSaveTimeZone_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                BUser  objBUser  = new BUser();
                BEUser objBEUser = new BEUser();
                objBEUser.StrFirstName   = txtFirstName.Text;
                objBEUser.StrLastName    = txtLastName.Text;
                objBEUser.StrEmail       = txtEmail.Text;
                objBEUser.strPhoneNumber = txtPhoneNumber.Text;
                objBEUser.strTimeZone    = ddlTimeZone.SelectedValue;
                objBEUser.IntUserID      = Convert.ToInt32(Session[EnumPageSessions.USERID]);
                //11sep2017----removing plus sign from the country code
                string[] ArrCodes = null;
                if (!string.IsNullOrEmpty(txtCountryCode.Text))
                {
                    ArrCodes = txtCountryCode.Text.Split('+');
                }

                if (ArrCodes != null)
                {
                    objBEUser.CountryCode = ArrCodes[0];
                }


                objBUser.BUpdateTimeZone(objBEUser);

                if (objBEUser.IntResult == 1)
                {
                    Session["TimeZoneID"] = ddlTimeZone.SelectedValue.ToString();
                    Session["TimeZone"]   = ddlTimeZone.SelectedItem.Text.ToString();
                    LinkButton lbtnTimeZone = this.Master.FindControl("lbtnTimeZone") as LinkButton;
                    BECommon   objBECommon  = new BECommon();
                    BCommon    objBCommon   = new BCommon();
                    objBECommon.iTimeZoneID = Convert.ToInt32(Session["TimeZoneID"]);
                    objBCommon.BGetTimeDelay(objBECommon);
                    string[] strtimezone = Session["TimeZone"].ToString().Split('(');
                    lbtnTimeZone.Text   = strtimezone[0].ToString() + " : " + DateTime.UtcNow.AddMinutes(objBECommon.IntResult).ToString("MM/dd/yyyy hh:mm tt");
                    Session["UserName"] = txtFirstName.Text + " " + txtLastName.Text + " [ Student ]";
                    Label lblUserName = this.Master.FindControl("lblUser") as Label;
                    lblUserName.Text = txtFirstName.Text + " " + txtLastName.Text + " [ Student ]";
                    lblsucc.Text     = "<img src='../Images/yes.png' align='middle'/>&nbsp;<font color='#00C000'>" + Resources.ResMessages.MyProfile_TimeZoneUpdateSuccess + "</font>";
                }
                else
                {
                    lblsucc.Text = "<img src='../Images/no.png'align='middle'/>&nbsp;<font color='red'>" + Resources.ResMessages.MyProfile_TimeZoneUpdateFailed + "</font>";
                }
                BindTimeZone();
                BindDemographicDetails();
                lblformat.Visible         = false;
                trDemographicEdit.Visible = false;
                trDemographicView.Visible = true;
                this.ValidatePhotoIdentity();
                ScriptManager.RegisterStartupScript(this, this.GetType(), "NotSaved", "document.getElementById('" + lblsucc.ClientID.ToString() + "').focus();", true);
            }
        }
示例#7
0
        protected void btnUpload_Click(object sender, EventArgs e)
        {
            //new code added by adarsh for video playeer tag
            if (Session["IsHmlCompliant"].ToString() == "Yes")
            {
                Session["CapturedBytes"] = Convert.FromBase64String(txtimgvalue.Value);
            }


            if (Session["CapturedBytes"] != null)
            {
                byte[] bytes = Session["CapturedBytes"] as byte[];


                if (transID != 0)
                {
                    BECommon objBECommon = new BECommon();
                    BCommon  objBCommon  = new BCommon();

                    objBECommon.iTimeZoneID = Convert.ToInt32(Session["TimeZoneID"].ToString());
                    objBCommon.BGetTimeDelay(objBECommon);
                    string SavedTime = DateTime.UtcNow.AddMinutes(objBECommon.IntResult).ToString("MM/dd/yyyy hh:mm tt");

                    lblError.Visible = true;

                    objBECommon.IntTransID = transID;
                    objBECommon.image      = bytes;
                    objBECommon.strTime    = SavedTime;
                    objBCommon.BSaveTransImage(objBECommon);
                    if (objBECommon.IntstatusFlag == 1)
                    {
                        lblError.Text      = "Your picture has been saved successfully! Click " + "<b>&#34;Next&#34;</b> to proceed.";
                        lblError.ForeColor = System.Drawing.Color.Green;
                        btnProceed.Visible = true;
                        // Response.Redirect("ExamProcess.aspx?TransID=" + AppSecurity.Encrypt(transID.ToString()), false);
                    }
                    else
                    {
                        lblError.Text      = "Error in saving Image.";
                        lblError.ForeColor = System.Drawing.Color.Red;
                    }
                }
                else
                {
                    lblError.Text      = "Error in uploading Image.";
                    lblError.ForeColor = System.Drawing.Color.Red;
                }

                Session["CapturedBytes"] = null;
                //Session["TransID"] = null;
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         this.Page.Title = EnumPageTitles.APPNAME + EnumPageTitles.PROCTOR_VALIDATESTUDENTIDENTITY;
         ((LinkButton)this.Page.Master.FindControl("lnkValidate")).CssClass = "main_menu_active";
         //calDate.SelectedDate = DateTime.Now;
         BECommon objBECommon = new BECommon();
         BCommon objBCommon = new BCommon();
         objBECommon.iTimeZoneID = Convert.ToInt32(Session["TimeZoneID"]);
         objBCommon.BGetTimeDelay(objBECommon);
         calDate.SelectedDate = DateTime.UtcNow.AddMinutes(objBECommon.IntResult);
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         BECommon objBECommon = new BECommon();
         BCommon  objBCommon  = new BCommon();
         objBECommon.iTimeZoneID = Convert.ToInt32(Session["TimeZoneID"]);
         objBCommon.BGetTimeDelay(objBECommon);
         txtFromDate.SelectedDate = DateTime.UtcNow.AddMinutes(objBECommon.IntResult);
         txtToDate.SelectedDate   = DateTime.UtcNow.AddMinutes(objBECommon.IntResult);
         LoadCourseDetails();
         gvReports.DataSource = new object[] { };
         gvReports.DataBind();
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BECommon objBECommon = new BECommon();
                BCommon  objBCommon  = new BCommon();
                objBECommon.iTimeZoneID = Convert.ToInt32(Session["TimeZoneID"].ToString());
                objBCommon.BGetTimeDelay(objBECommon);
                dtpstartdate.SelectedDate = DateTime.UtcNow.AddMinutes(objBECommon.IntResult);
                dtpEnddate.SelectedDate   = DateTime.UtcNow.AddMinutes(objBECommon.IntResult);
                btnInvoice.Visible        = false;
                string monthselect = DateTime.Today.Month.ToString();
                string yrselect    = DateTime.Today.Year.ToString();
                ddlMonths.FindItemByValue(monthselect).Selected = true;
                ddlYear.FindItemByText(yrselect).Selected       = true;
            }

            this.Page.Title = EnumPageTitles.APPNAME + EnumPageTitles.Auditor_AuditorREPORTS;
            ((LinkButton)this.Page.Master.FindControl("lnkReports")).CssClass = "main_menu_active";

            if (Request.QueryString != null && Request.QueryString.ToString() != null)
            {
                int intReportID = Convert.ToInt32(AppSecurity.Decrypt(Request.QueryString["ReportID"].ToString()));
                int intTypeID   = Convert.ToInt32(AppSecurity.Decrypt(Request.QueryString["ReportTypeID"].ToString()));


                if (intTypeID == 1)
                {
                    trSearchCriteria1.Visible = true;
                    trSearchCriteria2.Visible = false;
                    trSearchCriteria3.Visible = false;
                }
                else if (intTypeID == 2)
                {
                    trSearchCriteria1.Visible = false;
                    trSearchCriteria2.Visible = true;
                    trSearchCriteria3.Visible = false;
                }
                else if (intTypeID == 3)
                {
                    trSearchCriteria1.Visible = false;
                    trSearchCriteria2.Visible = false;
                    trSearchCriteria3.Visible = true;
                    btnInvoice.Visible        = true;
                }
            }
        }
示例#11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lnkHome.Focus();
            }

            if (Session[BaseClass.EnumPageSessions.USERID] != null)
            {
                lblUser.Text = Session["UserName"].ToString();
            }
            else
            {
                Response.Redirect(BaseClass.EnumAppPage.LOGIN);
            }


            if (Session["RoleID"].ToString() != "6")
            {
                Response.Redirect(BaseClass.EnumAppPage.ERRORMESSAGE, true);
            }


            //lblDate.Text = "Date: " + CommonFunctions.GetTime(DateTime.UtcNow,Session["TimeZone"].ToString()).ToString();
            BECommon objBECommon = new BECommon();
            BCommon  objBCommon  = new BCommon();

            objBECommon.iTimeZoneID = Convert.ToInt32(Session["TimeZoneID"].ToString());
            objBCommon.BGetTimeDelay(objBECommon);
            //lblDate.Text = "Date: " + CommonFunctions.GetTime(DateTime.UtcNow, Session["TimeZone"].ToString()).ToString();
            //lblDate.Text = "Date: " + DateTime.UtcNow.AddMinutes(objBECommon.IntResult).ToString();
            //lbtnTimeZone.Text = "[ " + Session["TimeZone"].ToString() + " ]";
            string[] strtimezone = Session["TimeZone"].ToString().Split('(');
            lbtnTimeZone.Text = strtimezone[0].ToString() + ":" + DateTime.UtcNow.AddMinutes(objBECommon.IntResult).ToString("MM/dd/yyyy hh:mm tt");
            //lblTimeZone.Text = "[ <b>Time Zone : </b>" + Session["TimeZone"].ToString() + " ]";
            // lbtnTimeZone.Text = strtimezone[0].ToString();

            //lblDate.Text = DateTime.UtcNow.AddMinutes(objBECommon.IntResult).ToString("MM/dd/yyyy hh:mm:ss tt");
            BEStudent objBEStudent = new BEStudent();
            BStudent  objBStudent  = new BStudent();

            objBEStudent.IntUserID     = Convert.ToInt32(Session[SecureProctor.BaseClass.EnumPageSessions.USERID].ToString());
            objBEStudent.IntProviderID = 0;
            objBEStudent.strExamName   = string.Empty;
            objBStudent.BGetStudentTransactions(objBEStudent);
            if (objBEStudent.DtResult.Rows.Count > 0)
            {
                if (Convert.ToBoolean(objBEStudent.DtResult.Rows[0]["StudentUploadFeature"]) == false)
                {
                    lnkUploadfiles.Visible = false;
                }
                else
                {
                    lnkUploadfiles.Visible = true;
                }
            }
            if (this.Page.GetType().Name.ToString() == "student_myprofile_aspx")
            {
                ((Label)this.FindControl("StudentContent").FindControl("lblHeader1")).Focus();
            }
            else if (this.Page.GetType().Name.ToString() == "student_scheduleexam_aspx" || this.Page.GetType().Name.ToString() == "student_examtools_aspx" || this.Page.GetType().Name.ToString() == "student_examuploadfiles_aspx")
            {
                ((Image)this.FindControl("StudentContent").FindControl("imgHead")).Focus();
            }
            else if (this.Page.GetType().Name.ToString() == "student_myexams_aspx" || this.Page.GetType().Name.ToString() == "student_startanexam_aspx" || this.Page.GetType().Name.ToString() == "student_examprocess_aspx")
            {
                ((Image)this.FindControl("StudentContent").FindControl("imgHead")).Focus();
            }
        }