Beispiel #1
0
        public void deleteStationById(int sid)
        {
            string       sql  = "exec delstation @sid";
            SqlParameter pSid = new SqlParameter("@sid", sid);

            db.ExecuteUpdate(sql, pSid);
        }
Beispiel #2
0
        public void addRoute(string name, string first, string last, int price)
        {
            string       sql    = "insert into route(name,first,last,price) values (@name,@first,@last,@price)";
            SqlParameter pNname = new SqlParameter("@name", name);
            SqlParameter pFirst = new SqlParameter("@first", first);
            SqlParameter pLast  = new SqlParameter("@last", last);
            SqlParameter pPrice = new SqlParameter("@price", price);

            db.ExecuteUpdate(sql, pNname, pFirst, pLast, pPrice);
        }