예제 #1
0
        private void btnadd_Click(object sender, EventArgs e)
        {
            try
            {
                SqlCommand add = new SqlCommand("update StokListesi set Tur=@a1,Kod=@a2,Ad=@a3,AdEn=@a4,Cas=@a5,Ambalaj=@a6,Ozellik=@a7,Saklama=@a8,Limit=@a9,Birim=@a10 where ID = '" + urunid + "' ", bgl.baglanti());
                add.Parameters.AddWithValue("@a1", combo_tur.Text);
                add.Parameters.AddWithValue("@a2", txtkod.Text);
                add.Parameters.AddWithValue("@a3", txtad.Text);
                add.Parameters.AddWithValue("@a4", txtenad.Text);
                add.Parameters.AddWithValue("@a5", txtcas.Text);
                add.Parameters.AddWithValue("@a6", txtambalaj.Text);
                add.Parameters.AddWithValue("@a7", txtozellik.Text);
                add.Parameters.AddWithValue("@a8", txtsaklama.Text);
                add.Parameters.AddWithValue("@a9", Convert.ToDecimal(txtlimit.Text));
                add.Parameters.AddWithValue("@a10", combobirim.Text);
                add.ExecuteNonQuery();
                bgl.baglanti().Close();

                MessageBox.Show("Güncelleme Başarılı!", "Tebrikler!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

                combo_marka.Properties.Items.Clear();

                //  detaybul2();

                if (Application.OpenForms["StokListesi"] == null)
                {
                }
                else
                {
                    m.listele();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Hata S4: " + ex);
            }
        }
예제 #2
0
 private void btnadd_Click(object sender, EventArgs e)
 {
     kodkontrol();
     if (o2 == 1)
     {
         MessageBox.Show("Bu kod daha önce kullanılmış. Lütfen farklı bir kod seçiniz.", "Kod Hatası", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     else
     {
         ekleme();
         MessageBox.Show("Stok girişiniz başarı ile tamamlanmıştır.", "İşlem Başarılı", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         temizle();
         if (Application.OpenForms["StokListesi"] == null)
         {
         }
         else
         {
             m.listele();
         }
     }
 }
예제 #3
0
        private void btnadd_Click(object sender, EventArgs e)
        {
            if (combo_marka.Text == "")
            {
                MessageBox.Show("Lütfen marka ve lot seçimi yapınız. ");
            }
            else
            {
                cikarma();
                anastok();

                if (Application.OpenForms["StokListesi"] == null)
                {
                }
                else
                {
                    m.listele();
                }

                MessageBox.Show("Stoğunuz başarı ile güncellenmiştir!", "Başarılı!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
예제 #4
0
        private void btnadd_Click(object sender, EventArgs e)
        {
            ekleme();
            anastok();

            if (Application.OpenForms["StokListesi"] == null)
            {
            }
            else
            {
                m.listele();
            }

            MessageBox.Show("Stoğunuz güncellenmiştir!", "Başarılı!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            temizle();

            if (talepkod == "" | talepkod == null)
            {
            }
            else
            {
                this.Close();
            }
        }