protected void Page_Load(object sender, EventArgs e)
 {
     if (!checkCookie())
         Response.Redirect("Login.aspx");
     this.UnobtrusiveValidationMode = System.Web.UI.UnobtrusiveValidationMode.None;
     if (!IsPostBack)
         Wizard1.ActiveStepIndex = 0;
     Panel2.Visible = false;
     Panel3.Visible = false;
     String customerUsername = Request.Cookies["Car-Trading"]["Username"].ToString();
     DatabaseHandler obj = new DatabaseHandler();
     DataSet ds = obj.GetCustomerAddressPhone(customerUsername);
     String customerAddress = ds.Tables[0].Rows[0]["CUSTOMER_ADDRESS"].ToString();
     Label1.Text = customerAddress;
     String carId = Request.QueryString["carId"].ToString();
     String sellerId = Request.QueryString["sellerId"].ToString();
     EncryptDecrypt obj1 = new EncryptDecrypt();
     carId = obj1.Decrypt(HttpUtility.UrlDecode(carId));
     sellerId = obj1.Decrypt(HttpUtility.UrlDecode(sellerId));
     ds = obj.GetSellerName(sellerId);
     Label2.Text = ds.Tables[0].Rows[0]["SELLER_NAME"].ToString();
     ds = obj.GetCarInfo(carId);
     Label3.Text = ds.Tables[0].Rows[0]["CAR_BRAND"].ToString();
     Label4.Text = ds.Tables[0].Rows[0]["CAR_MODEL_NAME"].ToString();
     Label5.Text = ds.Tables[0].Rows[0]["CAR_MODEL_NUMBER"].ToString();
     Label6.Text = ds.Tables[0].Rows[0]["CAR_POSSESSION_TYPE"].ToString();
     Label7.Text = ds.Tables[0].Rows[0]["CAR_PRICE"].ToString();
     Label13.Text = Label2.Text;
     Label14.Text = Label7.Text;
     ImageButton1.ImageUrl = "~\\Car\\Front\\" + Path.GetFileName(ds.Tables[0].Rows[0]["CAR_FRONT_IMAGE"].ToString());
     ImageButton1.Width = 150;
     ImageButton1.Height = 150;
 }
 protected void Wizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e)
 {
     DatabaseHandler obj = new DatabaseHandler();
     String customerUsername = Request.Cookies["Car-Trading"]["Username"].ToString();
     DataSet ds = obj.GetCustomerName(customerUsername);
     String customerName = ds.Tables[0].Rows[0]["CUSTOMER_FIRST_NAME"].ToString() + " " + ds.Tables[0].Rows[0]["CUSTOMER_LAST_NAME"].ToString();
     Label18.Text = customerName;
     ds = obj.GetCustomerAddressPhone(customerUsername);
     String customerAddress = ds.Tables[0].Rows[0]["CUSTOMER_ADDRESS"].ToString();
     Label19.Text = customerAddress;
     Label20.Text = ds.Tables[0].Rows[0]["CUSTOMER_PHONE_NUMBER"].ToString();
     Label22.Text = Label3.Text;
     Label23.Text = Label5.Text;
     Label24.Text = Label4.Text;
     Label25.Text = Label7.Text;
     Label26.Text = Label13.Text;
     Label27.Text = TextBox7.Text;
     Label28.Text = RadioButtonList1.Text;
     String carId = Request.QueryString["carId"].ToString();
     String sellerId = Request.QueryString["sellerId"].ToString();
     String customerId = Request.QueryString["customerId"].ToString();
     EncryptDecrypt obj1 = new EncryptDecrypt();
     carId = obj1.Decrypt(HttpUtility.UrlDecode(carId));
     sellerId = obj1.Decrypt(HttpUtility.UrlDecode(sellerId));
     customerId = obj1.Decrypt(HttpUtility.UrlDecode(customerId));
     String orderId = "ORD_" + DateTime.Now.Ticks.ToString();
     obj.InsertPendingOrder(orderId, customerId, carId, sellerId, RadioButtonList1.Text, customerAddress, TextBox7.Text);
     Label21.Text = orderId;
     Label29.Visible = true;
 }