if (Session["ads1"] != null && Session["ads2"] != null && Session["ads3"] != null && Session["ads4"] != null && Session["ads5"] != null && Session["ads6"] != null)
{
this.Label1.Text = Session["ads1"].ToString();
this.Label2.Text = Session["ads2"].ToString();
this.Label3.Text = Session["ads3"].ToString();
this.Label4.Text = Session["ads4"].ToString();
this.Label5.Text = Session["ads5"].ToString();
this.Label6.Text = Session["ads6"].ToString();
this.TextBox1.Text = Convert.ToInt32(Convert.ToInt32(Label1.Text) + Convert.ToInt32(Label2.Text) + Convert.ToInt32(Label3.Text) + Convert.ToInt32(Label4.Text) + Convert.ToInt32(Label5.Text) + Convert.ToInt32(Label6.Text)).ToString();
}
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
if (Session["ads1"] != null)
{
int counter = Convert.ToInt32(Session["ads1"].ToString());
counter++;
Label1.Text = counter.ToString();
Session["ads1"] = Convert.ToInt32(this.Label1.Text);
}
else
{
Session["ads1"] = Convert.ToInt32(this.Label1.Text);
}
}
protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
{
if (Session["ads2"] != null)
{
int add = Convert.ToInt32(Session["ads2"].ToString());
add++;
Label2.Text = add.ToString();
Session["ads2"] = Convert.ToInt32(this.Label2.Text);
}
else
{
Session["ads2"] = Convert.ToInt32(this.Label2.Text);
}
}
protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
{
if (Session["ads3"] != null)
{
int bur = Convert.ToInt32(Session["ads3"].ToString());
bur++;
Label3.Text = bur.ToString();
Session["ads3"] = Convert.ToInt32(this.Label3.Text);
}
else
{
Session["ads3"] = Convert.ToInt32(this.Label3.Text);
}
}
protected void ImageButton4_Click(object sender, ImageClickEventArgs e)
{
if (Session["ads4"] != null)
{
int bur = Convert.ToInt32(Session["ads4"].ToString());
bur++;
Label4.Text = bur.ToString();
Session["ads4"] = Convert.ToInt32(this.Label4.Text);
}
else
{
Session["ads4"] = Convert.ToInt32(this.Label4.Text);
}
}
protected void ImageButton5_Click(object sender, ImageClickEventArgs e)
{
if (Session["ads5"] != null)
{
int bur = Convert.ToInt32(Session["ads5"].ToString());
bur++;
Label5.Text = bur.ToString();
Session["ads5"] = Convert.ToInt32(this.Label5.Text);
}
else
{
Session["ads5"] = Convert.ToInt32(this.Label5.Text);
}
}
protected void ImageButton6_Click(object sender, ImageClickEventArgs e)
{
if (Session["ads6"] != null)
{
int bur = Convert.ToInt32(Session["ads6"].ToString());
bur++;
Label6.Text = bur.ToString();
Session["ads6"] = Convert.ToInt32(this.Label6.Text);
}
else
{
Session["ads6"] = Convert.ToInt32(this.Label6.Text);
}
}
protected void Button1_Click(object sender, EventArgs e)
{
int ads1 = Convert.ToInt32(this.Label1.Text);
int ads2 = Convert.ToInt32(this.Label2.Text);
int ads3 = Convert.ToInt32(this.Label3.Text);
int ads4 = Convert.ToInt32(this.Label4.Text);
int ads5 = Convert.ToInt32(this.Label5.Text);
int ads6 = Convert.ToInt32(this.Label6.Text);
int ppcTotalClicks = Convert.ToInt32(this.TextBox1.Text);
BlClicks bizLayer;
bizLayer = new BlClicks();
bizLayer.InsertClicks(ads1, ads2, ads3, ads4, ads5, ads6, ppcTotalClicks);
}
}