Beispiel #1
0
        private void btnGüncelle_Click(object sender, EventArgs e)
        {
            try
            {
                UrunBilgiTasima.Id          = Convert.ToInt32(dgEnvanter.SelectedRows[0].Cells["Id"].Value.ToString());
                UrunBilgiTasima.OdaId       = dgEnvanter.SelectedRows[0].Cells["OdaAdi"].Value.ToString();
                UrunBilgiTasima.UrunAdi     = dgEnvanter.SelectedRows[0].Cells["UrunAdi"].Value.ToString();
                UrunBilgiTasima.UrunKodu    = dgEnvanter.SelectedRows[0].Cells["UrunKodu"].Value.ToString();
                UrunBilgiTasima.Marka       = dgEnvanter.SelectedRows[0].Cells["Marka"].Value.ToString();
                UrunBilgiTasima.Model       = dgEnvanter.SelectedRows[0].Cells["Model"].Value.ToString();
                UrunBilgiTasima.Adet        = Convert.ToInt32(dgEnvanter.SelectedRows[0].Cells["Adet"].Value.ToString());
                UrunBilgiTasima.BirimFiyat  = Convert.ToDouble(dgEnvanter.SelectedRows[0].Cells["BirimFiyat"].Value.ToString());
                UrunBilgiTasima.ToplamFiyat = Convert.ToDouble(dgEnvanter.SelectedRows[0].Cells["ToplamFiyat"].Value.ToString());
                UrunBilgiTasima.Aciklama    = dgEnvanter.SelectedRows[0].Cells["Aciklama"].Value.ToString();

                MemoryStream ms = new MemoryStream();
                pbImage.Image.Save(ms, pbImage.Image.RawFormat);
                byte[] img = ms.ToArray();

                UrunBilgiTasima.Resim = img;

                FormUrunGuncelle formUrun = new FormUrunGuncelle();
                formUrun.Show();
            }
            catch (Exception hata)
            {
                MessageBox.Show("hata :" + hata.Message);
            }
        }
Beispiel #2
0
        public void UrunGuncelle()
        {
            FormUrunGuncelle z = new FormUrunGuncelle();

            z.txtUrunAd.Text        = "Klavye";
            z.txtAdet.Text          = "2";
            z.txtFiyat.Text         = "5000";
            z.calendarControl1.Text = "2018/10/26";
            z.btnGuncelle.PerformClick();
        }