Untitled
unknown
csharp
5 years ago
1.5 kB
13
Indexable
namespace UrunTanimlamaDGW
{
public partial class FRM_UrunTanimlama : Form
{
public FRM_UrunTanimlama()
{
InitializeComponent();
}
MySqlConnection baglanti = new MySqlConnection("datasource=localhost;database=urun_tanimlama;port=3306;username=root;password=171717");
private void FRM_UrunTanimlama_Load(object sender, EventArgs e)
{
this.CenterToScreen();
this.FormBorderStyle = FormBorderStyle.None;
this.BackColor = System.Drawing.Color.FromArgb(17, 24, 37);
URUNLERI_TABLOYA_GETIR();
}
public void URUNLERI_TABLOYA_GETIR()
{
MySqlCommand sorgu = new MySqlCommand("SELECT * FROM ----------",baglanti);
MySqlDataAdapter adaptor = new MySqlDataAdapter(sorgu);
DataTable tablo = new DataTable();
adaptor.Fill(tablo);
dgv_UrunListesi.DataSource = tablo;
}
private void btn_ResimSec_Click(object sender, EventArgs e)
{
OpenFileDialog opf = new OpenFileDialog();
opf.Filter = "Resim Seciniz(*.JPG;*.PNG;*.GIF)|*.jpg;*.png;*.gif";
if (opf.ShowDialog() == DialogResult.OK )
{
pictureBox1.Image = Image.FromFile(opf.FileName);
}
}
private void btn_Kapat_Click(object sender, EventArgs e)
{
this.Close();
}
}
}Editor is loading...