Example #1
0
 public static int Ekle(EntitKulup deger)
 {
     if (deger.KULUPAD != null)
     {
         return(FacadeKulup.Ekle(deger));
     }
     return(-1);
 }
Example #2
0
        public static bool Guncelle(EntitKulup deger)
        {
            if (deger.KULUPAD != null && deger.KULUPID != 0)

            {
                return(FacadeKulup.GUNCELLE(deger));
            }
            return(false);
        }
Example #3
0
        public static int Ekle(EntitKulup Deger)
        {
            SqlCommand komut = new SqlCommand("KULUPEKLE", SqlSonnect.baglanti);

            komut.CommandType = CommandType.StoredProcedure;
            if (komut.Connection.State != ConnectionState.Open)
            {
                komut.Connection.Open();
            }
            komut.Parameters.AddWithValue("KULUPAD", Deger.KULUPAD);
            return(komut.ExecuteNonQuery());
        }
Example #4
0
        public static bool GUNCELLE(EntitKulup deger)
        {
            SqlCommand komut = new SqlCommand("KULUPGUNCELLE", SqlSonnect.baglanti);

            komut.CommandType = CommandType.StoredProcedure;
            if (komut.Connection.State != ConnectionState.Open)
            {
                komut.Connection.Open();
            }
            komut.Parameters.AddWithValue("KULUPAD", deger.KULUPAD);
            komut.Parameters.AddWithValue("KULUPID", deger.KULUPID);
            return(komut.ExecuteNonQuery() > 0);
        }
Example #5
0
        public static List <EntitKulup> KULUPLISTESI()
        {
            List <EntitKulup> degerler = new List <EntitKulup>();
            SqlCommand        komut    = new SqlCommand("KULUPLISTESI", SqlSonnect.baglanti);

            komut.CommandType = CommandType.StoredProcedure;
            if (komut.Connection.State != ConnectionState.Open)
            {
                komut.Connection.Open();
            }
            SqlDataReader dr = komut.ExecuteReader();

            while (dr.Read())
            {
                EntitKulup ent = new EntitKulup();
                ent.KULUPID = Convert.ToInt16(dr["KULUPID"]);
                ent.KULUPAD = dr["KULUPAD"].ToString();
                degerler.Add(ent);
            }
            dr.Close();
            return(degerler);
        }