Пример #1
0
        //public static ESiparisler SiparisBul(string masaAdi, string urunAdi)
        //{
        //    SqlCommand cmd = new SqlCommand("select * from TableProducts")
        //}

        public static void SiparisSil(string urunAdi, string masaAdi)
        {
            int        urunID = DALUrun.UrunBul(urunAdi).ID;
            int        masaID = DALMasa.MasaBul(masaAdi).ID;
            SqlCommand cmd    = new SqlCommand("sp_SiparisSil", baglanti.conn);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("masaID", masaID);
            cmd.Parameters.AddWithValue("urunID", urunID);
            baglanti.conn.Open();
            cmd.ExecuteNonQuery();
            baglanti.conn.Close();
        }
Пример #2
0
        public static void Ekle(string masaAdi, ESiparisler s)
        {
            int        urunID = DALUrun.UrunBul(s.ProductName).ID;
            int        masaID = DALMasa.MasaBul(masaAdi).ID;
            SqlCommand cmd    = new SqlCommand("sp_SiparisEkle", baglanti.conn);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("masaID", masaID);
            cmd.Parameters.AddWithValue("urunID", urunID);
            cmd.Parameters.AddWithValue("miktar", s.Quantity);
            baglanti.conn.Open();
            cmd.ExecuteNonQuery();
            baglanti.conn.Close();
        }