Exemple #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session[Decrypt(Request.QueryString["SessionId"])].ToString() != "")
     {
         if (Request.QueryString["SessionId"] != null)
         {
             DataTable dt = TransactionBOL.Select_ShowDetails(Convert.ToInt64(Decrypt(Request.QueryString["SessionId"].ToString())));
             Session_value     = dt.Rows[0]["Seat_Val"].ToString();
             sessionvalue      = Session_value.Split(',');
             trnsectioncounter = sessionvalue[12];
         }
     }
     if (!IsPostBack)
     {
         set_seatLayout();
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write(Decrypt(Request.QueryString["SessionId"]));
        agent = Session["Agent"].ToString();
        if (Session[Decrypt(Request.QueryString["SessionId"])].ToString() != "")
        {
            Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write(Decrypt(Request.QueryString["SessionId"]));
            if (Request.QueryString["SessionId"] != null || Request.QueryString["SessionId"] != "")
            {
                Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write(Decrypt(Request.QueryString["SessionId"]));
                DataTable dtseatval = TransactionBOL.Select_ShowDetails(Convert.ToInt64(Decrypt(Request.QueryString["SessionId"].ToString())));
                Session_value = dtseatval.Rows[0]["Seat_Val"].ToString();
                sessionvalue  = Session_value.Split(',');
                SeatVal       = dtseatval.Rows[0]["Seat_Info"].ToString();
                hotel         = sessionvalue[10];
            }
        }
        else
        {
            Session.Clear();
            Response.Redirect("Default.aspx", false);
        }
        //*******************Promo**************************//
        decimal TotalAmount = 0;
        bool    isfilled    = false;

        if (Request.QueryString["SessionId"] != null || Request.QueryString["SessionId"].ToString() != "")
        {
            //BookingID = long.Parse(Session["Seat_TransactionID"].ToString());
            //TotalAmount = GTICKBOL.Get_SeatPrice_SeatKeyNoWise(BookingID);
            //Session["TotalAmount"] = decimal.Truncate(TotalAmount);
            string[] strarr = null;
            if (Session_value != "")
            {
                strarr   = Session_value.Split(',');
                isfilled = false;
            }
            if (strarr.Length < 6)
            {
                throw new Exception("Contact details page loading cannot be done as session value is no valid Session: " + (isfilled ? Session_value : Session_value));
            }
            string category        = strarr[8].ToString();
            string SingleSeatPrice = strarr[9].ToString().Split('.')[1].ToString();
            TotalAmount            = Convert.ToDecimal(strarr[9].ToString().Split('.')[1].ToString()) * Convert.ToDecimal(strarr[5].ToString());
            Session["TotalAmount"] = decimal.Truncate(TotalAmount);
            string   ShowDate = "";
            string[] datarr   = strarr[2].ToString().Split('/');      //for live server
            ShowDate = datarr[1] + "/" + datarr[0] + "/" + datarr[2]; //for live server

            //string[] datarr = strarr[2].ToString().Split('-');// for dev/local
            //ShowDate = datarr[0] + "/" + datarr[1] + "/" + datarr[2]; // for dev/local

            string day = Convert.ToDateTime(ShowDate).DayOfWeek.ToString().ToUpper();
            //ShowDate = datarr[1] + "/" + datarr[0] + "/" + datarr[2];//for local
            Session["day"] = day;
            if (strarr[10].ToString() == "")
            {
                lblttlAmt.Visible = true;
                lblttlAmt.Text    = "Total Payable Amount : Rs. " + Session["TotalAmount"].ToString();
            }
        }
        else
        {
            lblttlAmt.Visible = false;
            lblpayAmt.Visible = false;
            if (sessionvalue[12] != null)
            {
                String KeyNo = Decrypt(sessionvalue[12]);
                GTICKBOL.ON_Session_out(KeyNo);
            }
            Response.Redirect("Default.aspx", false);
        }
    }