예제 #1
0
        public static void MasaBosalt(string masaAdi)
        {
            int        masaID = DALMasa.MasaBul(masaAdi).ID;
            SqlCommand cmd    = new SqlCommand("sp_MasaBosalt", baglanti.conn);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("masaID", masaID);
            baglanti.conn.Open();
            cmd.ExecuteNonQuery();
            baglanti.conn.Close();
        }
예제 #2
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();
        }
예제 #3
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();
        }