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 Page_Load(object sender, EventArgs e) { if (!checkCookie()) Response.Redirect("Login.aspx"); EncryptDecrypt obj1 = new EncryptDecrypt(); String carId = obj1.Decrypt(HttpUtility.UrlDecode(Request.QueryString["carId"].ToString())); String sellerId = obj1.Decrypt(HttpUtility.UrlDecode(Request.QueryString["sellerId"].ToString())); if (carId == null || sellerId == null) Response.Redirect("Error.aspx"); else { DatabaseHandler obj = new DatabaseHandler(); DataSet ds = obj.GetCarInfo(carId); Label1.Text = ds.Tables[0].Rows[0]["CAR_BRAND"].ToString() + " " + ds.Tables[0].Rows[0]["CAR_MODEL_NAME"].ToString(); Label2.Text = ds.Tables[0].Rows[0]["CAR_BRAND"].ToString(); Label3.Text = ds.Tables[0].Rows[0]["CAR_MODEL_NAME"].ToString(); Label4.Text = ds.Tables[0].Rows[0]["CAR_MODEL_NUMBER"].ToString(); Label5.Text = ds.Tables[0].Rows[0]["CAR_POSSESSION_TYPE"].ToString(); Label6.Text = ds.Tables[0].Rows[0]["CAR_YEAR_OF_PURCHASE"].ToString(); Label7.Text = ds.Tables[0].Rows[0]["CAR_PRICE"].ToString(); Label8.Text = ds.Tables[0].Rows[0]["CAR_ENGINE"].ToString(); Label9.Text = ds.Tables[0].Rows[0]["CAR_FUEL"].ToString(); ImageButton1.ImageUrl = "~\\Car\\Front\\" + Path.GetFileName(ds.Tables[0].Rows[0]["CAR_FRONT_IMAGE"].ToString()); ImageButton1.Width = 100; ImageButton1.Height = 100; ImageButton2.ImageUrl = "~\\Car\\Side\\" + Path.GetFileName(ds.Tables[0].Rows[0]["CAR_SIDE_IMAGE"].ToString()); ImageButton2.Width = 100; ImageButton2.Height = 100; ImageButton3.ImageUrl = "~\\Car\\Rear\\" + Path.GetFileName(ds.Tables[0].Rows[0]["CAR_REAR_IMAGE"].ToString()); ImageButton3.Width = 100; ImageButton3.Height = 100; ds = obj.GetSellerName(sellerId); Label10.Text = ds.Tables[0].Rows[0]["SELLER_NAME"].ToString(); } }
protected void Page_Load(object sender, EventArgs e) { if (!checkCookie()) Response.Redirect("Login.aspx"); EncryptDecrypt obj=new EncryptDecrypt(); String sellerId = obj.Decrypt(HttpUtility.UrlDecode(Request.QueryString["sellerId"].ToString())); String carId = obj.Decrypt(HttpUtility.UrlDecode(Request.QueryString["carId"].ToString())); DatabaseHandler obj1 = new DatabaseHandler(); DataSet ds = obj1.GetCarInfo(carId); Label1.Text = ds.Tables[0].Rows[0]["CAR_BRAND"].ToString(); Label2.Text = ds.Tables[0].Rows[0]["CAR_MODEL_NAME"].ToString(); Label3.Text = ds.Tables[0].Rows[0]["CAR_MODEL_NUMBER"].ToString(); Label4.Text = ds.Tables[0].Rows[0]["CAR_POSSESSION_TYPE"].ToString(); Label5.Text = ds.Tables[0].Rows[0]["CAR_YEAR_OF_PURCHASE"].ToString(); Label6.Text = ds.Tables[0].Rows[0]["CAR_PRICE"].ToString(); Label7.Text = ds.Tables[0].Rows[0]["CAR_ENGINE"].ToString(); Label8.Text = ds.Tables[0].Rows[0]["CAR_FUEL"].ToString(); Label9.Text = ds.Tables[0].Rows[0]["CAR_STOCK_QUANTITY"].ToString(); }