Exemple #1
0
        private void btnStokGuncelle_Click(object sender, EventArgs e)
        {
            if (seciliHamStok != null)
            {
                int hamStokId = new Stok.Services.HamStok().HamStokGuncelle(Convert.ToDateTime(dtTarih.EditValue), txtIrsaliyeNo.Text, txtAciklama.Text, seciliHamStok.Id);

                if (hamStokId == 0)
                {
                    MessageBox.Show(this, "Bu irsaliye numarası daha önce kaydedilmiş", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else
                {
                    HamStokDetayKaydet(seciliHamStok.Id);
                }

                GridHamStokDoldur();
                new sametson.ControlEdit().LayoutBilgiTemizle(layoutControl2);
            }
        }
Exemple #2
0
        private void btnStokSil_Click(object sender, EventArgs e)
        {
            if (seciliHamStok != null)
            {
                DialogResult result = MessageBox.Show(this, "Silmek istediğinizden emin misiniz ?", "Soru", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (result == DialogResult.Yes)
                {
                    string mesaj = new Stok.Services.HamStok().DeleteHamStok(seciliHamStok.Id);

                    if (mesaj != null)
                    {
                        MessageBox.Show(this, mesaj, "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                    else
                    {
                        GridHamStokDoldur();
                        new sametson.ControlEdit().LayoutBilgiTemizle(layoutControl2);
                    }

                }
            }
            else
            {
                MessageBox.Show(this, "Seçim yapmadınız !", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Exemple #3
0
 private void GridHamStokDetayDoldur()
 {
     var hamStokDetayList = new Stok.Services.HamStok().GetHamStokDetayByHamStokId(seciliHamStok.Id);
     table.Clear();
     foreach (Stok.HamStokDetay item in hamStokDetayList)
     {
         table.Rows.Add(item.Sarj.HamMalzemeId, item.SarjId, item.Sarj.HamMalzeme.Adi + "/" + item.Sarj.HamMalzeme.No, item.Sarj.No, item.Miktar, item.Id);
     }
     gridControl1.DataSource = table;
 }
Exemple #4
0
        private void btnStokKaydet_Click(object sender, EventArgs e)
        {
            int hamStokId = new Stok.Services.HamStok().HamStokKaydet(Convert.ToDateTime(dtTarih.EditValue), txtIrsaliyeNo.Text, txtAciklama.Text);

            if (hamStokId == 0)
            {
                MessageBox.Show(this, "Bu irsaliye numarası daha önce kaydedilmiş", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                HamStokDetayKaydet(hamStokId);
            }
            GridHamStokDoldur();
        }