.net 创立一个分布式web 应用程序

  • Y1_486608
    了解作者
  • 72.5KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-18 05:15
    上传日期
.net 创立一个分布式web 应用程序
20051114034750.zip
  • netufo
  • model
  • create.sql
    9.1KB
  • remove.sql
    180B
  • view
  • images
  • NetUFO.jpg
    16.7KB
  • architecture.jpg
    12KB
  • controls
  • header.cs
    450B
  • footer.cs
    670B
  • locationlist.cs
    598B
  • navigation.cs
    1.2KB
  • reportgrid.cs
    1.9KB
  • bin
  • NetUFO.Controller.dll
    28KB
  • NetUFO.View.dll
    28KB
  • report.aspx.cs
    1.3KB
  • location_reports.aspx.cs
    765B
  • Web.config
    2.1KB
  • start.aspx
    1.4KB
  • search_results.aspx
    857B
  • view_report.aspx.cs
    3.1KB
  • login.aspx.cs
    1.4KB
  • logout.aspx.cs
    269B
  • global.asax
    78B
  • login.aspx
    1.7KB
  • search.aspx.cs
    782B
  • location_results.aspx
    865B
  • location_results.aspx.cs
    836B
  • location_reports.aspx
    1.3KB
  • global.asax.cs
    454B
  • logout.aspx
    610B
  • netufo.css
    3.1KB
  • error.aspx
    409B
  • search_results.aspx.cs
    803B
  • webservices.asmx.cs
    5.5KB
  • report.aspx
    2KB
  • search.aspx
    1.3KB
  • webservices.asmx
    98B
  • view_report.aspx
    2.6KB
  • Makefile
    1.1KB
  • default.aspx
    624B
  • docs
  • controller
  • assembly.cs
    273B
  • agent.cs
    5.4KB
  • location.cs
    4.9KB
  • report.cs
    9.4KB
  • db.cs
    4.9KB
  • followup.cs
    4.5KB
  • Makefile
    998B
  • NetUFO.Controller.xml
    13.1KB
  • NetUFO.snk
    596B
  • Makefile
    451B
