180 likes | 278 Vues
ASP.Net Final Project. - Team Project : DigiEvent Manager - Date : November 12 th 2013 - Name : William H. Chung Jay ( Jeong Jae) Lee. The Purpose of DigiEvent Manager. Create an Internet Event Website for a client.
E N D
ASP.Net Final Project - Team Project : DigiEvent Manager - Date : November 12th 2013 - Name : William H. Chung Jay (Jeong Jae) Lee
The Purpose of DigiEvent Manager • Create an Internet Event Website for a client. • Allows web users to browse upcoming events, view event details, create an event, register and update user profiles, and so on. • Implements 8 Business Requirements. • DB tables : DigiUser, DigiEvent, and ASP_NET*
DigiUser Table [UserID] [uniqueidentifier] NOT NULL, [UserName] [nvarchar](256) NOT NULL, [Type] [tinyint] NOT NULL, [CreatedDate] [datetime] NOT NULL, [UpdatedDate] [datetime] NOT NULL, [FirstName] [nvarchar](30) NOT NULL, [LastName] [nvarchar](20) NOT NULL, [Email] [nvarchar](50) NOT NULL, [Password] [nvarchar](128) NULL, [PostalCode] [nchar](6) NOT NULL, [SubsOption] [bit] NULL, [ts] [timestamp] NOT NULL,
DigiEvent Table [DigiEventID] [int] IDENTITY(1,1) NOT NULL, [StartDate] [datetime] NOT NULL, [EndDate] [datetime] NOT NULL, [CreatedDate] [datetime] NOT NULL, [UpdatedDate] [datetime] NOT NULL, [Title] [nvarchar](30) NOT NULL, [Description] [nvarchar](125) NOT NULL, [Details] [nvarchar](125) NULL, [Address] [nvarchar](30) NOT NULL, [City] [nvarchar](20) NOT NULL, [Province] [tinyint] NOT NULL, [PostalCode] [nchar](6) NOT NULL, [IsSalesEnded] [bit] NOT NULL, [Price] [smallmoney] NOT NULL, [MaxAttendees] [smallint] NOT NULL, [IsPublished] [bit] NOT NULL, [IsDisable] [bit] NOT NULL, [IsCancelled] [bit] NOT NULL, [ImageOfEvent] [nvarchar](max) NULL, [ts] [timestamp] NOT NULL
Business Rule 001 • Event Publish Window. • An event cannot be published more than 80 days before the date of the event. • Applied into a stored procedure PublishEvent. If @CurrentEndDate < GETDATE() OR @CurrentCancelStatus = 'True' BEGIN SET @Error = 'The past or cancelled event cannot be altered' RAISERROR (@Error,16,1) END ELSE IF @CurrentPublishStatus = 'True' BEGIN SET @Error = 'The event was already published' RAISERROR (@Error,16,1) END ELSE IF DATEDIFF(DAY, GETDATE(), @CurrentStartDate) > 80 BEGIN SET @Error = 'An event cannot be published more than 80 days before the date of the event' RAISERROR (@Error,16,1) END
Business Rule 002 • Past Event Cannot be Altered. • An event that has already occurred cannot be updated or canceled. • Applied into stored procedures : CancelEvent, UpdateEvent. DECLARE @CurrentEndDatedatetime SET @CurrentEndDate = (SELECT EndDate FROM DigiEvent WHERE DigiEventID = @DigiEventID) DECLARE @CurrentCancelStatus bit SET @CurrentCancelStatus = (SELECT IsCancelled FROM DigiEvent WHERE DigiEventID = @DigiEventID) If @CurrentEndDate < GETDATE() OR @CurrentCancelStatus = 'True' BEGIN DECLARE @Error char(50) SET @Error = 'The past or cancelled event cannot be altered' RAISERROR (@Error,16,1) END
Business Rule 003 • Past Events Are Not Visible. • Past events are not visible to the general public. • Applied into stored procedures : DigiLookup(s). - WHERE e.IsPublished = 'True' AND e.IsDisable = 'False' AND e.IsCancelled = 'False’ AND e.EndDate >= getdate();
Business Rule 006 • Unique Email Address. • All user email addresses must be unique in the system. • Applied into DigiUser Table when creating it. • ALTER TABLE [dbo].[DigiUser] ADD CONSTRAINT [UniqueEmail] UNIQUE NONCLUSTERED
Business Rule 011 • Required Event Data. • All event data must be entered before the event can be published. • Applied into DigiEventAdd.aspx, DigiEventEdit.aspx <asp:RequiredFieldValidator class="error" ID="rfvTitle" runat="server" ControlToValidate="txtTitle" Text="*" ErrorMessage="Title is required"> </asp:RequiredFieldValidator>
Business Rule 013 • Disabled Events Are Not Visible. • Past events not visible to the general public. Admin can see all events but only see upcoming events by default • Applied into stored procedures : DigiLookup(s). - WHERE e.IsPublished = 'True' AND e.IsDisable = 'False' AND e.IsCancelled = 'False’ AND e.EndDate >= getdate();
Business Rule 015 • Cancelled Events Are Not Visible. • Past events are not visible to the general public. Organizers and Admins can see all events but only see upcoming events by default • Applied into stored procedures : DigiLookup(s). - WHERE e.IsPublished = 'True' AND e.IsDisable = 'False' AND e.IsCancelled = 'False’ AND e.EndDate >= getdate();
Business Rule 016 • Cancelled Events Cannot Be Altered. • An event that has been cancelled cannot be updated. • Check the IsCancelled field before executing UpdateEvent If @CurrentEndDate < GETDATE() OR @CurrentCancelStatus = 'True' BEGIN DECLARE @Error char(50) SET @Error = 'The past or cancelled event cannot be altered' RAISERROR (@Error,16,1) END
Challenge • Lack of Time - Plan ahead and design it very carefully. (Some Use Cases were given separately.) • Protect the source - Save it frequently. • BitBucket (Tickets, Commits)
Further Studies • All the task related with Tickets & Keywords can be applied. • Pay for Tickets, Get Event Tickets • View Keywords, Add Keyword, Edit Keyword, Remove Keyword • Needs to make the web site more user friendly.