protected void PayNow_btn_Click(object sender, EventArgs e)
        {
            try
            {
                bh = new BussinessHandler();

                Button      btn         = (Button)sender;
                GridViewRow selectedRow = (GridViewRow)btn.NamingContainer;
                int         orderid     = Convert.ToInt32(selectedRow.Cells[0].Text);
                int         status      = bh.PayInstallment(orderid);
                if (status == 0)
                {
                    Response.Write("<script>alert('Payment Failed')</script>");
                }
                else
                {
                    Response.Write("<script>alert('Payment Successful')</script>");
                }

                allEMI_dt = bh.GetAllEMIHistory(username);
                FillActiveEMITable();
                FillOrderHistory(username);
            }
            catch (Exception ex)
            {
                string errormessage = ex.Message;
                Response.Write("<script>alert('Error During Payment :" + errormessage + "');</script>");
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                this.UnobtrusiveValidationMode = UnobtrusiveValidationMode.None;

                //Session["Username"] = "******";
                #region usersession
                Label lblLogin = (Label)Page.Master.FindControl("Label1");
                if (!Session.IsNewSession)
                {
                    lblLogin.Text = Session["Username"].ToString();
                }
                else
                {
                    lblLogin.Text = "NONE";
                }

                #endregion

                pnlPopup.Visible = false;

                username = Session["Username"].ToString();

                FillUserCardInfo(username);

                FillOrderHistory(username);

                allEMI_dt = bh.GetAllEMIHistory(username);

                FillActiveEMITable();

                Fetch();
            }
            catch (Exception ex)
            {
                string errormessage = ex.Message;
                Response.Write("<script>alert('Session Expired :" + errormessage + "');</script>");
                Response.Redirect("Index.aspx");
            }
        }