private void frmPersonelSorgulama_Load(object sender, EventArgs e)
 {
     this.Top = 0;
     this.Left = 0;
     cPersonel p = new cPersonel();
     p.GetAllPersonelLoadArama(lvPersonelSorgu);
 }
        private void dtpS_ValueChanged(object sender, EventArgs e)
        {
            if (dtpB.Value <= dtpS.Value)
            {
                cPersonel p = new cPersonel();
                dgvPHar.DataSource = p.PersonelHareketleri(txtArama.Text, Convert.ToInt32(txtGID.Text), dtpB.Value, dtpS.Value);

            }
        }
 private void cbArama_SelectedIndexChanged(object sender, EventArgs e)
 {
     cGorev go = (cGorev)cbArama.SelectedItem;
     txtGID.Text = go.GorevID.ToString();
     cPersonel p = new cPersonel();
     dgvPHar.DataSource = p.PersonelHareketleri(txtArama.Text, Convert.ToInt32(txtGID.Text), dtpB.Value, dtpS.Value);
     dgvPHar.Columns[1].Width = 175;
     dgvPHar.Columns[2].Width = 175;
 }
Beispiel #4
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);
        }
Beispiel #5
0
        private void btnDegistir_Click(object sender, EventArgs e)
        {
            dtpIBTarihi.Enabled = true;
            cPersonel p = new cPersonel();
            p.PersonelID = Convert.ToInt32(txtID.Text);
            p.PersonelAdi = txtAdi.Text;
            p.PersonelSoyadi = txtSoyadi.Text;
            p.PersonelTCK = txtPTCNo.Text;
            p.KullaniciAdi = txtKAdi.Text;
            p.KullaniciSifresi = txtKSifresi.Text;
            p.GorevID = Convert.ToInt32(txtGorevID.Text);
            p.Ustu = Convert.ToInt32(txtUstuID.Text);
            p.YetkiTipi = Convert.ToInt32(txtYetkiID.Text);
            p.Telefon = mtxtTel.Text;
            p.Mail = txtMail.Text;
            p.IseBaslamaTarihi = Convert.ToDateTime(txtIseBTarihi.Text);
            p.Adres = txtAdres.Text;

            bool sonuc = p.PersonelGuncelle(p);
            if (txtGorevID.Text != "" && txtYetkiID.Text != "" && txtAdi.Text != "" && txtPTCNo.Text != "" && txtKAdi.Text != "" && txtKSifresi.Text != "")
            {
                if (sonuc)
                {
                    MessageBox.Show("Personel Bilgileri Değiştirildi.");
                    Temizle();
                    btnDegistir.Enabled = false;
                    btnSil.Enabled = false;
                    p.GetAllPersonel(lvPersonel);
                }
                else
                {
                    MessageBox.Show("Personel Bilgileri Değiştirilemedi!");
                }
            }
            else
            {
                MessageBox.Show("Eksik Bilgi Girdiniz.");
            }
        }
Beispiel #6
0
 private void frmUcak_Load(object sender, EventArgs e)
 {
     this.Top = 0;
     this.Left = 0;
     cUcak u = new cUcak();
     u.UcakBilgileriGetir(lvUcakBilgileri);
     cPersonel p = new cPersonel();
     p.BakimMuhGetir(cbMuhendis);
 }
 private void txtArama_TextChanged(object sender, EventArgs e)
 {
     cPersonel p = new cPersonel();
     p.GetAllPersonelByARAMA(lvPersonelSorgu, txtArama.Text);
 }
Beispiel #8
0
        private void frmPersonel_Load(object sender, EventArgs e)
        {
            this.Top = 0;
            this.Left = 0;
            dtpIBTarihi.Enabled = false;
            txtIseBTarihi.Text = DateTime.Now.ToShortDateString() +" " + DateTime.Now.ToShortTimeString();
            cGorev g = new cGorev();
            g.GorevGetir(cbGorevi);

            cPersonel p = new cPersonel();
            p.GetAllPersonel(lvPersonel);

            cYetki y = new cYetki();
            y.YetkiGetir(cbYetki);
        }
Beispiel #9
0
 private void cbGorevi_SelectedIndexChanged(object sender, EventArgs e)
 {
     txtUstu.Clear();
     cbUstu.Items.Clear();
     cGorev g = (cGorev)cbGorevi.SelectedItem;
     txtGorevID.Text = g.GorevID.ToString();
     txtGorevi.Text = g.GorevAd;
     cPersonel p = new cPersonel();
     if (cbGorevi.SelectedItem.ToString() == "Kabin Ekibi" || cbGorevi.SelectedItem.ToString() == "Co-Pilot")
     {
         p.UstuGetir(cbUstu, Convert.ToInt32(txtGorevID.Text));
         cbUstu.Enabled = true;
     }
     else
     {
         txtUstuID.Text = "0";
         cbUstu.Enabled = false;
     }
 }
