private void geriDon_Click(object sender, EventArgs e) { this.Hide(); GirisSayfasi frm2 = new GirisSayfasi(); frm2.Show(); }
private void YoneticiGiris_Click(object sender, EventArgs e) { this.Hide(); GirisSayfasi frm2 = new GirisSayfasi(); frm2.label5.Text = "3"; frm2.Show(); }
private void uyeolButon_Click(object sender, EventArgs e) { bool kayitKontrol = false; siparisim.Open(); OleDbCommand select = new OleDbCommand("select * from saticilar where saticikullaniciad='" + textBox2.Text + "'", siparisim); OleDbDataReader kayitOku = select.ExecuteReader(); while (kayitOku.Read()) { kayitKontrol = true; break; } siparisim.Close(); if (kayitKontrol == false) { if (textBox1.Text == "") { label1.ForeColor = Color.Red; } else { label1.ForeColor = Color.Black; } if (textBox2.Text == "") { label2.ForeColor = Color.Red; } else { label2.ForeColor = Color.Black; } if (textBox3.Text == "") { label3.ForeColor = Color.Red; } else { label3.ForeColor = Color.Black; } if (textBox4.Text == "" || textBox3.Text != textBox4.Text) { label4.ForeColor = Color.Red; } else { label4.ForeColor = Color.Black; } if (textBox5.Text == "") { label6.ForeColor = Color.Red; } else { label6.ForeColor = Color.Black; } if (textBox1.Text != "" && textBox2.Text != "" && textBox3.Text != "" && textBox4.Text != "" && textBox3.Text == textBox4.Text && textBox5.Text != "" && textBox2.Text.Length > 4 && textBox3.Text.Length > 6) { try { siparisim.Open(); OleDbCommand insert = new OleDbCommand("insert into saticilar(saticiadsoyad,saticikullaniciad,saticisifre,saticiyetki,dogumtarihi,sirketad,saticiresim) values ('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + "Satıcı" + "','" + dateTimePicker1.Text + "','" + textBox5.Text + "','" + resimyolu2 + "')", siparisim); insert.ExecuteNonQuery(); siparisim.Close(); MessageBox.Show("Satıcı kaydı tamamlandı.", "Siparişim", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); this.Hide(); GirisSayfasi frm2 = new GirisSayfasi(); frm2.Show(); } catch (Exception hatamsj) { MessageBox.Show(hatamsj.Message); siparisim.Close(); } } else { MessageBox.Show("Hatalı alanları tekrar gözden geçiriniz.", "Siparişim", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { MessageBox.Show("Bu kullanıcı adı zaten kullanılmaktadır.", "Siparişim", MessageBoxButtons.OK, MessageBoxIcon.Error); } }