Exemplo n.º 1
0
        public void personelGetbyInformation(ComboBox cb)
        {
            cb.Items.Clear();
            MySqlConnection con = new MySqlConnection("Server = localhost; Database = itadakimasu; Uid = root; Pwd = ''");

            con.Open();
            MySqlCommand mcd = new MySqlCommand("Select * from personeller", con);


            if (con.State == ConnectionState.Closed)
            {
                con.Open();
            }
            MySqlDataReader dr = mcd.ExecuteReader();

            while (dr.Read())
            {
                cPersoneller p = new cPersoneller();
                p.PersonelId           = Convert.ToInt32(dr["ID"]);
                p.PersonelGorevId      = Convert.ToInt32(dr["GOREVID"]);
                p.PersonelAd           = Convert.ToString(dr["AD"]);
                p.PersonelSoyad        = Convert.ToString(dr["SOYAD"]);
                p.PersonelParola       = Convert.ToString(dr["PAROLA"]);
                p.PersonelKullaniciAdi = Convert.ToString(dr["KULLANICIADI"]);
                p.PersonelDurum        = Convert.ToString(dr["DURUM"]);
                cb.Items.Add(p);
            }
            dr.Close();
            con.Close();
        }
Exemplo n.º 2
0
        private void cbKullanici_SelectedIndexChanged(object sender, EventArgs e)
        {
            cGenel       gnl = new cGenel();
            cPersoneller p   = (cPersoneller)cbKullanici.SelectedItem;

            cGenel._personelId = p.PersonelId;
            cGenel._gorevId    = p.PersonelGorevId;
        }
Exemplo n.º 3
0
        private void btnGiris_Click(object sender, EventArgs e)
        {
            cPersoneller p      = new cPersoneller();
            bool         result = p.personelEntryControl(tbMetin.Text, cGenel._personelId);

            if (result)
            {
                cPersonelHareketleri ch = new cPersonelHareketleri();
                ch.PersonelId = cGenel._personelId;
                ch.Islem      = "Giriş Yaptı";
                ch.Tarih      = DateTime.Now;
                ch.PersonelActionSave(ch);
                this.Hide();
                frmMenu menu = new frmMenu();
                menu.Show();
            }
            else
            {
                MessageBox.Show("Şifreniz Yanlış?", "Uyarı !!!", MessageBoxButtons.OK, MessageBoxIcon.Stop);
            }
        }
Exemplo n.º 4
0
        private void frmGiris_Load(object sender, EventArgs e)
        {
            cPersoneller p = new cPersoneller();

            p.personelGetbyInformation(cbKullanici);
        }