示例#1
0
        protected void btnUpload_Click(object sender, EventArgs e)
        {
            //new code added by adarsh for video playeer tag
            if (Session["IsHmlCompliant"].ToString() == "Yes")
            {
                Session["CapturedIDBytes"] = Convert.FromBase64String(txtimgvalue.Value);
            }


            if (Session["CapturedIDBytes"] != null)
            {
                byte[] bytes = Session["CapturedIDBytes"] 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.BSaveTransIDImage(objBECommon);
                    if (objBECommon.IntstatusFlag == 1)
                    {
                        lblError.Text      = "Your ID 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 uploading Image.";
                        lblError.ForeColor = System.Drawing.Color.Red;
                    }
                }
                else
                {
                    lblError.Text      = "Error in uploading Image.";
                    lblError.ForeColor = System.Drawing.Color.Red;
                }

                Session["CapturedIDBytes"] = null;
                //Session["TransID"] = null;
            }
        }