Esempio n. 1
0
 private void btnDegistir_Click(object sender, EventArgs e)
 {
     cUcus u = new cUcus();
     u.UcusID = Convert.ToInt32(txtUcusID.Text);
     u.NeredenID = Convert.ToInt32(txtNeredenID.Text);
     u.NereyeID = Convert.ToInt32(txtNereyeID.Text);
     u.Mesafe = Convert.ToInt32(txtMesafe.Text);
     u.TahminiKalkis = Convert.ToDateTime(txtKTar.Text + " " + mtxtKSa.Text);
     u.TahminiVaris = Convert.ToDateTime(txtVTar.Text + " " + mtxtVSa.Text);
     u.PilotID = Convert.ToInt32(txtPilotID.Text);
     u.KabinEkibiID = Convert.ToInt32(txtKabinEkibiID.Text);
     u.Ucret = Convert.ToDecimal(txtUcret.Text);
     u.UcakID = Convert.ToInt32(txtUcakID.Text);
     bool sonuc = u.UcusGuncelle(u);
     if (txtNeredenID.Text.Trim() != "" || txtNereyeID.Text.Trim() != "")
     {
         if (sonuc)
         {
             MessageBox.Show("Uçuş Bilgileri Değiştirildi.");
             Temizle();
             btnDegistir.Enabled = false;
             btnSil.Enabled = false;
             u.UcuslariGetirGenis(lvUcus);
         }
         else
         {
             MessageBox.Show("Uçuş Bilgileri Değiştirilemedi!");
         }
     }
     else
     {
         MessageBox.Show("Tüm Boşlukları Doldurunuz.");
     }
 }
Esempio n. 2
0
        private void frmUcus_Load(object sender, EventArgs e)
        {
            this.Top  = 0;
            this.Left = 0;
            tabUcusSorgulama.SelectedIndex = tabindex;
            slblKullanici.Text             = frmAnaSayfa.logmain.Adsoyad;
            cUcus     u  = new cUcus();
            cPersonel p  = new cPersonel();
            cUcak     uc = new cUcak();

            u.UcuslariGetirGenis(lvUcus);
            p.PilotGetir(cbPilot);
            p.KabinEkibiGetir(cbKabinEkibi);
            uc.UcakGetir(cbUcak);
            DataTable dt = u.UcuslarıGetirByNeredenNereye2DGV(dgvUcus);

            dgvUcus.DataSource = dt;
            GridViewDuzenle();
        }
Esempio n. 3
0
        private void btnKaydet_Click(object sender, EventArgs e)
        {
            cPersonel p  = new cPersonel();
            cUcak     uc = new cUcak();
            cUcus     u  = new cUcus();

            u.NeredenID     = Convert.ToInt32(txtNeredenID.Text);
            u.NereyeID      = Convert.ToInt32(txtNereyeID.Text);
            u.Mesafe        = Convert.ToInt32(txtMesafe.Text);
            u.TahminiKalkis = Convert.ToDateTime(txtKTar.Text + " " + mtxtKSa.Text);
            u.TahminiVaris  = Convert.ToDateTime(txtVTar.Text + " " + mtxtVSa.Text);
            u.PilotID       = Convert.ToInt32(txtPilotID.Text);
            u.KabinEkibiID  = Convert.ToInt32(txtKabinEkibiID.Text);
            u.Ucret         = Convert.ToDecimal(txtUcret.Text);
            u.UcakID        = Convert.ToInt32(txtUcakID.Text);
            bool sonuc = u.UcusEkle(u);

            if (txtNeredenID.Text.Trim() != "" || txtNereyeID.Text.Trim() != "")
            {
                if (sonuc)
                {
                    MessageBox.Show("Uçuş Bilgileri Kaydedildi.");
                    Temizle();
                    btnDegistir.Enabled = false;
                    btnSil.Enabled      = false;
                    u.UcuslariGetirGenis(lvUcus);
                }
                else
                {
                    MessageBox.Show("Uçuş Bilgileri Kaydedilemedi!");
                }
            }
            else
            {
                MessageBox.Show("Tüm Boşlukları Doldurunuz.");
            }
            ButonKontrol1();
            p.PilotGetir(cbPilot);
            p.KabinEkibiGetir(cbKabinEkibi);
            uc.UcakGetir(cbUcak);
        }
