Example #1
0
        private void lviSiparisler_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            sID = Convert.ToInt32(lviSiparisler.SelectedItems[0].SubItems[0].Text);
            ESiparis s = BLLSiparis.SiparisBul(sID);

            lblSiparisID.Text = s.ID.ToString();
        }
        private void frmSiparisIncele_Load(object sender, EventArgs e)
        {
            int sID = Form1.sID;

            lblMusteri.Text       = BLLMusteri.MusteriBul(BLLSiparis.SiparisBul(sID).CustomerID).Username;
            lblSiparisTarihi.Text = BLLSiparis.SiparisBul(sID).OrderDate.ToString();
            txtKargoKodu.Text     = BLLSiparis.SiparisBul(sID).ShippingCode;
            bool aktifMi;

            if (BLLSiparis.SiparisBul(sID).Status == true)
            {
                aktifMi = true;
            }
            else
            {
                aktifMi = false;
            }

            chkAktifMi.Checked = aktifMi;
            foreach (ESiparisUrun item in BLLSiparisUrun.SiparisUrunListele(Form1.sID))
            {
                ToplamFiyat += item.Price * item.Quantity;
            }
            lblToplamFiyat.Text = ToplamFiyat.ToString("c2");

            Doldur();
        }
        private void lviSiparisler_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            sID = Convert.ToInt32(lviSiparisler.SelectedItems[0].SubItems[0].Text);
            ESiparis         s   = BLLSiparis.SiparisBul(sID);
            frmSiparisIncele frm = new frmSiparisIncele();

            frm.Show();
        }
        private void frmAdresDetay_Load(object sender, EventArgs e)
        {
            EAdres a = BLLAdres.AdresBul(BLLSiparis.SiparisBul(Form1.sID).AddressID);

            lblAd.Text        = a.Firstname;
            lblSoyad.Text     = a.Lastname;
            lblil.Text        = a.City;
            lblilce.Text      = a.Town;
            lblPostaKodu.Text = a.PostalCode.ToString();
            lblAdres.Text     = a.Address;
        }
        private void btnKaydet_Click(object sender, EventArgs e)
        {
            ESiparis s = BLLSiparis.SiparisBul(frmSiparisler.sID);

            s.ShippingCode = txtKargoKodu.Text;
            string cevap = BLLSiparis.KargoKoduDuzenle(s);

            MessageBox.Show(cevap);
            Form1 f = Application.OpenForms["Form1"] as Form1;

            f.Doldur();
        }