Initial Commit after switching from SVN to git
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,59 @@
|
||||
DECLARe @AS XML;
|
||||
|
||||
SET @as = [dbo].[mfr__schema]();
|
||||
|
||||
DECLARE @types TABLE ([edm] varchar(100), [sql] varchar(50));
|
||||
INSERT INTO @types VALUES ('Edm.Boolean', 'bit'),
|
||||
('Edm.DateTime', 'DateTime'),
|
||||
('Edm.Decimal', 'decimal'),
|
||||
('Edm.Double', 'float'),
|
||||
('Edm.Int32', 'int'),
|
||||
('Edm.Int64', 'bigint'),
|
||||
('Edm.String', 'varchar(255)');
|
||||
|
||||
|
||||
--WITH XMLNAMESPACES
|
||||
--(
|
||||
|
||||
-- 'http://schemas.microsoft.com/ado/2007/06/edmx' as edmx,
|
||||
-- 'http://schemas.microsoft.com/ado/2007/08/dataservices/metadata' as m
|
||||
--) , x as (
|
||||
-- SELECT ROW_NUMBER() OVER(ORDER BY (SELECT NULL)) as '#', xD.value('@Name', 'varchar(255)') as 'set', xD.value('End[1]/@Role', 'varchar(255)') as 'role1', xD.value('End[2]/@Role', 'varchar(255)') as 'role2' , xD.query('.') as 'q' from @as.nodes('/Schema/EntityContainer/AssociationSet') as xm(xD)
|
||||
--), y as (
|
||||
-- select [#], [role1], [role2], RIGHT([set],CHARINDEX('_', REVERSE([set])) - 1) as [name]
|
||||
|
||||
-- from x
|
||||
--), z as(
|
||||
-- SELECT [cmd] = N'DROP TABLE IF EXISTS [dbo].[mfr__*' + [name] + N'] GO' + CHAR(10) + ' CREATE TABLE [dbo].[mfr__*' + [name] + N']([' + [role1] + N'] [bigint] NOT NULL,[' + [role2] + N'] [bigint] NOT NULL) ON [PRIMARY] GO' + CHAR(10) FROM y
|
||||
--)
|
||||
--select TOP( 1000) * from z;
|
||||
|
||||
|
||||
--WITH XMLNAMESPACES
|
||||
--(
|
||||
|
||||
-- 'http://schemas.microsoft.com/ado/2007/06/edmx' as edmx,
|
||||
-- 'http://schemas.microsoft.com/ado/2007/08/dataservices/metadata' as m
|
||||
--), x as (
|
||||
-- SELECT xD.value('@Name', 'varchar(255)') as [name], xD.query('.') as 'q' from @as.nodes('/Schema/EntityContainer/EntitySet') as xm(xD)
|
||||
--)
|
||||
--SELEcT * FROM x
|
||||
-- where not exists(select * from sys.objects as o where type_desc = 'USER_TABLE' AND o.[name] = 'mfr__' + x.[name]);
|
||||
|
||||
|
||||
WITH XMLNAMESPACES
|
||||
(
|
||||
'http://schemas.microsoft.com/ado/2007/06/edmx' as edmx,
|
||||
'http://schemas.microsoft.com/ado/2007/08/dataservices/metadata' as m
|
||||
), np as (
|
||||
SELECT ROW_NUMBER() OVER(ORDER BY (SELECT NULL)) as '#', xD.value('../@Name', 'varchar(255)') as [parent], xD.value('@Name', 'varchar(255)') as [name], xD.value('@Type', 'varchar(255)') as [Type], ISNULL(xD.value('@Nullable', 'bit'),1) as [nullable], xD.value('@ToRole', 'varchar(255)') as [ToRole], xD.value('@FromRole', 'varchar(255)') as [FromRole]-- , xD.query('.') as 'q'
|
||||
from @as.nodes('/Schema[1]/EntityType/Property') as xm(xD)
|
||||
)
|
||||
--select distinct [type] from np
|
||||
SELECT '[' + [name] + '] '
|
||||
+ t.sql
|
||||
+ CASE WHEN [nullable] = 0 THEN ' NOT NULL' ELSE '' END
|
||||
+ ','
|
||||
from np LEFT JOIN @types as t ON np.[Type] = t.[edm]
|
||||
where parent = 'StockMovement' order by [#]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,93 @@
|
||||
{
|
||||
"odata.metadata": "https://portal.mobilefieldreport.com/odata/$metadata",
|
||||
"value": [
|
||||
{
|
||||
"name": "ItemTypes",
|
||||
"url": "ItemTypes"
|
||||
},
|
||||
{
|
||||
"name": "ServiceRequests",
|
||||
"url": "ServiceRequests"
|
||||
},
|
||||
{
|
||||
"name": "Items",
|
||||
"url": "Items"
|
||||
},
|
||||
{
|
||||
"name": "StockMovements",
|
||||
"url": "StockMovements"
|
||||
},
|
||||
{
|
||||
"name": "CostCenters",
|
||||
"url": "CostCenters"
|
||||
},
|
||||
{
|
||||
"name": "ItemUnits",
|
||||
"url": "ItemUnits"
|
||||
},
|
||||
{
|
||||
"name": "TimeEvents",
|
||||
"url": "TimeEvents"
|
||||
},
|
||||
{
|
||||
"name": "Documents",
|
||||
"url": "Documents"
|
||||
},
|
||||
{
|
||||
"name": "Reports",
|
||||
"url": "Reports"
|
||||
},
|
||||
{
|
||||
"name": "Comments",
|
||||
"url": "Comments"
|
||||
},
|
||||
{
|
||||
"name": "Attachments",
|
||||
"url": "Attachments"
|
||||
},
|
||||
{
|
||||
"name": "Appointments",
|
||||
"url": "Appointments"
|
||||
},
|
||||
{
|
||||
"name": "Steps",
|
||||
"url": "Steps"
|
||||
},
|
||||
{
|
||||
"name": "ServiceObjects",
|
||||
"url": "ServiceObjects"
|
||||
},
|
||||
{
|
||||
"name": "StepListTemplates",
|
||||
"url": "StepListTemplates"
|
||||
},
|
||||
{
|
||||
"name": "StepListTemplateInstances",
|
||||
"url": "StepListTemplateInstances"
|
||||
},
|
||||
{
|
||||
"name": "Contacts",
|
||||
"url": "Contacts"
|
||||
},
|
||||
{
|
||||
"name": "Tags",
|
||||
"url": "Tags"
|
||||
},
|
||||
{
|
||||
"name": "Products",
|
||||
"url": "Products"
|
||||
},
|
||||
{
|
||||
"name": "Companies",
|
||||
"url": "Companies"
|
||||
},
|
||||
{
|
||||
"name": "Users",
|
||||
"url": "Users"
|
||||
},
|
||||
{
|
||||
"name": "Qualifications",
|
||||
"url": "Qualifications"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,387 @@
|
||||
{
|
||||
"odata.metadata": "https://portal.mobilefieldreport.com/odata/$metadata#Companies",
|
||||
"value": [
|
||||
{
|
||||
"Contacts": [
|
||||
{
|
||||
"Id": "17030086658",
|
||||
"CustomValues": [],
|
||||
"FirstName": "Andre ",
|
||||
"LastName": "Winkels",
|
||||
"Email": "a.winkels@sanitaerfuchs.de",
|
||||
"JobTitle": "Technische Leitung",
|
||||
"MobilePhone": "0178-3137898",
|
||||
"Telephone": null,
|
||||
"Fax": null,
|
||||
"Note": null,
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"Version": 1,
|
||||
"CompanyId": "17029922816",
|
||||
"IsUser": false,
|
||||
"ExternalId": null,
|
||||
"Gender": "Male",
|
||||
"UserId": "0"
|
||||
},
|
||||
{
|
||||
"Id": "17494310912",
|
||||
"CustomValues": [],
|
||||
"FirstName": "system",
|
||||
"LastName": "system",
|
||||
"Email": "system@sebastian-fuchs---bad-und-heizung-gmbh-und-co-kg.com",
|
||||
"JobTitle": "system",
|
||||
"MobilePhone": null,
|
||||
"Telephone": null,
|
||||
"Fax": null,
|
||||
"Note": null,
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"Version": 1,
|
||||
"CompanyId": "17029922816",
|
||||
"IsUser": false,
|
||||
"ExternalId": null,
|
||||
"Gender": "Male",
|
||||
"UserId": "0"
|
||||
},
|
||||
{
|
||||
"Id": "17494310913",
|
||||
"CustomValues": [],
|
||||
"FirstName": "Simon",
|
||||
"LastName": "Schlese",
|
||||
"Email": "s.schlese@sanitaerfuchs.de",
|
||||
"JobTitle": "Technische Leitung",
|
||||
"MobilePhone": null,
|
||||
"Telephone": null,
|
||||
"Fax": null,
|
||||
"Note": null,
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"Version": 1,
|
||||
"CompanyId": "17029922816",
|
||||
"IsUser": false,
|
||||
"ExternalId": null,
|
||||
"Gender": "Male",
|
||||
"UserId": "0"
|
||||
}
|
||||
],
|
||||
"Tags": [],
|
||||
"ServiceObjects": [
|
||||
{
|
||||
"Location": null,
|
||||
"Id": "17030053888",
|
||||
"Name": "Munk",
|
||||
"Note": null,
|
||||
"CustomValues": [],
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"ExternalId": "S-2046",
|
||||
"MappingId": null,
|
||||
"QuickSearch": null,
|
||||
"Version": 2,
|
||||
"CreateGeoLocation": false,
|
||||
"IsWarehouse": false,
|
||||
"ParentServiceObjectId": "0",
|
||||
"CompanyId": "17029922816",
|
||||
"ProductId": "0"
|
||||
},
|
||||
{
|
||||
"Location": null,
|
||||
"Id": "17494245376",
|
||||
"Name": "Main-Taunus-Schule",
|
||||
"Note": null,
|
||||
"CustomValues": [],
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"ExternalId": "S-3337",
|
||||
"MappingId": null,
|
||||
"QuickSearch": null,
|
||||
"Version": 2,
|
||||
"CreateGeoLocation": false,
|
||||
"IsWarehouse": false,
|
||||
"ParentServiceObjectId": "0",
|
||||
"CompanyId": "17029922816",
|
||||
"ProductId": "0"
|
||||
}
|
||||
],
|
||||
"Location": {
|
||||
"Version": 0,
|
||||
"Id": "17029955584",
|
||||
"AddressString": "Germaniastraße 15",
|
||||
"Postal": "40223",
|
||||
"City": "Düsseldorf",
|
||||
"State": null,
|
||||
"Country": "DE",
|
||||
"Longitude": 6.7619074,
|
||||
"Latitude": 51.2072308,
|
||||
"IsValidLocation": true
|
||||
},
|
||||
"Id": "17029922816",
|
||||
"Version": 4,
|
||||
"IsPhysicalPerson": false,
|
||||
"IsOwner": false,
|
||||
"IsEmailInvoicingActive": false,
|
||||
"IsSupplier": false,
|
||||
"MappingId": null,
|
||||
"ExternalId": null,
|
||||
"Name": "Sebastian Fuchs - Bad und Heizung GmbH und Co. KG",
|
||||
"Note": null,
|
||||
"SupportTelephone": null,
|
||||
"SupportFax": null,
|
||||
"SupportMail": null,
|
||||
"QuickSearch": null,
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"CustomValues": [],
|
||||
"MainContactId": "0"
|
||||
},
|
||||
{
|
||||
"Contacts": [
|
||||
{
|
||||
"Id": "17030086656",
|
||||
"CustomValues": [],
|
||||
"FirstName": "",
|
||||
"LastName": "Munk",
|
||||
"Email": "renate.munk@gmx.net",
|
||||
"JobTitle": null,
|
||||
"MobilePhone": "",
|
||||
"Telephone": "0211 4059209 Fr. Munk",
|
||||
"Fax": "",
|
||||
"Note": null,
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"Version": 1,
|
||||
"CompanyId": "17029922817",
|
||||
"IsUser": false,
|
||||
"ExternalId": null,
|
||||
"Gender": "Male",
|
||||
"UserId": "0"
|
||||
}
|
||||
],
|
||||
"Tags": [],
|
||||
"ServiceObjects": [],
|
||||
"MainContact": {
|
||||
"Id": "17030086656",
|
||||
"CustomValues": [],
|
||||
"FirstName": "",
|
||||
"LastName": "Munk",
|
||||
"Email": "renate.munk@gmx.net",
|
||||
"JobTitle": null,
|
||||
"MobilePhone": "",
|
||||
"Telephone": "0211 4059209 Fr. Munk",
|
||||
"Fax": "",
|
||||
"Note": null,
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"Version": 1,
|
||||
"CompanyId": "17029922817",
|
||||
"IsUser": false,
|
||||
"ExternalId": null,
|
||||
"Gender": "Male",
|
||||
"UserId": "0"
|
||||
},
|
||||
"Location": {
|
||||
"Version": 0,
|
||||
"Id": "17029955586",
|
||||
"AddressString": "Alte Landstr. 91",
|
||||
"Postal": "40489",
|
||||
"City": "Düsseldorf",
|
||||
"State": null,
|
||||
"Country": "DE",
|
||||
"Longitude": 0.0,
|
||||
"Latitude": 0.0,
|
||||
"IsValidLocation": false
|
||||
},
|
||||
"Id": "17029922817",
|
||||
"Version": 2,
|
||||
"IsPhysicalPerson": false,
|
||||
"IsOwner": false,
|
||||
"IsEmailInvoicingActive": false,
|
||||
"IsSupplier": false,
|
||||
"MappingId": null,
|
||||
"ExternalId": "21455",
|
||||
"Name": "Munk",
|
||||
"Note": null,
|
||||
"SupportTelephone": "0211 4059209 Fr. Munk",
|
||||
"SupportFax": null,
|
||||
"SupportMail": "renate.munk@gmx.net",
|
||||
"QuickSearch": null,
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"CustomValues": [],
|
||||
"MainContactId": "17030086656"
|
||||
},
|
||||
{
|
||||
"Contacts": [
|
||||
{
|
||||
"Id": "17030086657",
|
||||
"CustomValues": [],
|
||||
"FirstName": "Herbert",
|
||||
"LastName": "Schons",
|
||||
"Email": "",
|
||||
"JobTitle": null,
|
||||
"MobilePhone": "0171 6581941",
|
||||
"Telephone": "",
|
||||
"Fax": "",
|
||||
"Note": null,
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"Version": 1,
|
||||
"CompanyId": "17029922818",
|
||||
"IsUser": false,
|
||||
"ExternalId": null,
|
||||
"Gender": "Male",
|
||||
"UserId": "0"
|
||||
}
|
||||
],
|
||||
"Tags": [],
|
||||
"ServiceObjects": [],
|
||||
"MainContact": {
|
||||
"Id": "17030086657",
|
||||
"CustomValues": [],
|
||||
"FirstName": "Herbert",
|
||||
"LastName": "Schons",
|
||||
"Email": "",
|
||||
"JobTitle": null,
|
||||
"MobilePhone": "0171 6581941",
|
||||
"Telephone": "",
|
||||
"Fax": "",
|
||||
"Note": null,
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"Version": 1,
|
||||
"CompanyId": "17029922818",
|
||||
"IsUser": false,
|
||||
"ExternalId": null,
|
||||
"Gender": "Male",
|
||||
"UserId": "0"
|
||||
},
|
||||
"Location": {
|
||||
"Version": 0,
|
||||
"Id": "17029955587",
|
||||
"AddressString": "Roßpfad 44",
|
||||
"Postal": "40489",
|
||||
"City": "Düsseldorf",
|
||||
"State": null,
|
||||
"Country": "DE",
|
||||
"Longitude": 0.0,
|
||||
"Latitude": 0.0,
|
||||
"IsValidLocation": false
|
||||
},
|
||||
"Id": "17029922818",
|
||||
"Version": 2,
|
||||
"IsPhysicalPerson": false,
|
||||
"IsOwner": false,
|
||||
"IsEmailInvoicingActive": false,
|
||||
"IsSupplier": false,
|
||||
"MappingId": null,
|
||||
"ExternalId": "21981",
|
||||
"Name": "Herbert Schons",
|
||||
"Note": null,
|
||||
"SupportTelephone": "",
|
||||
"SupportFax": null,
|
||||
"SupportMail": "",
|
||||
"QuickSearch": null,
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"CustomValues": [],
|
||||
"MainContactId": "17030086657"
|
||||
},
|
||||
{
|
||||
"Contacts": [],
|
||||
"Tags": [],
|
||||
"ServiceObjects": [
|
||||
{
|
||||
"Location": null,
|
||||
"Id": "15891563165",
|
||||
"Name": "Herrmann- Josef Hosselmann",
|
||||
"Note": null,
|
||||
"CustomValues": [],
|
||||
"DateModified": "2020-12-01T13:14:51",
|
||||
"ExternalId": "1671",
|
||||
"MappingId": null,
|
||||
"QuickSearch": null,
|
||||
"Version": 3,
|
||||
"CreateGeoLocation": false,
|
||||
"IsWarehouse": false,
|
||||
"ParentServiceObjectId": "0",
|
||||
"CompanyId": "15877014174",
|
||||
"ProductId": "0"
|
||||
}
|
||||
],
|
||||
"Location": {
|
||||
"Version": 0,
|
||||
"Id": "15877047611",
|
||||
"AddressString": "Bastionstr.27",
|
||||
"Postal": "40213",
|
||||
"City": "Düsseldorf",
|
||||
"State": null,
|
||||
"Country": "DE",
|
||||
"Longitude": 0.0,
|
||||
"Latitude": 0.0,
|
||||
"IsValidLocation": false
|
||||
},
|
||||
"Id": "15877014174",
|
||||
"Version": 2,
|
||||
"IsPhysicalPerson": false,
|
||||
"IsOwner": false,
|
||||
"IsEmailInvoicingActive": false,
|
||||
"IsSupplier": false,
|
||||
"MappingId": null,
|
||||
"ExternalId": "10671",
|
||||
"Name": "Herrmann- Josef Hosselmann",
|
||||
"Note": null,
|
||||
"SupportTelephone": "0211 87744544",
|
||||
"SupportFax": null,
|
||||
"SupportMail": "Hosselmann@gmx.de",
|
||||
"QuickSearch": null,
|
||||
"DateModified": "2020-11-06T12:34:05",
|
||||
"CustomValues": [],
|
||||
"MainContactId": "0"
|
||||
},
|
||||
{
|
||||
"Contacts": [],
|
||||
"Tags": [],
|
||||
"ServiceObjects": [
|
||||
{
|
||||
"Location": null,
|
||||
"Id": "15891563374",
|
||||
"Name": "Lutz Thomas",
|
||||
"Note": null,
|
||||
"CustomValues": [
|
||||
{
|
||||
"Meta": "{\"Id\":\"9FC961F5-D9F4-AD4E-FE8B-89BD3BFD4A7B\",\"Name\":\"Im Rottfeld 3, Düsseldorf\"}",
|
||||
"Value": null
|
||||
}
|
||||
],
|
||||
"DateModified": "2021-03-18T12:42:02",
|
||||
"ExternalId": "1880",
|
||||
"MappingId": null,
|
||||
"QuickSearch": null,
|
||||
"Version": 5,
|
||||
"CreateGeoLocation": false,
|
||||
"IsWarehouse": false,
|
||||
"ParentServiceObjectId": "0",
|
||||
"CompanyId": "15877014383",
|
||||
"ProductId": "0"
|
||||
}
|
||||
],
|
||||
"Location": {
|
||||
"Version": 0,
|
||||
"Id": "15877048029",
|
||||
"AddressString": "Weidenstr.38",
|
||||
"Postal": "41542",
|
||||
"City": "Dormagen",
|
||||
"State": null,
|
||||
"Country": "DE",
|
||||
"Longitude": 0.0,
|
||||
"Latitude": 0.0,
|
||||
"IsValidLocation": false
|
||||
},
|
||||
"Id": "15877014383",
|
||||
"Version": 2,
|
||||
"IsPhysicalPerson": false,
|
||||
"IsOwner": false,
|
||||
"IsEmailInvoicingActive": false,
|
||||
"IsSupplier": false,
|
||||
"MappingId": null,
|
||||
"ExternalId": "10880",
|
||||
"Name": "Lutz Thomas",
|
||||
"Note": null,
|
||||
"SupportTelephone": "0213380503",
|
||||
"SupportFax": null,
|
||||
"SupportMail": "",
|
||||
"QuickSearch": null,
|
||||
"DateModified": "2020-11-06T12:34:05",
|
||||
"CustomValues": [],
|
||||
"MainContactId": "0"
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,54 @@
|
||||
USE [site_fuchs]
|
||||
GO
|
||||
OPEN SYMMETRIC KEY [fuchs_enc_1] DECRYPTION BY PASSWORD = N'+0&PY+6iyjlKyQ';DECLARE @enc_key uniqueidentifier = key_guid('fuchs_enc_1');
|
||||
|
||||
DECLARE @RC int
|
||||
DECLARE @name nvarchar(255) = 'Ott'
|
||||
DECLARE @firstname nvarchar(255) = 'Stefan'
|
||||
DECLARE @title varchar(50) = 'Dr.'
|
||||
DECLARE @gender varchar(1) = 'm'
|
||||
DECLARE @email varchar(255)= 'info@processweb.de'
|
||||
DECLARE @mobile varchar(50) = ''
|
||||
DECLARE @password nvarchar(20) = CAST([dbo].[ocms_fn_generatePassword] (8, 0, 1, 1) as nvarchar(20))
|
||||
|
||||
|
||||
|
||||
-- TODO: Set parameter values here.
|
||||
|
||||
EXECUTE @RC = [dbo].[fis_admin_createUserAccount]
|
||||
@name
|
||||
,@firstname
|
||||
,@title
|
||||
,@gender
|
||||
,@email
|
||||
,@mobile
|
||||
,@password
|
||||
,@enc_key;
|
||||
|
||||
|
||||
|
||||
--DECLARE @authaccount varchar(5) = 'J5KL8'
|
||||
--DECLARE @useraccount_id varchar(5) = 'J5KL8'
|
||||
--SET @name = null
|
||||
--SET @firstname = null
|
||||
--SET @password = null
|
||||
|
||||
---- TODO: Set parameter values here.
|
||||
|
||||
--EXECUTE [dbo].[fis_admin_setUserAccount]
|
||||
-- @authaccount
|
||||
-- ,@useraccount_id
|
||||
-- ,@name
|
||||
-- ,@firstname
|
||||
-- ,@title
|
||||
-- ,@gender
|
||||
-- ,@email
|
||||
-- ,@mobile
|
||||
-- ,@password
|
||||
-- ,@enc_key
|
||||
--GO
|
||||
|
||||
|
||||
|
||||
|
||||
CLOSE SYMMETRIC KEY [fuchs_enc_1]
|
||||
@@ -0,0 +1,23 @@
|
||||
USE [site_fuchs]
|
||||
GO
|
||||
OPEN SYMMETRIC KEY [fuchs_enc_1] DECRYPTION BY PASSWORD = N'+0&PY+6iyjlKyQ';DECLARE @enc_key uniqueidentifier = key_guid('fuchs_enc_1');
|
||||
|
||||
DECLARE @RC int
|
||||
DECLARE @authaccount varchar(5) = 'J5KL8'
|
||||
DECLARE @usergroup_id varchar(5) = NULL
|
||||
DECLARE @name nvarchar(255) = 'Lesende'
|
||||
|
||||
-- TODO: Set parameter values here.
|
||||
|
||||
EXECUTE @RC = [dbo].[fis_admin_setUserGroup]
|
||||
@authaccount
|
||||
,@usergroup_id
|
||||
,@name
|
||||
,@enc_key
|
||||
;
|
||||
|
||||
|
||||
SELECT CAST(DECRYPTBYKEY([name_enc]) as nvarchar(255)) from fis_usergroups
|
||||
|
||||
|
||||
CLOSE SYMMETRIC KEY [fuchs_enc_1]
|
||||
@@ -0,0 +1,178 @@
|
||||
use [site_fuchs]
|
||||
go
|
||||
|
||||
OPEN SYMMETRIC KEY [fuchs_enc_1] DECRYPTION BY PASSWORD = N'*0&PY_6iyjlKyQ';DECLARE @enc_key uniqueidentifier = key_guid('fuchs_enc_1');
|
||||
|
||||
DECLARE @utcnow datetime = GETUTCDATE();
|
||||
|
||||
/****** Script for SelectTopNRows command from SSMS ******/
|
||||
with acc as (
|
||||
SELECT TOP (1000) [useraccount_id]
|
||||
,'name' = CAST(DECRYPTBYKEY([name_enc]) as nvarchar(100))
|
||||
,'firstname' = CAST(DECRYPTBYKEY([firstname_enc]) as nvarchar(100))
|
||||
,'title' = CAST(DECRYPTBYKEY([title_enc]) as varchar(255))
|
||||
,'gender' = CAST(DECRYPTBYKEY([gender_enc]) as varchar(1))
|
||||
,'email' = CAST(DECRYPTBYKEY([email_enc]) as varchar(255))
|
||||
,'mobile' = CAST(DECRYPTBYKEY([mobile_enc]) as varchar(50))
|
||||
,'password' = CAST(DECRYPTBYKEY([password_enc]) as nvarchar(20))
|
||||
,[language]
|
||||
,[UserDisabled]
|
||||
,[DateDisabled]
|
||||
,[UserCreated]
|
||||
,[DateCreated]
|
||||
,[UserModified]
|
||||
,[DateModified]
|
||||
,[UserDeleted]
|
||||
,[DateDeleted]
|
||||
FROM [site_fuchs].[dbo].[fis_useraccounts] as a
|
||||
)
|
||||
SELECT * from acc order by [name] ;
|
||||
|
||||
|
||||
SELECT
|
||||
ug.usergroup_id
|
||||
,'name' = CAST(DECRYPTBYKEY(ug.[name_enc]) as nvarchar(255))
|
||||
,m.useraccount_id
|
||||
FROM [site_fuchs].[dbo].[fis_usergroups] as ug
|
||||
join [site_fuchs].[dbo].[fis_usergroups_members] as m on m.usergroup_id = ug.usergroup_id
|
||||
order by m.useraccount_id, ug.usergroup_id;
|
||||
|
||||
|
||||
--UPDate a
|
||||
-- SET [email_enc] = ENCRYPTBYKEY(@enc_key, CAST('n.beckmann@sanitaerfuchs.de' as varchar(255)))
|
||||
-- ,[name_enc] = ENCRYPTBYKEY(@enc_key, CAST(N'Beckmann' as nvarchar(100)))
|
||||
--from [site_fuchs].[dbo].[fis_useraccounts] as a
|
||||
--WHERE [useraccount_id] = 'O6C2O';
|
||||
|
||||
|
||||
--UPDate a
|
||||
-- SET [mobile_enc] = ENCRYPTBYKEY(@enc_key, CAST( '+49 178 3137898' as varchar(50)))
|
||||
--from [site_fuchs].[dbo].[fis_useraccounts] as a
|
||||
--WHERE [useraccount_id] = 'SCHR4';
|
||||
|
||||
--UPDate a
|
||||
-- SET [userDeleted] = 'J5KL8', [dateDeleted] = @utcnow
|
||||
--from [site_fuchs].[dbo].[fis_useraccounts] as a
|
||||
--WHERE [useraccount_id] = 'GRS0Q';
|
||||
|
||||
|
||||
|
||||
--DECLARE @RC int
|
||||
--DECLARE @name nvarchar(100) = 'Winkels'
|
||||
--DECLARE @firstname nvarchar(100) = 'André'
|
||||
--DECLARE @title varchar(50) = ''
|
||||
--DECLARE @gender varchar(1) = 'm'
|
||||
--DECLARE @email varchar(255) = 'a.winkels@sanitaerfuchs.de'
|
||||
--DECLARE @mobile varchar(50) = ''
|
||||
--DECLARE @password nvarchar(20) = 'En2dfB4R'--[dbo].[fn_generatePassword(8,1,0,1)
|
||||
|
||||
---- TODO: Set parameter values here.
|
||||
|
||||
--EXECUTE @RC = [dbo].[fis_admin_createUserAccount]
|
||||
-- @name
|
||||
-- ,@firstname
|
||||
-- ,@title
|
||||
-- ,@gender
|
||||
-- ,@email
|
||||
-- ,@mobile
|
||||
-- ,@password
|
||||
-- ,@enc_key
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- INSERT INTO [dbo].[dda_usergroups_members]
|
||||
-- ([usergroup_id]
|
||||
-- ,[useraccount_id]
|
||||
-- ,[UserCreated]
|
||||
-- ,[DateCreated]
|
||||
-- ,[UserDeleted]
|
||||
-- ,[DateDeleted])
|
||||
-- SELECT
|
||||
-- 'ILW0I'
|
||||
-- ,[useraccount_id]
|
||||
-- ,'GFLU7'
|
||||
-- ,@utcnow
|
||||
-- ,null
|
||||
-- ,null
|
||||
--FROM [site_fuchs].[dbo].[fis_useraccounts] as a
|
||||
--WHERE NOT EXISTS(select * from [dbo].[dda_usergroups_members] as m1 where m1.useraccount_id = a.[useraccount_id])
|
||||
-- and not useraccount_id in ('GFLU7','4U8LM','8FPIO')
|
||||
|
||||
|
||||
-- SELECT * FROM [site_fuchs].dbo.[fis_admin_getUserAccount]('4U8LM');
|
||||
-- SELECT * from [dbo].[fis_admin_getUserAccountList]
|
||||
--(
|
||||
-- 'Y1LU5'
|
||||
-- , 'Y1LU5'
|
||||
-- , NULL --@usergroup_id varchar(5)
|
||||
-- , 1
|
||||
--);
|
||||
|
||||
|
||||
|
||||
--INSERT INTO [dbo].[fis_useraccounts]
|
||||
-- ([useraccount_id]
|
||||
-- ,[name_enc]
|
||||
-- ,[firstname_enc]
|
||||
-- ,[title_enc]
|
||||
-- ,[gender_enc]
|
||||
-- ,[email_enc]
|
||||
-- ,[mobile_enc]
|
||||
-- ,[password_enc]
|
||||
-- ,[language]
|
||||
-- ,[UserDisabled]
|
||||
-- ,[DateDisabled]
|
||||
-- ,[UserCreated]
|
||||
-- ,[DateCreated]
|
||||
-- ,[UserModified]
|
||||
-- ,[DateModified]
|
||||
-- ,[UserDeleted]
|
||||
-- ,[DateDeleted])
|
||||
-- SELECT
|
||||
-- [dbo].[fis_fn_useraccount_id]()
|
||||
-- ,ENCRYPTBYKEY(@enc_key, CAST([Name] as nvarchar(100)))
|
||||
-- ,ENCRYPTBYKEY(@enc_key, CAST([Vorname] as nvarchar(100)))
|
||||
-- ,ENCRYPTBYKEY(@enc_key, CAST(CASE WHEN LOWER([T]) = 'dr.' THEN 'Dr.' ELSE NULL END as varchar(50)))
|
||||
-- ,ENCRYPTBYKEY(@enc_key, CAST(CASE WHEN LOWER([A]) ='herr' THEN 'm' ELSE 'f' END as varchar(1)))
|
||||
-- ,ENCRYPTBYKEY(@enc_key, CAST([Email] as varchar(255)))
|
||||
-- ,NULL
|
||||
-- ,ENCRYPTBYKEY(@enc_key, CAST([dbo].[ocms_fn_generatePassword] (8, 0, 1, 1) as nvarchar(20)))
|
||||
-- ,'de'
|
||||
-- ,NULL --<UserDisabled, varchar(36),>
|
||||
-- ,NULL --<DateDisabled, datetime,>
|
||||
-- ,'GFLU7'
|
||||
-- ,@utcnow
|
||||
-- ,'GFLU7'
|
||||
-- ,@utcnow
|
||||
-- ,NULL --<UserDeleted, varchar(36),>
|
||||
-- ,NULL --<DateDeleted, datetime,>)
|
||||
-- FROM [master].[dbo].[20200430__Y2020_TN_Email-Aschriften_2];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- EXECUTE [dbo].[fis_admin_setUserGroup]
|
||||
-- 'GFLU7'
|
||||
-- ,NULL
|
||||
-- ,'Studienjahr 2020-2022'
|
||||
-- ,@enc_key;
|
||||
|
||||
|
||||
--UPDATE dbo.fis_useraccounts SET email_enc = ENCRYPTBYKEY(@enc_key, CAST('webmaster@duesseldorf-dental-academy.de' as varchar(255))) WHERE useraccount_id = '2OGN4'
|
||||
--UPDATE dbo.fis_useraccounts SET name_enc = ENCRYPTBYKEY(@enc_key, CAST('Ott' as nvarchar(100))) WHERE useraccount_id = '2OGN4'
|
||||
--UPDATE dbo.fis_useraccounts SET firstname_enc = ENCRYPTBYKEY(@enc_key, CAST('Stefan' as nvarchar(100))) WHERE useraccount_id = '2OGN4'
|
||||
--UPDATE dbo.fis_useraccounts SET title_enc = ENCRYPTBYKEY(@enc_key, CAST('Dr.' as varchar(50))) WHERE useraccount_id = '2OGN4'
|
||||
--UPDATE dbo.fis_useraccounts SET gender_enc = ENCRYPTBYKEY(@enc_key, CAST('m' as varchar(1))) WHERE useraccount_id = '2OGN4'
|
||||
--UPDATE dbo.fis_useraccounts SET mobile_enc = ENCRYPTBYKEY(@enc_key, CAST('+49 123 45678901' as varchar(50))) WHERE useraccount_id = '2OGN4'
|
||||
--UPDATE dbo.fis_useraccounts SET password_enc = ENCRYPTBYKEY(@enc_key, CAST('+49 123 45678901' as nvarchar(20))) WHERE useraccount_id = 'J5KL8'
|
||||
|
||||
--SELECT * FROM [dbo].[fis_admin_getUserAccount_byemail] (
|
||||
-- 'davidsonntag@hush.com', 1)
|
||||
|
||||
|
||||
|
||||
CLOSE SYMMETRIC KEY [fuchs_enc_1]
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user