Ejemplo n.º 1
0
        public static bool bagisKanDeposuIdArama(kanDepo kanDepo)
        {
            SqlConnection sqlbaglanti = openConnection();

            try
            {
                SqlCommand veriOku = new SqlCommand("select * from kanDeposu where kanDeposuId=@kanDeposuId", sqlbaglanti);

                veriOku.Parameters.AddWithValue("@kanDeposuId", kanDepo.getKanDeposuId());


                SqlDataReader rdr = veriOku.ExecuteReader();
                rdr.Read();

                if (rdr.HasRows)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                connectionClose(sqlbaglanti);
            }
        }
Ejemplo n.º 2
0
        public static void bagisKanDeposuMerkeziSil(kanDepo kandepo)
        {
            SqlConnection sqlbaglanti = openConnection();
            SqlCommand    veriOku     = new SqlCommand("DELETE FROM kanDeposu WHERE kanDeposuId=@kanDeposuId", sqlbaglanti);

            veriOku.Parameters.AddWithValue("@kanDeposuId", kandepo.getKanDeposuId());



            try
            {
                veriOku.ExecuteNonQuery();
            }
            catch (Exception)
            {
            }
            finally
            {
                connectionClose(sqlbaglanti);
            }
        }
Ejemplo n.º 3
0
        public static void bagisKanDeposuMerkeziGuncelle(kanDepo kandepo)
        {
            SqlConnection sqlbaglanti = openConnection();
            SqlCommand    veriOku     = new SqlCommand("UPDATE kanDeposu SET kanGrubu=@kanGrubu,verilisTarihi=@verilisTarihi,miktar=@miktar,subeKodu=@subeKodu where kanDeposuId=@kanDeposuId", sqlbaglanti);

            veriOku.Parameters.AddWithValue("@kanDeposuId", kandepo.getKanDeposuId());
            veriOku.Parameters.AddWithValue("@kanGrubu", kandepo.getKanGrubu());
            veriOku.Parameters.AddWithValue("@verilisTarihi", kandepo.getVerilisTarihi());
            veriOku.Parameters.AddWithValue("@miktar", kandepo.getMiktar());
            veriOku.Parameters.AddWithValue("@subeKodu", kandepo.getSubeKodu());


            try
            {
                veriOku.ExecuteNonQuery();
            }
            catch (Exception)
            {
            }
            finally
            {
                connectionClose(sqlbaglanti);
            }
        }
Ejemplo n.º 4
0
        public static void bagisKanDeposuMerkeziEkle(kanDepo kandepo)
        {
            SqlConnection sqlbaglanti = openConnection();
            SqlCommand    veriOku     = new SqlCommand("INSERT INTO kanDeposu (kanDeposuId,kanGrubu,verilisTarihi,miktar,subeKodu) VALUES (@kanDeposuId,@kanGrubu,@verilisTarihi,@miktar,@subeKodu)", sqlbaglanti);

            veriOku.Parameters.AddWithValue("@kanDeposuId", kandepo.getKanDeposuId());
            veriOku.Parameters.AddWithValue("@kanGrubu", kandepo.getKanGrubu());
            veriOku.Parameters.AddWithValue("@verilisTarihi", kandepo.getVerilisTarihi());
            veriOku.Parameters.AddWithValue("@miktar", kandepo.getMiktar());
            veriOku.Parameters.AddWithValue("@subeKodu", kandepo.getSubeKodu());


            try
            {
                veriOku.ExecuteNonQuery();
            }
            catch (Exception)
            {
            }
            finally
            {
                connectionClose(sqlbaglanti);
            }
        }