示例#1
0
 private void renkAyarlariKaydetButon_Click(object sender, EventArgs e)
 {
     if (comboBox1.SelectedItem == "Butonların rengi")
     {
         renkAyarlariKaydetButon.BackColor = Color.FromArgb(int.Parse(numericUpDown1.Value.ToString()), int.Parse(numericUpDown2.Value.ToString()),
                                                            int.Parse(numericUpDown3.Value.ToString()));
     }
     else if (comboBox1.SelectedItem == "Açılış sayfası rengi")
     {
         GirisTuru frm1 = new GirisTuru();
         frm1.BackColor = Color.FromArgb(int.Parse(numericUpDown1.Value.ToString()), int.Parse(numericUpDown2.Value.ToString()),
                                         int.Parse(numericUpDown3.Value.ToString()));
     }
     else if (comboBox1.SelectedItem == "Giriş sayfası rengi")
     {
         GirisSayfasi         frm1 = new GirisSayfasi();
         KayitIslemleri       frm3 = new KayitIslemleri();
         SaticiKayitIslemleri frm5 = new SaticiKayitIslemleri();
         frm1.BackColor = frm3.BackColor = frm5.BackColor = Color.FromArgb(int.Parse(numericUpDown1.Value.ToString()),
                                                                           int.Parse(numericUpDown2.Value.ToString()), int.Parse(numericUpDown3.Value.ToString()));
     }
     else if (comboBox1.SelectedItem == "Listview ve Datagridview rengi")
     {
         //GirisTuru frm1 = new GirisTuru();
         //frm1.BackColor = Color.FromArgb(int.Parse(numericUpDown1.Value.ToString()), int.Parse(numericUpDown2.Value.ToString()),
         //    int.Parse(numericUpDown3.Value.ToString()));
     }
     MessageBox.Show("Ayarlar kaydedildi.", "Siparişim", MessageBoxButtons.OK, MessageBoxIcon.Information);
     this.Close();
 }
        private void geriDon_Click(object sender, EventArgs e)
        {
            this.Hide();
            GirisSayfasi frm2 = new GirisSayfasi();

            frm2.Show();
        }
示例#3
0
        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);
            }
        }