内容介绍
-- database creation script for netufo -- create the database print 'Creating netufo database...' go use [master] go if exists (select [name] from [master].[dbo].[sysdatabases] where [name] = 'netufo') drop database [netufo] go create database [netufo] go use [netufo] go print 'Creating netufo tables...' go create table [dbo].[agent] ( [agent_id] uniqueidentifier not null default(newid()) constraint [PK_agent] primary key nonclustered, [agent_codename] varchar(32) not null constraint [IX_agent_unique] unique ([agent_codename]), [agent_password] varchar(16) not null ) go create table [dbo].[location] ( [location_id] uniqueidentifier not null default(newid()) constraint [PK_location] primary key nonclustered, [location_city] varchar(64) not null, [location_state] varchar(64) not null, [location_country] varchar(64) not null constraint [IX_location_unique] unique ([location_country], [location_state], [location_city]) ) go create table [dbo].[report] ( [report_id] uniqueidentifier not null default(newid()) constraint [PK_report] primary key nonclustered, [report_agent_id] uniqueidentifier not null constraint [FK_report_agent] foreign key references [dbo].[agent] ([agent_id]), [report_location_id] uniqueidentifier not null constraint [FK_report_location] foreign key references [dbo].[location] ([location_id]), [report_date] datetime not null default(getdate()), [report_title] varchar(128) not null, [report_text] text not null ) go create table [dbo].[followup] ( [followup_id] uniqueidentifier not null default(newid()) constraint [PK_followup] primary key nonclustered, [followup_report_id] uniqueidentifier not null constraint [FK_followup_report] foreign key references [dbo].[report] ([report_id]), [followup_agent_id] uniqueidentifier not null constraint [FK_followup_agent] foreign key references [dbo].[agent] ([agent_id]), [followup_date] datetime not null default(getdate()), [followup_text] text not null ) go -- create the views print 'Creating netufo views...' go create view [dbo].[vwAgentReports] as select [rpt].[report_id], [rpt].[report_date], [rpt].[report_title], [rpt].[report_text], [agt].[agent_id], [agt].[agent_codename], [loc].[location_id], [loc].[location_city], [loc].[location_state], [loc].[location_country] from [dbo].[report] [rpt] inner join [dbo].[agent] [agt] on [rpt].[report_agent_id] = [agt].[agent_id] inner join [dbo].[location] [loc] on [rpt].[report_location_id] = [loc].[location_id] go create view [dbo].[vwFollowups] as select [fup].[followup_id], [fup].[followup_date], [fup].[followup_report_id], [followup_text], [agt].[agent_id], [agt].[agent_codename] from [dbo].[followup] [fup] inner join [dbo].[agent] [agt] on [fup].[followup_agent_id] = [agt].[agent_id] go -- create the stored procedures print 'Creating stored procedures' go create procedure [dbo].[spInsertLocation] @City varchar(64), @State varchar(64), @Country varchar(64) as declare @id uniqueidentifier select @id = newid() insert into [location] values (@id, @City, @State, @Country) select @id go create procedure [dbo].[spUpdateLocation] @Id uniqueidentifier, @City varchar(64), @State varchar(64), @Country varchar(64) as update [location] set [location_city] = @City, [location_state] = @State, [location_country] = @Country where [location_id] = @id go create procedure [dbo].[spListLocations] as select [location_id], [location_city], [location_state], [location_country] from [location] order by [location_country], [location_state], [location_city] go create procedure [dbo].[spInsertAgent] @CodeName varchar(32), @Password varchar(16) as declare @id uniqueidentifier select @id = newid() insert into [agent] values (@id, @CodeName, @Password) select @id go create procedure [dbo].[spUpdateAgent] @Id uniqueidentifier, @CodeName varchar(32), @Password varchar(16) as update [agent] set [agent_codename] = @CodeName, [agent_password] = @Password where [agent_id] = @id go create procedure [dbo].[spValidateAgent] @CodeName varchar(32), @Password varchar(16) as select [agent_id], [agent_codename] from [agent] where [agent_codename] = @CodeName and [agent_password] = @Password go create procedure [dbo].[spListAgents] as select [agent_id], [agent_codename] from [agent] order by [agent_codename] go create procedure [dbo].[spInsertReport] @AgentID uniqueidentifier, @LocationID uniqueidentifier, @Title varchar(128), @Text text as insert into [report] ([report_agent_id], [report_location_id], [report_title], [report_text]) values (@AgentID, @LocationID, @Title, @Text) go create procedure [dbo].[spGetReport] @Id uniqueidentifier as select [r].[report_id], [r].[report_date], [r].[report_title], [r].[report_text], [a].[agent_id], [a].[agent_codename], [l].[location_id], [l].[location_city], [l].[location_state], [l].[location_country] from [report] [r] inner join [dbo].[agent] [a] on [r].[report_agent_id] = [a].[agent_id] inner join [dbo].[location] [l] on [r].[report_location_id] = [l].[location_id] where [report_id] = @Id go create procedure [dbo].[spGetLastReport] @AgentID uniqueidentifier as select top 1 [r].[report_id], [r].[report_date], [r].[report_title], [r].[report_text], [a].[agent_id], [a].[agent_codename], [l].[location_id], [l].[location_city], [l].[location_state], [l].[location_country] from [report] [r] inner join [dbo].[agent] [a] on [r].[report_agent_id] = [a].[agent_id] inner join [dbo].[location] [l] on [r].[report_location_id] = [l].[location_id] where [agent_id] = @AgentID order by [report_date] desc go create procedure [dbo].[spListReportsByLocation] @LocationID uniqueidentifier as select [report_id], [report_date], [report_title], [agent_id], [agent_codename], [location_id], [location_city], [location_state], [location_country] from [vwAgentReports] [v] where [location_id] = @LocationID order by [report_date] desc go create procedure [dbo].[spListReportsBySearch] @Criteria varchar(64) as select [report_id], [report_date], [report_title], [agent_id], [agent_codename], [location_id], [location_city], [location_state], [location_country] from [vwAgentReports] [v] where [location_city] like @Criteria or [location_state] like @Criteria or [location_country] like @Criteria or [report_title] like @Criteria or [report_text] like @Criteria order by [report_date] desc go create procedure [dbo].[spInsertFollowup] @ReportID uniqueidentifier, @AgentID uniqueidentifier, @Text text as insert into [followup] ([followup_report_id], [followup_agent_id], [followup_text]) values (@ReportID, @AgentID, @Text) go create procedure [dbo].[spGetFollowup] @Id uniqueidentifier as select [f].[followup_id], [f].[followup_report_id], [f].[followup_date], [f].[followup_text], [a].[agent_id], [a].[agent_codename] from [followup] [f] inner join [dbo].[agent] [a] on [f].[followup_agent_id] = [a].[agent_id] where [followup_id] = @Id go create procedure [dbo].[spListFollowups] @ReportId uniqueidentifier as select [followup_id], [followup_report_id], [followup_date], [followup_text], [agent_id], [agent_codename] from [vwFollowups] where [followup_report_id] = @ReportId order by [followup_date] desc go -- insert some data print 'Inserting netufo initial data...' go set nocount on insert into [agent] values ('{384A3574-3A19-4ed1-98A1-9E5277F967AA}', 'blue', 'blue') insert into [agent] values ('{D9E5F11A-EFC8-43a5-A87A-99F79E4DC9CC}', 'red', 'red') insert into [location] values ('{12ABCCA7-BEBE-4849-AC5F-C1CF2F6B15B0}', 'Islip', 'NY', 'USA') insert into [location] ([location_city], [location_state], [locatio
评论
    相关推荐