USE [helpdesk]
GO
/****** Object:  View [dbo].[v_subcat]    Script Date: 10/03/2016 19:44:15 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_subcat]'))
DROP VIEW [dbo].[v_subcat]
GO
/****** Object:  View [dbo].[v_tickets]    Script Date: 10/03/2016 19:44:15 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_tickets]'))
DROP VIEW [dbo].[v_tickets]
GO
/****** Object:  View [dbo].[v_topcat]    Script Date: 10/03/2016 19:44:15 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_topcat]'))
DROP VIEW [dbo].[v_topcat]
GO
/****** Object:  View [dbo].[v_users]    Script Date: 10/03/2016 19:44:15 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_users]'))
DROP VIEW [dbo].[v_users]
GO
/****** Object:  View [dbo].[v_cat1]    Script Date: 10/03/2016 19:44:15 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_cat1]'))
DROP VIEW [dbo].[v_cat1]
GO
/****** Object:  View [dbo].[v_cat2]    Script Date: 10/03/2016 19:44:15 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_cat2]'))
DROP VIEW [dbo].[v_cat2]
GO
/****** Object:  View [dbo].[v_pc]    Script Date: 10/03/2016 19:44:15 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_pc]'))
DROP VIEW [dbo].[v_pc]
GO
/****** Object:  View [dbo].[v_priority]    Script Date: 10/03/2016 19:44:15 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_priority]'))
DROP VIEW [dbo].[v_priority]
GO
/****** Object:  View [dbo].[v_reportmonth]    Script Date: 10/03/2016 19:44:15 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_reportmonth]'))
DROP VIEW [dbo].[v_reportmonth]
GO
/****** Object:  View [dbo].[v_reportsdate]    Script Date: 10/03/2016 19:44:15 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_reportsdate]'))
DROP VIEW [dbo].[v_reportsdate]
GO
/****** Object:  View [dbo].[v_status]    Script Date: 10/03/2016 19:44:15 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_status]'))
DROP VIEW [dbo].[v_status]
GO
/****** Object:  StoredProcedure [dbo].[sp_kb_insertcategory]    Script Date: 10/03/2016 19:44:15 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_kb_insertcategory]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[sp_kb_insertcategory]
GO
/****** Object:  StoredProcedure [dbo].[sp_kb_movecategory]    Script Date: 10/03/2016 19:44:15 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_kb_movecategory]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[sp_kb_movecategory]
GO
/****** Object:  StoredProcedure [dbo].[sp_ScanInstall]    Script Date: 10/03/2016 19:44:14 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_ScanInstall]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[sp_ScanInstall]
GO
/****** Object:  UserDefinedFunction [dbo].[GetdeptName]    Script Date: 10/03/2016 19:44:14 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[GetdeptName]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
DROP FUNCTION [dbo].[GetdeptName]
GO
/****** Object:  UserDefinedFunction [dbo].[GetPcDetail]    Script Date: 10/03/2016 19:44:14 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[GetPcDetail]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
DROP FUNCTION [dbo].[GetPcDetail]
GO
/****** Object:  Table [dbo].[helpdesk_assigntome]    Script Date: 10/03/2016 19:44:13 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_assigntome_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_assigntome] DROP CONSTRAINT [DF_helpdesk_assigntome_createdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_assigntome_isread]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_assigntome] DROP CONSTRAINT [DF_helpdesk_assigntome_isread]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_assigntome]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_assigntome]
GO
/****** Object:  Table [dbo].[helpdesk_autoscancache]    Script Date: 10/03/2016 19:44:13 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_autoscancache]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_autoscancache]
GO
/****** Object:  Table [dbo].[helpdesk_enum]    Script Date: 10/03/2016 19:44:13 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_enum]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_enum]
GO
/****** Object:  Table [dbo].[helpdesk_favourite]    Script Date: 10/03/2016 19:44:13 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_favourite_fcreatedate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_favourite] DROP CONSTRAINT [DF_helpdesk_favourite_fcreatedate]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_favourite]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_favourite]
GO
/****** Object:  Table [dbo].[helpdesk_iassign]    Script Date: 10/03/2016 19:44:13 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_iassign_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_iassign] DROP CONSTRAINT [DF_helpdesk_iassign_createdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_iassign_isread]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_iassign] DROP CONSTRAINT [DF_helpdesk_iassign_isread]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_iassign]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_iassign]
GO
/****** Object:  Table [dbo].[helpdesk_kbase]    Script Date: 10/03/2016 19:44:13 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_kbase_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_kbase] DROP CONSTRAINT [DF_helpdesk_kbase_createdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_kbase_updatedate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_kbase] DROP CONSTRAINT [DF_helpdesk_kbase_updatedate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_kbase_click]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_kbase] DROP CONSTRAINT [DF_helpdesk_kbase_click]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_kbase_good]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_kbase] DROP CONSTRAINT [DF_helpdesk_kbase_good]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_kbase_updatetime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_kbase] DROP CONSTRAINT [DF_helpdesk_kbase_updatetime]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_kbase]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_kbase]
GO
/****** Object:  Table [dbo].[helpdesk_kbcategory]    Script Date: 10/03/2016 19:44:13 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_kbcategory_parentid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_kbcategory] DROP CONSTRAINT [DF_portal_kbcategory_parentid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_kbcategory_orderid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_kbcategory] DROP CONSTRAINT [DF_portal_kbcategory_orderid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_kbcategory_depth]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_kbcategory] DROP CONSTRAINT [DF_portal_kbcategory_depth]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_hr2_kbcsscategory_path]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_kbcategory] DROP CONSTRAINT [DF_hr2_kbcsscategory_path]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_kbcategory]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_kbcategory]
GO
/****** Object:  Table [dbo].[helpdesk_lists]    Script Date: 10/03/2016 19:44:12 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__helpdesk___creat__0CBAE877]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_lists] DROP CONSTRAINT [DF__helpdesk___creat__0CBAE877]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_lists_islock]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_lists] DROP CONSTRAINT [DF_helpdesk_lists_islock]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_lists_ispublic]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_lists] DROP CONSTRAINT [DF_helpdesk_lists_ispublic]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_lists_hour]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_lists] DROP CONSTRAINT [DF_helpdesk_lists_hour]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_lists_isclose]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_lists] DROP CONSTRAINT [DF_helpdesk_lists_isclose]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_lists_ispop]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_lists] DROP CONSTRAINT [DF_helpdesk_lists_ispop]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_lists_ispoint]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_lists] DROP CONSTRAINT [DF_helpdesk_lists_ispoint]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_lists]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_lists]
GO
/****** Object:  Table [dbo].[helpdesk_loginscan_hardware]    Script Date: 10/03/2016 19:44:12 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_loginscan_hardware]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_loginscan_hardware]
GO
/****** Object:  Table [dbo].[helpdesk_loginscan_software]    Script Date: 10/03/2016 19:44:12 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_loginscan_software_guid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_loginscan_software] DROP CONSTRAINT [DF_helpdesk_loginscan_software_guid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_loginscan_software_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_loginscan_software] DROP CONSTRAINT [DF_helpdesk_loginscan_software_createdate]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_loginscan_software]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_loginscan_software]
GO
/****** Object:  Table [dbo].[helpdesk_logs]    Script Date: 10/03/2016 19:44:12 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_logs_adddate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_logs] DROP CONSTRAINT [DF_helpdesk_logs_adddate]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_logs]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_logs]
GO
/****** Object:  Table [dbo].[helpdesk_movelog]    Script Date: 10/03/2016 19:44:12 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_movelog_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_movelog] DROP CONSTRAINT [DF_helpdesk_movelog_createdate]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_movelog]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_movelog]
GO
/****** Object:  Table [dbo].[helpdesk_news]    Script Date: 10/03/2016 19:44:12 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_news_istop]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_news] DROP CONSTRAINT [DF_helpdesk_news_istop]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_news_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_news] DROP CONSTRAINT [DF_helpdesk_news_createdate]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_news]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_news]
GO
/****** Object:  Table [dbo].[helpdesk_newscat]    Script Date: 10/03/2016 19:44:12 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_newscat]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_newscat]
GO
/****** Object:  Table [dbo].[helpdesk_outlook_calendar]    Script Date: 10/03/2016 19:44:12 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_outlook_calendar]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_outlook_calendar]
GO
/****** Object:  Table [dbo].[helpdesk_pc]    Script Date: 10/03/2016 19:44:12 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_pc_ispopup]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_pc] DROP CONSTRAINT [DF_helpdesk_pc_ispopup]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_pc_ip10]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_pc] DROP CONSTRAINT [DF_helpdesk_pc_ip10]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_pc]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_pc]
GO
/****** Object:  Table [dbo].[helpdesk_pc_asset]    Script Date: 10/03/2016 19:44:12 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_pc_asset]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_pc_asset]
GO
/****** Object:  Table [dbo].[helpdesk_pc_details]    Script Date: 10/03/2016 19:44:12 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_pc_details]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_pc_details]
GO
/****** Object:  Table [dbo].[helpdesk_pc_logs]    Script Date: 10/03/2016 19:44:12 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_pc_logs]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_pc_logs]
GO
/****** Object:  Table [dbo].[helpdesk_pc_param]    Script Date: 10/03/2016 19:44:12 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_pc_param_orderid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_pc_param] DROP CONSTRAINT [DF_helpdesk_pc_param_orderid]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_pc_param]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_pc_param]
GO
/****** Object:  Table [dbo].[Helpdesk_PointList]    Script Date: 10/03/2016 19:44:12 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Helpdesk_PointList_adddate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Helpdesk_PointList] DROP CONSTRAINT [DF_Helpdesk_PointList_adddate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Helpdesk_PointList_isprocess]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Helpdesk_PointList] DROP CONSTRAINT [DF_Helpdesk_PointList_isprocess]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Helpdesk_PointList]') AND type in (N'U'))
DROP TABLE [dbo].[Helpdesk_PointList]
GO
/****** Object:  Table [dbo].[helpdesk_repairlist]    Script Date: 10/03/2016 19:44:12 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_repairlist]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_repairlist]
GO
/****** Object:  Table [dbo].[helpdesk_report]    Script Date: 10/03/2016 19:44:11 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_outlook_report_createdate2]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_report] DROP CONSTRAINT [DF_outlook_report_createdate2]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_report]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_report]
GO
/****** Object:  Table [dbo].[helpdesk_reportcomm]    Script Date: 10/03/2016 19:44:11 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_reportcomm]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_reportcomm]
GO
/****** Object:  Table [dbo].[helpdesk_reportdetail]    Script Date: 10/03/2016 19:44:11 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_reportdetail]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_reportdetail]
GO
/****** Object:  Table [dbo].[helpdesk_scanlist]    Script Date: 10/03/2016 19:44:11 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_scanlist]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_scanlist]
GO
/****** Object:  Table [dbo].[helpdesk_sday]    Script Date: 10/03/2016 19:44:11 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_sday]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_sday]
GO
/****** Object:  Table [dbo].[helpdesk_searchkey]    Script Date: 10/03/2016 19:44:11 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_searchkey]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_searchkey]
GO
/****** Object:  Table [dbo].[helpdesk_software]    Script Date: 10/03/2016 19:44:11 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_software]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_software]
GO
/****** Object:  Table [dbo].[helpdesk_svr]    Script Date: 10/03/2016 19:44:11 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_svr_iswarning]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_svr] DROP CONSTRAINT [DF_helpdesk_svr_iswarning]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_svr_adddate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_svr] DROP CONSTRAINT [DF_helpdesk_svr_adddate]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_svr]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_svr]
GO
/****** Object:  Table [dbo].[helpdesk_svrdisk]    Script Date: 10/03/2016 19:44:11 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_svrdisk_guid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_svrdisk] DROP CONSTRAINT [DF_helpdesk_svrdisk_guid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_helpdesk_svrdisk_isalert]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[helpdesk_svrdisk] DROP CONSTRAINT [DF_helpdesk_svrdisk_isalert]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_svrdisk]') AND type in (N'U'))
DROP TABLE [dbo].[helpdesk_svrdisk]
GO
/****** Object:  Table [dbo].[helphesk_categories]    Script Date: 10/03/2016 19:44:11 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helphesk_categories]') AND type in (N'U'))
DROP TABLE [dbo].[helphesk_categories]
GO
/****** Object:  Table [dbo].[helplist_reply]    Script Date: 10/03/2016 19:44:11 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helplist_reply]') AND type in (N'U'))
DROP TABLE [dbo].[helplist_reply]
GO
/****** Object:  Table [dbo].[purchase_session_lists]    Script Date: 10/03/2016 19:44:11 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__applying___creat__060DEAE8]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[purchase_session_lists] DROP CONSTRAINT [DF__applying___creat__060DEAE8]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_purchase_session_lists_auditstatus]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[purchase_session_lists] DROP CONSTRAINT [DF_purchase_session_lists_auditstatus]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_purchase_session_lists_isdelete]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[purchase_session_lists] DROP CONSTRAINT [DF_purchase_session_lists_isdelete]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[purchase_session_lists]') AND type in (N'U'))
DROP TABLE [dbo].[purchase_session_lists]
GO
/****** Object:  Table [dbo].[purchase_sessiondetails]    Script Date: 10/03/2016 19:44:11 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_purchase_sessiondetails_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[purchase_sessiondetails] DROP CONSTRAINT [DF_purchase_sessiondetails_createdate]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[purchase_sessiondetails]') AND type in (N'U'))
DROP TABLE [dbo].[purchase_sessiondetails]
GO
/****** Object:  Table [dbo].[survery_defineactive]    Script Date: 10/03/2016 19:44:11 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_defineactive_adddate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_defineactive] DROP CONSTRAINT [DF_defineactive_adddate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_defineactive_allowmultivote]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_defineactive] DROP CONSTRAINT [DF_survery_defineactive_allowmultivote]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_defineactive_ispublic]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_defineactive] DROP CONSTRAINT [DF_survery_defineactive_ispublic]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_defineactive_ispublicresult]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_defineactive] DROP CONSTRAINT [DF_survery_defineactive_ispublicresult]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_defineactive]') AND type in (N'U'))
DROP TABLE [dbo].[survery_defineactive]
GO
/****** Object:  Table [dbo].[survery_lists]    Script Date: 10/03/2016 19:44:11 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_lists_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_lists] DROP CONSTRAINT [DF_lists_createdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_lists_uid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_lists] DROP CONSTRAINT [DF_survery_lists_uid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_lists_ispass]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_lists] DROP CONSTRAINT [DF_survery_lists_ispass]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_lists_isdeleted]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_lists] DROP CONSTRAINT [DF_survery_lists_isdeleted]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_lists_isfull]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_lists] DROP CONSTRAINT [DF_survery_lists_isfull]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_lists_process]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_lists] DROP CONSTRAINT [DF_survery_lists_process]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_lists_auditstatus]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_lists] DROP CONSTRAINT [DF_survery_lists_auditstatus]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_lists]') AND type in (N'U'))
DROP TABLE [dbo].[survery_lists]
GO
/****** Object:  Table [dbo].[survery_options]    Script Date: 10/03/2016 19:44:11 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_options]') AND type in (N'U'))
DROP TABLE [dbo].[survery_options]
GO
/****** Object:  Table [dbo].[survery_subjects]    Script Date: 10/03/2016 19:44:11 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_subjects_mustfilled]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_subjects] DROP CONSTRAINT [DF_survery_subjects_mustfilled]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_subjects_col]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_subjects] DROP CONSTRAINT [DF_survery_subjects_col]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_subjects_colspan]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_subjects] DROP CONSTRAINT [DF_survery_subjects_colspan]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_subjects]') AND type in (N'U'))
DROP TABLE [dbo].[survery_subjects]
GO
/****** Object:  Table [dbo].[users_dept]    Script Date: 10/03/2016 19:44:11 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_category_parentid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_dept] DROP CONSTRAINT [DF_portal_category_parentid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_category_orderid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_dept] DROP CONSTRAINT [DF_portal_category_orderid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_category_depth]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_dept] DROP CONSTRAINT [DF_portal_category_depth]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_hr_csscategory_path]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_dept] DROP CONSTRAINT [DF_hr_csscategory_path]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_dept]') AND type in (N'U'))
DROP TABLE [dbo].[users_dept]
GO
/****** Object:  Table [dbo].[users_getpwd]    Script Date: 10/03/2016 19:44:10 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_getpwd_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_getpwd] DROP CONSTRAINT [DF_users_getpwd_createdate]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_getpwd]') AND type in (N'U'))
DROP TABLE [dbo].[users_getpwd]
GO
/****** Object:  Table [dbo].[users_releation]    Script Date: 10/03/2016 19:44:10 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_releation]') AND type in (N'U'))
DROP TABLE [dbo].[users_releation]
GO
/****** Object:  Table [dbo].[users_roles]    Script Date: 10/03/2016 19:44:10 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_roles_issystem]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_roles] DROP CONSTRAINT [DF_users_roles_issystem]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_roles]') AND type in (N'U'))
DROP TABLE [dbo].[users_roles]
GO
/****** Object:  Table [dbo].[users_users]    Script Date: 10/03/2016 19:44:10 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_users_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_portal_users_createdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_users_lastlogin]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_portal_users_lastlogin]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_users_avtor]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_users_users_avtor]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_users_logintime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_users_users_logintime]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_users_logintime_1]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_users_users_logintime_1]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_users_ismgr]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_users_users_ismgr]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_users_issec]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_users_users_issec]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_users_isstaff]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_users_users_isstaff]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_users]') AND type in (N'U'))
DROP TABLE [dbo].[users_users]
GO
/****** Object:  Table [dbo].[users_usersinroles]    Script Date: 10/03/2016 19:44:10 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_usersinroles]') AND type in (N'U'))
DROP TABLE [dbo].[users_usersinroles]
GO
/****** Object:  Table [dbo].[wx_id]    Script Date: 10/03/2016 19:44:10 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_wx_id_isdel]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[wx_id] DROP CONSTRAINT [DF_wx_id_isdel]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_wx_id_deletedate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[wx_id] DROP CONSTRAINT [DF_wx_id_deletedate]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[wx_id]') AND type in (N'U'))
DROP TABLE [dbo].[wx_id]
GO
/****** Object:  Table [dbo].[wx_id]    Script Date: 10/03/2016 19:44:10 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[wx_id]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[wx_id](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[uid] [int] NULL,
	[wxid] [nvarchar](500) NULL,
	[isdel] [int] NULL CONSTRAINT [DF_wx_id_isdel]  DEFAULT ((0)),
	[deletedate] [datetime] NULL CONSTRAINT [DF_wx_id_deletedate]  DEFAULT (getdate()),
 CONSTRAINT [PK_wx_id] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[users_usersinroles]    Script Date: 10/03/2016 19:44:10 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_usersinroles]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[users_usersinroles](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[uid] [int] NULL,
	[rolename] [nvarchar](50) NULL,
 CONSTRAINT [PK_portal_usersinroles] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[users_usersinroles] ON
INSERT [dbo].[users_usersinroles] ([id], [uid], [rolename]) VALUES (1, 1, N'Administrators')
INSERT [dbo].[users_usersinroles] ([id], [uid], [rolename]) VALUES (3, 1, N'audit')
INSERT [dbo].[users_usersinroles] ([id], [uid], [rolename]) VALUES (4, 1, N'supervisor')
INSERT [dbo].[users_usersinroles] ([id], [uid], [rolename]) VALUES (10, 16, N'supporter')
INSERT [dbo].[users_usersinroles] ([id], [uid], [rolename]) VALUES (12, 18, N'supporter')
SET IDENTITY_INSERT [dbo].[users_usersinroles] OFF
/****** Object:  Table [dbo].[users_users]    Script Date: 10/03/2016 19:44:10 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_users]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[users_users](
	[uid] [int] IDENTITY(1,1) NOT NULL,
	[username] [nvarchar](256) NOT NULL,
	[adpath] [nvarchar](1024) NULL,
	[firstname] [nvarchar](50) NULL,
	[lastname] [nvarchar](50) NULL,
	[city] [nvarchar](256) NULL,
	[Office] [nvarchar](256) NULL,
	[Description] [nvarchar](1024) NULL,
	[Tel] [nvarchar](128) NULL,
	[fax] [nvarchar](128) NULL,
	[email] [nvarchar](256) NULL,
	[MailType] [nvarchar](128) NULL,
	[Title] [nvarchar](128) NULL,
	[Department] [nvarchar](128) NULL,
	[Company] [nvarchar](128) NULL,
	[Password] [nvarchar](128) NULL,
	[displayname] [nvarchar](128) NULL,
	[StaffCode] [nvarchar](128) NULL,
	[IsAccountActive] [int] NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_portal_users_createdate]  DEFAULT (getdate()),
	[lastlogin] [datetime] NULL CONSTRAINT [DF_portal_users_lastlogin]  DEFAULT (getdate()),
	[sex] [nvarchar](50) NULL,
	[avtor] [nvarchar](300) NULL CONSTRAINT [DF_users_users_avtor]  DEFAULT ('avtor.jpg'),
	[logintimes] [int] NULL CONSTRAINT [DF_users_users_logintime]  DEFAULT ((0)),
	[ip] [nvarchar](50) NULL,
	[logintime] [int] NULL CONSTRAINT [DF_users_users_logintime_1]  DEFAULT ((0)),
	[intro] [nvarchar](500) NULL,
	[ismgr] [int] NULL CONSTRAINT [DF_users_users_ismgr]  DEFAULT ((0)),
	[issec] [int] NULL CONSTRAINT [DF_users_users_issec]  DEFAULT ((0)),
	[isstaff] [int] NULL CONSTRAINT [DF_users_users_isstaff]  DEFAULT ((1)),
	[color] [nvarchar](50) NULL,
	[mobile] [nvarchar](50) NULL,
	[pinyin] [nvarchar](50) NULL,
 CONSTRAINT [PK_portal_users_1] PRIMARY KEY CLUSTERED 
(
	[uid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[users_users] ON
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [color], [mobile], [pinyin]) VALUES (1, N'admin', NULL, NULL, NULL, NULL, N'北京', NULL, N'15001712100', N'123456', N'1939248766@qq.com', NULL, N'', N'环境部', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'管理员', N'', NULL, CAST(0x00009E4C013FE373 AS DateTime), CAST(0x0000A5C40114F41A AS DateTime), N'男', N'images/avtor.jpg', 157, N'::1', 0, N'我是管理员，负责网络', 0, 0, 1, N'#FF0000', NULL, NULL)
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [color], [mobile], [pinyin]) VALUES (15, N'李万宝', NULL, NULL, NULL, NULL, N'', NULL, N'12365895450', N'', N'983506039@qq.com', NULL, N'', N'', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'李万宝', N'', NULL, CAST(0x0000A14C01637014 AS DateTime), CAST(0x0000A1500161084B AS DateTime), N'', N'images/avtor.jpg', 3, N'::1', 0, N'', 0, 0, 1, NULL, NULL, NULL)
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [color], [mobile], [pinyin]) VALUES (16, N'周海', NULL, NULL, NULL, NULL, N'', NULL, N'', N'', N'86813438@qq.com', NULL, N'', N'IT部门', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'周海', N'', NULL, CAST(0x0000A14C016398D6 AS DateTime), CAST(0x0000A14C016398D6 AS DateTime), N'', N'images/avtor.jpg', 0, N'::1', 0, N'', 0, 0, 1, NULL, NULL, NULL)
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [color], [mobile], [pinyin]) VALUES (17, N'joly', NULL, NULL, NULL, NULL, N'', NULL, N'', N'', N'', NULL, N'', N'人事部', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'joly', N'', NULL, CAST(0x0000A52200D051AF AS DateTime), CAST(0x0000A5C400FCCB09 AS DateTime), N'', N'images/avtor.jpg', 3, N'::1', 0, N'', 0, 0, 1, NULL, NULL, NULL)
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [color], [mobile], [pinyin]) VALUES (18, N'dream', NULL, NULL, NULL, NULL, N'', NULL, N'', N'', N'dream@qq.com', NULL, N'', N'IT部门', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'dream', N'', NULL, CAST(0x0000A5C4008DD248 AS DateTime), CAST(0x0000A5C4011333B4 AS DateTime), N'', N'images/avtor.jpg', 7, N'::1', 0, N'', 0, 0, 1, NULL, NULL, NULL)
SET IDENTITY_INSERT [dbo].[users_users] OFF
/****** Object:  Table [dbo].[users_roles]    Script Date: 10/03/2016 19:44:10 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_roles]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[users_roles](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[rolename] [nvarchar](50) NULL,
	[issystem] [int] NULL CONSTRAINT [DF_users_roles_issystem]  DEFAULT ((0)),
	[roletype] [nvarchar](50) NULL,
 CONSTRAINT [PK_users_roles] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[users_roles] ON
INSERT [dbo].[users_roles] ([id], [rolename], [issystem], [roletype]) VALUES (1, N'administrators', 1, N'系统管理员')
INSERT [dbo].[users_roles] ([id], [rolename], [issystem], [roletype]) VALUES (2, N'manager', 1, N'经理')
INSERT [dbo].[users_roles] ([id], [rolename], [issystem], [roletype]) VALUES (3, N'supervisor', 1, N'主管')
INSERT [dbo].[users_roles] ([id], [rolename], [issystem], [roletype]) VALUES (5, N'supporter', 1, N'支持人员')
INSERT [dbo].[users_roles] ([id], [rolename], [issystem], [roletype]) VALUES (6, N'audit', 1, N'审批')
SET IDENTITY_INSERT [dbo].[users_roles] OFF
/****** Object:  Table [dbo].[users_releation]    Script Date: 10/03/2016 19:44:10 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_releation]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[users_releation](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[mgrid] [int] NULL,
	[secid] [int] NULL,
 CONSTRAINT [PK_users_releation] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[users_getpwd]    Script Date: 10/03/2016 19:44:10 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_getpwd]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[users_getpwd](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[uid] [int] NOT NULL,
	[display] [nvarchar](50) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_users_getpwd_createdate]  DEFAULT (getdate()),
 CONSTRAINT [PK_users_getpwd] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[users_dept]    Script Date: 10/03/2016 19:44:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_dept]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[users_dept](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[catname] [nvarchar](50) NULL,
	[parentid] [int] NULL CONSTRAINT [DF_portal_category_parentid]  DEFAULT ((0)),
	[orderid] [int] NULL CONSTRAINT [DF_portal_category_orderid]  DEFAULT ((0)),
	[depth] [int] NULL CONSTRAINT [DF_portal_category_depth]  DEFAULT ((1)),
	[note] [nvarchar](200) NULL,
	[path] [nvarchar](1000) NULL CONSTRAINT [DF_hr_csscategory_path]  DEFAULT (''),
	[types] [nvarchar](50) NULL,
 CONSTRAINT [PK_users_dept] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[users_dept] ON
INSERT [dbo].[users_dept] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (1, N'人事部', 0, 0, 1, NULL, N'', NULL)
INSERT [dbo].[users_dept] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (2, N'财务部', 0, 0, 1, NULL, N'', NULL)
INSERT [dbo].[users_dept] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (3, N'IT部门', 0, 0, 1, NULL, N'', NULL)
SET IDENTITY_INSERT [dbo].[users_dept] OFF
/****** Object:  Table [dbo].[survery_subjects]    Script Date: 10/03/2016 19:44:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_subjects]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[survery_subjects](
	[autoid] [int] IDENTITY(1,1) NOT NULL,
	[subject] [nvarchar](200) NULL,
	[types] [nvarchar](50) NULL,
	[id] [int] NULL,
	[activeid] [int] NULL,
	[mustfilled] [int] NULL CONSTRAINT [DF_survery_subjects_mustfilled]  DEFAULT ((0)),
	[typesname] [nvarchar](200) NULL,
	[col] [int] NULL CONSTRAINT [DF_survery_subjects_col]  DEFAULT ((1)),
	[IsSingleRow] [int] NULL CONSTRAINT [DF_survery_subjects_colspan]  DEFAULT ((0)),
	[bad] [nvarchar](50) NULL,
	[mid] [nvarchar](50) NULL,
	[good] [nvarchar](50) NULL,
	[coin] [int] NULL,
	[clientfun] [nvarchar](1000) NULL,
	[serverfun] [nvarchar](1000) NULL,
 CONSTRAINT [PK_subjects] PRIMARY KEY CLUSTERED 
(
	[autoid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[survery_subjects] ON
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (1, N'1.一个完整的微型电脑系统应包括', N'RadioButtonList', 1, 1, 0, N'单选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (2, N'2. 十六进制1000转换成十进制数是', N'RadioButtonList', 2, 1, 0, N'单选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (3, N'3.微型电脑的运算器、控制器及内存存储器的总称是', N'RadioButtonList', 3, 1, 0, N'单选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (4, N'4.目前我国使用较广泛的浏览器有', N'CheckBoxList', 4, 1, 0, N'复选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (5, N'5.下面文件格式是图形图像的存储格式', N'CheckBoxList', 5, 1, 0, N'复选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (6, N'问答题', N'Label', 6, 1, 0, N'标签', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (7, N'6.如何在windows上查看本机IP地址（请提供至少一种方法）', N'TextBox', 7, 1, 0, N'单行文本框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (8, N'7.如何开启windows防火墙？', N'MultiTextBox', 8, 1, 0, N'多行文本框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (9, N'8.论述一下您对网络安全的看法以及措施', N'MultiTextBox', 9, 1, 0, N'多行文本框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (10, N' 1 总体而言 您对企业满意度', N'RadioButtonList', 1, 2, 0, N'单选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (11, N'2 您对公司的归属感', N'RadioButtonList', 2, 2, 0, N'单选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (12, N' 3 您的工作量', N'RadioButtonList', 3, 2, 1, N'单选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (13, N' 4 您对自己的工作', N'RadioButtonList', 4, 2, 1, N'单选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (14, N'5 您对自己的工作与所得到的报酬', N'RadioButtonList', 5, 2, 1, N'单选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (15, N'6 您的兴趣', N'CheckBoxList', 6, 2, 1, N'复选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (16, N'7 您的工作年限', N'DropDownList', 7, 2, 1, N'下拉框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (17, N'8. 请描述您对您的领导或者下属的开发', N'MultiTextBox', 8, 2, 1, N'多行文本框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (18, N'您的职务', N'RadioButtonList', 1, 3, 1, N'单选框', 4, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (19, N'您对IT的满意度', N'GroupOption', 2, 3, 1, N'分组选项', 4, 1, N'非常差', N'一般', N'非常好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (20, N'您认为我们需要改进', N'MultiTextBox', 3, 3, 0, N'多行文本框', 4, 1, N'非常差', N'一般', N'非常好', 5, NULL, NULL)
SET IDENTITY_INSERT [dbo].[survery_subjects] OFF
/****** Object:  Table [dbo].[survery_options]    Script Date: 10/03/2016 19:44:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_options]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[survery_options](
	[itemid] [int] IDENTITY(1,1) NOT NULL,
	[id] [int] NULL,
	[item] [nvarchar](200) NULL,
	[activeid] [int] NULL,
	[subjectid] [int] NULL,
 CONSTRAINT [PK_options] PRIMARY KEY CLUSTERED 
(
	[itemid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[survery_options] ON
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (1, 1, N'A. 电脑及外部设备', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (2, 1, N'B.主机箱、键盘、显示器和打印机', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (3, 1, N'C. 硬件系统和软件系统', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (4, 1, N'D.系统软件和系统硬件', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (5, 2, N'A. 4096', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (6, 2, N'B.1024', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (7, 2, N'C. 2048 ', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (8, 2, N'D.8192', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (9, 3, N'A. CPU', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (10, 3, N'B. ALU', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (11, 3, N'C. 主机', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (12, 3, N'D. MPU', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (13, 4, N'A. 微软浏览器', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (14, 4, N'B. 谷歌浏览器', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (15, 4, N'C. 火狐浏览器', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (16, 4, N'D. QQ聊天', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (17, 5, N'A. JPG', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (18, 5, N'B. PDF', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (19, 5, N'C. PNG', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (20, 5, N'D. DOC', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (21, 1, N'不满意', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (22, 1, N'一般', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (23, 1, N'满意', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (24, 1, N'很满意', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (25, 2, N'不高', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (26, 2, N'一般', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (27, 2, N'高', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (28, 2, N'很高', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (29, 3, N'超负荷', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (30, 3, N'一般', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (31, 3, N'轻松', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (32, 3, N'很低', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (33, 4, N'不感兴趣', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (34, 4, N'一般', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (35, 4, N'感兴趣', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (36, 4, N'很有兴趣', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (37, 5, N'很不满意', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (38, 5, N'一般', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (39, 5, N'满意', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (40, 5, N'很满意', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (41, 6, N'运动', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (42, 6, N'唱歌', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (43, 6, N'表演', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (44, 6, N'摄影', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (45, 7, N'1年一下', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (46, 7, N'1-3年', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (47, 7, N'3-5年', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (48, 7, N'5-10年', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (49, 7, N'10年以上', 2, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (50, 1, N'普通员工', 3, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (51, 1, N'主管', 3, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (52, 1, N'经理', 3, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (53, 1, N'董事', 3, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (54, 2, N'IT响应速度', 3, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (55, 2, N'IT解决问题能力', 3, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (56, 2, N'IT服务态度', 3, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (57, 2, N'与用户沟通能力', 3, NULL)
SET IDENTITY_INSERT [dbo].[survery_options] OFF
/****** Object:  Table [dbo].[survery_lists]    Script Date: 10/03/2016 19:44:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_lists]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[survery_lists](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[activeid] [int] NULL,
	[username] [nvarchar](50) NULL,
	[dept] [nvarchar](50) NULL,
	[email] [nvarchar](50) NULL,
	[mobile] [nvarchar](50) NULL,
	[ctrl1] [nvarchar](1000) NULL,
	[ctrl2] [nvarchar](1000) NULL,
	[ctrl3] [nvarchar](1000) NULL,
	[ctrl4] [nvarchar](1000) NULL,
	[ctrl5] [nvarchar](1000) NULL,
	[ctrl6] [nvarchar](1000) NULL,
	[ctrl7] [nvarchar](1000) NULL,
	[ctrl8] [nvarchar](1000) NULL,
	[ctrl9] [nvarchar](1000) NULL,
	[ctrl10] [nvarchar](1000) NULL,
	[ctrl11] [nvarchar](1000) NULL,
	[ctrl12] [nvarchar](1000) NULL,
	[ctrl13] [nvarchar](1000) NULL,
	[ctrl14] [nvarchar](1000) NULL,
	[ctrl15] [nvarchar](1000) NULL,
	[ctrl16] [nvarchar](1000) NULL,
	[ctrl17] [nvarchar](1000) NULL,
	[ctrl18] [nvarchar](1000) NULL,
	[ctrl19] [nvarchar](1000) NULL,
	[ctrl20] [nvarchar](1000) NULL,
	[ctrl21] [nvarchar](1000) NULL,
	[ctrl22] [nvarchar](1000) NULL,
	[ctrl23] [nvarchar](1000) NULL,
	[ctrl24] [nvarchar](1000) NULL,
	[ctrl25] [nvarchar](1000) NULL,
	[ctrl26] [nvarchar](1000) NULL,
	[ctrl27] [nvarchar](1000) NULL,
	[ctrl28] [nvarchar](1000) NULL,
	[ctrl29] [nvarchar](1000) NULL,
	[ctrl30] [nvarchar](1000) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_lists_createdate]  DEFAULT (getdate()),
	[updatedate] [datetime] NULL,
	[note1] [nvarchar](50) NULL,
	[note2] [nvarchar](50) NULL,
	[note3] [nvarchar](50) NULL,
	[note4] [nvarchar](50) NULL,
	[note5] [nvarchar](50) NULL,
	[uid] [int] NULL CONSTRAINT [DF_survery_lists_uid]  DEFAULT ((0)),
	[ispass] [int] NULL CONSTRAINT [DF_survery_lists_ispass]  DEFAULT ((0)),
	[treeid] [int] NULL,
	[isdelete] [int] NULL CONSTRAINT [DF_survery_lists_isdeleted]  DEFAULT ((0)),
	[isfull] [int] NULL CONSTRAINT [DF_survery_lists_isfull]  DEFAULT ((0)),
	[orderno] [nvarchar](50) NULL,
	[process] [int] NULL CONSTRAINT [DF_survery_lists_process]  DEFAULT ((0)),
	[auditstatus] [int] NULL CONSTRAINT [DF_survery_lists_auditstatus]  DEFAULT ((0)),
 CONSTRAINT [PK_lists] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[survery_lists] ON
INSERT [dbo].[survery_lists] ([id], [activeid], [username], [dept], [email], [mobile], [ctrl1], [ctrl2], [ctrl3], [ctrl4], [ctrl5], [ctrl6], [ctrl7], [ctrl8], [ctrl9], [ctrl10], [ctrl11], [ctrl12], [ctrl13], [ctrl14], [ctrl15], [ctrl16], [ctrl17], [ctrl18], [ctrl19], [ctrl20], [ctrl21], [ctrl22], [ctrl23], [ctrl24], [ctrl25], [ctrl26], [ctrl27], [ctrl28], [ctrl29], [ctrl30], [createdate], [updatedate], [note1], [note2], [note3], [note4], [note5], [uid], [ispass], [treeid], [isdelete], [isfull], [orderno], [process], [auditstatus]) VALUES (1, 1, N'管理员', N'环境部', N'1939248766@qq.com', N'15001712100', N'A. 电脑及外部设备', N'A. 4096', N'A. CPU', N'A. 微软浏览器;', N'A. JPG;', N'问答题', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', CAST(0x0000A42A01782A02 AS DateTime), NULL, NULL, NULL, NULL, NULL, NULL, 1, 0, 0, 0, 0, NULL, 0, 0)
SET IDENTITY_INSERT [dbo].[survery_lists] OFF
/****** Object:  Table [dbo].[survery_defineactive]    Script Date: 10/03/2016 19:44:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_defineactive]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[survery_defineactive](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[title] [nvarchar](200) NULL,
	[adddate] [datetime] NULL CONSTRAINT [DF_defineactive_adddate]  DEFAULT (getdate()),
	[uid] [int] NULL,
	[username] [nvarchar](50) NULL,
	[status] [int] NULL,
	[begintime] [datetime] NULL,
	[endtime] [datetime] NULL,
	[allowmultivote] [int] NULL CONSTRAINT [DF_survery_defineactive_allowmultivote]  DEFAULT ((0)),
	[ispublic] [int] NULL CONSTRAINT [DF_survery_defineactive_ispublic]  DEFAULT ((0)),
	[ispublicresult] [int] NULL CONSTRAINT [DF_survery_defineactive_ispublicresult]  DEFAULT ((1)),
 CONSTRAINT [PK_defineactive] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[survery_defineactive] ON
INSERT [dbo].[survery_defineactive] ([id], [title], [adddate], [uid], [username], [status], [begintime], [endtime], [allowmultivote], [ispublic], [ispublicresult]) VALUES (1, N'内部员工计算机基础测试题（样本1）', CAST(0x0000A42A0173C38C AS DateTime), 1, N'管理员', NULL, CAST(0x0000000000000000 AS DateTime), CAST(0x0000000000000000 AS DateTime), 0, 0, 1)
INSERT [dbo].[survery_defineactive] ([id], [title], [adddate], [uid], [username], [status], [begintime], [endtime], [allowmultivote], [ispublic], [ispublicresult]) VALUES (2, N'企业员工满意度调查（样本2）', CAST(0x0000A42A0178DA79 AS DateTime), 1, N'管理员', NULL, CAST(0x0000000000000000 AS DateTime), CAST(0x0000000000000000 AS DateTime), 0, 0, 1)
INSERT [dbo].[survery_defineactive] ([id], [title], [adddate], [uid], [username], [status], [begintime], [endtime], [allowmultivote], [ispublic], [ispublicresult]) VALUES (3, N'IT服务满意度调查（样本3）', CAST(0x0000A42A017BDFE5 AS DateTime), 1, N'管理员', NULL, CAST(0x0000000000000000 AS DateTime), CAST(0x0000000000000000 AS DateTime), 0, 0, 1)
SET IDENTITY_INSERT [dbo].[survery_defineactive] OFF
/****** Object:  Table [dbo].[purchase_sessiondetails]    Script Date: 10/03/2016 19:44:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[purchase_sessiondetails]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[purchase_sessiondetails](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[catname] [nvarchar](50) NULL,
	[productname] [nvarchar](50) NULL,
	[number] [int] NULL,
	[spec] [nvarchar](50) NULL,
	[piece] [nvarchar](50) NULL,
	[intro] [nvarchar](500) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_purchase_sessiondetails_createdate]  DEFAULT (getdate()),
	[sid] [int] NULL,
	[appuid] [int] NULL,
	[appuname] [nvarchar](50) NULL,
 CONSTRAINT [PK_purchase_sessiondetails] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[purchase_sessiondetails] ON
INSERT [dbo].[purchase_sessiondetails] ([id], [catname], [productname], [number], [spec], [piece], [intro], [createdate], [sid], [appuid], [appuname]) VALUES (1, N'办公软件', N'Office2010', 1, NULL, NULL, N'222', CAST(0x0000A19800AB832B AS DateTime), 1, 1, N'管理员')
SET IDENTITY_INSERT [dbo].[purchase_sessiondetails] OFF
/****** Object:  Table [dbo].[purchase_session_lists]    Script Date: 10/03/2016 19:44:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[purchase_session_lists]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[purchase_session_lists](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF__applying___creat__060DEAE8]  DEFAULT (getdate()),
	[appusername] [nvarchar](50) NULL,
	[appdept] [nvarchar](50) NULL,
	[apptel] [nvarchar](50) NULL,
	[appemail] [text] NULL,
	[useritname] [nvarchar](50) NULL,
	[useritemail] [nvarchar](50) NULL,
	[useritdept] [nvarchar](50) NULL,
	[reason] [nvarchar](500) NULL,
	[uid] [int] NULL,
	[username] [nvarchar](50) NULL,
	[auditstatus] [int] NULL CONSTRAINT [DF_purchase_session_lists_auditstatus]  DEFAULT ((0)),
	[process] [int] NULL,
	[types] [int] NULL,
	[isthesame] [int] NULL,
	[audituid] [int] NULL,
	[auditusername] [nvarchar](50) NULL,
	[auditdate] [datetime] NULL,
	[isdelete] [int] NULL CONSTRAINT [DF_purchase_session_lists_isdelete]  DEFAULT ((0)),
 CONSTRAINT [PK__applying_lists__0519C6AF] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[purchase_session_lists] ON
INSERT [dbo].[purchase_session_lists] ([id], [createdate], [appusername], [appdept], [apptel], [appemail], [useritname], [useritemail], [useritdept], [reason], [uid], [username], [auditstatus], [process], [types], [isthesame], [audituid], [auditusername], [auditdate], [isdelete]) VALUES (1, CAST(0x0000A19800AB8327 AS DateTime), N'管理员', N'环境部', N'15001712100', N'1939248766@qq.com', N'', N'', N'', N'', 1, N'管理员', 0, 1, NULL, 1, NULL, NULL, NULL, 0)
SET IDENTITY_INSERT [dbo].[purchase_session_lists] OFF
/****** Object:  Table [dbo].[helplist_reply]    Script Date: 10/03/2016 19:44:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helplist_reply]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helplist_reply](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[ticketid] [int] NULL,
	[contents] [nvarchar](max) NULL,
	[replydate] [datetime] NULL,
	[replyuser] [nvarchar](50) NULL,
	[replyuserid] [int] NULL,
	[userrole] [nvarchar](50) NULL,
 CONSTRAINT [PK_helplist_reply] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helplist_reply] ON
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (1, 21, N'<p>现在的仍然可以了吧</p>', CAST(0x0000A13F007B5CD7 AS DateTime), N'管理员', 1, N'Support')
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (2, 21, N'<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div>不行啊</div>
<div>&nbsp;</div>
<div><sign signid="0">
<div style="color:#909090;font-family:Arial Narrow;font-size:12px">------------------</div>
<div style="font-size:14px;font-family:Verdana;color:#000;">
<div>李万宝（Dream）</div>
<div>电话：15001712100&nbsp;</div>
<div>QQ：983506039&nbsp; Email:983506039@qq.com&nbsp;</div>
<div>启明星系统&nbsp; 官网 <a href="http://www.dotnetcms.org/">http://www.dotnetcms.org</a></div>
</div>
</sign></div>
<div>&nbsp;</div>
<div><br>
</div>
<div><br>
</div>
<div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------&nbsp;原始邮件&nbsp;------------------</div>
<div style="font-size: 12px;background:#efefef;padding:8px;">
<div><b>发件人:</b> &quot;test4&quot;<test4@lifung.com.hk>; </div>
<div><b>发送时间:</b> 2013年1月7日(星期一) 上午7:29</div>
<div><b>收件人:</b> &quot;983506039&quot;&lt;983506039@qq.com&gt;; &quot;983506039&quot;&lt;983506039@qq.com&gt;; </div>
<div><b>主题:</b> 管理员答复了【TicketID:21】 问题,请帮助我把IE6升级为IE9</div>
</div>
<div><br>
</div>
<style>



.subtitle{ font-size:14px; font-weight:bold}
</style><b>Ticket ID号:21 &nbsp; 查看该问题请单击<a href="http://localhost:2772/helpdesk/helpdesk/ticket_view.aspx?id=21" target="_blank">http://localhost:2772/helpdesk/helpdesk/ticket_view.aspx?id=21</a><br>
<br>
</b>
<table class="gwTableClass" border="0" cellspacing="0" cellpadding="0" width="95%" align="center">
<tbody>
<tr>
<td>
<div class="subtitle">1.回复者信息 Reply Information</div>
<table border="0" cellspacing="1" borderColorDark="#ffffff" cellpadding="8" width="90%" bgcolor="#a1a3ad" align="center">
<tbody>
<tr bgcolor="#ffffff">
<td class="gwTdLabel" width="20%">显示名 Display Name</td>
<td width="30%">管理员 </td>
<td class="gwTdLabel" width="20%">部门 Department</td>
<td width="30%">环境部 </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<br>
<table class="gwTableClass" border="0" cellspacing="0" cellpadding="0" width="95%" align="center">
<tbody>
<tr>
<td>
<div class="subtitle">2.问题信息 Ticket Information</div>
<table border="0" cellspacing="1" borderColorDark="#ffffff" cellpadding="8" width="90%" bgcolor="#a1a3ad" align="center">
<tbody>
<tr bgcolor="#ffffff">
<td width="25%">时间 </td>
<td colspan="3">回复时间:1/7/2013 7:29:09 AM </td>
</tr>
<tr bgcolor="#ffffff">
<td width="25%">主题 </td>
<td colspan="3">请帮助我把IE6升级为IE9 </td>
</tr>
<tr bgcolor="#ffffff">
<td width="25%">补充/回复内容 </td>
<td colspan="3">
<p>现在的仍然可以了吧</p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>
', CAST(0x0000A13F007AE1D0 AS DateTime), N'管理员', 1, N'--')
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (3, 45, N'<div>升级为PS4 </div><div><div><br></div><div><br></div><div style="padding: 2px 0px; font-family: Arial Narrow; font-size: 12px;">------------------&nbsp;原始邮件&nbsp;------------------</div><div style="background: rgb(239, 239, 239); padding: 8px; font-size: 12px;"><div><b>发件人:</b>&nbsp;"test"&lt;test@dotnetcms.org&gt;;</div><div><b>发送时间:</b>&nbsp;2013年1月20日(星期天) 晚上9:47</div><div><b>收件人:</b>&nbsp;"983506039"&lt;983506039@qq.com&gt;; "86813438"&lt;86813438@qq.com&gt;; "1939248766"&lt;1939248766@qq.com&gt;; <wbr></div><div></div><div><b>主题:</b>&nbsp;李万宝【TicketID:45】PS</div></div><div><br></div>Dear 李万宝:<br>  您的问题已经提交，请单击如下链接查看,如果您对本问题有疑问或者补充，请直接回复此邮件或者到Helpdesk进行查看.<br><a href="http://localhost/helpdesk/helpdesk/ticket_view.aspx?id=45">http://localhost/helpdesk/helpdesk/ticket_view.aspx?id=45</a><br>

<style>



.subtitle{ font-size:14px; font-weight:bold}
</style>



<b>
Ticket ID号:45   &nbsp; 查看该问题请单击<a href="http://localhost/helpdesk/" target="_blank">http://localhost/helpdesk/</a><br><br>
</b>
 
  <table class="gwTableClass" border="0" cellSpacing="0" cellPadding="0" width="95%" align="center">
  <tbody>
   
  <tr>
    <td>

      <div class="subtitle">1.提交者信息 User Information</div>

      <table border="0" cellSpacing="1" borderColorDark="#ffffff" cellPadding="8" width="90%" bgColor="#a1a3ad" align="center">
        <tbody>
           
           
              <tr bgColor="#ffffff">     
               
               
                   
          <td class="gwTdLabel" width="20%">显示名 Display Name</td>
          <td width="30%"> 
         
         
          李万宝 
         
         
          </td>
    
    
    
     
         <td class="gwTdLabel" width="20%">部门 Department</td>
          <td width="30%"> 
          
           </td>
           
           
           
     
           
          
           
           </tr>
 

        <tr bgColor="#ffffff">
        
        
     
       
          <td class="gwTdLabel" width="20%">电话 Tel </td>
          <td width="30%">
          
           12365895450
           </td>
          
    
    
        <td class="gwTdLabel" width="20%">邮件  Email</td>
          <td width="30%"> 
       983506039@qq.com  
          </td>
          
          </tr>
          
          
      
           
             
             <tr bgColor="#ffffff">
           
              <td class="gwTdLabel" width="20%">优先级 Priority </td>
          <td width="30%"> 
         medium  
          </td>
          
      
            <td class="gwTdLabel" width="20%">问题提交登录名</td>
          <td width="30%"> 
     李万宝
          </td>
          </tr>
          
          
           
           
            
           
           
           
           
           
          
             
         
            
       </tbody>
       </table>
       </td>
       </tr>
       
  </tbody>
    </table> 
 

       
       
    
       <br><br>
       
          
     <table class="gwTableClass" border="0" cellSpacing="0" cellPadding="0" width="95%" align="center">
  <tbody>
  
   
  <tr>
    <td>
    <div class="subtitle">2.问题信息  Ticket Information</div>
    <table border="0" cellSpacing="1" borderColorDark="#ffffff" cellPadding="8" width="90%" bgColor="#a1a3ad" align="center">
        <tbody>
       
       
         
      <tr bgColor="#ffffff">
   
 <td width="25%">类别 

 </td>
  <td colSpan="3">
    未分类 未分类 未分类
  </td>
  
  </tr>  
  
        <tr bgColor="#ffffff">
   
 <td width="25%">时间 

 </td>
  <td colSpan="3">
  提交时间:2013/1/20 21:43:05   
  </td>
  
  </tr>  


        <tr bgColor="#ffffff">
   
 <td width="25%">主题 

 </td>
  <td colSpan="3">
    李万宝【TicketID:45】PS
  </td>
  
  </tr>  
           
       <tr bgColor="#ffffff">
   
 <td width="25%">具体内容 

 </td>
  <td colSpan="3">
    <br>我要PS<br><div><div style="color: rgb(144, 144, 144); font-family: Arial Narrow; font-size: 12px;">------------------</div><div style="color: rgb(0, 0, 0); font-family: Verdana; font-size: 14px;"><div>李万宝（Dream）</div>
<div>电话：15001712100 </div>
<div>QQ：983506039&nbsp; Email:983506039@qq.com </div>
<div>启明星系统&nbsp; 官网 <a href="http://www.dotnetcms.org/">http://www.dotnetcms.org</a></div></div></div><div>&nbsp;</div>
  </td>
  
  </tr>  
       
 </tbody>
    </table> 
      </td>
    </tr>
    </tbody>
    </table></div>', CAST(0x0000A14C01673F94 AS DateTime), N'管理员', 1, N'--')
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (4, 45, N'<div>升级为PS4 </div><div><div><br></div><div><br></div><div style="padding: 2px 0px; font-family: Arial Narrow; font-size: 12px;">------------------&nbsp;原始邮件&nbsp;------------------</div><div style="background: rgb(239, 239, 239); padding: 8px; font-size: 12px;"><div><b>发件人:</b>&nbsp;"test"&lt;test@dotnetcms.org&gt;;</div><div><b>发送时间:</b>&nbsp;2013年1月20日(星期天) 晚上9:47</div><div><b>收件人:</b>&nbsp;"983506039"&lt;983506039@qq.com&gt;; "86813438"&lt;86813438@qq.com&gt;; "1939248766"&lt;1939248766@qq.com&gt;; <wbr></div><div></div><div><b>主题:</b>&nbsp;李万宝【TicketID:45】PS</div></div><div><br></div>Dear 李万宝:<br>  您的问题已经提交，请单击如下链接查看,如果您对本问题有疑问或者补充，请直接回复此邮件或者到Helpdesk进行查看.<br><a href="http://localhost/helpdesk/helpdesk/ticket_view.aspx?id=45">http://localhost/helpdesk/helpdesk/ticket_view.aspx?id=45</a><br>

<style>



.subtitle{ font-size:14px; font-weight:bold}
</style>



<b>
Ticket ID号:45   &nbsp; 查看该问题请单击<a href="http://localhost/helpdesk/" target="_blank">http://localhost/helpdesk/</a><br><br>
</b>
 
  <table class="gwTableClass" border="0" cellSpacing="0" cellPadding="0" width="95%" align="center">
  <tbody>
   
  <tr>
    <td>

      <div class="subtitle">1.提交者信息 User Information</div>

      <table border="0" cellSpacing="1" borderColorDark="#ffffff" cellPadding="8" width="90%" bgColor="#a1a3ad" align="center">
        <tbody>
           
           
              <tr bgColor="#ffffff">     
               
               
                   
          <td class="gwTdLabel" width="20%">显示名 Display Name</td>
          <td width="30%"> 
         
         
          李万宝 
         
         
          </td>
    
    
    
     
         <td class="gwTdLabel" width="20%">部门 Department</td>
          <td width="30%"> 
          
           </td>
           
           
           
     
           
          
           
           </tr>
 

        <tr bgColor="#ffffff">
        
        
     
       
          <td class="gwTdLabel" width="20%">电话 Tel </td>
          <td width="30%">
          
           12365895450
           </td>
          
    
    
        <td class="gwTdLabel" width="20%">邮件  Email</td>
          <td width="30%"> 
       983506039@qq.com  
          </td>
          
          </tr>
          
          
      
           
             
             <tr bgColor="#ffffff">
           
              <td class="gwTdLabel" width="20%">优先级 Priority </td>
          <td width="30%"> 
         medium  
          </td>
          
      
            <td class="gwTdLabel" width="20%">问题提交登录名</td>
          <td width="30%"> 
     李万宝
          </td>
          </tr>
          
          
           
           
            
           
           
           
           
           
          
             
         
            
       </tbody>
       </table>
       </td>
       </tr>
       
  </tbody>
    </table> 
 

       
       
    
       <br><br>
       
          
     <table class="gwTableClass" border="0" cellSpacing="0" cellPadding="0" width="95%" align="center">
  <tbody>
  
   
  <tr>
    <td>
    <div class="subtitle">2.问题信息  Ticket Information</div>
    <table border="0" cellSpacing="1" borderColorDark="#ffffff" cellPadding="8" width="90%" bgColor="#a1a3ad" align="center">
        <tbody>
       
       
         
      <tr bgColor="#ffffff">
   
 <td width="25%">类别 

 </td>
  <td colSpan="3">
    未分类 未分类 未分类
  </td>
  
  </tr>  
  
        <tr bgColor="#ffffff">
   
 <td width="25%">时间 

 </td>
  <td colSpan="3">
  提交时间:2013/1/20 21:43:05   
  </td>
  
  </tr>  


        <tr bgColor="#ffffff">
   
 <td width="25%">主题 

 </td>
  <td colSpan="3">
    李万宝【TicketID:45】PS
  </td>
  
  </tr>  
           
       <tr bgColor="#ffffff">
   
 <td width="25%">具体内容 

 </td>
  <td colSpan="3">
    <br>我要PS<br><div><div style="color: rgb(144, 144, 144); font-family: Arial Narrow; font-size: 12px;">------------------</div><div style="color: rgb(0, 0, 0); font-family: Verdana; font-size: 14px;"><div>李万宝（Dream）</div>
<div>电话：15001712100 </div>
<div>QQ：983506039&nbsp; Email:983506039@qq.com </div>
<div>启明星系统&nbsp; 官网 <a href="http://www.dotnetcms.org/">http://www.dotnetcms.org</a></div></div></div><div>&nbsp;</div>
  </td>
  
  </tr>  
       
 </tbody>
    </table> 
      </td>
    </tr>
    </tbody>
    </table></div>', CAST(0x0000A14C01673F94 AS DateTime), N'管理员', 1, N'--')
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (6, 71, N'管理员跟进了此问题', CAST(0x0000A5C50161A660 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (7, 71, N'管理员跟进了此问题', CAST(0x0000A5C50162A380 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (8, 71, N'管理员跟进了此问题', CAST(0x0000A5C5016925E8 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (9, 71, N'管理员跟进了此问题', CAST(0x0000A5C50169EBF4 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (10, 72, N'管理员跟进了此问题', CAST(0x0000A5C5016BD11C AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (11, 72, N'管理员跟进了此问题', CAST(0x0000A5C5016C5204 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (12, 72, N'管理员跟进了此问题', CAST(0x0000A5C5016CF998 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (13, 72, N'管理员跟进了此问题', CAST(0x0000A5C5016D850C AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (14, 72, N'管理员跟进了此问题', CAST(0x0000A5C5016E1788 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (15, 72, N'管理员跟进了此问题', CAST(0x0000A5C5016EE5C8 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (16, 69, N'管理员跟进了此问题', CAST(0x0000A5C501722CD8 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (17, 71, N'管理员跟进了此问题', CAST(0x0000A5C50172F8C0 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (18, 71, N'管理员跟进了此问题', CAST(0x0000A5C501735EB4 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (19, 71, N'管理员跟进了此问题', CAST(0x0000A5C50173B7C4 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (20, 71, N'管理员跟进了此问题', CAST(0x0000A5C50175C974 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (21, 76, N'管理员跟进了此问题', CAST(0x0000A5C60097B2C4 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (22, 76, N'管理员跟进了此问题', CAST(0x0000A5C60097FA40 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (23, 76, N'管理员跟进了此问题', CAST(0x0000A5C6009805F8 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (24, 74, N'管理员跟进了此问题', CAST(0x0000A5C600999B70 AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (25, 78, N'管理员跟进了此问题', CAST(0x0000A5C600A7790C AS DateTime), N'管理员', 1, NULL)
INSERT [dbo].[helplist_reply] ([id], [ticketid], [contents], [replydate], [replyuser], [replyuserid], [userrole]) VALUES (26, 90, N'管理员跟进了此问题', CAST(0x0000A5C600B0F07C AS DateTime), N'管理员', 1, NULL)
SET IDENTITY_INSERT [dbo].[helplist_reply] OFF
/****** Object:  Table [dbo].[helphesk_categories]    Script Date: 10/03/2016 19:44:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helphesk_categories]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helphesk_categories](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[catname] [text] NULL,
	[parentid] [int] NULL,
	[orderid] [int] NULL,
	[note] [nvarchar](500) NULL,
	[depth] [int] NULL,
	[uids] [nvarchar](500) NULL,
	[usernames] [nvarchar](500) NULL,
 CONSTRAINT [PK__supplying_catego__0425A276] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helphesk_categories] ON
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (1, N'操作系统与标准软件', 0, 0, NULL, 0, N'', N'')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (2, N'应用系统', 0, 0, NULL, 0, N'', N'')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (3, N'硬件与外设', 0, 0, NULL, 0, N'', N'')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (4, N'网络故障', 0, 0, NULL, 0, N'', N'')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (5, N'权限与账户', 0, 0, NULL, 0, N'', N'')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (6, N'其他', 0, 0, NULL, 0, N'', N'')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (7, N'操作系统', 1, 0, NULL, 1, N';1;18;', N';admin;dream;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (8, N'办公软件', 1, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (9, N'常规软件', 1, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (10, N'财务系统', 2, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (11, N'人事系统', 2, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (12, N'PC外设', 3, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (13, N'打印机', 3, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (14, N'扫描仪', 3, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (15, N'网卡相关', 4, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (16, N'线路故障', 4, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (17, N'申请账户', 5, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (18, N'注销权限', 5, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (19, N'windows系列', 7, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (20, N'windows2003/2008', 7, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (21, N'Android', 7, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (22, N'iOS', 7, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (23, N'手机移动软件', 1, 0, NULL, 1, N';1;', N';admin;')
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (24, N'iOS', 23, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (25, N'Android', 23, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (26, N'Window Phone', 23, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (27, N'Office2003', 8, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (28, N'Office2007', 8, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (29, N'压缩软件', 9, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (30, N'PDF', 9, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (31, N'Autocad', 9, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (32, N'金蝶账户相关', 10, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (33, N'HR账户', 11, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (34, N'培训系统', 11, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (35, N'鼠标键盘U盘', 12, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (36, N'打印机', 13, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (37, N'扫描仪', 14, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (38, N'IP/MAC相关', 15, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (39, N'地址段', 16, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (40, N'Active Directory账户申请', 17, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (41, N'Active Directory账户注销', 17, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (42, N'邮件申请', 17, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (43, N'邮件注销', 18, 0, NULL, 2, NULL, NULL)
INSERT [dbo].[helphesk_categories] ([id], [catname], [parentid], [orderid], [note], [depth], [uids], [usernames]) VALUES (44, N'其他', 18, 0, NULL, 2, NULL, NULL)
SET IDENTITY_INSERT [dbo].[helphesk_categories] OFF
/****** Object:  Table [dbo].[helpdesk_svrdisk]    Script Date: 10/03/2016 19:44:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_svrdisk]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_svrdisk](
	[guid] [uniqueidentifier] NOT NULL CONSTRAINT [DF_helpdesk_svrdisk_guid]  DEFAULT (newid()),
	[ip] [nvarchar](50) NULL,
	[diskname] [nvarchar](50) NULL,
	[total] [decimal](18, 2) NULL,
	[used] [decimal](18, 2) NULL,
	[free] [decimal](18, 2) NULL,
	[isalert] [int] NULL CONSTRAINT [DF_helpdesk_svrdisk_isalert]  DEFAULT ((0)),
 CONSTRAINT [PK_helpdesk_svrdisk] PRIMARY KEY CLUSTERED 
(
	[guid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
INSERT [dbo].[helpdesk_svrdisk] ([guid], [ip], [diskname], [total], [used], [free], [isalert]) VALUES (N'7b2513b5-0919-4841-afa9-21e0bfa34f14', N'192.168.1.102', N'C:\', CAST(100.00 AS Decimal(18, 2)), CAST(59.00 AS Decimal(18, 2)), CAST(41.00 AS Decimal(18, 2)), 1)
INSERT [dbo].[helpdesk_svrdisk] ([guid], [ip], [diskname], [total], [used], [free], [isalert]) VALUES (N'6a577e95-35a4-4068-9f85-9c58dfac0926', N'192.168.1.102', N'F:\', CAST(121.00 AS Decimal(18, 2)), CAST(15.00 AS Decimal(18, 2)), CAST(106.00 AS Decimal(18, 2)), 0)
INSERT [dbo].[helpdesk_svrdisk] ([guid], [ip], [diskname], [total], [used], [free], [isalert]) VALUES (N'21228182-3fa4-4405-a189-bacba3bced2e', N'192.168.1.102', N'E:\', CAST(122.00 AS Decimal(18, 2)), CAST(16.00 AS Decimal(18, 2)), CAST(106.00 AS Decimal(18, 2)), 0)
INSERT [dbo].[helpdesk_svrdisk] ([guid], [ip], [diskname], [total], [used], [free], [isalert]) VALUES (N'996c1b38-4b9f-4e7b-9b4e-e696464aefc6', N'192.168.1.102', N'D:\', CAST(122.00 AS Decimal(18, 2)), CAST(51.00 AS Decimal(18, 2)), CAST(71.00 AS Decimal(18, 2)), 0)
/****** Object:  Table [dbo].[helpdesk_svr]    Script Date: 10/03/2016 19:44:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_svr]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_svr](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[ip] [nvarchar](50) NULL,
	[friendname] [nvarchar](500) NULL,
	[bios_serialnumber] [nvarchar](200) NULL,
	[bios_manufacturer] [nvarchar](200) NULL,
	[bd_serialnumber] [nvarchar](200) NULL,
	[bd_manufacturer] [nvarchar](200) NULL,
	[processor] [nvarchar](200) NULL,
	[processorcount] [int] NULL,
	[mem] [nvarchar](50) NULL,
	[os] [nvarchar](200) NULL,
	[svrname] [nvarchar](500) NULL,
	[is64] [int] NULL,
	[osversion] [nvarchar](200) NULL,
	[lastbootuptime] [nvarchar](50) NULL,
	[svrtype] [nvarchar](50) NULL,
	[ip10] [bigint] NULL,
	[note] [nvarchar](1000) NULL,
	[loginname] [nvarchar](50) NULL,
	[password] [nvarchar](500) NULL,
	[isalert] [int] NULL CONSTRAINT [DF_helpdesk_svr_iswarning]  DEFAULT ((0)),
	[adddate] [datetime] NULL CONSTRAINT [DF_helpdesk_svr_adddate]  DEFAULT (getdate()),
 CONSTRAINT [PK_helpdesk_svr] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_svr] ON
INSERT [dbo].[helpdesk_svr] ([id], [ip], [friendname], [bios_serialnumber], [bios_manufacturer], [bd_serialnumber], [bd_manufacturer], [processor], [processorcount], [mem], [os], [svrname], [is64], [osversion], [lastbootuptime], [svrtype], [ip10], [note], [loginname], [password], [isalert], [adddate]) VALUES (1, N'10.1.11.11', N'共享服务器', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'File服务器', 825241137, N'主要存放文件共享', NULL, NULL, 0, CAST(0x0000A5C200B2232C AS DateTime))
INSERT [dbo].[helpdesk_svr] ([id], [ip], [friendname], [bios_serialnumber], [bios_manufacturer], [bd_serialnumber], [bd_manufacturer], [processor], [processorcount], [mem], [os], [svrname], [is64], [osversion], [lastbootuptime], [svrtype], [ip10], [note], [loginname], [password], [isalert], [adddate]) VALUES (2, N'10.1.12.2', N'网站数据库', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'Database服务器', 825241137, N'主要存放网站数据库', NULL, NULL, 1, CAST(0x0000A5C200B2232C AS DateTime))
INSERT [dbo].[helpdesk_svr] ([id], [ip], [friendname], [bios_serialnumber], [bios_manufacturer], [bd_serialnumber], [bd_manufacturer], [processor], [processorcount], [mem], [os], [svrname], [is64], [osversion], [lastbootuptime], [svrtype], [ip10], [note], [loginname], [password], [isalert], [adddate]) VALUES (3, N'192.168.1.102', N'File01', N'F0KQKP1', N'Dell Inc.', N'Dell Inc.', N'Dell Inc.', N'Intel64 Family 6 Model 42 Stepping 7', 4, N'3.909344G', N'Microsoft Windows 7 旗舰版 ', N'PC-20150710RZJT', 1, N'Microsoft Windows NT 6.1.7601 Service Pack 1', N'03  7 2016  8:40AM', N'File服务器', 825241137, N'日常服务器。', NULL, NULL, 0, CAST(0x0000A5C200B2232C AS DateTime))
SET IDENTITY_INSERT [dbo].[helpdesk_svr] OFF
/****** Object:  Table [dbo].[helpdesk_software]    Script Date: 10/03/2016 19:44:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_software]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_software](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[softwarename] [nvarchar](50) NULL,
	[serialno] [nvarchar](50) NULL,
	[types] [nvarchar](50) NULL,
	[manufacturer] [nvarchar](50) NULL,
	[buydate] [datetime] NULL,
	[notes] [nvarchar](500) NULL,
	[lastopusername] [nvarchar](50) NULL,
	[prev1] [nvarchar](50) NULL,
	[prev2] [nvarchar](50) NULL,
	[belongto] [nvarchar](50) NULL,
	[dept] [nvarchar](50) NULL,
	[version] [nvarchar](50) NULL,
	[limitedusers] [nvarchar](50) NULL,
	[expiredate] [datetime] NULL,
	[contactname] [nvarchar](50) NULL,
	[contacttel] [nvarchar](50) NULL,
	[price] [nvarchar](50) NULL,
	[lng] [nvarchar](500) NULL,
	[os] [nvarchar](500) NULL,
	[db] [nvarchar](500) NULL,
	[opusername] [nvarchar](500) NULL,
	[opdate] [datetime] NULL,
	[lastopdate] [datetime] NULL,
 CONSTRAINT [PK_helpdesk_software] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_software] ON
INSERT [dbo].[helpdesk_software] ([id], [softwarename], [serialno], [types], [manufacturer], [buydate], [notes], [lastopusername], [prev1], [prev2], [belongto], [dept], [version], [limitedusers], [expiredate], [contactname], [contacttel], [price], [lng], [os], [db], [opusername], [opdate], [lastopdate]) VALUES (2, N'AutoCAD2014', N'', N'专业软件', N'AutoDesk', CAST(0x0000A4ED00000000 AS DateTime), N'', NULL, N'', N'', N'集团使用', N'工程部', N'2014', N'10', CAST(0x0000000000000000 AS DateTime), N'', N'', N'', N'', N'Windows;', N'', NULL, NULL, NULL)
INSERT [dbo].[helpdesk_software] ([id], [softwarename], [serialno], [types], [manufacturer], [buydate], [notes], [lastopusername], [prev1], [prev2], [belongto], [dept], [version], [limitedusers], [expiredate], [contactname], [contacttel], [price], [lng], [os], [db], [opusername], [opdate], [lastopdate]) VALUES (3, N'MSSQL2008', N'2F7A-EDDX-3333-XD3HJ-KJFE', N'专业软件', N'微软', CAST(0x0000000000000000 AS DateTime), N'', N'管理员', N'', N'', N'集团使用', N'IT部门', N'专业版', N'50', CAST(0x0000000000000000 AS DateTime), N'', N'', N'', N'C++;', N'Windows;', N'MSSQL;', NULL, NULL, CAST(0x0000A4E900900873 AS DateTime))
INSERT [dbo].[helpdesk_software] ([id], [softwarename], [serialno], [types], [manufacturer], [buydate], [notes], [lastopusername], [prev1], [prev2], [belongto], [dept], [version], [limitedusers], [expiredate], [contactname], [contacttel], [price], [lng], [os], [db], [opusername], [opdate], [lastopdate]) VALUES (4, N'金蝶2010', N'', N'操作系统', N'金蝶', CAST(0x0000A4EA00000000 AS DateTime), N'', NULL, N'', N'', N'部门使用', N'财务部', N'专业版', N'', CAST(0x0000000000000000 AS DateTime), N'', N'', N'', N'', N'Windows;', N'MSSQL;MySQL;', NULL, NULL, NULL)
SET IDENTITY_INSERT [dbo].[helpdesk_software] OFF
/****** Object:  Table [dbo].[helpdesk_searchkey]    Script Date: 10/03/2016 19:44:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_searchkey]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_searchkey](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[keyword] [nvarchar](50) NOT NULL,
	[count] [int] NULL,
 CONSTRAINT [PK_helpdesk_searchkey] PRIMARY KEY CLUSTERED 
(
	[keyword] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[helpdesk_sday]    Script Date: 10/03/2016 19:44:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_sday]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_sday](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[calid] [int] NULL,
	[sdate] [datetime] NULL,
	[isworkday] [int] NOT NULL,
 CONSTRAINT [PK_appform_sday] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_sday]') AND name = N'idx_sdate')
CREATE NONCLUSTERED INDEX [idx_sdate] ON [dbo].[helpdesk_sday] 
(
	[sdate] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[helpdesk_scanlist]    Script Date: 10/03/2016 19:44:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_scanlist]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_scanlist](
	[scanpcname] [nvarchar](50) NULL,
	[scanpcip] [nvarchar](50) NULL,
	[scandate] [nvarchar](50) NULL,
	[guid] [nvarchar](50) NULL
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[helpdesk_reportdetail]    Script Date: 10/03/2016 19:44:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_reportdetail]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_reportdetail](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[rid] [int] NULL,
	[contents] [nvarchar](500) NULL,
	[types] [nvarchar](50) NULL,
	[per] [nvarchar](50) NULL,
 CONSTRAINT [PK_outlook_reportdetail] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_reportdetail] ON
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (6, 1, N'ssss', N'worklog', N'40')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (7, 1, N'dddd', N'worklog', N'20')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (8, 1, N'ff', N'worklog', N'0')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (9, 1, N'xxx', N'plan', N'')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (10, 1, N'fff', N'plan', N'')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (11, 2, N'1.修改helpdesk修改账户页面问题', N'worklog', N'100')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (12, 2, N'2.整合代码，优化报表', N'worklog', N'100')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (13, 2, N'3.增加资产管理功能', N'worklog', N'80')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (14, 2, N'1.优化book系统', N'plan', N'')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (15, 2, N'2.优化请假系统', N'plan', N'')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (26, 3, N'1.数据库升级', N'worklog', N'40')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (27, 3, N'2.更新操作系统', N'worklog', N'60')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (28, 3, N'3.更新office系统', N'worklog', N'60')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (29, 3, N'1.将2008升级到2012', N'plan', N'')
INSERT [dbo].[helpdesk_reportdetail] ([id], [rid], [contents], [types], [per]) VALUES (30, 3, N'2.将office升级到2016', N'plan', N'')
SET IDENTITY_INSERT [dbo].[helpdesk_reportdetail] OFF
/****** Object:  Table [dbo].[helpdesk_reportcomm]    Script Date: 10/03/2016 19:44:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_reportcomm]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_reportcomm](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[rid] [int] NULL,
	[commid] [int] NULL,
	[comments] [nvarchar](500) NULL,
	[commdate] [datetime] NULL,
	[commusername] [nvarchar](50) NULL,
 CONSTRAINT [PK_outlook_reportcomm] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[helpdesk_report]    Script Date: 10/03/2016 19:44:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_report]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_report](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[contents] [nvarchar](3000) NULL,
	[uid] [int] NULL,
	[username] [nvarchar](50) NULL,
	[reportstart] [datetime] NULL,
	[reportend] [datetime] NULL,
	[types] [nvarchar](50) NULL,
	[planstart] [datetime] NULL,
	[planend] [datetime] NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_outlook_report_createdate2]  DEFAULT (getdate()),
	[subject] [nvarchar](300) NULL,
	[commstatus] [nvarchar](10) NULL,
	[comments] [nvarchar](500) NULL,
	[commdate] [datetime] NULL,
	[commuid] [int] NULL,
	[commusername] [nvarchar](50) NULL,
	[keypoint] [nvarchar](1000) NULL,
	[summary] [nvarchar](1000) NULL,
	[nextplan] [nvarchar](1000) NULL,
	[title] [nvarchar](50) NULL,
 CONSTRAINT [PK_outlook_report2] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_report] ON
INSERT [dbo].[helpdesk_report] ([id], [contents], [uid], [username], [reportstart], [reportend], [types], [planstart], [planend], [createdate], [subject], [commstatus], [comments], [commdate], [commuid], [commusername], [keypoint], [summary], [nextplan], [title]) VALUES (2, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>本次对helpdesk更新，最核心的是对系统那些了优化。</p>
<p>包括对报表，页面优化等</p>
</body>
</html>', 1, N'管理员', CAST(0x0000A52100000000 AS DateTime), CAST(0x0000A52500000000 AS DateTime), N'周报', CAST(0x0000A52800000000 AS DateTime), CAST(0x0000A52C00000000 AS DateTime), CAST(0x0000A5230178D78C AS DateTime), N'李万宝工作周报', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_report] ([id], [contents], [uid], [username], [reportstart], [reportend], [types], [planstart], [planend], [createdate], [subject], [commstatus], [comments], [commdate], [commuid], [commusername], [keypoint], [summary], [nextplan], [title]) VALUES (3, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p><strong>本次更新，主要是对数据库进行操作，对系统优化。</strong></p>
</body>
</html>', 1, N'管理员', CAST(0x0000A52100000000 AS DateTime), CAST(0x0000A52500000000 AS DateTime), N'周报', CAST(0x0000A52800000000 AS DateTime), CAST(0x0000A52C00000000 AS DateTime), CAST(0x0000A5230179BA29 AS DateTime), N'李万宝周报', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
SET IDENTITY_INSERT [dbo].[helpdesk_report] OFF
/****** Object:  Table [dbo].[helpdesk_repairlist]    Script Date: 10/03/2016 19:44:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_repairlist]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_repairlist](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[assettype] [nvarchar](50) NULL,
	[assetname] [nvarchar](50) NULL,
	[repairmethod] [nvarchar](500) NULL,
	[opuser] [nvarchar](50) NULL,
	[opdate] [datetime] NULL,
	[note] [nvarchar](1000) NULL,
	[tid] [int] NULL,
	[dept] [nvarchar](50) NULL,
	[money] [float] NULL,
	[prev1] [nvarchar](100) NULL,
	[prev2] [nvarchar](1000) NULL,
 CONSTRAINT [PK_helpdesk_repairlist] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[Helpdesk_PointList]    Script Date: 10/03/2016 19:44:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Helpdesk_PointList]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Helpdesk_PointList](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[tid] [int] NULL,
	[uid] [int] NULL,
	[username] [nvarchar](50) NULL,
	[respoint] [int] NULL,
	[techpoint] [int] NULL,
	[serpoint] [int] NULL,
	[totalpoint] [int] NULL,
	[supportid] [int] NULL,
	[supportuser] [nvarchar](50) NULL,
	[note] [nvarchar](200) NULL,
	[adddate] [datetime] NULL CONSTRAINT [DF_Helpdesk_PointList_adddate]  DEFAULT (getdate()),
	[category1id] [int] NULL,
	[category1name] [nvarchar](200) NULL,
	[category2id] [int] NULL,
	[category2name] [nvarchar](200) NULL,
	[isprocess] [int] NULL CONSTRAINT [DF_Helpdesk_PointList_isprocess]  DEFAULT ((1)),
	[totaltext] [nvarchar](100) NULL,
 CONSTRAINT [PK_Helpdesk_PointList] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[Helpdesk_PointList] ON
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (1, 76, 1, N'管理员', 0, 0, 0, 1, NULL, NULL, N'', CAST(0x0000A5220113706A AS DateTime), 1, N'操作系统与标准软件', 9, N'常规软件', 1, N'非常满意')
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (2, 73, 1, N'管理员', 0, 0, 0, 1, NULL, NULL, N'', CAST(0x0000A5C400C10354 AS DateTime), 1, N'操作系统与标准软件', 23, N'手机移动软件', 1, N'非常满意')
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (3, 89, 1, N'管理员', 0, 0, 0, 4, NULL, NULL, N'good', CAST(0x0000A5C400DEDA11 AS DateTime), 4, N'网络故障', 16, N'线路故障', 1, N'满意')
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (4, 89, 1, N'管理员', 0, 0, 0, 4, NULL, NULL, N'', CAST(0x0000A5C400F79713 AS DateTime), 4, N'网络故障', 16, N'线路故障', 1, N'满意')
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (5, 80, 1, N'管理员', 0, 0, 0, 1, NULL, NULL, N'非常差劲', CAST(0x0000A5C40118086C AS DateTime), 1, N'操作系统与标准软件', 7, N'操作系统', 1, N'非常不满意')
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (6, 78, 1, N'管理员', 0, 0, 0, 5, NULL, NULL, N'good', CAST(0x0000A5C4011810A2 AS DateTime), 1, N'操作系统与标准软件', 7, N'操作系统', 1, N'非常满意')
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (7, 75, 1, N'管理员', 0, 0, 0, 3, NULL, NULL, N'', CAST(0x0000A5C401181854 AS DateTime), 1, N'操作系统与标准软件', 8, N'办公软件', 1, N'一般')
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (8, 72, 1, N'管理员', 0, 0, 0, 2, NULL, NULL, N'no', CAST(0x0000A5C401182098 AS DateTime), 1, N'操作系统与标准软件', 7, N'操作系统', 1, N'不满意')
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (9, 71, 1, N'管理员', 0, 0, 0, 4, NULL, NULL, N'', CAST(0x0000A5C401182587 AS DateTime), 3, N'硬件与外设', 12, N'PC外设', 1, N'满意')
INSERT [dbo].[Helpdesk_PointList] ([id], [tid], [uid], [username], [respoint], [techpoint], [serpoint], [totalpoint], [supportid], [supportuser], [note], [adddate], [category1id], [category1name], [category2id], [category2name], [isprocess], [totaltext]) VALUES (10, 70, 1, N'管理员', 0, 0, 0, 4, NULL, NULL, N'', CAST(0x0000A5C401182B77 AS DateTime), 2, N'应用系统', 11, N'人事系统', 1, N'满意')
SET IDENTITY_INSERT [dbo].[Helpdesk_PointList] OFF
/****** Object:  Table [dbo].[helpdesk_pc_param]    Script Date: 10/03/2016 19:44:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_pc_param]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_pc_param](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[paramname] [nvarchar](50) NULL,
	[types] [nvarchar](50) NULL,
	[paramvalue] [nvarchar](50) NULL,
	[parentvalue] [nvarchar](50) NULL,
	[parentname] [nvarchar](50) NULL,
	[orderid] [int] NULL CONSTRAINT [DF_helpdesk_pc_param_orderid]  DEFAULT ((0)),
 CONSTRAINT [PK_helpdesk_pc_spec] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_pc_param] ON
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (2, N'DELL OptiPlex 380', N'spec', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (3, N'DELL OptiPlex 580', N'spec', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (4, N'DELL OptiPlex 780', N'spec', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (5, N'DELL OptiPlex 980', N'spec', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (6, N'DELL OptiPlex 960', N'spec', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (7, N'DELL OptiPlex FX160', N'spec', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (8, N'Office2003', N'office', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (9, N'Office2007', N'office', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (10, N'WPS Office', N'office', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (11, N'金山Office', N'office', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (12, N'永中Office', N'office', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (13, N'Windows7', N'os', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (14, N'WindowsXP', N'os', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (15, N'Windows2003', N'os', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (16, N'Windows2008', N'os', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (17, N'Linux', N'os', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (18, N'Android', N'os', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (19, N'Mac OS', N'os', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (20, N'其它', N'office', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (21, N'其它', N'os', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (22, N'其它', N'spec', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (23, N'台式机', N'usetype', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (24, N'笔记本', N'usetype', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (25, N'平板电脑', N'usetype', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (26, N'服务器', N'usetype', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (27, N'其它', N'usetype', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (28, N'在用', N'usestatus', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (29, N'在库', N'usestatus', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (30, N'报废', N'usestatus', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (31, N'Winrar', N'software', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (32, N'Photoshop', N'software', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (34, N'Adobe PDF', N'software', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (45, N'MSSQL', N'software', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (46, N'Symantec', N'software', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (95, N'操作系统', N'purchase_bigclass', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (96, N'办公软件', N'purchase_bigclass', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (97, N'电脑硬件', N'purchase_bigclass', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (101, N'Office2010', N'purchase_smallclass', NULL, NULL, N'办公软件', 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (102, N'Photoshop', N'purchase_smallclass', NULL, NULL, N'办公软件', 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (103, N'硬盘', N'purchase_smallclass', NULL, NULL, N'电脑硬件', 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (104, N'内存', N'purchase_smallclass', NULL, NULL, N'电脑硬件', 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (105, N'鼠标', N'purchase_smallclass', NULL, NULL, N'电脑硬件', 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (106, N'键盘', N'purchase_smallclass', NULL, NULL, N'电脑硬件', 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (107, N'主机', N'purchase_smallclass', NULL, NULL, N'电脑硬件', 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (108, N'其它硬件', N'purchase_bigclass', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (109, N'打印机', N'purchase_smallclass', NULL, NULL, N'其它硬件', 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (110, N'扫描仪', N'purchase_smallclass', NULL, NULL, N'其它硬件', 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (111, N'投影仪', N'purchase_smallclass', NULL, NULL, N'其它硬件', 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (115, N'维修', N'usestatus', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (116, N'操作系统', N'softtype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (117, N'办公软件', N'softtype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (118, N'财务软件', N'softtype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (119, N'人事软件', N'softtype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (120, N'音频软件', N'softtype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (121, N'常用软件', N'softtype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (122, N'更换内存', N'repairstatus', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (123, N'更换主板', N'repairstatus', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (124, N'更换鼠标', N'repairstatus', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (125, N'更换键盘', N'repairstatus', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (126, N'更换显示器', N'repairstatus', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (127, N'更换硬盘', N'repairstatus', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (128, N'更换光驱', N'repairstatus', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (129, N'其它', N'repairstatus', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (130, N'打印机', N'assettype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (131, N'扫描仪', N'assettype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (132, N'路由器', N'assettype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (133, N'投影仪', N'assettype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (134, N'使用者', N'belongto', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (135, N'使用部门', N'belongto', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (136, N'所属公司', N'belongto', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (137, N'所属集团', N'belongto', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (138, N'总公司仓库', N'storeplace', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (139, N'IT仓库', N'storeplace', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (140, N'行政仓库', N'storeplace', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (141, N'2F 杂物仓库', N'storeplace', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (142, N'串行接口', N'hardware', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (143, N'风扇', N'hardware', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (144, N'数据库', N'softtype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (145, N'专业软件', N'softtype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (146, N'开发软件', N'softtype', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc_param] ([id], [paramname], [types], [paramvalue], [parentvalue], [parentname], [orderid]) VALUES (147, N'录音设备', N'assettype', NULL, NULL, NULL, 0)
SET IDENTITY_INSERT [dbo].[helpdesk_pc_param] OFF
/****** Object:  Table [dbo].[helpdesk_pc_logs]    Script Date: 10/03/2016 19:44:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_pc_logs]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_pc_logs](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[pcid] [int] NULL,
	[pcname] [nvarchar](50) NULL,
	[optype] [nvarchar](50) NULL,
	[opdate] [datetime] NULL,
	[contents] [nvarchar](3000) NULL,
	[opuser] [nvarchar](50) NULL,
 CONSTRAINT [PK_helpdesk_pc_logs] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_pc_logs] ON
INSERT [dbo].[helpdesk_pc_logs] ([id], [pcid], [pcname], [optype], [opdate], [contents], [opuser]) VALUES (1, 1, N'Fin01', N'Add', CAST(0x0000A0FE00CA38B3 AS DateTime), N'新增PC', N'admin')
INSERT [dbo].[helpdesk_pc_logs] ([id], [pcid], [pcname], [optype], [opdate], [contents], [opuser]) VALUES (2, 2, N'IT02', N'Add', CAST(0x0000A0FE00CA53E0 AS DateTime), N'新增PC', N'admin')
INSERT [dbo].[helpdesk_pc_logs] ([id], [pcid], [pcname], [optype], [opdate], [contents], [opuser]) VALUES (3, 2, N'IT02', N'Add', CAST(0x0000A0FF01308A01 AS DateTime), N'更新PC note内容由pp  变更为 pppp', N'admin')
INSERT [dbo].[helpdesk_pc_logs] ([id], [pcid], [pcname], [optype], [opdate], [contents], [opuser]) VALUES (4, 2, N'IT02', N'Add', CAST(0x0000A0FF0130B087 AS DateTime), N'更新PC note内容由pp  变更为 pppp', N'admin')
INSERT [dbo].[helpdesk_pc_logs] ([id], [pcid], [pcname], [optype], [opdate], [contents], [opuser]) VALUES (5, 1, N'Fin01', N'Add', CAST(0x0000A0FF0130DAAA AS DateTime), N'更新PC office内容由Office2003  变更为 Office2007', N'admin')
INSERT [dbo].[helpdesk_pc_logs] ([id], [pcid], [pcname], [optype], [opdate], [contents], [opuser]) VALUES (6, 3, N'qqqq', N'add', CAST(0x0000A4E5011342A9 AS DateTime), N'新增PC', N'admin')
INSERT [dbo].[helpdesk_pc_logs] ([id], [pcid], [pcname], [optype], [opdate], [contents], [opuser]) VALUES (7, 3, N'111', N'delete', CAST(0x0000A4E5012F312B AS DateTime), N'删除PC ', N'admin')
INSERT [dbo].[helpdesk_pc_logs] ([id], [pcid], [pcname], [optype], [opdate], [contents], [opuser]) VALUES (8, 4, N'FIN0003', N'add', CAST(0x0000A4E5013A99C2 AS DateTime), N'新增PC', N'admin')
SET IDENTITY_INSERT [dbo].[helpdesk_pc_logs] OFF
/****** Object:  Table [dbo].[helpdesk_pc_details]    Script Date: 10/03/2016 19:44:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_pc_details]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_pc_details](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[pcid] [int] NULL,
	[pname] [nvarchar](50) NULL,
	[pvalue] [nvarchar](50) NULL,
	[types] [nvarchar](50) NULL,
 CONSTRAINT [PK_helpdesk_pc_details] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_pc_details] ON
INSERT [dbo].[helpdesk_pc_details] ([id], [pcid], [pname], [pvalue], [types]) VALUES (1, 4, N'串行接口', N'C3', N'hardware')
INSERT [dbo].[helpdesk_pc_details] ([id], [pcid], [pname], [pvalue], [types]) VALUES (2, 4, N'风扇', N'F3', N'hardware')
INSERT [dbo].[helpdesk_pc_details] ([id], [pcid], [pname], [pvalue], [types]) VALUES (3, 4, N'Winrar', N'W3', N'software')
INSERT [dbo].[helpdesk_pc_details] ([id], [pcid], [pname], [pvalue], [types]) VALUES (4, 4, N'Photoshop', N'P2', N'software')
SET IDENTITY_INSERT [dbo].[helpdesk_pc_details] OFF
/****** Object:  Table [dbo].[helpdesk_pc_asset]    Script Date: 10/03/2016 19:44:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_pc_asset]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_pc_asset](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[assetname] [nvarchar](50) NULL,
	[manufacturer] [nvarchar](50) NULL,
	[serialno] [nvarchar](50) NULL,
	[buydate] [datetime] NULL,
	[storeplace] [nvarchar](50) NULL,
	[usestatus] [nvarchar](50) NULL,
	[types] [nvarchar](50) NULL,
	[prev1] [nvarchar](50) NULL,
	[prev2] [nvarchar](50) NULL,
	[notes] [nvarchar](500) NULL,
	[expiredate] [datetime] NULL,
	[lastopusername] [nvarchar](50) NULL,
	[ip] [nvarchar](50) NULL,
	[mac] [nvarchar](250) NULL,
	[belongto] [nvarchar](50) NULL,
	[dept] [nvarchar](50) NULL,
	[enduser] [nvarchar](50) NULL,
	[connecttype] [nvarchar](50) NULL,
	[provider] [nvarchar](50) NULL,
	[price] [nvarchar](50) NULL,
	[contactname] [nvarchar](50) NULL,
	[contacttel] [nvarchar](50) NULL,
	[opusername] [nvarchar](50) NULL,
	[lastopdate] [datetime] NULL,
	[opdate] [datetime] NULL,
	[ip10] [bigint] NULL,
 CONSTRAINT [PK_helpdesk_pc_asset] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_pc_asset] ON
INSERT [dbo].[helpdesk_pc_asset] ([id], [assetname], [manufacturer], [serialno], [buydate], [storeplace], [usestatus], [types], [prev1], [prev2], [notes], [expiredate], [lastopusername], [ip], [mac], [belongto], [dept], [enduser], [connecttype], [provider], [price], [contactname], [contacttel], [opusername], [lastopdate], [opdate], [ip10]) VALUES (1, N'HPXDE433', N'HPXDE433', N'HPXDE433', CAST(0x0000A19E00000000 AS DateTime), N'', N'在用', N'打印机', N'', N'', N'', CAST(0x0000000000000000 AS DateTime), NULL, N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', NULL, NULL, NULL, NULL)
INSERT [dbo].[helpdesk_pc_asset] ([id], [assetname], [manufacturer], [serialno], [buydate], [storeplace], [usestatus], [types], [prev1], [prev2], [notes], [expiredate], [lastopusername], [ip], [mac], [belongto], [dept], [enduser], [connecttype], [provider], [price], [contactname], [contacttel], [opusername], [lastopdate], [opdate], [ip10]) VALUES (2, N'HPXD222', N'HPXD222', N'HPXDE433', CAST(0x0000A19E00000000 AS DateTime), N'', N'在用', N'打印机', N'', N'', N'', CAST(0x0000000000000000 AS DateTime), N'管理员', N'', N'', N'集团使用', N'财务部', N'李万宝', N'', N'', N'', N'', N'', NULL, CAST(0x0000A4E9008F3A4C AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_pc_asset] ([id], [assetname], [manufacturer], [serialno], [buydate], [storeplace], [usestatus], [types], [prev1], [prev2], [notes], [expiredate], [lastopusername], [ip], [mac], [belongto], [dept], [enduser], [connecttype], [provider], [price], [contactname], [contacttel], [opusername], [lastopdate], [opdate], [ip10]) VALUES (3, N'针式打印机', N'DELL', N'', CAST(0x0000000000000000 AS DateTime), N'', N'在用', N'打印机', N'', N'', N'', CAST(0x0000000000000000 AS DateTime), N'管理员', N'192.168.1.30', N'', N'', N'', N'', N'', N'', N'', N'', N'', NULL, CAST(0x0000A4E9008F265B AS DateTime), NULL, 3232235806)
INSERT [dbo].[helpdesk_pc_asset] ([id], [assetname], [manufacturer], [serialno], [buydate], [storeplace], [usestatus], [types], [prev1], [prev2], [notes], [expiredate], [lastopusername], [ip], [mac], [belongto], [dept], [enduser], [connecttype], [provider], [price], [contactname], [contacttel], [opusername], [lastopdate], [opdate], [ip10]) VALUES (4, N'LQ300K+II 针式打印机', N'HP', N'', CAST(0x0000A21400000000 AS DateTime), N'', N'在用', N'打印机', N'', N'', N'', CAST(0x0000000000000000 AS DateTime), NULL, N'192.168.1.22', N'', N'部门使用', N'服务部', N'', N'', N'', N'', N'', N'', N'管理员', NULL, CAST(0x0000A4E900877E74 AS DateTime), 3232235798)
INSERT [dbo].[helpdesk_pc_asset] ([id], [assetname], [manufacturer], [serialno], [buydate], [storeplace], [usestatus], [types], [prev1], [prev2], [notes], [expiredate], [lastopusername], [ip], [mac], [belongto], [dept], [enduser], [connecttype], [provider], [price], [contactname], [contacttel], [opusername], [lastopdate], [opdate], [ip10]) VALUES (5, N'LQ300K+II 针式打印机', N'HP', N'', CAST(0x0000A4EB00000000 AS DateTime), N'', N'在用', N'打印机', N'', N'', N'', CAST(0x0000000000000000 AS DateTime), NULL, N'192.168.1.23', N'', N'部门使用', N'财务部', N'', N'', N'', N'', N'', N'', N'管理员', NULL, CAST(0x0000A4E90087A162 AS DateTime), 3232235799)
INSERT [dbo].[helpdesk_pc_asset] ([id], [assetname], [manufacturer], [serialno], [buydate], [storeplace], [usestatus], [types], [prev1], [prev2], [notes], [expiredate], [lastopusername], [ip], [mac], [belongto], [dept], [enduser], [connecttype], [provider], [price], [contactname], [contacttel], [opusername], [lastopdate], [opdate], [ip10]) VALUES (6, N'HP CP1025C 彩色打印机', N'', N'', CAST(0x0000000000000000 AS DateTime), N'文印室', N'在用', N'打印机', N'', N'', N'', CAST(0x0000000000000000 AS DateTime), NULL, N'192.168.1.25', N'', N'集团使用', N'文印室', N'', N'', N'', N'', N'', N'', N'管理员', NULL, CAST(0x0000A4E90087E642 AS DateTime), 3232235801)
INSERT [dbo].[helpdesk_pc_asset] ([id], [assetname], [manufacturer], [serialno], [buydate], [storeplace], [usestatus], [types], [prev1], [prev2], [notes], [expiredate], [lastopusername], [ip], [mac], [belongto], [dept], [enduser], [connecttype], [provider], [price], [contactname], [contacttel], [opusername], [lastopdate], [opdate], [ip10]) VALUES (7, N'hp1212 一体机', N'HP', N'', CAST(0x0000000000000000 AS DateTime), N'', N'在用', N'打印机', N'', N'', N'', CAST(0x0000000000000000 AS DateTime), NULL, N'192.168.1.26', N'', N'集团使用', N'销售部', N'', N'', N'', N'', N'', N'', N'管理员', NULL, CAST(0x0000A4E900896307 AS DateTime), 3232235802)
INSERT [dbo].[helpdesk_pc_asset] ([id], [assetname], [manufacturer], [serialno], [buydate], [storeplace], [usestatus], [types], [prev1], [prev2], [notes], [expiredate], [lastopusername], [ip], [mac], [belongto], [dept], [enduser], [connecttype], [provider], [price], [contactname], [contacttel], [opusername], [lastopdate], [opdate], [ip10]) VALUES (8, N'路由器 32口', N'', N'', CAST(0x0000000000000000 AS DateTime), N'', N'在用', N'路由器', N'', N'', N'', CAST(0x0000000000000000 AS DateTime), NULL, N'192.168.1.0', N'66:D4:FE:XD:RE', N'部门使用', N'财务部', N'', N'服务器', N'', N'', N'', N'', N'管理员', NULL, CAST(0x0000A4E9008F9DF3 AS DateTime), 3232235776)
SET IDENTITY_INSERT [dbo].[helpdesk_pc_asset] OFF
/****** Object:  Table [dbo].[helpdesk_pc]    Script Date: 10/03/2016 19:44:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_pc]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_pc](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[pcname] [nvarchar](50) NULL,
	[assettag] [nvarchar](50) NULL,
	[spec] [nvarchar](50) NULL,
	[serial] [nvarchar](50) NULL,
	[dept] [nvarchar](50) NULL,
	[enduser] [nvarchar](50) NULL,
	[usetype] [nvarchar](50) NULL,
	[usestatus] [nvarchar](50) NULL,
	[os] [nvarchar](50) NULL,
	[office] [nvarchar](500) NULL,
	[buydate] [datetime] NULL,
	[expiredate] [datetime] NULL,
	[storeplace] [nvarchar](50) NULL,
	[ip] [nvarchar](50) NULL,
	[prezver1] [nvarchar](50) NULL,
	[prezver2] [nvarchar](50) NULL,
	[note] [nvarchar](500) NULL,
	[addby] [nvarchar](50) NULL,
	[adduid] [int] NULL,
	[adddate] [datetime] NULL,
	[ispopup] [int] NULL CONSTRAINT [DF_helpdesk_pc_ispopup]  DEFAULT ((1)),
	[mainboardserialno] [nvarchar](50) NULL,
	[mainboardmanufacture] [nvarchar](50) NULL,
	[display] [nvarchar](50) NULL,
	[mac] [nvarchar](50) NULL,
	[belongto] [nvarchar](50) NULL,
	[cpu] [nvarchar](50) NULL,
	[mem] [nvarchar](50) NULL,
	[harddisk] [nvarchar](50) NULL,
	[mouse] [nvarchar](50) NULL,
	[keyboard] [nvarchar](50) NULL,
	[cd] [nvarchar](50) NULL,
	[netcard] [nvarchar](100) NULL,
	[sound] [nvarchar](100) NULL,
	[lastupdatedate] [datetime] NULL,
	[lastupdateusername] [nvarchar](50) NULL,
	[lastupdateuid] [int] NULL,
	[ip10] [bigint] NULL CONSTRAINT [DF_helpdesk_pc_ip10]  DEFAULT ((0)),
 CONSTRAINT [PK_helpdesk_pc] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_pc] ON
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (1, N'HRPC01', N'ZC01', N'DELL OptiPlex 380', N'XH01', N'人事部', N'李飞', N'台式机', N'在用', N'windows 7', N'Office2010', CAST(0x00009D4C00000000 AS DateTime), CAST(0x0000A58000000000 AS DateTime), N'总部仓库', N'192.168.1.1', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD001', N'DELL', N'', N'MAC0001', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (3, N'HRPC03', N'ZC02', N'DELL OptiPlex 380', N'XH02', N'人事部', N'张红', N'台式机', N'在用', N'windows 7', N'Office2010', CAST(0x00009D4C00000000 AS DateTime), CAST(0x0000A58100000000 AS DateTime), N'总部仓库', N'192.168.1.2', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD002', N'DELL', N'', N'MAC0002', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (4, N'HRPC04', N'ZC04', N'DELL OptiPlex 380', N'XH04', N'人事部', N'理想', N'台式机', N'在用', N'windows 7', N'Office2010', CAST(0x00009D4C00000000 AS DateTime), CAST(0x0000A58200000000 AS DateTime), N'总部仓库', N'192.168.1.3', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD003', N'DELL', N'', N'MAC0003', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (5, N'HRPC05', N'ZC05', N'DELL OptiPlex 380', N'XH05', N'人事部', N'张天', N'台式机', N'在用', N'windows 7', N'Office2010', CAST(0x0000A19400000000 AS DateTime), CAST(0x0000A58300000000 AS DateTime), N'总部仓库', N'192.168.1.4', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD004', N'DELL', N'', N'MAC0004', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (6, N'HRPC06', N'ZC06', N'DELL OptiPlex 380', N'XH06', N'人事部', N'张说', N'台式机', N'在用', N'windows 7', N'Office2010', CAST(0x0000A19400000000 AS DateTime), CAST(0x0000A58400000000 AS DateTime), N'总部仓库', N'192.168.1.5', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD005', N'DELL', N'', N'MAC0005', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (7, N'HRPC07', N'ZC07', N'DELL OptiPlex 380', N'XH07', N'人事部', N'李硕', N'台式机', N'在用', N'windows 7', N'Office2010', CAST(0x0000A19400000000 AS DateTime), CAST(0x0000A58500000000 AS DateTime), N'总部仓库', N'192.168.1.6', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD006', N'DELL', N'', N'MAC0006', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (8, N'HRPC08', N'ZC08', N'DELL OptiPlex 380', N'XH08', N'人事部', N'李伟', N'台式机', N'在用', N'windows 7', N'Office2010', CAST(0x00009D4C00000000 AS DateTime), CAST(0x0000A58600000000 AS DateTime), N'总部仓库', N'192.168.1.7', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD007', N'DELL', N'', N'MAC0007', N'集团使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (9, N'HRPC09', N'ZC09', N'DELL OptiPlex 380', N'XH09', N'人事部', N'李红', N'台式机', N'在用', N'windows 7', N'Office2010', CAST(0x00009D4C00000000 AS DateTime), CAST(0x0000A58700000000 AS DateTime), N'总部仓库', N'192.168.1.8', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD008', N'DELL', N'', N'MAC0008', N'集团使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (10, N'HRPC10', N'ZC10', N'DELL OptiPlex 380', N'XH10', N'人事部', N'何炅', N'台式机', N'在用', N'windows 7', N'Office2010', CAST(0x00009D4C00000000 AS DateTime), CAST(0x0000A58800000000 AS DateTime), N'总部仓库', N'192.168.1.9', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD009', N'DELL', N'', N'MAC0009', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (11, N'HRPC11', N'ZC11', N'DELL OptiPlex 380', N'XH11', N'人事部', N'何啊', N'台式机', N'在用', N'windows 7', N'Office2010', CAST(0x0000A19400000000 AS DateTime), CAST(0x0000A58900000000 AS DateTime), N'总部仓库', N'192.168.1.10', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD010', N'DELL', N'', N'MAC0010', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (12, N'HRPC12', N'ZC12', N'DELL OptiPlex 380', N'XH12', N'人事部', N'何本科', N'台式机', N'在用', N'windows 7', N'Office2010', CAST(0x0000A19400000000 AS DateTime), CAST(0x0000A58A00000000 AS DateTime), N'总部仓库', N'192.168.1.11', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD011', N'DELL', N'', N'MAC0011', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (13, N'HRPC13', N'ZC13', N'DELL OptiPlex 380', N'XH13', N'人事部', N'万里', N'台式机', N'在用', N'windows 7', N'Office2010', CAST(0x0000A19400000000 AS DateTime), CAST(0x0000A58B00000000 AS DateTime), N'总部仓库', N'192.168.1.12', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD012', N'DELL', N'', N'MAC0012', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (14, N'HRPC14', N'ZC14', N'DELL OptiPlex 380', N'XH14', N'人事部', N'万年', N'台式机', N'在用', N'windows 7', N'Office2010', CAST(0x00009D4C00000000 AS DateTime), CAST(0x0000A58C00000000 AS DateTime), N'总部仓库', N'192.168.1.13', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD013', N'DELL', N'', N'MAC0013', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (15, N'HRPC15', N'ZC15', N'DELL OptiPlex 380', N'XH15', N'人事部', N'万钢', N'台式机', N'在用', N'windows 7', N'Office2010', CAST(0x00009D4C00000000 AS DateTime), CAST(0x0000A58D00000000 AS DateTime), N'总部仓库', N'192.168.1.14', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD014', N'DELL', N'', N'MAC0014', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (16, N'HRPC16', N'ZC16', N'DELL OptiPlex 380', N'XH16', N'人事部', N'李万宝', N'台式机', N'在用', N'windows 7', N'Office2010', CAST(0x00009D4C00000000 AS DateTime), CAST(0x0000A58E00000000 AS DateTime), N'总部仓库', N'192.168.1.15', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD015', N'DELL', N'', N'MAC0015', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (17, N'HRPC17', N'ZC17', N'DELL OptiPlex 380', N'XH17', N'人事部', N'张晓军', N'台式机', N'在用', N'windows 7', N'Office2010', CAST(0x0000A19400000000 AS DateTime), CAST(0x0000A14800000000 AS DateTime), N'总部仓库', N'192.168.1.16', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD016', N'DELL', N'', N'MAC0016', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (18, N'HRPC18', N'ZC18', N'DELL OptiPlex 380', N'XH18', N'人事部', N'张丽婷', N'台式机', N'在用', N'windows 7', N'Office2010', CAST(0x0000A19400000000 AS DateTime), CAST(0x0000A59000000000 AS DateTime), N'总部仓库', N'192.168.1.17', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD017', N'DELL', N'', N'MAC0017', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (19, N'HRPC19', N'ZC19', N'DELL OptiPlex 480', N'XH19', N'人事部', N'李一', N'笔记本', N'报废', N'windows 8', N'Office2010', CAST(0x0000A19400000000 AS DateTime), CAST(0x0000A2B700000000 AS DateTime), N'总部仓库', N'192.168.1.18', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD018', N'DELL', N'', N'MAC0018', N'集团使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (20, N'HRPC20', N'ZC20', N'DELL OptiPlex 480', N'XH20', N'人事部', N'李二', N'笔记本', N'在库', N'windows 10', N'Office2015', CAST(0x00009D4C00000000 AS DateTime), CAST(0x0000A59200000000 AS DateTime), N'总部仓库', N'192.168.1.19', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD019', N'DELL', N'', N'MAC0019', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (21, N'HRPC21', N'ZC21', N'DELL OptiPlex 480', N'XH21', N'人事部', N'李三', N'笔记本', N'在用', N'windows 10', N'Office2010', CAST(0x00009D4C00000000 AS DateTime), CAST(0x0000A42600000000 AS DateTime), N'总部仓库', N'192.168.1.20', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD020', N'DELL', N'', N'MAC0020', N'集团使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (22, N'HRPC22', N'ZC22', N'DELL OptiPlex 580', N'XH22', N'财务部', N'李四', N'笔记本', N'在用', N'windows 10', N'Office2015', CAST(0x00009D4C00000000 AS DateTime), CAST(0x0000A59400000000 AS DateTime), N'总部仓库', N'192.168.1.21', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD021', N'DELL', N'', N'MAC0021', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (23, N'HRPC23', N'ZC23', N'DELL OptiPlex 580', N'XH23', N'财务部', N'李伟', N'笔记本', N'在用', N'windows 10', N'Office2010', CAST(0x0000A19400000000 AS DateTime), CAST(0x0000A42800000000 AS DateTime), N'总部仓库', N'192.168.1.22', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD022', N'DELL', N'', N'MAC0022', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (24, N'HRPC24', N'ZC24', N'DELL OptiPlex 580', N'XH24', N'财务部', N'里流', N'台式机', N'在用', N'windows 10', N'Office2010', CAST(0x0000A19400000000 AS DateTime), CAST(0x0000A59600000000 AS DateTime), N'总部仓库', N'192.168.1.23', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD023', N'DELL', N'', N'MAC0023', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (25, N'HRPC25', N'ZC25', N'DELL OptiPlex 380', N'XH25', N'财务部', N'李琦', N'台式机', N'在用', N'windows 10', N'Office2010', CAST(0x0000A19400000000 AS DateTime), CAST(0x0000A59700000000 AS DateTime), N'总部仓库', N'192.168.1.24', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD024', N'DELL', N'', N'MAC0024', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (26, N'HRPC26', N'ZC26', N'DELL OptiPlex 380', N'XH26', N'财务部', N'力巴', N'台式机', N'在用', N'windows 10', N'Office2010', CAST(0x00009D4C00000000 AS DateTime), CAST(0x0000A59800000000 AS DateTime), N'总部仓库', N'192.168.1.25', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD025', N'DELL', N'', N'MAC0025', N'集团使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (27, N'HRPC27', N'ZC27', N'DELL OptiPlex 380', N'XH27', N'财务部', N'利旧', N'台式机', N'在用', N'windows 10', N'Office2010', CAST(0x00009D4C00000000 AS DateTime), CAST(0x0000A59900000000 AS DateTime), N'总部仓库', N'192.168.1.26', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD026', N'DELL', N'', N'MAC0026', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (28, N'HRPC28', N'ZC28', N'DELL OptiPlex 380', N'XH28', N'财务部', N'仗义', N'台式机', N'在用', N'windows 10', N'Office2010', CAST(0x00009D4C00000000 AS DateTime), CAST(0x0000A59A00000000 AS DateTime), N'总部仓库', N'192.168.1.27', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD027', N'DELL', N'', N'MAC0027', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (29, N'HRPC29', N'ZC29', N'DELL OptiPlex 380', N'XH29', N'财务部', N'张二', N'台式机', N'报废', N'windows 10', N'Office2010', CAST(0x0000A19400000000 AS DateTime), CAST(0x0000A59B00000000 AS DateTime), N'总部仓库', N'192.168.1.28', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD028', N'DELL', N'', N'MAC0028', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (30, N'HRPC30', N'ZC30', N'DELL OptiPlex 380', N'XH30', N'财务部', N'张说', N'台式机', N'在库', N'windows 10', N'Office2010', CAST(0x0000A19400000000 AS DateTime), CAST(0x0000A59C00000000 AS DateTime), N'总部仓库', N'192.168.1.29', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD029', N'DELL', N'', N'MAC0029', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (31, N'HRPC31', N'ZC31', N'DELL OptiPlex 380', N'XH31', N'财务部', N'张思', N'台式机', N'在用', N'windows 10', N'Office2010', CAST(0x0000A19400000000 AS DateTime), CAST(0x0000A59D00000000 AS DateTime), N'总部仓库', N'192.168.1.30', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD030', N'DELL', N'', N'MAC0030', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (32, N'HRPC32', N'ZC32', N'DELL OptiPlex 380', N'XH32', N'IT部门', N'彰武', N'台式机', N'报废', N'windows 10', N'Office2010', CAST(0x00009D4C00000000 AS DateTime), CAST(0x0000A59E00000000 AS DateTime), N'总部仓库', N'192.168.1.31', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD031', N'HP', N'', N'MAC0031', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (33, N'HRPC33', N'ZC33', N'DELL OptiPlex 380', N'XH33', N'IT部门', N'张柳', N'台式机', N'报废', N'windows 10', N'Office2010', CAST(0x00009D4C00000000 AS DateTime), CAST(0x0000A59F00000000 AS DateTime), N'总部仓库', N'192.168.1.32', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD032', N'HP', N'', N'MAC0032', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (34, N'HRPC34', N'ZC34', N'DELL OptiPlex 480', N'XH34', N'IT部门', N'张琪', N'平板电脑', N'在用', N'windows 10', N'Office2010', CAST(0x00009D4C00000000 AS DateTime), CAST(0x0000A5A000000000 AS DateTime), N'总部仓库', N'192.168.1.33', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD033', N'HP', N'', N'MAC0033', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (35, N'HRPC35', N'ZC35', N'DELL OptiPlex 480', N'XH35', N'IT部门', N'张吧', N'台式机', N'在用', N'windows 10', N'Office2010', CAST(0x0000A19400000000 AS DateTime), CAST(0x0000A5A100000000 AS DateTime), N'总部仓库', N'192.168.1.34', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD034', N'HP', N'', N'MAC0034', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (36, N'HRPC36', N'ZC36', N'DELL OptiPlex 480', N'XH36', N'IT部门', N'张久', N'台式机', N'在用', N'windows 10', N'Office2010', CAST(0x0000A19400000000 AS DateTime), CAST(0x0000A5A200000000 AS DateTime), N'总部仓库', N'192.168.1.35', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD035', N'HP', N'', N'MAC0035', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (37, N'HRPC37', N'ZC37', N'DELL OptiPlex 380', N'XH37', N'IT部门', N'王一', N'台式机', N'在用', N'windows 10', N'Office2010', CAST(0x0000A19400000000 AS DateTime), CAST(0x0000A5A300000000 AS DateTime), N'总部仓库', N'192.168.1.36', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD036', N'HP', N'', N'MAC0036', N'部门使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (38, N'HRPC38', N'ZC38', N'DELL OptiPlex 380', N'XH38', N'IT部门', N'王二', N'平板电脑', N'在用', N'windows 10', N'Office2010', CAST(0x00009D4C00000000 AS DateTime), CAST(0x0000A5A400000000 AS DateTime), N'总部仓库', N'192.168.1.37', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD037', N'HP', N'', N'MAC0037', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (39, N'HRPC39', N'ZC39', N'DELL OptiPlex 380', N'XH39', N'IT部门', N'网三', N'平板电脑', N'报废', N'windows 10', N'Office2010', CAST(0x00009D4C00000000 AS DateTime), CAST(0x0000A5A500000000 AS DateTime), N'总部仓库', N'192.168.1.38', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD038', N'HP', N'', N'MAC0038', N'集团使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (40, N'HRPC40', N'ZC40', N'DELL OptiPlex 380', N'XH40', N'IT部门', N'王思', N'平板电脑', N'在库', N'windows 10', N'Office2010', CAST(0x00009D4C00000000 AS DateTime), CAST(0x0000A5A600000000 AS DateTime), N'总部仓库', N'192.168.1.39', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD039', N'HP', N'', N'MAC0039', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (41, N'HRPC41', N'ZC41', N'DELL OptiPlex 380', N'XH41', N'IT部门', N'王武', N'平板电脑', N'在用', N'windows 10', N'Office2010', CAST(0x0000A19400000000 AS DateTime), CAST(0x0000A5A700000000 AS DateTime), N'总部仓库', N'192.168.1.40', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD040', N'HP', N'', N'MAC0040', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (42, N'HRPC42', N'ZC42', N'DELL OptiPlex 380', N'XH42', N'IT部门', N'王柳', N'台式机', N'在用', N'windows 10', N'Office2010', CAST(0x0000A19400000000 AS DateTime), CAST(0x0000A5A800000000 AS DateTime), N'总部仓库', N'192.168.1.41', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD041', N'HP', N'', N'MAC0041', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
INSERT [dbo].[helpdesk_pc] ([id], [pcname], [assettag], [spec], [serial], [dept], [enduser], [usetype], [usestatus], [os], [office], [buydate], [expiredate], [storeplace], [ip], [prezver1], [prezver2], [note], [addby], [adduid], [adddate], [ispopup], [mainboardserialno], [mainboardmanufacture], [display], [mac], [belongto], [cpu], [mem], [harddisk], [mouse], [keyboard], [cd], [netcard], [sound], [lastupdatedate], [lastupdateusername], [lastupdateuid], [ip10]) VALUES (43, N'HRPC43', N'ZC43', N'DELL OptiPlex 380', N'XH43', N'IT部门', N'王琦', N'台式机', N'在用', N'windows 10', N'Office2010', CAST(0x0000A19400000000 AS DateTime), CAST(0x0000A5A900000000 AS DateTime), N'总部仓库', N'192.168.1.42', N'', N'', N'', NULL, NULL, NULL, 1, N'BORD042', N'联想', N'', N'MAC0042', N'个人使用', N'酷睿', N'4G', N'100G', N'双飞燕', N'双飞燕', N'', N'', N'', NULL, NULL, NULL, 0)
SET IDENTITY_INSERT [dbo].[helpdesk_pc] OFF
/****** Object:  Table [dbo].[helpdesk_outlook_calendar]    Script Date: 10/03/2016 19:44:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_outlook_calendar]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_outlook_calendar](
	[username] [nvarchar](50) NULL,
	[begintime] [datetime] NULL,
	[endtime] [datetime] NULL,
	[title] [nvarchar](50) NULL,
	[id] [int] IDENTITY(1,1) NOT NULL
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[helpdesk_newscat]    Script Date: 10/03/2016 19:44:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_newscat]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_newscat](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[catname] [nvarchar](50) NULL,
 CONSTRAINT [PK_helpdesk_newscat] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_newscat] ON
INSERT [dbo].[helpdesk_newscat] ([id], [catname]) VALUES (1, N'最新新闻')
INSERT [dbo].[helpdesk_newscat] ([id], [catname]) VALUES (2, N'内部通知')
SET IDENTITY_INSERT [dbo].[helpdesk_newscat] OFF
/****** Object:  Table [dbo].[helpdesk_news]    Script Date: 10/03/2016 19:44:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_news]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_news](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[catid] [int] NULL,
	[title] [nvarchar](100) NULL,
	[contents] [nvarchar](max) NULL,
	[istop] [int] NULL CONSTRAINT [DF_helpdesk_news_istop]  DEFAULT ((0)),
	[createdate] [datetime] NULL CONSTRAINT [DF_helpdesk_news_createdate]  DEFAULT (getdate()),
	[addby] [nvarchar](50) NULL,
 CONSTRAINT [PK_helpdesk_news] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_news] ON
INSERT [dbo].[helpdesk_news] ([id], [catid], [title], [contents], [istop], [createdate], [addby]) VALUES (1, 1, N'关于2012.12.1日系统升级暂停网络的通知', N'<p>关于2012.12.1日系统升级暂停网络的通知</p>', 2, CAST(0x0000A0FE00C40D10 AS DateTime), N'管理员')
SET IDENTITY_INSERT [dbo].[helpdesk_news] OFF
/****** Object:  Table [dbo].[helpdesk_movelog]    Script Date: 10/03/2016 19:44:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_movelog]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_movelog](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[opusername] [nvarchar](50) NULL,
	[pcid] [int] NULL,
	[fromuid] [int] NULL,
	[fromusername] [nvarchar](50) NULL,
	[fromdept] [nvarchar](50) NULL,
	[touid] [int] NULL,
	[tousername] [nvarchar](50) NULL,
	[todeptname] [nvarchar](50) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_helpdesk_movelog_createdate]  DEFAULT (getdate()),
 CONSTRAINT [PK_helpdesk_movelog] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[helpdesk_logs]    Script Date: 10/03/2016 19:44:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_logs]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_logs](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[types] [nvarchar](50) NULL,
	[title] [nvarchar](500) NULL,
	[contents] [nvarchar](500) NULL,
	[adddate] [datetime] NULL CONSTRAINT [DF_helpdesk_logs_adddate]  DEFAULT (getdate()),
	[tid] [int] NULL,
	[username] [nvarchar](50) NULL,
 CONSTRAINT [PK_helpdesk_logs] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_logs] ON
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (14, NULL, NULL, N'建立新的Ticket', CAST(0x0000A1980081E9D0 AS DateTime), 61, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (15, NULL, NULL, N'更新了Ticket', CAST(0x0000A19800823020 AS DateTime), 61, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (16, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A1980082BCC0 AS DateTime), 62, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (17, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A1980085B613 AS DateTime), 63, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (18, N'Ticket', NULL, N'删除了Ticket', CAST(0x0000A1980085BC75 AS DateTime), 63, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (19, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A1980087899C AS DateTime), 64, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (20, N'Ticket', NULL, N'删除了Ticket', CAST(0x0000A19800883EE9 AS DateTime), 55, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (21, N'Ticket', NULL, N'删除了Ticket', CAST(0x0000A19800883EE9 AS DateTime), 54, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (25, N'Ticket', NULL, N'关闭了Ticket', CAST(0x0000A1980088C9E8 AS DateTime), 64, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (26, N'Ticket', NULL, N'开启了Ticket', CAST(0x0000A1980088E4BB AS DateTime), 64, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (27, N'Ticket', NULL, N'开启了Ticket', CAST(0x0000A1980088E4DD AS DateTime), 58, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (28, N'Ticket', NULL, N'更改了问题优先级为medium 备注:尽快', CAST(0x0000A198008ACDF8 AS DateTime), 64, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (29, N'Ticket', NULL, N'更改了问题优先级为critical 备注:', CAST(0x0000A198008B43D6 AS DateTime), 64, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (30, N'Ticket', NULL, N'关闭了Ticket', CAST(0x0000A198008E4B81 AS DateTime), 64, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (31, N'Ticket', NULL, N'关闭了Ticket', CAST(0x0000A198008E4B81 AS DateTime), 58, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (32, N'Ticket', NULL, N'关闭了Ticket', CAST(0x0000A198008E4B81 AS DateTime), 57, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (33, N'Ticket', NULL, N'关闭了Ticket', CAST(0x0000A198008E4B81 AS DateTime), 56, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (34, N'Ticket', NULL, N'关闭了Ticket', CAST(0x0000A198008E4C52 AS DateTime), 64, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (35, N'Ticket', NULL, N'关闭了Ticket', CAST(0x0000A198008E4C53 AS DateTime), 58, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (36, N'Ticket', NULL, N'关闭了Ticket', CAST(0x0000A198008E4C53 AS DateTime), 57, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (37, N'Ticket', NULL, N'关闭了Ticket', CAST(0x0000A198008E4C54 AS DateTime), 56, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (38, N'Ticket', NULL, N'开启了Ticket', CAST(0x0000A198008E52E7 AS DateTime), 64, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (39, N'Ticket', NULL, N'开启了Ticket', CAST(0x0000A198008E52F1 AS DateTime), 58, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (40, N'Ticket', NULL, N'开启了Ticket', CAST(0x0000A198008E52F2 AS DateTime), 57, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (41, N'Ticket', NULL, N'开启了Ticket', CAST(0x0000A198008E52F2 AS DateTime), 56, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (42, N'Ticket', NULL, N'更改了问题优先级为high 备注:ok', CAST(0x0000A198008E5F37 AS DateTime), 64, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (43, N'Ticket', NULL, N'更改了问题优先级为high 备注:ok', CAST(0x0000A198008E5F38 AS DateTime), 58, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (44, N'Ticket', NULL, N'更改了问题优先级为high 备注:ok', CAST(0x0000A198008E5F38 AS DateTime), 57, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (45, N'Ticket', NULL, N'更改了问题优先级为high 备注:ok', CAST(0x0000A198008E5F38 AS DateTime), 56, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (46, N'Ticket', NULL, N'关闭了Ticket', CAST(0x0000A198009AA33B AS DateTime), 64, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (47, N'Ticket', NULL, N'开启了Ticket', CAST(0x0000A198009AD0C8 AS DateTime), 64, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (48, N'Ticket', NULL, N'更新了问题的类别', CAST(0x0000A198009BD1FF AS DateTime), 64, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (49, N'Ticket', NULL, N'更新了问题的类别', CAST(0x0000A198009BD7C3 AS DateTime), 64, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (50, N'Asset Add', N'管理员于4/6/2013 10:00:15 AM 添加了ID为0 的资材', N'', CAST(0x0000A19800A4DDD7 AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (51, N'Asset Add', N'管理员于4/6/2013 10:00:25 AM 添加了ID为0 的资材', N'', CAST(0x0000A19800A4E93B AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (52, N'Purchase', N'新采购ID:1', N'管理员于4/6/2013 10:24:27 AM 采购了新的系统', CAST(0x0000A19800AB832C AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (53, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A35F0093C3D8 AS DateTime), 67, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (54, N'Software Add', N'管理员于8/2/2015 6:05:47 PM 添加了ID为1 的软件', N'', CAST(0x0000A4E8012A38F0 AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (55, N'Software Deleted ', N'管理员删除了ID为1 的软件 ', N'', CAST(0x0000A4E8012F6C6A AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (56, N'Software Add', N'管理员于8/2/2015 6:28:21 PM 添加了ID为2 的软件', N'', CAST(0x0000A4E801306BF2 AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (57, N'Software Add', N'管理员于8/2/2015 6:30:40 PM 添加了ID为3 的软件', N'', CAST(0x0000A4E801310EE9 AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (58, N'Software Add', N'管理员于8/2/2015 6:31:30 PM 添加了ID为4 的软件', N'', CAST(0x0000A4E801314913 AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (59, N'Asset Add', N'管理员于8/2/2015 10:08:02 PM 添加了ID为3 的外设', N'', CAST(0x0000A4E8016CC251 AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (60, N'Asset Add', N'管理员于8/2/2015 10:08:18 PM 添加了ID为4 的外设', N'', CAST(0x0000A4E8016CD522 AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (61, N'Asset Deleted ', N'管理员删除了ID为4 的外设 ', N'', CAST(0x0000A4E8016FBA68 AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (62, N'Ticket', NULL, N'删除了Ticket', CAST(0x0000A4E9007F08B2 AS DateTime), 67, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (63, N'Ticket', NULL, N'删除了Ticket', CAST(0x0000A4E9007F08B4 AS DateTime), 66, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (64, N'Ticket', NULL, N'删除了Ticket', CAST(0x0000A4E9007F08B4 AS DateTime), 65, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (65, N'Ticket', NULL, N'删除了Ticket', CAST(0x0000A4E9007F10B4 AS DateTime), 58, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (66, N'Ticket', NULL, N'删除了Ticket', CAST(0x0000A4E9007F10B4 AS DateTime), 57, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (67, N'Ticket', NULL, N'删除了Ticket', CAST(0x0000A4E9007F10B4 AS DateTime), 56, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (68, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A4E9007F43E2 AS DateTime), 68, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (69, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A4E9007F9630 AS DateTime), 69, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (70, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A4E9008010EB AS DateTime), 70, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (71, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A4E900804AF2 AS DateTime), 71, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (72, N'Ticket', NULL, N'更新了Ticket', CAST(0x0000A4E9008062ED AS DateTime), 71, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (73, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A4E900808AA9 AS DateTime), 72, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (74, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A4E90080BF49 AS DateTime), 73, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (75, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A4E90080E8FF AS DateTime), 74, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (76, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A4E900812AC3 AS DateTime), 75, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (77, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A4E900814CF2 AS DateTime), 76, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (78, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A4E900818CBD AS DateTime), 77, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (79, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A4E90081A95C AS DateTime), 78, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (80, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A4E90081D605 AS DateTime), 79, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (81, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A4E9008214E7 AS DateTime), 80, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (82, N'Asset Add', N'管理员于8/3/2015 8:13:19 AM 添加了ID为4 的外设', N'', CAST(0x0000A4E900877E7A AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (83, N'Asset Add', N'管理员于8/3/2015 8:13:48 AM 添加了ID为5 的外设', N'', CAST(0x0000A4E90087A163 AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (84, N'Asset Add', N'管理员于8/3/2015 8:14:47 AM 添加了ID为6 的外设', N'', CAST(0x0000A4E90087E643 AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (85, N'Asset Add', N'管理员于8/3/2015 8:20:12 AM 添加了ID为7 的外设', N'', CAST(0x0000A4E90089630A AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (86, N'Asset Update', N'管理员于8/3/2015 8:20:41 AM 更新了ID为3 的外设', N'', CAST(0x0000A4E900898538 AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (87, N'Asset Update', N'管理员于8/3/2015 8:21:21 AM 更新了ID为3 的外设', N'', CAST(0x0000A4E90089B389 AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (88, N'Asset Update', N'管理员于8/3/2015 8:38:13 AM 更新了ID为3 的外设', N'', CAST(0x0000A4E9008E55E8 AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (89, N'Asset Update', N'管理员于8/3/2015 8:39:39 AM 更新了ID为3 的外设', N'', CAST(0x0000A4E9008EBACB AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (90, N'Asset Update', N'管理员于8/3/2015 8:41:11 AM 更新了ID为3 的外设', N'', CAST(0x0000A4E9008F265C AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (91, N'Asset Update', N'管理员于8/3/2015 8:41:28 AM 更新了ID为2 的外设', N'', CAST(0x0000A4E9008F3A4E AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (92, N'Asset Add', N'管理员于8/3/2015 8:42:53 AM 添加了ID为8 的外设', N'', CAST(0x0000A4E9008F9DF4 AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (93, N'Software Update', N'管理员于8/3/2015 8:44:24 AM 更新了ID为3 的软件', N'', CAST(0x0000A4E900900877 AS DateTime), NULL, NULL)
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (94, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A52200D08175 AS DateTime), 81, N'joly')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (95, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A52200D327AC AS DateTime), 82, N'joly')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (96, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A52200D33DE7 AS DateTime), 83, N'joly')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (97, N'Ticket', NULL, N'更新了Ticket', CAST(0x0000A52200D3502F AS DateTime), 82, N'joly')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (98, N'Ticket', NULL, N'更新了Ticket', CAST(0x0000A52200D361B7 AS DateTime), 83, N'joly')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (99, N'Ticket', NULL, N'解决并关闭了Ticket', CAST(0x0000A52200D47E1F AS DateTime), 82, N'joly')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (100, N'Ticket', NULL, N'删除了Ticket', CAST(0x0000A52201036C88 AS DateTime), 77, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (101, N'Ticket', NULL, N'删除了Ticket', CAST(0x0000A522010391A4 AS DateTime), 79, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (102, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A52300C3A365 AS DateTime), 84, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (103, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A5C400B8DF41 AS DateTime), 85, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (104, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A5C400B90DD0 AS DateTime), 86, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (105, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A5C400B95A2F AS DateTime), 87, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (106, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A5C400B96CB9 AS DateTime), 88, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (107, N'Ticket', NULL, N'删除了Ticket', CAST(0x0000A5C400BB74FB AS DateTime), 88, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (108, N'Ticket', NULL, N'删除了Ticket', CAST(0x0000A5C400BB7AE3 AS DateTime), 87, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (109, N'Ticket', NULL, N'删除了Ticket', CAST(0x0000A5C400BB7AE4 AS DateTime), 86, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (110, N'Ticket', NULL, N'删除了Ticket', CAST(0x0000A5C400BB8056 AS DateTime), 85, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (111, N'Ticket', NULL, N'删除了Ticket', CAST(0x0000A5C400BB8057 AS DateTime), 84, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (112, N'Ticket', NULL, N'删除了Ticket', CAST(0x0000A5C400C11B68 AS DateTime), 73, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (113, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A5C400DD9A08 AS DateTime), 89, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (114, N'Ticket', NULL, N'删除了Ticket', CAST(0x0000A5C4011536E9 AS DateTime), 89, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (115, N'Ticket', NULL, N'删除了Ticket', CAST(0x0000A5C4011536EA AS DateTime), 83, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (116, N'Ticket', NULL, N'删除了Ticket', CAST(0x0000A5C4011536EA AS DateTime), 82, N'管理员')
GO
print 'Processed 100 total records'
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (117, N'Ticket', NULL, N'更改了问题状态为pending', CAST(0x0000A5C4013DA5A1 AS DateTime), 80, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (118, N'Ticket', NULL, N'解决并关闭了Ticket', CAST(0x0000A5C4013E49CD AS DateTime), 80, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (119, N'Ticket', NULL, N'开启了Ticket', CAST(0x0000A5C4014EBA47 AS DateTime), 80, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (120, N'Ticket', NULL, N'更改了问题优先级为high', CAST(0x0000A5C4014ED480 AS DateTime), 80, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (121, N'Ticket', NULL, N'更改了问题优先级为critical', CAST(0x0000A5C4014EDAF3 AS DateTime), 80, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (122, N'Ticket', NULL, N'更改了问题状态为unsolved', CAST(0x0000A5C4014EE246 AS DateTime), 80, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (123, N'Ticket', NULL, N'更改了问题状态为pending', CAST(0x0000A5C4014EE718 AS DateTime), 80, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (124, N'Ticket', NULL, N'解决并关闭了Ticket', CAST(0x0000A5C401603174 AS DateTime), 81, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (125, N'Ticket', NULL, N'解决并关闭了Ticket', CAST(0x0000A5C401604EA3 AS DateTime), 80, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (126, N'Ticket', NULL, N'开启了Ticket', CAST(0x0000A5C40160679A AS DateTime), 80, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (127, N'Ticket', NULL, N'解决并关闭了Ticket', CAST(0x0000A5C4016089AD AS DateTime), 80, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (128, N'Ticket', NULL, N'开启了Ticket', CAST(0x0000A5C401610783 AS DateTime), 80, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (129, N'Ticket', NULL, N'解决并关闭了Ticket', CAST(0x0000A5C40161DFA0 AS DateTime), 80, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (130, N'Ticket', NULL, N'开启了Ticket', CAST(0x0000A5C401622B89 AS DateTime), 80, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (131, N'Ticket', NULL, N'更改了问题优先级为high', CAST(0x0000A5C500BBD7ED AS DateTime), 76, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (132, N'Ticket', NULL, N'更改了问题优先级为critical', CAST(0x0000A5C500BBDA2E AS DateTime), 76, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (133, N'Ticket', NULL, N'更改了问题优先级为medium', CAST(0x0000A5C500BBE169 AS DateTime), 76, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (134, N'Ticket', NULL, N'更改了问题状态为pending', CAST(0x0000A5C500BBE2C6 AS DateTime), 76, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (135, N'Ticket', NULL, N'更新解决方式为邮件支持', CAST(0x0000A5C500BBE420 AS DateTime), 76, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (136, N'Ticket', NULL, N'关闭了Ticket', CAST(0x0000A5C50170AF22 AS DateTime), 72, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (137, N'Ticket', NULL, N'关闭了Ticket', CAST(0x0000A5C60098CCAD AS DateTime), 76, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (138, N'Ticket', NULL, N'开启了Ticket', CAST(0x0000A5C60098EC88 AS DateTime), 76, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (139, N'Ticket', NULL, N'解决并关闭了Ticket', CAST(0x0000A5C6009A3D4F AS DateTime), 74, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (140, N'Ticket', NULL, N'开启了Ticket', CAST(0x0000A5C6009B2528 AS DateTime), 74, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (141, N'Ticket', NULL, N'关闭了Ticket', CAST(0x0000A5C6009B929D AS DateTime), 74, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (142, N'Ticket', NULL, N'开启了Ticket', CAST(0x0000A5C6009BAB77 AS DateTime), 74, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (143, N'Ticket', NULL, N'更改了问题状态为pending', CAST(0x0000A5C6009BCA4D AS DateTime), 74, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (144, N'Ticket', NULL, N'解决并关闭了Ticket', CAST(0x0000A5C6009F9C84 AS DateTime), 71, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (145, N'Ticket', NULL, N'建立新的Ticket', CAST(0x0000A5C600B0DCC5 AS DateTime), 90, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (146, N'Ticket', NULL, N'解决并关闭了Ticket', CAST(0x0000A5C600B6C274 AS DateTime), 90, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (147, N'Ticket', NULL, N'开启了Ticket', CAST(0x0000A5C600B805CC AS DateTime), 90, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (148, N'Ticket', NULL, N'解决并关闭了Ticket', CAST(0x0000A5C600B80DF8 AS DateTime), 90, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (149, N'Ticket', NULL, N'开启了Ticket', CAST(0x0000A5C600B82EB6 AS DateTime), 90, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (150, N'Ticket', NULL, N'解决并关闭了Ticket', CAST(0x0000A5C600B83A28 AS DateTime), 90, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (151, N'Ticket', NULL, N'开启了Ticket', CAST(0x0000A5C600B8610A AS DateTime), 90, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (152, N'Ticket', NULL, N'关闭了Ticket', CAST(0x0000A5C600B865EE AS DateTime), 90, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (153, N'Ticket', NULL, N'关闭了Ticket', CAST(0x0000A5C600B99A9F AS DateTime), 81, N'管理员')
INSERT [dbo].[helpdesk_logs] ([id], [types], [title], [contents], [adddate], [tid], [username]) VALUES (154, N'Ticket', NULL, N'管理员解决并关闭了问题 solved & closed', CAST(0x0000A5C600B9A8B4 AS DateTime), 80, N'管理员')
SET IDENTITY_INSERT [dbo].[helpdesk_logs] OFF
/****** Object:  Table [dbo].[helpdesk_loginscan_software]    Script Date: 10/03/2016 19:44:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_loginscan_software]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_loginscan_software](
	[guid] [uniqueidentifier] NOT NULL CONSTRAINT [DF_helpdesk_loginscan_software_guid]  DEFAULT (newid()),
	[pcname] [nvarchar](50) NULL,
	[ip] [nvarchar](50) NULL,
	[loginname] [nvarchar](50) NULL,
	[softwarename] [nvarchar](500) NULL,
	[installLocation] [nvarchar](500) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_helpdesk_loginscan_software_createdate]  DEFAULT (getdate()),
 CONSTRAINT [PK_helpdesk_loginscan_software] PRIMARY KEY CLUSTERED 
(
	[guid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
INSERT [dbo].[helpdesk_loginscan_software] ([guid], [pcname], [ip], [loginname], [softwarename], [installLocation], [createdate]) VALUES (N'ff60e791-6efd-45e3-ad18-2a07c799b35b', N'PC-20150710RZJT', N'192.168.0.123', N'Administrator', N'NVIDIA Install Application', N'C:\Program Files\NVIDIA Corporation\Installer2\installer.{CB697631-AD87-4E1D-B6BC-DE07CC619F3C}', CAST(0x0000A4E900772132 AS DateTime))
INSERT [dbo].[helpdesk_loginscan_software] ([guid], [pcname], [ip], [loginname], [softwarename], [installLocation], [createdate]) VALUES (N'9c001211-109f-4f89-8aaf-2a83a676dadd', N'PC-20150710RZJT', N'192.168.0.123', N'Administrator', N'WinRAR 5.21 (64-位)', N'C:\Program Files\WinRAR\', CAST(0x0000A4E900772131 AS DateTime))
INSERT [dbo].[helpdesk_loginscan_software] ([guid], [pcname], [ip], [loginname], [softwarename], [installLocation], [createdate]) VALUES (N'070c6339-b05c-4175-bfb2-3b9be06a583d', N'PC-20150710RZJT', N'192.168.0.123', N'Administrator', N'Microsoft Silverlight', N'C:\Program Files\Microsoft Silverlight\', CAST(0x0000A4E900772131 AS DateTime))
INSERT [dbo].[helpdesk_loginscan_software] ([guid], [pcname], [ip], [loginname], [softwarename], [installLocation], [createdate]) VALUES (N'3175167c-6eaa-48bf-8647-b675dca687bc', N'PC-20150710RZJT', N'192.168.0.123', N'Administrator', N'Microsoft .NET Framework 4.5.1', N'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\SetupCache\v4.5.51078\', CAST(0x0000A4E900772131 AS DateTime))
INSERT [dbo].[helpdesk_loginscan_software] ([guid], [pcname], [ip], [loginname], [softwarename], [installLocation], [createdate]) VALUES (N'b79fa3a2-702c-4018-9dc8-c7f8c179b1a7', N'PC-20150710RZJT', N'192.168.0.123', N'Administrator', N'Microsoft SQL Server Compact 4.0 SP1 x64 ENU', N'C:\Program Files\Microsoft SQL Server Compact Edition\', CAST(0x0000A4E900772131 AS DateTime))
INSERT [dbo].[helpdesk_loginscan_software] ([guid], [pcname], [ip], [loginname], [softwarename], [installLocation], [createdate]) VALUES (N'fd909b81-12f6-4e40-9442-e04bf45fb81b', N'PC-20150710RZJT', N'192.168.0.123', N'Administrator', N'NVIDIA 控制面板 320.18', N'C:\Program Files\NVIDIA Corporation\Control Panel Client', CAST(0x0000A4E900772132 AS DateTime))
/****** Object:  Table [dbo].[helpdesk_loginscan_hardware]    Script Date: 10/03/2016 19:44:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_loginscan_hardware]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_loginscan_hardware](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[pcname] [nvarchar](200) NULL,
	[loginname] [nvarchar](200) NULL,
	[ip] [nvarchar](50) NULL,
	[bios_manufacturer] [nvarchar](200) NULL,
	[bios_serialnumber] [nvarchar](200) NULL,
	[bios_smbiosbiosversion] [nvarchar](200) NULL,
	[bios_version] [nvarchar](200) NULL,
	[bios_caption] [nvarchar](200) NULL,
	[board_caption] [nvarchar](200) NULL,
	[board_manufacturer] [nvarchar](200) NULL,
	[board_serialnumber] [nvarchar](200) NULL,
	[board_tag] [nvarchar](200) NULL,
	[board_product] [nvarchar](200) NULL,
	[os_caption] [nvarchar](200) NULL,
	[os_installdate] [nvarchar](200) NULL,
	[os_lastbootuptime] [nvarchar](200) NULL,
	[os_serialnumber] [nvarchar](200) NULL,
	[os_totalvirtualmemorysize] [nvarchar](200) NULL,
	[os_version] [nvarchar](200) NULL,
	[os_windowsdirectory] [nvarchar](200) NULL,
	[createdate] [datetime] NULL,
	[os_csdversion] [nvarchar](200) NULL,
	[mac] [nvarchar](200) NULL,
 CONSTRAINT [PK_helpdesk_loginscan] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_loginscan_hardware] ON
INSERT [dbo].[helpdesk_loginscan_hardware] ([id], [pcname], [loginname], [ip], [bios_manufacturer], [bios_serialnumber], [bios_smbiosbiosversion], [bios_version], [bios_caption], [board_caption], [board_manufacturer], [board_serialnumber], [board_tag], [board_product], [os_caption], [os_installdate], [os_lastbootuptime], [os_serialnumber], [os_totalvirtualmemorysize], [os_version], [os_windowsdirectory], [createdate], [os_csdversion], [mac]) VALUES (1, N'PC-20150710RZJT', N'Administrator', N'192.168.0.123', N'Dell Inc.', N'F0KQKP1', N'A06', N'DELL   - 1072009', N'BIOS Date: 05/26/11 10:02:35 Ver: 04.06.04', N'Base Board', N'Dell Inc.', N'.F0KQKP1.CN7016617L024F.', N'Base Board', N'0FXK2Y', N'Microsoft Windows 7 旗舰版 ', N'20150710112552.000000+480', N'20150803055451.125599+480', N'00426-OEM-8992662-00400', N'8.196632', N'6.1.7601', N'C:\Windows', CAST(0x0000A4E900772023 AS DateTime), N'Service Pack 1', N'AC:72:89:23:5C:3A')
SET IDENTITY_INSERT [dbo].[helpdesk_loginscan_hardware] OFF
/****** Object:  Table [dbo].[helpdesk_lists]    Script Date: 10/03/2016 19:44:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_lists]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_lists](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF__helpdesk___creat__0CBAE877]  DEFAULT (getdate()),
	[category1id] [int] NULL,
	[category1name] [nvarchar](50) NULL,
	[category2id] [int] NULL,
	[category2name] [nvarchar](50) NULL,
	[category3id] [int] NULL,
	[category3name] [nvarchar](50) NULL,
	[title] [nvarchar](500) NULL,
	[priority] [nvarchar](50) NULL,
	[method] [nvarchar](50) NULL,
	[status] [nvarchar](50) NULL,
	[contents] [nvarchar](max) NULL,
	[assettag] [nvarchar](50) NULL,
	[serial] [nvarchar](50) NULL,
	[os] [nvarchar](50) NULL,
	[pcname] [nvarchar](50) NULL,
	[ip] [nvarchar](50) NULL,
	[bit32] [nvarchar](50) NULL,
	[Usercheck] [nvarchar](50) NULL,
	[ie] [nvarchar](50) NULL,
	[uid] [int] NULL,
	[username] [nvarchar](50) NULL,
	[islock] [int] NULL CONSTRAINT [DF_helpdesk_lists_islock]  DEFAULT ((0)),
	[ispublic] [int] NULL CONSTRAINT [DF_helpdesk_lists_ispublic]  DEFAULT ((0)),
	[handleby] [nvarchar](50) NULL,
	[handleid] [int] NULL,
	[handledate] [datetime] NULL,
	[hour] [nvarchar](50) NULL CONSTRAINT [DF_helpdesk_lists_hour]  DEFAULT ((0)),
	[closedate] [datetime] NULL,
	[isclose] [nvarchar](10) NULL CONSTRAINT [DF_helpdesk_lists_isclose]  DEFAULT ((0)),
	[closeby] [nvarchar](50) NULL,
	[sladate] [datetime] NULL,
	[ispop] [int] NULL CONSTRAINT [DF_helpdesk_lists_ispop]  DEFAULT ((1)),
	[email] [nvarchar](500) NULL,
	[mainboardserialno] [nvarchar](50) NULL,
	[mainboardmanufacturer] [nvarchar](50) NULL,
	[contactname] [nvarchar](50) NULL,
	[contactdept] [nvarchar](50) NULL,
	[contactemail] [nvarchar](50) NULL,
	[contacttel] [nvarchar](50) NULL,
	[assignuid] [int] NULL,
	[ispoint] [int] NULL CONSTRAINT [DF_helpdesk_lists_ispoint]  DEFAULT ((0)),
	[starttime] [datetime] NULL,
 CONSTRAINT [PK__helpdesk_lists__0BC6C43E] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_lists]') AND name = N'index_category1name')
CREATE NONCLUSTERED INDEX [index_category1name] ON [dbo].[helpdesk_lists] 
(
	[category1name] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_lists]') AND name = N'index_category2name')
CREATE NONCLUSTERED INDEX [index_category2name] ON [dbo].[helpdesk_lists] 
(
	[category2name] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_lists]') AND name = N'index_date')
CREATE NONCLUSTERED INDEX [index_date] ON [dbo].[helpdesk_lists] 
(
	[createdate] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO
SET IDENTITY_INSERT [dbo].[helpdesk_lists] ON
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (64, CAST(0x0000A350015FAFA4 AS DateTime), 3, N'硬件与外设', 13, N'打印机', 36, N'打印机', N'解决IE兼容性', N'high', N'远程桌面', N'unsolved', N'<p>解决IE兼容性</p>', N'Fin01', N'Fin01', N'WinNT', N'Fin01', N'::1', N'是', N'管理员', N'IE9.0', 1, N'管理员', 0, 0, N'管理员', 1, CAST(0x0000A198009BD7C2 AS DateTime), N'0', CAST(0x0000A198009AA339 AS DateTime), N'0', N'管理员', CAST(0x0000A19900878998 AS DateTime), 1, N'1939248766@qq.com', N'Fin01XXXXXX', N'', N'管理员', N'环境部', N'1939248766@qq.com', N'15001712100', NULL, 1, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (68, CAST(0x0000A4E9007F43CD AS DateTime), 1, N'操作系统与标准软件', 7, N'操作系统', 19, N'windows系列', N'windows XP升级到 windows10', N'medium', NULL, N'unsolved', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>如题</p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'管理员', N'InternetExplorer11.0', 1, N'管理员', 0, 0, NULL, NULL, NULL, N'0', NULL, N'0', NULL, CAST(0x0000A4EA007F43C1 AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'环境部', N'1939248766@qq.com', N'15001712100', NULL, 0, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (69, CAST(0x0000A4E9007F9631 AS DateTime), 5, N'权限与账户', 17, N'申请账户', 40, N'Active Directory账户申请', N'申请部门邮件组 dept-it@dotnetcms.org', N'medium', NULL, N'unsolved', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>你好IT，因工作需要，申请部门邮件组。<a href="mailto:dept-it@dotnetcms.org">dept-it@dotnetcms.org</a></p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'管理员', N'InternetExplorer11.0', 1, N'管理员', 0, 0, N'管理员', 1, NULL, N'0.0', NULL, N'0', NULL, CAST(0x0000A4EA007F9630 AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'环境部', N'1939248766@qq.com', N'15001712100', NULL, 0, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (70, CAST(0x0000A4E9008010E6 AS DateTime), 2, N'应用系统', 11, N'人事系统', 33, N'HR账户', N'请开通服务器共享盘 HR 文件夹读写权限', N'medium', NULL, N'unsolved', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>你好，我的新来的Jojo，请帮助开通部门文件夹读写权限</p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'管理员', N'InternetExplorer11.0', 1, N'管理员', 0, 0, NULL, NULL, NULL, N'0', NULL, N'0', NULL, CAST(0x0000A4EA008010E1 AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'环境部', N'1939248766@qq.com', N'15001712100', NULL, 4, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (71, CAST(0x0000A4E900804AEF AS DateTime), 3, N'硬件与外设', 12, N'PC外设', 35, N'鼠标键盘U盘', N'更换鼠标，目前的鼠标坏了', N'medium', NULL, N'solved', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>RT</p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'管理员', N'InternetExplorer11.0', 1, N'管理员', 0, 0, N'管理员', 1, CAST(0x0000A5C6009F9C83 AS DateTime), N'0.5', CAST(0x0000A5C6009F9C7D AS DateTime), N'1', N'管理员', CAST(0x0000A4EA00804AED AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'环境部', N'1939248766@qq.com', N'15001712100', NULL, 4, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (72, CAST(0x0000A4E900808AAA AS DateTime), 1, N'操作系统与标准软件', 7, N'操作系统', 19, N'windows系列', N'IE升级到IE10后，财务插件无法使用', N'medium', NULL, N'unsolved', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>如题</p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'管理员', N'InternetExplorer11.0', 1, N'管理员', 0, 0, N'管理员', 1, CAST(0x0000A5C50170AF1B AS DateTime), N'1.0', CAST(0x0000A5C50170AF1B AS DateTime), N'1', N'管理员', CAST(0x0000A4EA00808AA9 AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'环境部', N'1939248766@qq.com', N'15001712100', NULL, 2, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (74, CAST(0x0000A4E90080E8FC AS DateTime), 1, N'操作系统与标准软件', 7, N'操作系统', 22, N'iOS', N'请帮助我配置一下iOS邮件，以便接收公司邮箱', N'medium', NULL, N'pending', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>公司SMTP多少的？</p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'管理员', N'InternetExplorer11.0', 1, N'管理员', 0, 0, N'管理员', 1, CAST(0x0000A5C6009BCA4C AS DateTime), N'0', CAST(0x0000A5C6009B929C AS DateTime), N'0', N'管理员', CAST(0x0000A4EA0080E8FA AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'环境部', N'1939248766@qq.com', N'15001712100', NULL, 0, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (75, CAST(0x0000A4E900812AC0 AS DateTime), 1, N'操作系统与标准软件', 8, N'办公软件', 28, N'Office2007', N'Outlook每次接收邮件，总是弹出登录对话框', N'medium', NULL, N'unsolved', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>请帮助解决。</p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'管理员', N'InternetExplorer11.0', 1, N'管理员', 0, 0, NULL, NULL, NULL, N'0', NULL, N'0', NULL, CAST(0x0000A4EA00812ABE AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'环境部', N'1939248766@qq.com', N'15001712100', NULL, 3, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (76, CAST(0x0000A4E900814CEE AS DateTime), 1, N'操作系统与标准软件', 9, N'常规软件', 31, N'Autocad', N'请帮助我安装一下AutoCAD2014，工作需要', N'medium', N'邮件支持', N'pending', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>如题</p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'管理员', N'InternetExplorer11.0', 1, N'管理员', 0, 0, N'管理员', 1, CAST(0x0000A5C60098EC87 AS DateTime), N'6', CAST(0x0000A5C60098CCAB AS DateTime), N'0', N'管理员', CAST(0x0000A4EA00814CED AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'环境部', N'1939248766@qq.com', N'15001712100', NULL, 1, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (78, CAST(0x0000A4E90081A95B AS DateTime), 1, N'操作系统与标准软件', 7, N'操作系统', 19, N'windows系列', N'增加磁盘空间，目前只有10G了，不够了', N'medium', NULL, N'unsolved', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>如题</p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'管理员', N'InternetExplorer11.0', 1, N'管理员', 0, 0, N'管理员', 1, NULL, N'0', NULL, N'0', NULL, CAST(0x0000A4EA0081A95C AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'环境部', N'1939248766@qq.com', N'15001712100', NULL, 5, NULL)
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (80, CAST(0x0000A4E9008214DB AS DateTime), 1, N'操作系统与标准软件', 7, N'操作系统', 19, N'windows系列', N'请帮助我windows安装Office2013吧，急！急！急！', N'critical', NULL, N'solved', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>如题</p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'管理员', N'InternetExplorer11.0', 1, N'管理员', 0, 0, N'管理员', 1, CAST(0x0000A5C600B9A8B4 AS DateTime), N'3.500000', CAST(0x0000A5C40161DF9F AS DateTime), N'1', N'管理员', CAST(0x0000A4EA008214D9 AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'环境部', N'1939248766@qq.com', N'15001712100', NULL, 1, CAST(0x0000A5C6007F8055 AS DateTime))
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (81, CAST(0x0000A52200D0816D AS DateTime), 5, N'权限与账户', 17, N'申请账户', 40, N'Active Directory账户申请', N'11111', N'medium', NULL, N'solved', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>1111111</p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'joly', N'InternetExplorer11.0', 17, N'joly', 0, 0, N'管理员', 1, CAST(0x0000A5C600B99A9F AS DateTime), N'2.500000', CAST(0x0000A5C401603172 AS DateTime), N'1', N'管理员', CAST(0x0000A52300D0816B AS DateTime), 1, N'', N'', N'', N'joly', N'人事部', N'1939248766@qq.com', N'111', NULL, 0, CAST(0x0000A5C6008FFB15 AS DateTime))
INSERT [dbo].[helpdesk_lists] ([id], [createdate], [category1id], [category1name], [category2id], [category2name], [category3id], [category3name], [title], [priority], [method], [status], [contents], [assettag], [serial], [os], [pcname], [ip], [bit32], [Usercheck], [ie], [uid], [username], [islock], [ispublic], [handleby], [handleid], [handledate], [hour], [closedate], [isclose], [closeby], [sladate], [ispop], [email], [mainboardserialno], [mainboardmanufacturer], [contactname], [contactdept], [contactemail], [contacttel], [assignuid], [ispoint], [starttime]) VALUES (90, CAST(0x0000A5C600B0DCBF AS DateTime), 4, N'网络故障', 16, N'线路故障', 39, N'地址段', N'88', N'medium', NULL, N'solved', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>888</p>
</body>
</html>', N'', N'', N'WinNT', N'', N'::1', N'是', N'管理员', N'InternetExplorer11.0', 1, N'管理员', 0, 0, N'管理员', 1, CAST(0x0000A5C600B865ED AS DateTime), N'24.500000', CAST(0x0000A5C600B865ED AS DateTime), N'1', N'管理员', CAST(0x0000A5C700B0DCBC AS DateTime), 1, N'1939248766@qq.com', N'', N'', N'管理员', N'环境部', N'1939248766@qq.com', N'15001712100', NULL, 0, CAST(0x0000A5C500B0F095 AS DateTime))
SET IDENTITY_INSERT [dbo].[helpdesk_lists] OFF
/****** Object:  Table [dbo].[helpdesk_kbcategory]    Script Date: 10/03/2016 19:44:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_kbcategory]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_kbcategory](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[catname] [nvarchar](50) NULL,
	[parentid] [int] NULL CONSTRAINT [DF_portal_kbcategory_parentid]  DEFAULT ((0)),
	[orderid] [int] NULL CONSTRAINT [DF_portal_kbcategory_orderid]  DEFAULT ((0)),
	[depth] [int] NULL CONSTRAINT [DF_portal_kbcategory_depth]  DEFAULT ((1)),
	[note] [nvarchar](200) NULL,
	[path] [nvarchar](1000) NULL CONSTRAINT [DF_hr2_kbcsscategory_path]  DEFAULT (''),
	[types] [nvarchar](50) NULL,
 CONSTRAINT [PK_kb_category] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_kbcategory] ON
INSERT [dbo].[helpdesk_kbcategory] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (1, N'IT软件使用文档', 0, 0, 1, N'All Roles;', N'', N'')
INSERT [dbo].[helpdesk_kbcategory] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (2, N'技巧分享', 0, 0, 1, N'All Roles;', N'', N'')
INSERT [dbo].[helpdesk_kbcategory] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (3, N'Office相关', 1, 0, 1, N'All Roles;', N'', N'')
INSERT [dbo].[helpdesk_kbcategory] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (4, N'金蝶软件手册', 1, 0, 1, N'All Roles;', N'', N'')
INSERT [dbo].[helpdesk_kbcategory] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (5, N'Outlook技巧', 2, 0, 1, N'All Roles;', N'', N'')
SET IDENTITY_INSERT [dbo].[helpdesk_kbcategory] OFF
/****** Object:  Table [dbo].[helpdesk_kbase]    Script Date: 10/03/2016 19:44:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_kbase]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_kbase](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[title] [nvarchar](200) NULL,
	[contents] [nvarchar](max) NULL,
	[keyword] [nvarchar](50) NULL,
	[intro] [nvarchar](200) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_helpdesk_kbase_createdate]  DEFAULT (getdate()),
	[updatedate] [datetime] NULL CONSTRAINT [DF_helpdesk_kbase_updatedate]  DEFAULT (getdate()),
	[click] [int] NULL CONSTRAINT [DF_helpdesk_kbase_click]  DEFAULT ((0)),
	[good] [int] NULL CONSTRAINT [DF_helpdesk_kbase_good]  DEFAULT ((0)),
	[addby] [nvarchar](50) NULL,
	[updatetime] [int] NULL CONSTRAINT [DF_helpdesk_kbase_updatetime]  DEFAULT ((0)),
	[kcatid] [int] NULL,
	[uid] [int] NULL,
	[bad] [int] NULL,
 CONSTRAINT [PK_helpdesk_kbase] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[helpdesk_kbase] ON
INSERT [dbo].[helpdesk_kbase] ([id], [title], [contents], [keyword], [intro], [createdate], [updatedate], [click], [good], [addby], [updatetime], [kcatid], [uid], [bad]) VALUES (1, N'使用Office 2010截图、抠图实用技巧', N'<p>巧一：截取当前窗口 &nbsp; 我们知道，WindowsVista开始，系统已经内置一个名为&ldquo;抓图工具&rdquo;的组件，可以部分替换第三方的截屏工具，不过现在我们可以在 Office2010中直接完成截屏操作，可以说更为方便。 &nbsp; 切换到Word2010或Excel2010的&ldquo;Insert&rdquo;选项卡，我们可以在&ldquo;Illustrations&rdquo;功能组中发现一个名为 &ldquo;Screenshot&rdquo;的按钮，这里支持多种截屏模式，单击&ldquo;Screenshot&rdquo;按钮，我们可以在这里发现当前打开窗口的截屏画面，单击选定之后即可插入当前文档。 &nbsp; 如果选择&ldquo;ScreenClipping&rdquo;，返回桌面时可以发现鼠标光标已经变成一个细十字形，按下鼠标左键即可截取相应画面，松开鼠标可以返回文档窗口，刚才截取的画面会自动进入当前文档。 &nbsp; 如果是在PowerPoint2010的演示文稿窗口，切换到&ldquo;Insert&rdquo;选项卡，&ldquo;Screenshot&rdquo;按钮的位置转移到了 &ldquo;Images&rdquo;功能组中，我们同样可以在这里快速插入当前窗口的缩略图或截取窗口。 &nbsp; 技巧二：移除图片中的背景 &nbsp; 对于已插入Word文档的图片，我们可以很方便的去除图片中的背景，这样就不需要动用庞大的PhotoShop，更妙的是还可以添加或去除水印。 &nbsp; 选择图片，切换到&ldquo;PictureTools&rdquo;选项卡，可以在这里发现名为&ldquo;BackgroundRemoval&rdquo;的按钮，单击 &ldquo;BackgroundRemoval&rdquo;按钮，很快就可以把想要的图片抠出来，是不是很神奇? &nbsp; 技巧三：自定义用户界面 &nbsp; Office2010的用户界面可以根据我们的需要自行定义，操作也是相当的简单。单击左上角的Office按钮进入配置面板，选择 &ldquo;CustomRibbon&rdquo;，在这里可以对所有的标签页、按钮进行定制，例如可以调整各个选项卡的位置、删除选项卡，也可以将原本显示为英文的对象更改为中文，只要选定之后单击右下角的&ldquo;Rename&rdquo;按钮即可重命名，利用这一功能可以对用户界面进行&ldquo;汉化&rdquo;。 &nbsp; 切换到&ldquo;QuickAccessToolbar&rdquo;面板，我们可以在这里对快捷工具栏进行自定义，包括添加新的按钮，移去原有的按钮。更妙的是，通过窗口底部的&ldquo;Import/Export&rdquo;按钮，可以导入或导出自定义配置，这样就可以将他人提供的界面配置文件导入系统，省去不少麻烦事。</p>', N'Office2010,技巧', N'Office2010发布后，受到了不少用户的肯定，这里介绍几则比较实用的技巧： 技巧一：截取当前窗口我们知道，WindowsVista开始，系统已经内置一个名为“抓图工具”的组件，可以部分替换第三方的截屏工具，不过现在我们可以在 Office2010中直接完成截屏操作，可以说更为方便。切换到Word2010或Excel2010的“Insert”选项卡', CAST(0x0000A0FE00C32817 AS DateTime), CAST(0x0000A0FE00C32817 AS DateTime), 1, 1, N'管理员', 0, 3, 1, NULL)
INSERT [dbo].[helpdesk_kbase] ([id], [title], [contents], [keyword], [intro], [createdate], [updatedate], [click], [good], [addby], [updatetime], [kcatid], [uid], [bad]) VALUES (2, N'金蝶软件使用说明书', N'<p>单击此处下载</p>', N'说明书', N'金蝶软件使用说明书', CAST(0x0000A0FE00C35754 AS DateTime), CAST(0x0000A0FE00C35754 AS DateTime), 0, 0, N'管理员', 0, 4, 1, NULL)
INSERT [dbo].[helpdesk_kbase] ([id], [title], [contents], [keyword], [intro], [createdate], [updatedate], [click], [good], [addby], [updatetime], [kcatid], [uid], [bad]) VALUES (3, N'Outlook如何出入图片', N'<p>Outlook如何出入图片</p>', N'Outlook', N'Outlook如何出入图片', CAST(0x0000A0FE00C3BC43 AS DateTime), CAST(0x0000A0FE00C3BC43 AS DateTime), 2, 0, N'管理员', 0, 5, 1, NULL)
SET IDENTITY_INSERT [dbo].[helpdesk_kbase] OFF
/****** Object:  Table [dbo].[helpdesk_iassign]    Script Date: 10/03/2016 19:44:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_iassign]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_iassign](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[tid] [int] NULL,
	[fromuid] [int] NULL,
	[fromusername] [nvarchar](50) NULL,
	[touid] [int] NULL,
	[tousername] [nvarchar](50) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_helpdesk_iassign_createdate]  DEFAULT (getdate()),
	[notes] [nvarchar](50) NULL,
	[isread] [int] NULL CONSTRAINT [DF_helpdesk_iassign_isread]  DEFAULT ((1)),
 CONSTRAINT [PK_helpdesk_iassign] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[helpdesk_favourite]    Script Date: 10/03/2016 19:44:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_favourite]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_favourite](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[uid] [int] NULL,
	[tid] [int] NULL,
	[fcreatedate] [datetime] NULL CONSTRAINT [DF_helpdesk_favourite_fcreatedate]  DEFAULT (getdate()),
	[priority] [nvarchar](50) NULL,
	[favtitle] [nvarchar](500) NULL,
	[subname] [nvarchar](500) NULL,
 CONSTRAINT [PK_helpdesk_favourite] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[helpdesk_enum]    Script Date: 10/03/2016 19:44:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_enum]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_enum](
	[id] [int] NOT NULL,
	[name] [nvarchar](50) NULL,
	[color] [nvarchar](50) NULL,
	[types] [nvarchar](50) NULL,
	[orders] [int] NULL,
	[sla] [int] NULL,
 CONSTRAINT [PK_helpdesk_enum] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
INSERT [dbo].[helpdesk_enum] ([id], [name], [color], [types], [orders], [sla]) VALUES (1, N'unsolved', N'red', N'status', 0, NULL)
INSERT [dbo].[helpdesk_enum] ([id], [name], [color], [types], [orders], [sla]) VALUES (2, N'pending', N'orange', N'status', 1, NULL)
INSERT [dbo].[helpdesk_enum] ([id], [name], [color], [types], [orders], [sla]) VALUES (3, N'solved', N'green', N'status', 2, NULL)
INSERT [dbo].[helpdesk_enum] ([id], [name], [color], [types], [orders], [sla]) VALUES (6, N'low', N'gray', N'priority', 0, 72)
INSERT [dbo].[helpdesk_enum] ([id], [name], [color], [types], [orders], [sla]) VALUES (7, N'medium', N'black', N'priority', 1, 24)
INSERT [dbo].[helpdesk_enum] ([id], [name], [color], [types], [orders], [sla]) VALUES (8, N'high', N'#990000', N'priority', 2, 12)
INSERT [dbo].[helpdesk_enum] ([id], [name], [color], [types], [orders], [sla]) VALUES (9, N'critical', N'red', N'priority', 3, 6)
/****** Object:  Table [dbo].[helpdesk_autoscancache]    Script Date: 10/03/2016 19:44:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_autoscancache]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_autoscancache](
	[id] [int] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_helpdesk_autoscancache] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[helpdesk_assigntome]    Script Date: 10/03/2016 19:44:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[helpdesk_assigntome]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[helpdesk_assigntome](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_helpdesk_assigntome_createdate]  DEFAULT (getdate()),
	[tid] [int] NULL,
	[fromuid] [int] NULL,
	[fromusername] [nvarchar](50) NULL,
	[touid] [int] NULL,
	[tousername] [nvarchar](50) NULL,
	[notes] [nvarchar](500) NULL,
	[isread] [int] NULL CONSTRAINT [DF_helpdesk_assigntome_isread]  DEFAULT ((0)),
 CONSTRAINT [PK_helpdesk_assigntome] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  UserDefinedFunction [dbo].[GetPcDetail]    Script Date: 10/03/2016 19:44:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[GetPcDetail]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
BEGIN
execute dbo.sp_executesql @statement = N'
CREATE  function   [dbo].[GetPcDetail](@id   int, @types nvarchar(50))   
    returns   nvarchar(3000)   
 as   
begin
declare @thelistname nvarchar(3000)
set @thelistname=''''
select @thelistname=@thelistname+listname+'' ; ''
from
( 
select  top 100   percent   pname+'':''+pvalue  as listname  from helpdesk_pc_details where pcid=@id and types=@types order by pname asc
) PD 

return @thelistname
end




' 
END
GO
/****** Object:  UserDefinedFunction [dbo].[GetdeptName]    Script Date: 10/03/2016 19:44:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[GetdeptName]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
BEGIN
execute dbo.sp_executesql @statement = N'CREATE FUNCTION [dbo].[GetdeptName]( @id int)
 
 
 RETURNS  nvarchar(50)
begin
declare @c nvarchar(50)
 select @c= catname from users_dept    where id=@id 
   RETURN @c
end

 

' 
END
GO
/****** Object:  StoredProcedure [dbo].[sp_ScanInstall]    Script Date: 10/03/2016 19:44:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_ScanInstall]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE proc [dbo].[sp_ScanInstall] 

(
    @pcname  nvarchar(100) ,
	@loginname  nvarchar(100) ,
	@ip  nvarchar(100) ,
	@mac  nvarchar(100) ,
	@bios_manufacturer  nvarchar(100) ,  
	@bios_serialnumber  nvarchar(100) ,
	@bios_smbiosbiosversion  nvarchar(100) , 
	@bios_version  nvarchar(100) ,
	@bios_caption  nvarchar(100) ,
	@board_caption  nvarchar(100) ,
	@board_manufacturer  nvarchar(100) ,
	@board_serialnumber  nvarchar(100) ,
	@board_tag  nvarchar(100) ,
	@board_product  nvarchar(100) ,
	@os_caption  nvarchar(100) ,
	@os_installdate  nvarchar(100) ,
	@os_lastbootuptime  nvarchar(100) ,
	@os_serialnumber  nvarchar(100) ,
	@os_totalvirtualmemorysize  nvarchar(100) ,
	@os_version  nvarchar(100) ,
	@os_windowsdirectory  nvarchar(100) , 
	@os_csdversion    nvarchar(100)  

)

as
if(not exists(select * from helpdesk_loginscan_hardware where pcname=@pcname) )
begin

insert into helpdesk_loginscan_hardware
(	 
	[pcname], 
	[loginname], 
	[ip]  ,
     [mac]  ,
	[bios_manufacturer],  
	[bios_serialnumber] , 
	[bios_smbiosbiosversion], 
	[bios_version] ,
	[bios_caption]  ,
	[board_caption]  ,
	[board_manufacturer], 
	[board_serialnumber] , 
	[board_tag] ,
	[board_product],  
	[os_caption]  ,
	[os_installdate],  
	[os_lastbootuptime], 
	[os_serialnumber]  ,
	os_totalvirtualmemorysize ,
	[os_version], 
	[os_windowsdirectory],  
	[createdate] ,
	[os_csdversion]  
)
values
(

 
	@pcname,
	@loginname, 
	@ip,
    @mac,
	@bios_manufacturer,  
	@bios_serialnumber,
	@bios_smbiosbiosversion, 
	@bios_version,
	@bios_caption,
	@board_caption,
	@board_manufacturer, 
	@board_serialnumber,  
	@board_tag,
	@board_product,  
	@os_caption,
	@os_installdate,
	@os_lastbootuptime, 
	@os_serialnumber,  
	@os_totalvirtualmemorysize,
	@os_version,
	@os_windowsdirectory,  
    getdate(),
	@os_csdversion  

)

end
else
begin
update helpdesk_loginscan_hardware
set loginname=@loginname,
ip=@ip,
mac=@mac,
bios_manufacturer=@bios_manufacturer,
bios_serialnumber=@bios_serialnumber,
bios_smbiosbiosversion=@bios_smbiosbiosversion,
bios_version=@bios_version,
bios_caption=@bios_caption,
board_manufacturer=@board_manufacturer,
board_serialnumber=@board_serialnumber,
board_tag=@board_tag,
board_product=@board_product,
os_caption=@os_caption,
os_installdate=@os_installdate,
os_lastbootuptime=@os_lastbootuptime,
os_serialnumber=@os_serialnumber,
os_totalvirtualmemorysize=@os_totalvirtualmemorysize,
os_version=@os_version,
os_windowsdirectory=@os_windowsdirectory,
os_csdversion=@os_csdversion,
createdate=getdate()
where pcname=@pcname
 
end

' 
END
GO
/****** Object:  StoredProcedure [dbo].[sp_kb_movecategory]    Script Date: 10/03/2016 19:44:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_kb_movecategory]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create    PROCEDURE  [dbo].[sp_kb_movecategory] 
(
    @ParentID int,--新父节点
    @CataID int,--要移动的节点编号
    @CataPath varchar(20) output,--新移动后的节点路径
    @orderid int,
    @note nvarchar(500),
    @types nvarchar(50),
    @catname nvarchar(50) 

)
AS

if (not exists(select 1 from helpdesk_kbcategory where ID = @ParentID))
    set @CataPath = '''' -- 如果新父节点不存在，则设置错误信息
else 
    begin

        declare @oldParentID int -- 原来的父节点
        select @oldParentID = ParentID from helpdesk_kbcategory where ID = @CataID
      


  if @oldParentID = @ParentID -- 没有移动，只更新内容即可
             begin
                update helpdesk_kbcategory set orderid=@orderid, note=@note,types=@types,catname=@catname  where id=@cataid
                select @CataPath = path from helpdesk_kbcategory where ID = @CataID
            end 
       
       else
			begin
	            
				declare @pathLength  int
				declare @path varchar(20)
				select @path = max(Path) from helpdesk_kbcategory  where parentID =@parentId --order by Path desc
				
            select @pathLength = len(@path) 
				 
			
   	declare @newpath varchar(20)-- 计算移动到新分类后的节点路径
				if @pathLength > 0 -- 已经存在该父类
						select @newpath = substring(@path,1,@pathLength -1)+CHAR(ASCII(REVERSE(@path))+1) 
				else
						select @newpath = path + ''A'' from helpdesk_kbcategory where ID = @parentID
	        
				if len(@newpath) > 0
					begin
						declare @oldPath varchar(20)-- 记录原来的节点路径
						select @oldPath = Path from helpdesk_kbcategory where ID = @CataID
						set @CataPath = @newpath;
						update helpdesk_kbcategory set orderid=@orderid,   ParentID = @ParentID,Path = @newpath, types=@types,catname=@catname,note=@note where ID = @CataID
						-- 替换子类的Path
						update helpdesk_kbcategory set Path = stuff(path,1,len(@oldPath),@CataPath) where Path like @oldPath+''%'' AND types=@types
					end
				else
					set @CataPath = ''''
			end
     end


' 
END
GO
/****** Object:  StoredProcedure [dbo].[sp_kb_insertcategory]    Script Date: 10/03/2016 19:44:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_kb_insertcategory]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
Create   PROCEDURE [dbo].[sp_kb_insertcategory] 
(
    @ParentID int, 
    @CatName varchar(20), 
    @Note nvarchar(200),
    @OrderId int,
    @Types nvarchar(50),
    @ID int output  
)
AS

if (@ParentID=0)
  begin
    insert into 
    helpdesk_kbcategory(catName,ParentID,Path,Note,OrderId,types) 
    values(@CatName,@ParentID,'''',@Note,@OrderId,@types)
    select @ID = scope_identity();
 end


else
    begin
        declare @pathLength  int --路径长度
        declare @path varchar(20) --该父节点下最后一个节点的路径
        select @path = max(Path) from helpdesk_kbcategory  where parentID = @parentId  
        select @pathLength = len(@path) 
        print @pathLength
        declare @newpath varchar(20)--新加节点的路径
        if @pathLength > 0 -- 该父类节点下已经存在有子类
                select @newpath = substring(@path,1,@pathLength -1)+CHAR(ASCII(REVERSE(@path))+1) 
        else
                select @newpath = path + ''A'' from helpdesk_kbcategory where ID = @parentID
        
        if len(@newpath) > 0
            begin
            insert into helpdesk_kbcategory(catName,ParentID,Path,note,OrderId,types) values(@CatName,@ParentID,@newpath,@Note,@OrderId,@types)
            select @ID = scope_identity();
            end
        else
            set @ID = -1
    end


 



' 
END
GO
/****** Object:  View [dbo].[v_status]    Script Date: 10/03/2016 19:44:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_status]'))
EXEC dbo.sp_executesql @statement = N'
create view [dbo].[v_status] as
select * from helpdesk_enum where types=''status''
'
GO
/****** Object:  View [dbo].[v_reportsdate]    Script Date: 10/03/2016 19:44:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_reportsdate]'))
EXEC dbo.sp_executesql @statement = N'create view [dbo].[v_reportsdate]
as 
select   convert(char(10),createdate,21)  as Createdate ,    count(*) as count   
 from helpdesk_lists  group by  Createdate '
GO
/****** Object:  View [dbo].[v_reportmonth]    Script Date: 10/03/2016 19:44:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_reportmonth]'))
EXEC dbo.sp_executesql @statement = N'create view [dbo].[v_reportmonth]
as
SELECT     CONVERT(char(7), createdate, 21)+''-1'' AS createdate, COUNT(*) AS count
FROM         dbo.helpdesk_lists
GROUP BY createdate'
GO
/****** Object:  View [dbo].[v_priority]    Script Date: 10/03/2016 19:44:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_priority]'))
EXEC dbo.sp_executesql @statement = N'
CREATE VIEW [dbo].[v_priority]
AS
SELECT     id, name, color, types, orders, sla
FROM         dbo.helpdesk_enum
WHERE     (types = ''priority'')

'
GO
/****** Object:  View [dbo].[v_pc]    Script Date: 10/03/2016 19:44:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_pc]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[v_pc]
AS
SELECT     id, pcname, assettag, spec, Serial, dept, enduser, usetype, usestatus, os, office, buydate, expiredate, storeplace, ip, prezver1, prezver2, note, addby, 
                      adduid, adddate, ispopup, mainboardserialno, mainboardmanufacture, display
FROM         dbo.helpdesk_pc
'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'v_pc', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "helpdesk_pc"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 242
               Right = 269
            End
            DisplayFlags = 280
            TopColumn = 13
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_pc'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'v_pc', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_pc'
GO
/****** Object:  View [dbo].[v_cat2]    Script Date: 10/03/2016 19:44:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_cat2]'))
EXEC dbo.sp_executesql @statement = N'create view [dbo].[v_cat2] as
select * from helphesk_categories where depth=2'
GO
/****** Object:  View [dbo].[v_cat1]    Script Date: 10/03/2016 19:44:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_cat1]'))
EXEC dbo.sp_executesql @statement = N'create view [dbo].[v_cat1] as 
select * from helphesk_categories where depth=1'
GO
/****** Object:  View [dbo].[v_users]    Script Date: 10/03/2016 19:44:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_users]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[v_users]
AS
SELECT     dbo.users_users.uid, dbo.users_users.username, dbo.users_users.adpath, dbo.users_users.firstname, dbo.users_users.lastname, 
                      dbo.users_users.city, dbo.users_users.Office, dbo.users_users.Description, dbo.users_users.Tel, dbo.users_users.fax, dbo.users_users.email, 
                      dbo.users_users.MailType, dbo.users_users.Title, dbo.users_users.Department, dbo.users_users.Company, dbo.users_users.Password, 
                      dbo.users_users.displayname, dbo.users_users.StaffCode, dbo.users_users.IsAccountActive, dbo.users_users.createdate, dbo.users_users.lastlogin, 
                      dbo.users_users.sex, dbo.users_users.avtor, dbo.users_users.logintimes, dbo.users_users.ip, dbo.users_users.logintime, dbo.users_users.intro, 
                      dbo.users_users.ismgr, dbo.users_users.issec, dbo.users_users.isstaff, dbo.users_usersinroles.rolename
FROM         dbo.users_users LEFT OUTER JOIN
                      dbo.users_usersinroles ON dbo.users_users.uid = dbo.users_usersinroles.uid
'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'v_users', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "users_users"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 121
               Right = 197
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "users_usersinroles"
            Begin Extent = 
               Top = 6
               Left = 235
               Bottom = 106
               Right = 366
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 9
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_users'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'v_users', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_users'
GO
/****** Object:  View [dbo].[v_topcat]    Script Date: 10/03/2016 19:44:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_topcat]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[v_topcat]
AS
SELECT     TOP (100) PERCENT id, catname, parentid, orderid, note, depth
FROM         dbo.helphesk_categories
WHERE     (depth = 1)
ORDER BY orderid
'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'v_topcat', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "helphesk_categories"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 121
               Right = 172
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_topcat'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'v_topcat', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_topcat'
GO
/****** Object:  View [dbo].[v_tickets]    Script Date: 10/03/2016 19:44:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_tickets]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[v_tickets]
AS
SELECT     dbo.helpdesk_lists.id, dbo.helpdesk_lists.createdate, dbo.helpdesk_lists.category1id, dbo.helpdesk_lists.category1name, dbo.helpdesk_lists.category2id, 
                      dbo.helpdesk_lists.category2name, dbo.helpdesk_lists.title, dbo.helpdesk_lists.priority, dbo.helpdesk_lists.method, dbo.helpdesk_lists.status, 
                      dbo.helpdesk_lists.contents, dbo.helpdesk_lists.assettag, dbo.helpdesk_lists.serial, dbo.helpdesk_lists.os, dbo.helpdesk_lists.pcname, dbo.helpdesk_lists.ip, 
                      dbo.helpdesk_lists.bit32, dbo.helpdesk_lists.Usercheck, dbo.helpdesk_lists.ie, dbo.helpdesk_lists.uid, dbo.helpdesk_lists.username, dbo.helpdesk_lists.islock, 
                      dbo.helpdesk_lists.ispublic, dbo.helpdesk_lists.handleby, dbo.helpdesk_lists.handleid, dbo.helpdesk_lists.handledate, dbo.helpdesk_lists.hour, 
                      dbo.helpdesk_lists.closedate, dbo.helpdesk_lists.isclose, dbo.helpdesk_lists.closeby, dbo.helpdesk_lists.sladate, dbo.helpdesk_lists.ispop, 
                      dbo.v_status.color AS statuscolor, dbo.v_priority.color AS priocolor, dbo.helpdesk_lists.email, dbo.helpdesk_lists.mainboardserialno, 
                      dbo.helpdesk_lists.mainboardmanufacturer, dbo.helpdesk_lists.contactname, dbo.helpdesk_lists.contactdept, dbo.helpdesk_lists.contactemail, 
                      dbo.helpdesk_lists.contacttel, dbo.helpdesk_lists.assignuid, dbo.helpdesk_lists.category3id, dbo.helpdesk_lists.category3name, dbo.helpdesk_lists.ispoint, 
                      dbo.helpdesk_lists.starttime
FROM         dbo.helpdesk_lists LEFT OUTER JOIN
                      dbo.v_status ON dbo.helpdesk_lists.status = dbo.v_status.name LEFT OUTER JOIN
                      dbo.v_priority ON dbo.helpdesk_lists.priority = dbo.v_priority.name
'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'v_tickets', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[61] 4[3] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "helpdesk_lists"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 298
               Right = 194
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "v_status"
            Begin Extent = 
               Top = 6
               Left = 232
               Bottom = 121
               Right = 363
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "v_priority"
            Begin Extent = 
               Top = 185
               Left = 397
               Bottom = 300
               Right = 528
            End
            DisplayFlags = 280
            TopColumn = 1
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 3555
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_tickets'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'v_tickets', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_tickets'
GO
/****** Object:  View [dbo].[v_subcat]    Script Date: 10/03/2016 19:44:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_subcat]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[v_subcat]
AS
SELECT     TOP (100) PERCENT dbo.v_cat2.id, dbo.v_cat2.catname, dbo.v_cat2.parentid, dbo.v_cat2.orderid, dbo.v_cat2.note, dbo.v_cat2.depth, 
                      dbo.v_cat1.catname AS parentname
FROM         dbo.v_cat2 LEFT OUTER JOIN
                      dbo.v_cat1 ON dbo.v_cat2.parentid = dbo.v_cat1.id
'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'v_subcat', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "v_cat2"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 121
               Right = 172
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "v_cat1"
            Begin Extent = 
               Top = 6
               Left = 210
               Bottom = 121
               Right = 344
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_subcat'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'v_subcat', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_subcat'
GO