Esempio n. 4
0
        private void btnSil_Click(object sender, EventArgs e)
        {
            cUcus uc = new cUcus();

            if (MessageBox.Show("Silmek İstiyor musunuz?", "SİLİNSİN Mİ?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
            {
                bool Sonuc = uc.UcusSil(Convert.ToInt32(txtUcusID.Text));
                if (Sonuc)
                {
                    MessageBox.Show("Uçuş Bilgileri Silindi.");
                    Temizle();
                    btnDegistir.Enabled = false;
                    btnSil.Enabled      = false;
                    uc.UcuslariGetirGenis(lvUcus);
                }
                else
                {
                    MessageBox.Show("Bilgiler Silinemedi!");
                }
            }
        }
Esempio n. 5
0
        private void btnDegistir_Click(object sender, EventArgs e)
        {
            cUcus u = new cUcus();

            u.UcusID        = Convert.ToInt32(txtUcusID.Text);
            u.NeredenID     = Convert.ToInt32(txtNeredenID.Text);
            u.NereyeID      = Convert.ToInt32(txtNereyeID.Text);
            u.Mesafe        = Convert.ToInt32(txtMesafe.Text);
            u.TahminiKalkis = Convert.ToDateTime(txtKTar.Text + " " + mtxtKSa.Text);
            u.TahminiVaris  = Convert.ToDateTime(txtVTar.Text + " " + mtxtVSa.Text);
            u.PilotID       = Convert.ToInt32(txtPilotID.Text);
            u.KabinEkibiID  = Convert.ToInt32(txtKabinEkibiID.Text);
            u.Ucret         = Convert.ToDecimal(txtUcret.Text);
            u.UcakID        = Convert.ToInt32(txtUcakID.Text);
            bool sonuc = u.UcusGuncelle(u);

            if (txtNeredenID.Text.Trim() != "" || txtNereyeID.Text.Trim() != "")
            {
                if (sonuc)
                {
                    MessageBox.Show("Uçuş Bilgileri Değiştirildi.");
                    Temizle();
                    btnDegistir.Enabled = false;
                    btnSil.Enabled      = false;
                    u.UcuslariGetirGenis(lvUcus);
                }
                else
                {
                    MessageBox.Show("Uçuş Bilgileri Değiştirilemedi!");
                }
            }
            else
            {
                MessageBox.Show("Tüm Boşlukları Doldurunuz.");
            }
        }
Esempio n. 6
0
        private void btnKaydet_Click(object sender, EventArgs e)
        {
            cPersonel p = new cPersonel();
            cUcak uc = new cUcak();
            cUcus u = new cUcus();
            u.NeredenID = Convert.ToInt32(txtNeredenID.Text);
            u.NereyeID = Convert.ToInt32(txtNereyeID.Text);
            u.Mesafe = Convert.ToInt32(txtMesafe.Text);
            u.TahminiKalkis = Convert.ToDateTime(txtKTar.Text + " " + mtxtKSa.Text);
            u.TahminiVaris = Convert.ToDateTime(txtVTar.Text + " " + mtxtVSa.Text);
            u.PilotID = Convert.ToInt32(txtPilotID.Text);
            u.KabinEkibiID = Convert.ToInt32(txtKabinEkibiID.Text);
            u.Ucret = Convert.ToDecimal(txtUcret.Text);
            u.UcakID = Convert.ToInt32(txtUcakID.Text);
            bool sonuc = u.UcusEkle(u);
            if (txtNeredenID.Text.Trim() != "" || txtNereyeID.Text.Trim() != "")
            {
                if (sonuc)
                {
                    MessageBox.Show("Uçuş Bilgileri Kaydedildi.");
                    Temizle();
                    btnDegistir.Enabled = false;
                    btnSil.Enabled = false;
                    u.UcuslariGetirGenis(lvUcus);

                }
                else
                {
                    MessageBox.Show("Uçuş Bilgileri Kaydedilemedi!");
                }
            }
            else
            {
                MessageBox.Show("Tüm Boşlukları Doldurunuz.");
            }
            ButonKontrol1();
            p.PilotGetir(cbPilot);
            p.KabinEkibiGetir(cbKabinEkibi);
            uc.UcakGetir(cbUcak);
        }
Esempio n. 7
0
 private void frmUcus_Load(object sender, EventArgs e)
 {
     this.Top = 0;
     this.Left = 0;
     tabUcusSorgulama.SelectedIndex = tabindex;
     slblKullanici.Text = frmAnaSayfa.logmain.Adsoyad;
     cUcus u = new cUcus();
     cPersonel p = new cPersonel();
     cUcak uc = new cUcak();
     u.UcuslariGetirGenis(lvUcus);
     p.PilotGetir(cbPilot);
     p.KabinEkibiGetir(cbKabinEkibi);
     uc.UcakGetir(cbUcak);
     DataTable dt = u.UcuslarıGetirByNeredenNereye2DGV(dgvUcus);
     dgvUcus.DataSource = dt;
     GridViewDuzenle();
 }
Esempio n. 8
0
 private void btnSil_Click(object sender, EventArgs e)
 {
     cUcus uc = new cUcus();
     if (MessageBox.Show("Silmek İstiyor musunuz?", "SİLİNSİN Mİ?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
     {
         bool Sonuc = uc.UcusSil(Convert.ToInt32(txtUcusID.Text));
         if (Sonuc)
         {
             MessageBox.Show("Uçuş Bilgileri Silindi.");
             Temizle();
             btnDegistir.Enabled = false;
             btnSil.Enabled = false;
             uc.UcuslariGetirGenis(lvUcus);
         }
         else
         {
             MessageBox.Show("Bilgiler Silinemedi!");
         }
     }
 }