Beispiel #10
0
 private void btnSil_Click(object sender, EventArgs e)
 {
     cPersonel p = new cPersonel();
     if (MessageBox.Show("Silmek İstiyor musunuz?", "SİLİNSİN Mİ?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
     {
         bool Sonuc = p.PersonelSil(Convert.ToInt32(txtID.Text));
         if (Sonuc)
         {
             MessageBox.Show("Personel Bilgileri Silindi.");
             Temizle();
             btnDegistir.Enabled = false;
             btnSil.Enabled = false;
             p.GetAllPersonel(lvPersonel);
         }
         else
         {
             MessageBox.Show("Bilgiler Silinemedi!");
         }
     }
 }
Beispiel #11
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();
 }
Beispiel #12
0
        public void UstuGetir(ComboBox list, int ID)
        {
            SqlConnection conn = new SqlConnection(gnl.connStr);
            SqlCommand comm = new SqlCommand("select PersonelID, (PersonelAdi + ' ' + PersonelSoyadi) as Adsoyad from Personeller where silindi = 0 and GorevID=@GorevID - 1", conn);
            comm.Parameters.Add("@GorevID", SqlDbType.Int).Value = ID;
            if (conn.State == ConnectionState.Closed) conn.Open();
            SqlDataReader dr;
            try
            {
                dr = comm.ExecuteReader();
                while (dr.Read())
                {
                    cPersonel p = new cPersonel();

                    p._personelID = Convert.ToInt32(dr[0]);
                    p._personelAdi = dr[1].ToString();
                    list.Items.Add(p);
                }
            }
            catch (SqlException ex)
            {
                string hata = ex.Message;
            }
            finally { conn.Close(); }
        }
Beispiel #13
0
        public void PilotGetir(ComboBox liste)
        {
            liste.Items.Clear();
            SqlConnection conn = new SqlConnection(gnl.connStr);
            SqlCommand comm = new SqlCommand("select PersonelID, (PersonelAdi + ' ' + PersonelSoyadi) as Adsoyad from Personeller where Silindi = 0 and GorevID = 1 and Uygunluk = 1", conn);
            if (conn.State == ConnectionState.Closed) conn.Open();
            SqlDataReader dr;
            try
            {
                dr = comm.ExecuteReader();
                while (dr.Read())
                {
                    cPersonel p = new cPersonel();

                    p._personelID = Convert.ToInt32(dr[0]);
                    p._personelAdi = dr[1].ToString();
                    liste.Items.Add(p);
                }
            }
            catch (SqlException ex)
            {
                string hata = ex.Message;
            }
            finally { conn.Close(); }
        }
Beispiel #14
0
 public bool PersonelGuncelle(cPersonel p)
 {
     bool sonuc = false;
     SqlConnection conn = new SqlConnection(gnl.connStr);
     SqlCommand comm = new SqlCommand("sp_PersonelGuncelle", conn);
     comm.CommandType = CommandType.StoredProcedure;
     comm.Parameters.Add("@ID", SqlDbType.Int).Value = p._personelID;
     comm.Parameters.Add("@Ad", SqlDbType.VarChar).Value = p._personelAdi;
     comm.Parameters.Add("@Soyad", SqlDbType.VarChar).Value = p._personelSoyadi;
     comm.Parameters.Add("@TcNo", SqlDbType.VarChar).Value = p._personelTCK;
     comm.Parameters.Add("@KAdi", SqlDbType.VarChar).Value = p._kullaniciAdi;
     comm.Parameters.Add("KSifre", SqlDbType.VarChar).Value = p._kullaniciSifresi;
     comm.Parameters.Add("@GorevID", SqlDbType.Int).Value = p._gorevID;
     comm.Parameters.Add("@UstuID", SqlDbType.Int).Value = p._ustuID;
     comm.Parameters.Add("@YetkiID", SqlDbType.Int).Value = p._yetkiTipiID;
     comm.Parameters.Add("@Telefon", SqlDbType.VarChar).Value = p._telefon;
     comm.Parameters.Add("@Mail", SqlDbType.VarChar).Value = p._mail;
     comm.Parameters.Add("@IBT", SqlDbType.DateTime).Value = p._iseBaslamaTarihi;
     comm.Parameters.Add("@Adres", SqlDbType.VarChar).Value = p._adres;
     if (conn.State == ConnectionState.Closed) conn.Open();
     try
     {
         sonuc = Convert.ToBoolean(comm.ExecuteNonQuery());
     }
     catch (SqlException ex)
     {
         string hata = ex.Message;
     }
     finally { conn.Close(); }
     return sonuc;
 }