Skip to main content

Posts

Showing posts with the label Add Edit Delete in C#

Sample CRUD application in C# and MS SQL Server

For this example, we'll be creating a simple sales management for a ticketing office named ACheapSeat. The application allows buying of tickets for a particular event in a given venue. For this example, let's have tickets for three (3) venues: Cowboy Stadium Tickets , Ringling Brothers Circus Tickets , and Kyle Field Tickets . First, create the database named acheapseat in MS SQL Server. (I'm using MS SQL Server 2005 Express edition). Create the following tables: 1. Venues     Id: int, PK, Auto-increment, not null     Name: varchar(50), not null 2. Events     Id:int, PK, Auto-increment, not null     Description: varchar(50), not null     DateTime: timestamp, not null     VenueId: FK, int, not null     Price: numeric 3. TicketSales     Id: int, PK, Auto-increment, not null     DateBought: timestamp, not null     EventId: FK,...