コード例 #1
0
        private void frm_gorevHaareketleri_Load(object sender, EventArgs e)
        {
            VTBaglan       vt = new VTBaglan();
            SqlDataAdapter da = new SqlDataAdapter("select baslik as Baslik, adi+' '+soyadi as AdSoyad, tarih as Tarih, durumAdi from tb_gorevHareket inner join tb_gorevler on tb_gorevhareket.gorevId = tb_gorevler.ID inner join tb_kullanicilar on tb_kullanicilar.ID = tb_gorevler.gorevliId inner join tb_Durum on tb_Durum.ID = tb_gorevHareket.durumId where projeId = @p1", vt.bagla());

            da.SelectCommand.Parameters.AddWithValue("@p1", _projeId);
            DataTable dt = new DataTable();

            da.Fill(dt);
            dataGridView1.DataSource = dt;
        }
コード例 #2
0
        public bool girisKontrol(string kullaniciAdi, string parola)
        {
            bool       onay = false;
            VTBaglan   vt   = new VTBaglan();
            Sifreleme  sf   = new Sifreleme();
            SqlCommand c    = new SqlCommand("select * from tb_kullanicilar where kullaniciAdi=@p1 and parola=@p2", vt.bagla());

            c.Parameters.AddWithValue("@p1", kullaniciAdi);
            c.Parameters.AddWithValue("@p2", sf.RijndaelSifrele(parola));
            SqlDataReader dr = c.ExecuteReader();

            if (dr.Read())
            {
                onay = true;
                giris(Convert.ToInt16(dr["ID"]), dr["adi"].ToString(), dr["soyadi"].ToString(), dr["kullaniciAdi"].ToString());
            }
            vt.bagla().Close();
            return(onay);
        }