Beispiel #1
0
        public DataTable PostOwnerPitch([FromBody] ClubOwner_pitch p)
        {
            System.Diagnostics.Debug.WriteLine("Inside pitch_Post********************************** ");
            DataTable result = handler.clubOwner_pitch(p);

            return(result);
        }
Beispiel #2
0
        public DataTable clubOwner_pitch(ClubOwner_pitch c)
        {
            string query = "Insert into Pitch (clubId,pitch#,creationDate,capacity,price,type) " +
                           " VALUES (" + c.clubid + "," + c.pitch_no + ",'" + c.creation_date.ToString("yyyy-MM-dd ")
                           + "'," + c.capacity + "," + c.price + "," + c.type + ")";

            if (dbMan.ExecuteNonQuery(query) != 0)
            {
                query = "SELECT * FROM Pitch WHERE clubId=" + c.clubid + " AND pitch# ="
                        + c.pitch_no + ";";
                return(dbMan.ExecuteReader(query));
            }
            else
            {
                return(null);
            }
        }