protected void BtnApprove_Click(object sender, EventArgs e) { string[] args = Request.QueryString["id"].Split(','); int VehicleId = Convert.ToInt32(args[0]); int FinId = Convert.ToInt32(args[1]); if (CustomerVehicleInfo.SetApprovedStatus(VehicleId, FinId, true)) { Financial.ChangeAdStatus(FinId, VehicleId, true); NotifyCustomer(Convert.ToInt32(Session["Seller"].ToString()), VehicleId, FinId); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Info", "alert('The vehicle posting #" + Request.QueryString["id"] + " has been approved.');", true); Response.Redirect("~/admin/vehicles.aspx"); } else { ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Info", "alert('Failed activating vehicle #" + Request.QueryString["id"] + ".');", true); } }