protected void Page_Load(object sender, EventArgs e) { wrefProjectService.ProjectService service = new wrefProjectService.ProjectService(); string asin = Request.QueryString["asin"]; lblItemDesc.Text = service.getItemDescription(asin); imgItem.ImageUrl = service.getLargeImageURL(asin); }
protected void btnAdd_Click(object sender, EventArgs e) { wrefProjectService.ProjectService service = new wrefProjectService.ProjectService(); try { //first check if asin is valid string test = service.getCurrentPrice(txtASIN.Text); //add to database if (service.addItemToDatabase(txtASIN.Text)) { lblMessage.Text = "Item added to watchlist!"; } else { lblMessage.Text = "Error: Verify ASIN is valid and not already in your watchlist!"; } } catch (Exception) { lblMessage.Text = "Error: Verify ASIN is valid and not already in your watchlist!"; //lblMessage.Text = ex.Message; } }
protected void btnAdd_Click(object sender, EventArgs e) { wrefProjectService.ProjectService service = new wrefProjectService.ProjectService(); try { //first check if asin is valid string test = service.getCurrentPrice(txtASIN.Text); //add to database if (service.addItemToDatabase(txtASIN.Text)) { lblMessage.Text = "Item added to watchlist!"; } else { lblMessage.Text = "Error: Verify ASIN is valid and not already in your watchlist!"; } } catch (Exception) { lblMessage.Text = "Error: Verify ASIN is valid and not already in your watchlist!"; //lblMessage.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { wrefProjectService.ProjectService service = new wrefProjectService.ProjectService(); string asin = Request.QueryString["asin"]; lblItemDesc.Text = service.getItemDescription(asin); imgItem.ImageUrl = service.getLargeImageURL(asin); }
protected void GridView1_SelectedIndexChanging(object sender, GridViewSelectEventArgs e) { string imageUrl, asin; wrefProjectService.ProjectService service = new wrefProjectService.ProjectService(); TableCell cell = GridView1.Rows[e.NewSelectedIndex].Cells[0]; imageUrl = cell.Text; asin = service.getASIN(imageUrl); e.Cancel = true; Response.Redirect("ItemDetail.aspx?asin=" + asin); }
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { string imageUrl; wrefProjectService.ProjectService service = new wrefProjectService.ProjectService(); TableCell cell = GridView1.Rows[e.RowIndex].Cells[0]; imageUrl = cell.Text; service.removeItemFromDatabase(imageUrl); e.Cancel = true; Response.Redirect("WatchList.aspx"); }
protected void GridView1_SelectedIndexChanging(object sender, GridViewSelectEventArgs e) { string imageUrl, asin; wrefProjectService.ProjectService service = new wrefProjectService.ProjectService(); TableCell cell = GridView1.Rows[e.NewSelectedIndex].Cells[0]; imageUrl = cell.Text; asin = service.getASIN(imageUrl); e.Cancel = true; Response.Redirect("ItemDetail.aspx?asin=" + asin); }
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { string imageUrl; wrefProjectService.ProjectService service = new wrefProjectService.ProjectService(); TableCell cell = GridView1.Rows[e.RowIndex].Cells[0]; imageUrl = cell.Text; service.removeItemFromDatabase(imageUrl); e.Cancel = true; Response.Redirect("WatchList.aspx"); }