private void edit4_Click(object sender, EventArgs e) { SqlCommand command = connection.CreateCommand(); command.CommandText = "select * from imagelist"; DataSet ds1 = new DataSet(); SqlDataAdapter adaptador = new SqlDataAdapter(command.CommandText, connection); adaptador.Fill(ds1); DataRow dRow = ds1.Tables[0].Rows[3]; desc = dRow.ItemArray.GetValue(2).ToString(); PubDialog dialog = new PubDialog(); this.AddOwnedForm(dialog); dialog.Show(); dialog.PubDialogStart(ImgBox4.ImageLocation, desc, 4); }
private void edit4_Click(object sender, EventArgs e) { if (ImgBox1.Size == new Size(167, 269)) { desc = "select * from publicidade_lateral"; } else { desc = "select * from publicidade_top"; } //Opens the Dialog PubDialog dialog = new PubDialog(); this.AddOwnedForm(dialog); connection.Close(); dialog.PubDialogStart(ImgBox1.ImageLocation, desc, 4, this); dialog.Show(); }