extra features allow duplicate epd, en sync from central
This commit is contained in:
parent
9066aaf3da
commit
a6d5254f07
20 changed files with 9349 additions and 9310 deletions
|
|
@ -1,340 +1,288 @@
|
|||
USE [eDosLocal];
|
||||
GO
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[VisitExit] Script Date: 11/04/2022 14:31:28 ******/
|
||||
SET ANSI_NULLS ON;
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON;
|
||||
GO
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM sys.columns WHERE OBJECT_ID=OBJECT_ID('dbo.visit') AND name='eDosBatteryWarning')
|
||||
begin
|
||||
ALTER TABLE [dbo].[Visit] ADD eDosBatteryWarning BIT null;
|
||||
ALTER TABLE [dbo].[Visit] ADD eDosDose07Warning BIT null;
|
||||
ALTER TABLE [dbo].[Visit] ADD eDosDose07Alarm BIT null;
|
||||
ALTER TABLE [dbo].[Visit] ADD eDosRate07Warning BIT null;
|
||||
ALTER TABLE [dbo].[Visit] ADD eDosRate07Alarm BIT null;
|
||||
ALTER TABLE [dbo].[Visit] ADD eDosDose10Warning BIT null;
|
||||
ALTER TABLE [dbo].[Visit] ADD eDosDose10Alarm BIT null;
|
||||
ALTER TABLE [dbo].[Visit] ADD eDosRate10Warning BIT null;
|
||||
ALTER TABLE [dbo].[Visit] ADD eDosRate10Alarm BIT null;
|
||||
END
|
||||
GO
|
||||
|
||||
ALTER PROCEDURE [dbo].[VisitExit]
|
||||
@EPDVisitID INT,
|
||||
@HP07 FLOAT,
|
||||
@HP10 FLOAT,
|
||||
@HP07Peak FLOAT,
|
||||
@HP10Peak FLOAT,
|
||||
@HP07PeakTime DATETIME = NULL,
|
||||
@HP10PeakTime DATETIME = NULL,
|
||||
@HP07Total FLOAT,
|
||||
@HP10Total FLOAT,
|
||||
@K1 INT,
|
||||
@K2 INT,
|
||||
@K3 INT,
|
||||
@K4 INT,
|
||||
@K5 INT = NULL,
|
||||
@K6 INT = NULL,
|
||||
@SG INT,
|
||||
@BC INT,
|
||||
@FB INT,
|
||||
@HG INT,
|
||||
@QualityData INT,
|
||||
@alarmStatus INT,
|
||||
@otherAlarms INT,
|
||||
@errorStatus INT,
|
||||
@operatingStatus INT,
|
||||
@ENTRY_EPD_CLOCK DECIMAL(10, 0) NULL,
|
||||
@EXIT_EPD_CLOCK DECIMAL(10, 0) NULL,
|
||||
@PersID INT = NULL,
|
||||
@eDosBatteryWarning BIT = NULL,
|
||||
@eDosDose07Warning BIT = NULL,
|
||||
@eDosDose07Alarm BIT = NULL,
|
||||
@eDosRate07Warning BIT = NULL,
|
||||
@eDosRate07Alarm BIT = NULL,
|
||||
@eDosDose10Warning BIT = NULL,
|
||||
@eDosDose10Alarm BIT = NULL,
|
||||
@eDosRate10Warning BIT = NULL,
|
||||
@eDosRate10Alarm BIT = NULL
|
||||
AS
|
||||
DECLARE @ID_Visit INT,
|
||||
@ID_Station INT,
|
||||
@ID_Station_Return INT;
|
||||
|
||||
SET @ID_Station = @EPDVisitID % 100;
|
||||
SET @ID_Visit = @EPDVisitID / 100;
|
||||
|
||||
IF @ID_Station_Return IS NULL
|
||||
SELECT @ID_Station_Return = [ID_Station]
|
||||
FROM [dbo].[StationSettings]
|
||||
WHERE [PCNr] = HOST_NAME ();
|
||||
|
||||
DECLARE @isComplete BIT = 1;
|
||||
|
||||
IF NOT EXISTS
|
||||
(
|
||||
SELECT *
|
||||
FROM [dbo].[Visit]
|
||||
WHERE [ID_Visit] = @ID_Visit
|
||||
AND [ID_Station] = @ID_Station
|
||||
)
|
||||
BEGIN
|
||||
SET @isComplete = 0;
|
||||
|
||||
INSERT [dbo].[Visit]
|
||||
(
|
||||
[ID_Station],
|
||||
[ID_Visit],
|
||||
[Inst_CODE],
|
||||
[isManualExit],
|
||||
[isDeleted],
|
||||
[ID_Station_Return],
|
||||
[isComplete],
|
||||
[ENTRY_EPD_CLOCK],
|
||||
[PersID]
|
||||
)
|
||||
VALUES
|
||||
(@ID_Station, @ID_Visit, 0, 0, 0, @ID_Station_Return, 0, @ENTRY_EPD_CLOCK, @PersID);
|
||||
END;
|
||||
|
||||
UPDATE [dbo].[Visit]
|
||||
SET [Hp07Dose] = @HP07,
|
||||
[Hp10Dose] = @HP10,
|
||||
[isComplete] = @isComplete,
|
||||
[ReturnTime] = GETDATE (),
|
||||
[Hp07Peak] = @HP07Peak,
|
||||
[Hp10Peak] = @HP10Peak,
|
||||
[Hp07Time] = @HP07PeakTime,
|
||||
[Hp10Time] = @HP10PeakTime,
|
||||
[Hp07Total] = @HP07Total,
|
||||
[Hp10Total] = @HP10Total,
|
||||
[K1] = @K1,
|
||||
[K2] = @K2,
|
||||
[K3] = @K3,
|
||||
[K4] = @K4,
|
||||
[K5] = @K5,
|
||||
[K6] = @K6,
|
||||
[SG] = @SG,
|
||||
[BC] = @BC,
|
||||
[FB] = @FB,
|
||||
[HG] = @HG,
|
||||
[QualityData] = @QualityData,
|
||||
[alarmStatus] = @alarmStatus,
|
||||
[otherAlarms] = @otherAlarms,
|
||||
[errorStatus] = @errorStatus,
|
||||
[operatingStatus] = @operatingStatus,
|
||||
--[D1] = @D1, [D2] = @D2, [D3] = @D3, [D4] = @D4,
|
||||
[isAlarm] = CASE
|
||||
WHEN ISNULL (@alarmStatus, 0) <> 0 THEN
|
||||
1
|
||||
ELSE
|
||||
0
|
||||
END,
|
||||
[isManualExit] = 0,
|
||||
[ID_Station_Return] = @ID_Station_Return,
|
||||
[ENTRY_EPD_CLOCK] = @ENTRY_EPD_CLOCK,
|
||||
[EXIT_EPD_CLOCK] = @EXIT_EPD_CLOCK,
|
||||
[PersID] = CASE
|
||||
WHEN [PersID] IS NULL THEN
|
||||
@PersID
|
||||
ELSE
|
||||
[PersID]
|
||||
END,
|
||||
eDosBatteryWarning= @eDosBatteryWarning,
|
||||
eDosDose07Warning = @eDosDose07Warning ,
|
||||
eDosDose07Alarm=@eDosDose07Alarm,
|
||||
eDosRate07Warning=@eDosRate07Warning,
|
||||
eDosRate07Alarm=@eDosRate07Alarm,
|
||||
eDosDose10Warning=@eDosDose10Warning,
|
||||
eDosDose10Alarm=@eDosDose10Alarm,
|
||||
eDosRate10Warning=@eDosRate10Warning,
|
||||
eDosRate10Alarm=@eDosRate10Alarm
|
||||
WHERE [ID_Visit] = @ID_Visit
|
||||
AND [ID_Station] = @ID_Station;
|
||||
|
||||
-- local- >PersonInfoSnapshot
|
||||
IF ISNULL (@alarmStatus, 0) <> 0
|
||||
OR ISNULL(@eDosDose07Alarm,0)<>0
|
||||
OR ISNULL(@eDosRate07Alarm,0)<>0
|
||||
OR ISNULL(@eDosDose10Alarm,0)<>0
|
||||
OR ISNULL(@eDosRate10Alarm,0)<>0
|
||||
BEGIN
|
||||
UPDATE [dbo].[PersonInfoSnapshot]
|
||||
SET [VisitIDLocked] = @ID_Visit * 100 + @ID_Station
|
||||
WHERE [PersID] =
|
||||
(
|
||||
SELECT [PersID]
|
||||
FROM [dbo].[Visit]
|
||||
WHERE [ID_Visit] = @ID_Visit
|
||||
AND @ID_Station = @ID_Station
|
||||
);
|
||||
END;
|
||||
|
||||
GO
|
||||
ALTER PROCEDURE [export].[VisitsSelect]
|
||||
AS
|
||||
SELECT [ID_Station],
|
||||
[ID_Visit],
|
||||
[Inst_CODE],
|
||||
[PersID],
|
||||
[ID_Task],
|
||||
[EntryTime],
|
||||
[ReturnTime],
|
||||
[Hp10Dose],
|
||||
[Hp07Dose],
|
||||
[Hp10Total],
|
||||
[Hp07Total],
|
||||
[Hp10Peak],
|
||||
[Hp07Peak],
|
||||
[Hp10Time],
|
||||
[Hp07Time],
|
||||
[ID_EPD],
|
||||
[QualityData],
|
||||
[K1],
|
||||
[K2],
|
||||
[K3],
|
||||
[K4],
|
||||
[K5],
|
||||
[K6],
|
||||
[SG],
|
||||
[BC],
|
||||
[FB],
|
||||
[HG],
|
||||
[alarmStatus],
|
||||
[otherAlarms],
|
||||
[errorStatus],
|
||||
[operatingStatus],
|
||||
[isBG],
|
||||
[isComplete],
|
||||
[isDeleted],
|
||||
[isAlarm],
|
||||
[isAlarmCleared],
|
||||
[isManualExit],
|
||||
[ID_Station_Return],
|
||||
[ENTRY_EPD_CLOCK],
|
||||
[EXIT_EPD_CLOCK],
|
||||
[TIME_LOST],
|
||||
[VisitStatus] = CONVERT ( TINYINT,
|
||||
CASE
|
||||
WHEN [EntryTime] IS NOT NULL
|
||||
AND [ReturnTime] IS NOT NULL THEN
|
||||
3
|
||||
WHEN [EntryTime] IS NOT NULL THEN
|
||||
1
|
||||
WHEN [ReturnTime] IS NOT NULL THEN
|
||||
2
|
||||
ELSE
|
||||
0
|
||||
END
|
||||
),
|
||||
[syncedEntry],
|
||||
[syncedExit],
|
||||
[epdType],
|
||||
[eDosBatteryWarning],
|
||||
[eDosDose07Warning],
|
||||
[eDosDose07Alarm],
|
||||
[eDosRate07Warning],
|
||||
[eDosRate07Alarm],
|
||||
[eDosDose10Warning],
|
||||
[eDosDose10Alarm],
|
||||
[eDosRate10Warning],
|
||||
[eDosRate10Alarm]
|
||||
FROM [dbo].[Visit]
|
||||
WHERE (
|
||||
[syncedEntry] = 0
|
||||
OR [syncedExit] = 0
|
||||
);
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[StationSettings] ADD [RestartComFirst] BIT;
|
||||
ALTER TABLE [dbo].[StationSettings] ADD [OnlyMK2] BIT;
|
||||
GO
|
||||
|
||||
ALTER PROCEDURE [dbo].[StationSettingsSelect]
|
||||
AS
|
||||
SELECT [ID_Station],
|
||||
[PCNr],
|
||||
[ComPort],
|
||||
[Inst_CODE1],
|
||||
[Inst_CODE2],
|
||||
[Inst_Name1],
|
||||
[Inst_Name2],
|
||||
[TestCSN],
|
||||
[Reader],
|
||||
[useTestButtons] = ISNULL ([useTestButtons], 0),
|
||||
[useBeep] = ISNULL ([useBeep], 22),
|
||||
[checkUser] = ISNULL ([checkUser], 0),
|
||||
[EPDTimeout] = ISNULL ([EPDTimeout], 10000),
|
||||
[EPDRetries] = ISNULL ([EPDREtries], 1),
|
||||
[RestartCom] = ISNULL ([RestartCom], 0),
|
||||
[RestartComFirst] = ISNULL ([RestartComFirst], 0),
|
||||
[OnlyMK2] = ISNULL ([OnlyMK2], 0)
|
||||
FROM [dbo].[StationSettings]
|
||||
WHERE [PCNr] = HOST_NAME ();
|
||||
GO
|
||||
|
||||
ALTER PROCEDURE [dbo].[StationSettingsUpdate]
|
||||
@ComPort INT = NULL,
|
||||
@Inst_CODE1 INT = NULL,
|
||||
@Inst_CODE2 INT = NULL,
|
||||
@Inst_Name1 VARCHAR(50) = NULL,
|
||||
@Inst_Name2 VARCHAR(50) = NULL,
|
||||
@TestCSN VARCHAR(50) = NULL,
|
||||
@Reader VARCHAR(70) = NULL,
|
||||
@useTestButtons BIT = 0,
|
||||
@useBeep TINYINT = 22,
|
||||
@checkUser BIT = 0,
|
||||
@EPDTimeout INT = 10000,
|
||||
@EPDRetries INT = 1,
|
||||
@RestartCom BIT = 0,
|
||||
@RestartComFirst BIT = 0,
|
||||
@OnlyMK2 BIT = 0
|
||||
AS
|
||||
IF NOT EXISTS
|
||||
(
|
||||
SELECT *
|
||||
FROM [dbo].[StationSettings]
|
||||
WHERE [PCNr] = HOST_NAME ()
|
||||
)
|
||||
INSERT [dbo].[StationSettings]
|
||||
(
|
||||
[PCNr],
|
||||
[ComPort],
|
||||
[Inst_CODE1],
|
||||
[Inst_CODE2],
|
||||
[Inst_Name1],
|
||||
[Inst_Name2],
|
||||
[TestCSN],
|
||||
[Reader],
|
||||
[useTestButtons],
|
||||
[useBeep],
|
||||
[checkUser],
|
||||
[EPDREtries],
|
||||
[RestartCom],
|
||||
[RestartComFirst],
|
||||
[OnlyMK2]
|
||||
)
|
||||
VALUES
|
||||
(HOST_NAME (), @ComPort, @Inst_CODE1, @Inst_CODE2, @Inst_Name1, @Inst_Name2, @TestCSN, @Reader, @useTestButtons,
|
||||
@useBeep, @checkUser, @EPDRetries, @RestartCom, @RestartComFirst, @OnlyMK2);
|
||||
ELSE
|
||||
UPDATE [dbo].[StationSettings]
|
||||
SET [ComPort] = @ComPort,
|
||||
[Inst_CODE1] = @Inst_CODE1,
|
||||
[Inst_CODE2] = @Inst_CODE2,
|
||||
[Inst_Name1] = @Inst_Name1,
|
||||
[Inst_Name2] = @Inst_Name2,
|
||||
[TestCSN] = @TestCSN,
|
||||
[Reader] = @Reader,
|
||||
[useTestButtons] = @useTestButtons,
|
||||
[useBeep] = @useBeep,
|
||||
[checkUser] = @checkUser,
|
||||
[EPDTimeout] = @EPDTimeout,
|
||||
[EPDREtries] = @EPDRetries,
|
||||
[RestartCom] = @RestartCom,
|
||||
[RestartComFirst] = @RestartComFirst,
|
||||
[OnlyMK2] = @OnlyMK2
|
||||
WHERE [PCNr] = HOST_NAME ();
|
||||
USE [eDosLocal];
|
||||
GO
|
||||
SET ANSI_NULLS ON;
|
||||
GO
|
||||
SET QUOTED_IDENTIFIER ON;
|
||||
GO
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM sys.columns WHERE OBJECT_ID=OBJECT_ID('dbo.visit') AND name='eDosBatteryWarning')
|
||||
begin
|
||||
ALTER TABLE [dbo].[Visit] ADD eDosBatteryWarning BIT null;
|
||||
ALTER TABLE [dbo].[Visit] ADD eDosDose07Warning BIT null;
|
||||
ALTER TABLE [dbo].[Visit] ADD eDosDose07Alarm BIT null;
|
||||
ALTER TABLE [dbo].[Visit] ADD eDosRate07Warning BIT null;
|
||||
ALTER TABLE [dbo].[Visit] ADD eDosRate07Alarm BIT null;
|
||||
ALTER TABLE [dbo].[Visit] ADD eDosDose10Warning BIT null;
|
||||
ALTER TABLE [dbo].[Visit] ADD eDosDose10Alarm BIT null;
|
||||
ALTER TABLE [dbo].[Visit] ADD eDosRate10Warning BIT null;
|
||||
ALTER TABLE [dbo].[Visit] ADD eDosRate10Alarm BIT null;
|
||||
END
|
||||
GO
|
||||
ALTER PROCEDURE [dbo].[VisitExit] @EPDVisitID INT,
|
||||
@HP07 FLOAT,
|
||||
@HP10 FLOAT,
|
||||
@HP07Peak FLOAT,
|
||||
@HP10Peak FLOAT,
|
||||
@HP07PeakTime DATETIME = NULL,
|
||||
@HP10PeakTime DATETIME = NULL,
|
||||
@HP07Total FLOAT,
|
||||
@HP10Total FLOAT,
|
||||
@K1 INT,
|
||||
@K2 INT,
|
||||
@K3 INT,
|
||||
@K4 INT,
|
||||
@K5 INT = NULL,
|
||||
@K6 INT = NULL,
|
||||
@SG INT,
|
||||
@BC INT,
|
||||
@FB INT,
|
||||
@HG INT,
|
||||
@QualityData INT,
|
||||
@alarmStatus INT,
|
||||
@otherAlarms INT,
|
||||
@errorStatus INT,
|
||||
@operatingStatus INT,
|
||||
@ENTRY_EPD_CLOCK DECIMAL(10, 0) NULL,
|
||||
@EXIT_EPD_CLOCK DECIMAL(10, 0) NULL,
|
||||
@PersID INT = NULL,
|
||||
@eDosBatteryWarning BIT = NULL,
|
||||
@eDosDose07Warning BIT = NULL,
|
||||
@eDosDose07Alarm BIT = NULL,
|
||||
@eDosRate07Warning BIT = NULL,
|
||||
@eDosRate07Alarm BIT = NULL,
|
||||
@eDosDose10Warning BIT = NULL,
|
||||
@eDosDose10Alarm BIT = NULL,
|
||||
@eDosRate10Warning BIT = NULL,
|
||||
@eDosRate10Alarm BIT = NULL
|
||||
AS
|
||||
DECLARE
|
||||
@ID_Visit INT,
|
||||
@ID_Station INT,
|
||||
@ID_Station_Return INT;
|
||||
|
||||
SET @ID_Station = @EPDVisitID % 100;
|
||||
SET @ID_Visit = @EPDVisitID / 100;
|
||||
|
||||
IF @ID_Station_Return IS NULL
|
||||
SELECT
|
||||
@ID_Station_Return = [ID_Station]
|
||||
FROM [dbo].[StationSettings]
|
||||
WHERE [PCNr] = HOST_NAME();
|
||||
|
||||
DECLARE @isComplete BIT = 1;
|
||||
|
||||
IF NOT EXISTS (SELECT
|
||||
*
|
||||
FROM [dbo].[Visit]
|
||||
WHERE [ID_Visit] = @ID_Visit
|
||||
AND [ID_Station] = @ID_Station)BEGIN
|
||||
SET @isComplete = 0;
|
||||
|
||||
INSERT [dbo].[Visit]([ID_Station], [ID_Visit], [Inst_CODE], [isManualExit], [isDeleted], [ID_Station_Return], [isComplete], [ENTRY_EPD_CLOCK], [PersID])
|
||||
VALUES(@ID_Station, @ID_Visit, 0, 0, 0, @ID_Station_Return, 0, @ENTRY_EPD_CLOCK, @PersID);
|
||||
END;
|
||||
|
||||
UPDATE
|
||||
[dbo].[Visit]
|
||||
SET
|
||||
[Hp07Dose] = @HP07,
|
||||
[Hp10Dose] = @HP10,
|
||||
[isComplete] = @isComplete,
|
||||
[ReturnTime] = GETDATE(),
|
||||
[Hp07Peak] = @HP07Peak,
|
||||
[Hp10Peak] = @HP10Peak,
|
||||
[Hp07Time] = @HP07PeakTime,
|
||||
[Hp10Time] = @HP10PeakTime,
|
||||
[Hp07Total] = @HP07Total,
|
||||
[Hp10Total] = @HP10Total,
|
||||
[K1] = @K1,
|
||||
[K2] = @K2,
|
||||
[K3] = @K3,
|
||||
[K4] = @K4,
|
||||
[K5] = @K5,
|
||||
[K6] = @K6,
|
||||
[SG] = @SG,
|
||||
[BC] = @BC,
|
||||
[FB] = @FB,
|
||||
[HG] = @HG,
|
||||
[QualityData] = @QualityData,
|
||||
[alarmStatus] = @alarmStatus,
|
||||
[otherAlarms] = @otherAlarms,
|
||||
[errorStatus] = @errorStatus,
|
||||
[operatingStatus] = @operatingStatus,
|
||||
--[D1] = @D1, [D2] = @D2, [D3] = @D3, [D4] = @D4,
|
||||
[isAlarm] = CASE WHEN ISNULL(@alarmStatus, 0) <> 0 THEN 1 ELSE 0 END,
|
||||
[isManualExit] = 0,
|
||||
[ID_Station_Return] = @ID_Station_Return,
|
||||
[ENTRY_EPD_CLOCK] = @ENTRY_EPD_CLOCK,
|
||||
[EXIT_EPD_CLOCK] = @EXIT_EPD_CLOCK,
|
||||
[PersID] = CASE WHEN [PersID] IS NULL THEN @PersID ELSE [PersID] END,
|
||||
[eDosBatteryWarning] = @eDosBatteryWarning,
|
||||
[eDosDose07Warning] = @eDosDose07Warning,
|
||||
[eDosDose07Alarm] = @eDosDose07Alarm,
|
||||
[eDosRate07Warning] = @eDosRate07Warning,
|
||||
[eDosRate07Alarm] = @eDosRate07Alarm,
|
||||
[eDosDose10Warning] = @eDosDose10Warning,
|
||||
[eDosDose10Alarm] = @eDosDose10Alarm,
|
||||
[eDosRate10Warning] = @eDosRate10Warning,
|
||||
[eDosRate10Alarm] = @eDosRate10Alarm
|
||||
WHERE [ID_Visit] = @ID_Visit
|
||||
AND [ID_Station] = @ID_Station;
|
||||
|
||||
-- local- >PersonInfoSnapshot
|
||||
IF ISNULL(@alarmStatus, 0) <> 0
|
||||
OR ISNULL(@eDosDose07Alarm, 0) <> 0
|
||||
OR ISNULL(@eDosRate07Alarm, 0) <> 0
|
||||
OR ISNULL(@eDosDose10Alarm, 0) <> 0
|
||||
OR ISNULL(@eDosRate10Alarm, 0) <> 0 BEGIN
|
||||
UPDATE
|
||||
[dbo].[PersonInfoSnapshot]
|
||||
SET
|
||||
[VisitIDLocked] = @ID_Visit * 100 + @ID_Station
|
||||
WHERE [PersID] = (SELECT
|
||||
[PersID]
|
||||
FROM [dbo].[Visit]
|
||||
WHERE [ID_Visit] = @ID_Visit
|
||||
AND @ID_Station = @ID_Station);
|
||||
END;
|
||||
GO
|
||||
ALTER PROCEDURE [export].[VisitsSelect]
|
||||
AS
|
||||
SELECT
|
||||
[ID_Station],
|
||||
[ID_Visit],
|
||||
[Inst_CODE],
|
||||
[PersID],
|
||||
[ID_Task],
|
||||
[EntryTime],
|
||||
[ReturnTime],
|
||||
[Hp10Dose],
|
||||
[Hp07Dose],
|
||||
[Hp10Total],
|
||||
[Hp07Total],
|
||||
[Hp10Peak],
|
||||
[Hp07Peak],
|
||||
[Hp10Time],
|
||||
[Hp07Time],
|
||||
[ID_EPD],
|
||||
[QualityData],
|
||||
[K1],
|
||||
[K2],
|
||||
[K3],
|
||||
[K4],
|
||||
[K5],
|
||||
[K6],
|
||||
[SG],
|
||||
[BC],
|
||||
[FB],
|
||||
[HG],
|
||||
[alarmStatus],
|
||||
[otherAlarms],
|
||||
[errorStatus],
|
||||
[operatingStatus],
|
||||
[isBG],
|
||||
[isComplete],
|
||||
[isDeleted],
|
||||
[isAlarm],
|
||||
[isAlarmCleared],
|
||||
[isManualExit],
|
||||
[ID_Station_Return],
|
||||
[ENTRY_EPD_CLOCK],
|
||||
[EXIT_EPD_CLOCK],
|
||||
[TIME_LOST],
|
||||
[VisitStatus] = CONVERT(TINYINT, CASE WHEN [EntryTime] IS NOT NULL
|
||||
AND [ReturnTime] IS NOT NULL THEN 3
|
||||
WHEN [EntryTime] IS NOT NULL THEN 1
|
||||
WHEN [ReturnTime] IS NOT NULL THEN 2 ELSE 0 END),
|
||||
[syncedEntry],
|
||||
[syncedExit],
|
||||
[epdType],
|
||||
[epdID],
|
||||
[eDosBatteryWarning],
|
||||
[eDosDose07Warning],
|
||||
[eDosDose07Alarm],
|
||||
[eDosRate07Warning],
|
||||
[eDosRate07Alarm],
|
||||
[eDosDose10Warning],
|
||||
[eDosDose10Alarm],
|
||||
[eDosRate10Warning],
|
||||
[eDosRate10Alarm]
|
||||
FROM [dbo].[Visit]
|
||||
WHERE([syncedEntry] = 0 OR [syncedExit] = 0);
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id=OBJECT_ID('[dbo].[StationSettings]') AND name='RestartComFirst')
|
||||
begin
|
||||
ALTER TABLE [dbo].[StationSettings] ADD [RestartComFirst] BIT;
|
||||
ALTER TABLE [dbo].[StationSettings] ADD [OnlyMK2] BIT;
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id=OBJECT_ID('[dbo].[StationSettings]') AND name='AllowMultipleEPD')
|
||||
ALTER TABLE [dbo].[StationSettings] ADD AllowMultipleEPD BIT NULL;
|
||||
IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id=OBJECT_ID('[dbo].[StationSettings]') AND name='EPDRetries')
|
||||
ALTER TABLE [dbo].[StationSettings] ADD EPDRetries BIT NULL;
|
||||
GO
|
||||
ALTER PROCEDURE [dbo].[StationSettingsSelect] AS
|
||||
SELECT
|
||||
[ID_Station],
|
||||
[PCNr],
|
||||
[ComPort],
|
||||
[Inst_CODE1],
|
||||
[Inst_CODE2],
|
||||
[Inst_Name1],
|
||||
[Inst_Name2],
|
||||
[TestCSN],
|
||||
[Reader],
|
||||
[useTestButtons] = ISNULL([useTestButtons], 0),
|
||||
[useBeep] = ISNULL([useBeep], 22),
|
||||
[checkUser] = ISNULL([checkUser], 0),
|
||||
[EPDTimeout] = ISNULL([EPDTimeout], 10000),
|
||||
[EPDRetries] = ISNULL([EPDREtries], 1),
|
||||
[RestartCom] = ISNULL([RestartCom], 0),
|
||||
[RestartComFirst] = ISNULL([RestartComFirst], 0),
|
||||
[OnlyMK2] = ISNULL([OnlyMK2], 0),
|
||||
[AllowMultipleEPD] = ISNULL([AllowMultipleEPD], 0)
|
||||
FROM [dbo].[StationSettings]
|
||||
WHERE [PCNr] = HOST_NAME();
|
||||
GO
|
||||
ALTER PROCEDURE [dbo].[StationSettingsUpdate] @ComPort INT = NULL,
|
||||
@Inst_CODE1 INT = NULL,
|
||||
@Inst_CODE2 INT = NULL,
|
||||
@Inst_Name1 VARCHAR(50) = NULL,
|
||||
@Inst_Name2 VARCHAR(50) = NULL,
|
||||
@TestCSN VARCHAR(50) = NULL,
|
||||
@Reader VARCHAR(70) = NULL,
|
||||
@useTestButtons BIT = 0,
|
||||
@useBeep TINYINT = 22,
|
||||
@checkUser BIT = 0,
|
||||
@EPDTimeout INT = 10000,
|
||||
@EPDRetries INT = 1,
|
||||
@RestartCom BIT = 0,
|
||||
@RestartComFirst BIT = 0,
|
||||
@OnlyMK2 BIT = 0,
|
||||
@AllowMultipleEPD BIT = 0
|
||||
AS
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[StationSettings] WHERE [PCNr] = HOST_NAME())
|
||||
INSERT [dbo].[StationSettings]([PCNr], [ComPort], [Inst_CODE1], [Inst_CODE2], [Inst_Name1], [Inst_Name2], [TestCSN], [Reader], [useTestButtons], [useBeep], [checkUser], [EPDREtries], [RestartCom], [RestartComFirst], [OnlyMK2], [AllowMultipleEPD])
|
||||
VALUES(HOST_NAME(), @ComPort, @Inst_CODE1, @Inst_CODE2, @Inst_Name1, @Inst_Name2, @TestCSN, @Reader, @useTestButtons, @useBeep, @checkUser, @EPDRetries, @RestartCom, @RestartComFirst, @OnlyMK2, @AllowMultipleEPD);
|
||||
ELSE
|
||||
UPDATE
|
||||
[dbo].[StationSettings]
|
||||
SET
|
||||
[ComPort] = @ComPort,
|
||||
[Inst_CODE1] = @Inst_CODE1,
|
||||
[Inst_CODE2] = @Inst_CODE2,
|
||||
[Inst_Name1] = @Inst_Name1,
|
||||
[Inst_Name2] = @Inst_Name2,
|
||||
[TestCSN] = @TestCSN,
|
||||
[Reader] = @Reader,
|
||||
[useTestButtons] = @useTestButtons,
|
||||
[useBeep] = @useBeep,
|
||||
[checkUser] = @checkUser,
|
||||
[EPDTimeout] = @EPDTimeout,
|
||||
[EPDREtries] = @EPDRetries,
|
||||
[RestartCom] = @RestartCom,
|
||||
[RestartComFirst] = @RestartComFirst,
|
||||
[OnlyMK2] = @OnlyMK2,
|
||||
[AllowMultipleEPD]=@AllowMultipleEPD
|
||||
WHERE [PCNr] = HOST_NAME();
|
||||
go
|
||||
|
|
|
|||
|
|
@ -1,362 +1,328 @@
|
|||
USE [eDosLocal];
|
||||
GO
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[GetPersonInfo] Script Date: 8/03/2022 15:53:18 ******/
|
||||
SET ANSI_NULLS ON;
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON;
|
||||
GO
|
||||
|
||||
IF NOT EXISTS
|
||||
(
|
||||
SELECT *
|
||||
FROM [INFORMATION_SCHEMA].[COLUMNS]
|
||||
WHERE [TABLE_NAME] = 'StationSettings'
|
||||
AND [COLUMN_NAME] = 'EPDRetries'
|
||||
)
|
||||
ALTER TABLE [dbo].[StationSettings] ADD [EPDRetries] INT;
|
||||
|
||||
IF NOT EXISTS
|
||||
(
|
||||
SELECT *
|
||||
FROM [INFORMATION_SCHEMA].[COLUMNS]
|
||||
WHERE [TABLE_NAME] = 'StationSettings'
|
||||
AND [COLUMN_NAME] = 'RestartCom'
|
||||
)
|
||||
ALTER TABLE [dbo].[StationSettings] ADD [RestartCom] BIT;
|
||||
GO
|
||||
|
||||
ALTER PROCEDURE [dbo].[StationSettingsSelect]
|
||||
AS
|
||||
SELECT [ID_Station],
|
||||
[PCNr],
|
||||
[ComPort],
|
||||
[Inst_CODE1],
|
||||
[Inst_CODE2],
|
||||
[Inst_Name1],
|
||||
[Inst_Name2],
|
||||
[TestCSN],
|
||||
[Reader],
|
||||
[useTestButtons] = ISNULL ([useTestButtons], 0),
|
||||
[useBeep] = ISNULL ([useBeep], 22),
|
||||
[checkUser] = ISNULL ([checkUser], 0),
|
||||
[EPDTimeout],
|
||||
[EPDRetries],
|
||||
[RestartCom]
|
||||
FROM [dbo].[StationSettings]
|
||||
WHERE [PCNr] = HOST_NAME ();
|
||||
GO
|
||||
|
||||
ALTER PROCEDURE [dbo].[StationSettingsUpdate]
|
||||
@ComPort INT = NULL,
|
||||
@Inst_CODE1 INT = NULL,
|
||||
@Inst_CODE2 INT = NULL,
|
||||
@Inst_Name1 VARCHAR(50) = NULL,
|
||||
@Inst_Name2 VARCHAR(50) = NULL,
|
||||
@TestCSN VARCHAR(50) = NULL,
|
||||
@Reader VARCHAR(70) = NULL,
|
||||
@useTestButtons BIT = 0,
|
||||
@useBeep TINYINT = 22,
|
||||
@checkUser BIT = 0,
|
||||
@EPDTimeout INT = 10000,
|
||||
@EPDRetries INT = 1,
|
||||
@RestartCom BIT = 0
|
||||
AS
|
||||
IF NOT EXISTS
|
||||
(
|
||||
SELECT *
|
||||
FROM [dbo].[StationSettings]
|
||||
WHERE [PCNr] = HOST_NAME ()
|
||||
)
|
||||
INSERT [dbo].[StationSettings]
|
||||
(
|
||||
[PCNr],
|
||||
[ComPort],
|
||||
[Inst_CODE1],
|
||||
[Inst_CODE2],
|
||||
[Inst_Name1],
|
||||
[Inst_Name2],
|
||||
[TestCSN],
|
||||
[Reader],
|
||||
[useTestButtons],
|
||||
[useBeep],
|
||||
[checkUser],
|
||||
[EPDRetries],
|
||||
[RestartCom]
|
||||
)
|
||||
VALUES
|
||||
(HOST_NAME (), @ComPort, @Inst_CODE1, @Inst_CODE2, @Inst_Name1, @Inst_Name2, @TestCSN, @Reader, @useTestButtons,
|
||||
@useBeep, @checkUser, @EPDRetries, @RestartCom);
|
||||
ELSE
|
||||
UPDATE [dbo].[StationSettings]
|
||||
SET [ComPort] = @ComPort,
|
||||
[Inst_CODE1] = @Inst_CODE1,
|
||||
[Inst_CODE2] = @Inst_CODE2,
|
||||
[Inst_Name1] = @Inst_Name1,
|
||||
[Inst_Name2] = @Inst_Name2,
|
||||
[TestCSN] = @TestCSN,
|
||||
[Reader] = @Reader,
|
||||
[useTestButtons] = @useTestButtons,
|
||||
[useBeep] = @useBeep,
|
||||
[checkUser] = @checkUser,
|
||||
[EPDTimeout] = @EPDTimeout,
|
||||
[EPDRetries] = @EPDRetries,
|
||||
[RestartCom] = @RestartCom
|
||||
WHERE [PCNr] = HOST_NAME ();
|
||||
GO
|
||||
|
||||
ALTER PROCEDURE [dbo].[StationSettingsSelect]
|
||||
AS
|
||||
SELECT [ID_Station],
|
||||
[PCNr],
|
||||
[ComPort],
|
||||
[Inst_CODE1],
|
||||
[Inst_CODE2],
|
||||
[Inst_Name1],
|
||||
[Inst_Name2],
|
||||
[TestCSN],
|
||||
[Reader],
|
||||
[useTestButtons] = ISNULL ([useTestButtons], 0),
|
||||
[useBeep] = ISNULL ([useBeep], 22),
|
||||
[checkUser] = ISNULL ([checkUser], 0),
|
||||
[EPDTimeout] = ISNULL ([EPDTimeout], 10000),
|
||||
[EPDRetries] = ISNULL ([EPDRetries], 1),
|
||||
[RestartCom] = ISNULL ([RestartCom], 0)
|
||||
FROM [dbo].[StationSettings]
|
||||
WHERE [PCNr] = HOST_NAME ();
|
||||
|
||||
go
|
||||
|
||||
ALTER PROCEDURE [dbo].[GetPersonInfo] @CSN CHAR(14) =NULL, @PersID INT = NULL AS
|
||||
--DECLARE @PersID INT = null, @CSN CHAR(14) = 'TP10';
|
||||
DECLARE
|
||||
@lid_station INT,
|
||||
@lid_visit INT;
|
||||
|
||||
if @PersID IS NULL SELECT @PersID=persid FROM [dbo].[PersonInfoSnapshot] where [CSN] = @CSN COLLATE SQL_Latin1_General_CP850_BIN;
|
||||
|
||||
SELECT TOP(1)
|
||||
@lid_station = id_station,
|
||||
@lid_visit = id_visit
|
||||
FROM dbo.Visit
|
||||
WHERE PersID = @PersID
|
||||
AND ReturnTime IS NULL
|
||||
AND [EntryTime] > DATEADD(year, -1, GETDATE());
|
||||
|
||||
SELECT
|
||||
[a].[PersID],
|
||||
[a].[Type],
|
||||
[a].[CSN],
|
||||
[a].[FirstName],
|
||||
[a].[LastName],
|
||||
[a].[NickName],
|
||||
[AccessAllow] = CASE WHEN a.[hasEPD] = 1 THEN 0 ELSE a.[AccessAllow] END,
|
||||
[a].[Language],
|
||||
[a].[MarginHP10_M],
|
||||
[a].[MarginHP10_Y],
|
||||
[a].[Margin],
|
||||
[a].[VisitIDLocked],
|
||||
[a].[ID_CommentToPerson],
|
||||
[a].[Comment],
|
||||
[a].[Deleted],
|
||||
[ReasonNoAccess] = CASE WHEN a.[hasEPD] = 1 THEN 'EPD not returned' ELSE a.[ReasonNoAccess] END,
|
||||
[a].[Dose_52W_microSv],
|
||||
[a].[hasEPD],
|
||||
activeStation = @lid_station,
|
||||
activeVisit = @lid_visit
|
||||
FROM(SELECT
|
||||
[p].[PersID],
|
||||
[p].[Type],
|
||||
[p].[CSN],
|
||||
[p].[FirstName],
|
||||
[p].[LastName],
|
||||
[p].[NickName],
|
||||
[p].[AccessAllow],
|
||||
[p].[Language],
|
||||
[p].[MarginHP10_M],
|
||||
[p].[MarginHP10_Y],
|
||||
[p].[Margin],
|
||||
[p].[VisitIDLocked],
|
||||
[p].[ID_CommentToPerson],
|
||||
[p].[Comment],
|
||||
[p].[Deleted],
|
||||
[p].[ReasonNoAccess],
|
||||
[p].[Dose_52W_microSv],
|
||||
hasEPD = CONVERT(BIT, CASE WHEN @lid_visit IS NOT NULL THEN 1 ELSE 0 END)
|
||||
FROM [dbo].[PersonInfoSnapshot] [p]
|
||||
WHERE [p].[PersID] = @PersID) a
|
||||
go
|
||||
|
||||
---- Luc 2022-03-25
|
||||
IF OBJECT_ID('[syncLoc].[compareVisit]') IS NULL
|
||||
begin
|
||||
CREATE TABLE [syncLoc].[compareVisit](
|
||||
[ID_Station] [INT] NOT NULL,
|
||||
[ID_Visit] [INT] NOT NULL,
|
||||
[Inst_CODE] [INT] NOT NULL,
|
||||
[PersID] [INT] NULL,
|
||||
[ID_Task] [INT] NULL,
|
||||
[EntryTime] [DATETIME] NULL,
|
||||
[ReturnTime] [DATETIME] NULL,
|
||||
[Hp10Dose] [FLOAT] NULL,
|
||||
[Hp07Dose] [FLOAT] NULL,
|
||||
[Hp10Total] [FLOAT] NULL,
|
||||
[Hp07Total] [FLOAT] NULL,
|
||||
[Hp10Peak] [FLOAT] NULL,
|
||||
[Hp07Peak] [FLOAT] NULL,
|
||||
[Hp10Time] [DATETIME] NULL,
|
||||
[Hp07Time] [DATETIME] NULL,
|
||||
[ID_EPD] [INT] NULL,
|
||||
[QualityData] [INT] NULL,
|
||||
[K1] [INT] NULL,
|
||||
[K2] [INT] NULL,
|
||||
[K3] [INT] NULL,
|
||||
[K4] [INT] NULL,
|
||||
[K5] [INT] NULL,
|
||||
[K6] [INT] NULL,
|
||||
[SG] [INT] NULL,
|
||||
[BC] [INT] NULL,
|
||||
[FB] [INT] NULL,
|
||||
[HG] [INT] NULL,
|
||||
[alarmStatus] [INT] NULL,
|
||||
[otherAlarms] [INT] NULL,
|
||||
[errorStatus] [INT] NULL,
|
||||
[operatingStatus] [INT] NULL,
|
||||
[isBG] [BIT] NULL,
|
||||
[isComplete] [BIT] NOT NULL,
|
||||
[isDeleted] [BIT] NOT NULL,
|
||||
[isAlarm] [BIT] NOT NULL,
|
||||
[isAlarmCleared] [BIT] NOT NULL,
|
||||
[isManualExit] [BIT] NOT NULL,
|
||||
[ID_Station_Return] [INT] NULL,
|
||||
[ENTRY_EPD_CLOCK] [NUMERIC](10, 0) NULL,
|
||||
[EXIT_EPD_CLOCK] [NUMERIC](10, 0) NULL,
|
||||
[TIME_LOST] [INT] NULL,
|
||||
[epdID] [INT] NULL,
|
||||
CONSTRAINT [PK_compareVisit] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[ID_Station] ASC,
|
||||
[ID_Visit] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON ) ON [PRIMARY]
|
||||
) ON [PRIMARY];
|
||||
|
||||
GRANT ALTER,INSERT,UPDATE,DELETE,select ON [syncLoc].[compareVisit] TO edosStation
|
||||
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
|
||||
CREATE OR ALTER PROCEDURE [syncLoc].[UpdateRemoteReturns] @ID_LocalStation INT=null AS
|
||||
-- Luc 2022-03-25
|
||||
--DECLARE @ID_LocalStation INT = 9;
|
||||
DECLARE @pcnr VARCHAR(20)
|
||||
|
||||
select @pcnr=@@servername;
|
||||
IF @pcnr='EDOS-SCH' SET @pcnr='EDOS-WSCH'
|
||||
ELSE IF @pcnr='DESKTOP-CCDL4A3' SET @pcnr='EDOS-LNK'
|
||||
ELSE IF @pcnr='EDOS-ZZZ'SET @pcnr='EDOS-LSCH'
|
||||
|
||||
IF @ID_LocalStation IS NULL SELECT @ID_LocalStation =id_station From stationsettings WHERE pcnr= @pcnr
|
||||
select @ID_LocalStation,pcnr FROM stationsettings WHERE id_station=@ID_LocalStation;
|
||||
|
||||
TRUNCATE TABLE [syncLoc].[compareVisit];
|
||||
|
||||
INSERT [syncLoc].[compareVisit]([ID_Station], [ID_Visit], [Inst_CODE], [PersID], [ID_Task], [EntryTime], [ReturnTime], [Hp10Dose], [Hp07Dose], [Hp10Total], [Hp07Total], [Hp10Peak], [Hp07Peak], [Hp10Time], [Hp07Time], [ID_EPD], [QualityData], [K1], [K2], [K3], [K4], [K5], [K6], [SG], [BC], [FB], [HG], [alarmStatus], [otherAlarms], [errorStatus], [operatingStatus], [isBG], [isComplete], [isDeleted], [isAlarm], [isAlarmCleared], [isManualExit], [ID_Station_Return], [ENTRY_EPD_CLOCK], [EXIT_EPD_CLOCK], [TIME_LOST], [epdID])
|
||||
SELECT
|
||||
[v].[ID_Station],
|
||||
[v].[ID_Visit],
|
||||
[v].[Inst_CODE],
|
||||
[v].[PersID],
|
||||
[v].[ID_Task],
|
||||
[v].[EntryTime],
|
||||
[v].[ReturnTime],
|
||||
[v].[Hp10Dose],
|
||||
[v].[Hp07Dose],
|
||||
[v].[Hp10Total],
|
||||
[v].[Hp07Total],
|
||||
[v].[Hp10Peak],
|
||||
[v].[Hp07Peak],
|
||||
[v].[Hp10Time],
|
||||
[v].[Hp07Time],
|
||||
[v].[ID_EPD],
|
||||
[v].[QualityData],
|
||||
[v].[K1],
|
||||
[v].[K2],
|
||||
[v].[K3],
|
||||
[v].[K4],
|
||||
[v].[K5],
|
||||
[v].[K6],
|
||||
[v].[SG],
|
||||
[v].[BC],
|
||||
[v].[FB],
|
||||
[v].[HG],
|
||||
[v].[alarmStatus],
|
||||
[v].[otherAlarms],
|
||||
[v].[errorStatus],
|
||||
[v].[operatingStatus],
|
||||
[v].[isBG],
|
||||
[v].[isComplete],
|
||||
[v].[isDeleted],
|
||||
[v].[isAlarm],
|
||||
[v].[isAlarmCleared],
|
||||
[v].[isManualExit],
|
||||
[v].[ID_Station_Return],
|
||||
[v].[ENTRY_EPD_CLOCK],
|
||||
[v].[EXIT_EPD_CLOCK],
|
||||
[v].[TIME_LOST],
|
||||
[v].[epdID]
|
||||
FROM [EDOS].[edos].[dbo].[visit] [v]
|
||||
INNER JOIN(SELECT
|
||||
[ID_Visit]
|
||||
FROM [dbo].[Visit]
|
||||
WHERE [ID_Station] = @ID_LocalStation
|
||||
AND [ReturnTime] IS NULL) [i] ON [i].[ID_Visit] = [v].[ID_Visit]
|
||||
WHERE [id_station] = @ID_LocalStation
|
||||
AND [v].[returntime] IS NOT NULL;
|
||||
|
||||
UPDATE
|
||||
[dbo].[Visit]
|
||||
SET
|
||||
[ReturnTime] = [c].[ReturnTime],
|
||||
[Hp10Dose] = [c].[Hp10Dose],
|
||||
[Hp07Dose] = [c].[Hp07Dose],
|
||||
[Hp10Total] = [c].[Hp10Total],
|
||||
[Hp07Total] = [c].[Hp07Total],
|
||||
[Hp10Peak] = [c].[Hp10Peak],
|
||||
[Hp07Peak] = [c].[Hp07Peak],
|
||||
[Hp10Time] = [c].[Hp10Time],
|
||||
[Hp07Time] = [c].[Hp07Time],
|
||||
[QualityData] = [c].[QualityData],
|
||||
[K1] = [c].[K1],
|
||||
[K2] = [c].[K2],
|
||||
[K3] = [c].[K3],
|
||||
[K4] = [c].[K4],
|
||||
[K5] = [c].[K5],
|
||||
[K6] = [c].[K6],
|
||||
[SG] = [c].[SG],
|
||||
[BC] = [c].[BC],
|
||||
[FB] = [c].[FB],
|
||||
[HG] = [c].[HG],
|
||||
[alarmStatus] = [c].[alarmStatus],
|
||||
[otherAlarms] = [c].[otherAlarms],
|
||||
[errorStatus] = [c].[errorStatus],
|
||||
[operatingStatus] = [c].[operatingStatus],
|
||||
[isComplete] = [c].[isComplete],
|
||||
[isDeleted] = [c].[isDeleted],
|
||||
[isAlarm] = [c].[isAlarm],
|
||||
[isAlarmCleared] = [c].[isAlarmCleared],
|
||||
[isManualExit] = ISNULL([c].[isManualExit], [v].[isManualExit]),
|
||||
[ID_Station_Return] = ISNULL([c].[ID_Station_Return], [v].[ID_Station_Return]),
|
||||
[EXIT_EPD_CLOCK] = [c].[EXIT_EPD_CLOCK]
|
||||
FROM [dbo].[Visit] [v]
|
||||
INNER JOIN [syncLoc].[compareVisit] [c] ON [c].[ID_Station] = [v].[ID_Station]
|
||||
AND [c].[ID_Visit] = [v].[ID_Visit]
|
||||
WHERE [v].[ReturnTime] IS NULL
|
||||
AND [v].[isComplete] = 0;
|
||||
|
||||
GO
|
||||
|
||||
GRANT EXECUTE ON [syncLoc].[UpdateRemoteReturns] TO [eDosStation]
|
||||
go
|
||||
USE [eDosLocal];
|
||||
GO
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[GetPersonInfo] Script Date: 8/03/2022 15:53:18 ******/
|
||||
SET ANSI_NULLS ON;
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON;
|
||||
GO
|
||||
ALTER PROCEDURE [dbo].[GetPersonInfo] @CSN CHAR(14) = NULL,
|
||||
@PersID INT = NULL
|
||||
AS
|
||||
--DECLARE @PersID INT = null, @CSN CHAR(14) = 'TP10';
|
||||
DECLARE
|
||||
@lid_station INT,
|
||||
@lid_visit INT;
|
||||
|
||||
IF @PersID IS NULL
|
||||
SELECT
|
||||
@PersID = [PersID]
|
||||
FROM [dbo].[PersonInfoSnapshot]
|
||||
WHERE [CSN] = @CSN COLLATE SQL_Latin1_General_CP850_BIN;
|
||||
|
||||
SELECT TOP(1)
|
||||
@lid_station = [ID_Station],
|
||||
@lid_visit = [ID_Visit]
|
||||
FROM [dbo].[Visit]
|
||||
WHERE [PersID] = @PersID
|
||||
AND [ReturnTime] IS NULL
|
||||
AND [EntryTime] > DATEADD(YEAR, -1, GETDATE());
|
||||
|
||||
SELECT
|
||||
[a].[PersID],
|
||||
[a].[Type],
|
||||
[a].[CSN],
|
||||
[a].[FirstName],
|
||||
[a].[LastName],
|
||||
[a].[NickName],
|
||||
[AccessAllow] = CASE WHEN [a].[hasEPD] = 1 THEN 0 ELSE [a].[AccessAllow] END,
|
||||
[a].[Language],
|
||||
[a].[MarginHP10_M],
|
||||
[a].[MarginHP10_Y],
|
||||
[a].[Margin],
|
||||
[a].[VisitIDLocked],
|
||||
[a].[ID_CommentToPerson],
|
||||
[a].[Comment],
|
||||
[a].[Deleted],
|
||||
[ReasonNoAccess] = CASE WHEN [a].[hasEPD] = 1 THEN 'EPD not returned' ELSE [a].[ReasonNoAccess] END,
|
||||
[a].[Dose_52W_microSv],
|
||||
[a].[hasEPD],
|
||||
[activeStation] = @lid_station,
|
||||
[activeVisit] = @lid_visit
|
||||
FROM(SELECT
|
||||
[p].[PersID],
|
||||
[p].[Type],
|
||||
[p].[CSN],
|
||||
[p].[FirstName],
|
||||
[p].[LastName],
|
||||
[p].[NickName],
|
||||
[p].[AccessAllow],
|
||||
[p].[Language],
|
||||
[p].[MarginHP10_M],
|
||||
[p].[MarginHP10_Y],
|
||||
[p].[Margin],
|
||||
[p].[VisitIDLocked],
|
||||
[p].[ID_CommentToPerson],
|
||||
[p].[Comment],
|
||||
[p].[Deleted],
|
||||
[p].[ReasonNoAccess],
|
||||
[p].[Dose_52W_microSv],
|
||||
[hasEPD] = CONVERT(BIT, CASE WHEN @lid_visit IS NOT NULL THEN 1 ELSE 0 END)
|
||||
FROM [dbo].[PersonInfoSnapshot] [p]
|
||||
WHERE [p].[PersID] = @PersID) [a];
|
||||
go
|
||||
|
||||
---- Luc 2022-03-25
|
||||
USE [eDosLocal]
|
||||
go
|
||||
IF SCHEMA_ID('syncloc') IS NULL
|
||||
BEGIN
|
||||
exec('CREATE SCHEMA [syncLoc]')
|
||||
END
|
||||
|
||||
GO
|
||||
IF OBJECT_ID ('[syncLoc].[compareVisit]') IS NULL
|
||||
BEGIN
|
||||
CREATE TABLE [syncLoc].[compareVisit](
|
||||
[ID_Station] [INT] NOT NULL,
|
||||
[ID_Visit] [INT] NOT NULL,
|
||||
[Inst_CODE] [INT] NOT NULL,
|
||||
[PersID] [INT] NULL,
|
||||
[ID_Task] [INT] NULL,
|
||||
[EntryTime] [DATETIME] NULL,
|
||||
[ReturnTime] [DATETIME] NULL,
|
||||
[Hp10Dose] [FLOAT] NULL,
|
||||
[Hp07Dose] [FLOAT] NULL,
|
||||
[Hp10Total] [FLOAT] NULL,
|
||||
[Hp07Total] [FLOAT] NULL,
|
||||
[Hp10Peak] [FLOAT] NULL,
|
||||
[Hp07Peak] [FLOAT] NULL,
|
||||
[Hp10Time] [DATETIME] NULL,
|
||||
[Hp07Time] [DATETIME] NULL,
|
||||
[ID_EPD] [INT] NULL,
|
||||
[QualityData] [INT] NULL,
|
||||
[K1] [INT] NULL,
|
||||
[K2] [INT] NULL,
|
||||
[K3] [INT] NULL,
|
||||
[K4] [INT] NULL,
|
||||
[K5] [INT] NULL,
|
||||
[K6] [INT] NULL,
|
||||
[SG] [INT] NULL,
|
||||
[BC] [INT] NULL,
|
||||
[FB] [INT] NULL,
|
||||
[HG] [INT] NULL,
|
||||
[alarmStatus] [INT] NULL,
|
||||
[otherAlarms] [INT] NULL,
|
||||
[errorStatus] [INT] NULL,
|
||||
[operatingStatus] [INT] NULL,
|
||||
[isBG] [BIT] NULL,
|
||||
[isComplete] [BIT] NOT NULL,
|
||||
[isDeleted] [BIT] NOT NULL,
|
||||
[isAlarm] [BIT] NOT NULL,
|
||||
[isAlarmCleared] [BIT] NOT NULL,
|
||||
[isManualExit] [BIT] NOT NULL,
|
||||
[ID_Station_Return] [INT] NULL,
|
||||
[ENTRY_EPD_CLOCK] [NUMERIC](10, 0) NULL,
|
||||
[EXIT_EPD_CLOCK] [NUMERIC](10, 0) NULL,
|
||||
[TIME_LOST] [INT] NULL,
|
||||
[epdID] [INT] NULL,
|
||||
[eDosBatteryWarning] [BIT] NULL,
|
||||
[eDosDose07Warning] [BIT] NULL,
|
||||
[eDosDose07Alarm] [BIT] NULL,
|
||||
[eDosRate07Warning] [BIT] NULL,
|
||||
[eDosRate07Alarm] [BIT] NULL,
|
||||
[eDosDose10Warning] [BIT] NULL,
|
||||
[eDosDose10Alarm] [BIT] NULL,
|
||||
[eDosRate10Warning] [BIT] NULL,
|
||||
[eDosRate10Alarm] [BIT] NULL,
|
||||
CONSTRAINT [PK_compareVisit] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[ID_Station] ASC,
|
||||
[ID_Visit] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY];
|
||||
|
||||
GRANT ALTER,
|
||||
INSERT,
|
||||
UPDATE,
|
||||
DELETE,
|
||||
SELECT
|
||||
ON [syncLoc].[compareVisit]
|
||||
TO [edosStation];
|
||||
END;
|
||||
GO
|
||||
|
||||
IF NOT EXISTS (SELECT
|
||||
*
|
||||
FROM [sys].[columns]
|
||||
WHERE [object_id] = OBJECT_ID('[syncLoc].[compareVisit]')
|
||||
AND [name] = 'eDosBatteryWarning')BEGIN
|
||||
ALTER TABLE [syncLoc].[compareVisit] ADD [eDosBatteryWarning] BIT NULL;
|
||||
|
||||
ALTER TABLE [syncLoc].[compareVisit] ADD [eDosDose07Warning] BIT NULL;
|
||||
|
||||
ALTER TABLE [syncLoc].[compareVisit] ADD [eDosDose07Alarm] BIT NULL;
|
||||
|
||||
ALTER TABLE [syncLoc].[compareVisit] ADD [eDosRate07Warning] BIT NULL;
|
||||
|
||||
ALTER TABLE [syncLoc].[compareVisit] ADD [eDosRate07Alarm] BIT NULL;
|
||||
|
||||
ALTER TABLE [syncLoc].[compareVisit] ADD [eDosDose10Warning] BIT NULL;
|
||||
|
||||
ALTER TABLE [syncLoc].[compareVisit] ADD [eDosDose10Alarm] BIT NULL;
|
||||
|
||||
ALTER TABLE [syncLoc].[compareVisit] ADD [eDosRate10Warning] BIT NULL;
|
||||
|
||||
ALTER TABLE [syncLoc].[compareVisit] ADD [eDosRate10Alarm] BIT NULL;
|
||||
END;
|
||||
GO
|
||||
|
||||
ALTER PROCEDURE [syncLoc].[UpdateRemoteReturns] @ID_LocalStation INT = NULL
|
||||
AS
|
||||
-- Luc 2022-03-25
|
||||
--DECLARE @ID_LocalStation INT = 9;
|
||||
DECLARE @pcnr VARCHAR(20);
|
||||
|
||||
SELECT @pcnr = @@serverName;
|
||||
|
||||
IF @pcnr = 'EDOS-SCH' SET @pcnr = 'EDOS-WSCH';
|
||||
ELSE IF @pcnr = 'DESKTOP-CCDL4A3' SET @pcnr = 'EDOS-LNK';
|
||||
ELSE IF @pcnr = 'EDOS-ZZZ' SET @pcnr = 'EDOS-LSCH';
|
||||
|
||||
IF @ID_LocalStation IS NULL
|
||||
SELECT
|
||||
@ID_LocalStation = [id_station]
|
||||
FROM [dbo].[stationsettings]
|
||||
WHERE [pcnr] = @pcnr;
|
||||
|
||||
SELECT
|
||||
@ID_LocalStation,
|
||||
[pcnr]
|
||||
FROM [dbo].[stationsettings]
|
||||
WHERE [id_station] = @ID_LocalStation;
|
||||
|
||||
TRUNCATE TABLE [syncLoc].[compareVisit];
|
||||
|
||||
INSERT [syncLoc].[compareVisit]([ID_Station], [ID_Visit], [Inst_CODE], [PersID], [ID_Task], [EntryTime], [ReturnTime], [Hp10Dose], [Hp07Dose], [Hp10Total], [Hp07Total], [Hp10Peak], [Hp07Peak], [Hp10Time], [Hp07Time], [ID_EPD], [QualityData], [K1], [K2], [K3], [K4], [K5], [K6], [SG], [BC], [FB], [HG], [alarmStatus], [otherAlarms], [errorStatus], [operatingStatus], [isBG], [isComplete], [isDeleted], [isAlarm], [isAlarmCleared], [isManualExit], [ID_Station_Return], [ENTRY_EPD_CLOCK], [EXIT_EPD_CLOCK], [TIME_LOST], [epdID], [eDosBatteryWarning], [eDosDose07Warning], [eDosDose07Alarm], [eDosRate07Warning], [eDosRate07Alarm], [eDosDose10Warning], [eDosDose10Alarm], [eDosRate10Warning], [eDosRate10Alarm])
|
||||
SELECT
|
||||
[v].[ID_Station],
|
||||
[v].[ID_Visit],
|
||||
[v].[Inst_CODE],
|
||||
[v].[PersID],
|
||||
[v].[ID_Task],
|
||||
[v].[EntryTime],
|
||||
[v].[ReturnTime],
|
||||
[v].[Hp10Dose],
|
||||
[v].[Hp07Dose],
|
||||
[v].[Hp10Total],
|
||||
[v].[Hp07Total],
|
||||
[v].[Hp10Peak],
|
||||
[v].[Hp07Peak],
|
||||
[v].[Hp10Time],
|
||||
[v].[Hp07Time],
|
||||
[v].[ID_EPD],
|
||||
[v].[QualityData],
|
||||
[v].[K1],
|
||||
[v].[K2],
|
||||
[v].[K3],
|
||||
[v].[K4],
|
||||
[v].[K5],
|
||||
[v].[K6],
|
||||
[v].[SG],
|
||||
[v].[BC],
|
||||
[v].[FB],
|
||||
[v].[HG],
|
||||
[v].[alarmStatus],
|
||||
[v].[otherAlarms],
|
||||
[v].[errorStatus],
|
||||
[v].[operatingStatus],
|
||||
[v].[isBG],
|
||||
[v].[isComplete],
|
||||
[v].[isDeleted],
|
||||
[v].[isAlarm],
|
||||
[v].[isAlarmCleared],
|
||||
[v].[isManualExit],
|
||||
[v].[ID_Station_Return],
|
||||
[v].[ENTRY_EPD_CLOCK],
|
||||
[v].[EXIT_EPD_CLOCK],
|
||||
[v].[TIME_LOST],
|
||||
[v].[epdID],
|
||||
[v].[eDosBatteryWarning],
|
||||
[v].[eDosDose07Warning],
|
||||
[v].[eDosDose07Alarm],
|
||||
[v].[eDosRate07Warning],
|
||||
[v].[eDosRate07Alarm],
|
||||
[v].[eDosDose10Warning],
|
||||
[v].[eDosDose10Alarm],
|
||||
[v].[eDosRate10Warning],
|
||||
[v].[eDosRate10Alarm]
|
||||
FROM [EDOS].[edos].[dbo].[visit] [v]
|
||||
INNER JOIN(SELECT
|
||||
[ID_Visit]
|
||||
FROM [dbo].[Visit]
|
||||
WHERE [ID_Station] = @ID_LocalStation
|
||||
AND [ReturnTime] IS NULL) [i] ON [i].[ID_Visit] = [v].[ID_Visit]
|
||||
WHERE [v].[id_station] = @ID_LocalStation
|
||||
AND [v].[returntime] IS NOT NULL;
|
||||
|
||||
UPDATE
|
||||
[dbo].[Visit]
|
||||
SET
|
||||
[ReturnTime] = [c].[ReturnTime],
|
||||
[Hp10Dose] = [c].[Hp10Dose],
|
||||
[Hp07Dose] = [c].[Hp07Dose],
|
||||
[Hp10Total] = [c].[Hp10Total],
|
||||
[Hp07Total] = [c].[Hp07Total],
|
||||
[Hp10Peak] = [c].[Hp10Peak],
|
||||
[Hp07Peak] = [c].[Hp07Peak],
|
||||
[Hp10Time] = [c].[Hp10Time],
|
||||
[Hp07Time] = [c].[Hp07Time],
|
||||
[QualityData] = [c].[QualityData],
|
||||
[K1] = [c].[K1],
|
||||
[K2] = [c].[K2],
|
||||
[K3] = [c].[K3],
|
||||
[K4] = [c].[K4],
|
||||
[K5] = [c].[K5],
|
||||
[K6] = [c].[K6],
|
||||
[SG] = [c].[SG],
|
||||
[BC] = [c].[BC],
|
||||
[FB] = [c].[FB],
|
||||
[HG] = [c].[HG],
|
||||
[alarmStatus] = [c].[alarmStatus],
|
||||
[otherAlarms] = [c].[otherAlarms],
|
||||
[errorStatus] = [c].[errorStatus],
|
||||
[operatingStatus] = [c].[operatingStatus],
|
||||
[isComplete] = [c].[isComplete],
|
||||
[isDeleted] = [c].[isDeleted],
|
||||
[isAlarm] = [c].[isAlarm],
|
||||
[isAlarmCleared] = [c].[isAlarmCleared],
|
||||
[isManualExit] = ISNULL([c].[isManualExit], [v].[isManualExit]),
|
||||
[ID_Station_Return] = ISNULL([c].[ID_Station_Return], [v].[ID_Station_Return]),
|
||||
[EXIT_EPD_CLOCK] = [c].[EXIT_EPD_CLOCK],
|
||||
[eDosBatteryWarning] = CASE WHEN [v].[eDosBatteryWarning] IS NULL
|
||||
OR [c].[eDosBatteryWarning] = 1 THEN [c].[eDosBatteryWarning] ELSE [v].[eDosBatteryWarning] END,
|
||||
[eDosDose07Warning ] = CASE WHEN [v].[eDosDose07Warning ] IS NULL
|
||||
OR [c].[eDosDose07Warning ] = 1 THEN [c].[eDosDose07Warning ] ELSE [v].[eDosDose07Warning ] END,
|
||||
[eDosDose07Alarm] = CASE WHEN [v].[eDosDose07Alarm] IS NULL
|
||||
OR [c].[eDosDose07Alarm] = 1 THEN [c].[eDosDose07Alarm] ELSE [v].[eDosDose07Alarm] END,
|
||||
[eDosRate07Warning] = CASE WHEN [v].[eDosRate07Warning] IS NULL
|
||||
OR [c].[eDosRate07Warning] = 1 THEN [c].[eDosRate07Warning] ELSE [v].[eDosRate07Warning] END,
|
||||
[eDosRate07Alarm] = CASE WHEN [v].[eDosRate07Alarm] IS NULL
|
||||
OR [c].[eDosRate07Alarm] = 1 THEN [c].[eDosRate07Alarm] ELSE [v].[eDosRate07Alarm] END,
|
||||
[eDosDose10Warning] = CASE WHEN [v].[eDosDose10Warning] IS NULL
|
||||
OR [c].[eDosDose10Warning] = 1 THEN [c].[eDosDose10Warning] ELSE [v].[eDosDose10Warning] END,
|
||||
[eDosDose10Alarm] = CASE WHEN [v].[eDosDose10Alarm] IS NULL
|
||||
OR [c].[eDosDose10Alarm] = 1 THEN [c].[eDosDose10Alarm] ELSE [v].[eDosDose10Alarm] END,
|
||||
[eDosRate10Warning] = CASE WHEN [v].[eDosRate10Warning] IS NULL
|
||||
OR [c].[eDosRate10Warning] = 1 THEN [c].[eDosRate10Warning] ELSE [v].[eDosRate10Warning] END,
|
||||
[eDosRate10Alarm] = CASE WHEN [v].[eDosRate10Alarm] IS NULL
|
||||
OR [c].[eDosRate10Alarm] = 1 THEN [c].[eDosRate10Alarm] ELSE [v].[eDosRate10Alarm] END
|
||||
FROM [dbo].[Visit] [v]
|
||||
INNER JOIN [syncLoc].[compareVisit] [c] ON [c].[ID_Station] = [v].[ID_Station]
|
||||
AND [c].[ID_Visit] = [v].[ID_Visit]
|
||||
WHERE [v].[ReturnTime] IS NULL
|
||||
AND [v].[isComplete] = 0;
|
||||
GO
|
||||
GRANT EXECUTE ON [syncLoc].[UpdateRemoteReturns] TO [eDosStation];
|
||||
GO
|
||||
|
|
|
|||
|
|
@ -1,466 +1,463 @@
|
|||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace eDosStation
|
||||
{
|
||||
public class DataInterface
|
||||
{
|
||||
public int ID_Station;
|
||||
public bool isLocal = false;
|
||||
private string currentConStr, ConCentralStr;
|
||||
public System.IO.StreamWriter stationLog;
|
||||
|
||||
public SqlConnection localConnection, centralConnection;
|
||||
public System.Data.SqlClient.SqlCommand VisitInitCommand;
|
||||
public static SqlCommand VisitExitCommand;
|
||||
public static SqlCommand NextIDCommand;
|
||||
public static SqlCommand LastIDCommand;
|
||||
public static SqlCommand CheckStatus;
|
||||
public DataSet1.CommentOnEventDataTable dtCOE;
|
||||
private bool CheckUser;
|
||||
|
||||
public static string tnow()
|
||||
{
|
||||
return DateTime.Now.ToString("HH:mm:ss.fff");
|
||||
}
|
||||
public static int? NextID()
|
||||
{
|
||||
int? nxtValue = null;
|
||||
if (NextIDCommand.Connection.State == ConnectionState.Closed) NextIDCommand.Connection.Open();
|
||||
nxtValue = NextIDCommand.ExecuteScalar() as int?;
|
||||
return nxtValue;
|
||||
}
|
||||
public static int? LastID()
|
||||
{
|
||||
int? lastValue = null;
|
||||
if (NextIDCommand.Connection.State == ConnectionState.Closed) LastIDCommand.Connection.Open();
|
||||
lastValue = LastIDCommand.ExecuteScalar() as int?;
|
||||
return lastValue;
|
||||
}
|
||||
/// <summary>
|
||||
/// Check connenction. If closed then open oand optianly leave open.
|
||||
/// </summary>
|
||||
/// <param name="leaveOpen">If opened leave it open</param>
|
||||
/// <returns>true if connection ok</returns>
|
||||
public bool checkCon(bool leaveOpen = false)
|
||||
{
|
||||
bool rv = false;
|
||||
if (localConnection != null && localConnection.State == System.Data.ConnectionState.Open) return true;
|
||||
try
|
||||
{
|
||||
if (localConnection == null || string.IsNullOrEmpty(localConnection.ConnectionString)) localConnection = new SqlConnection(currentConStr);
|
||||
localConnection.Open();
|
||||
rv = true;
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
System.Windows.MessageBox.Show($"Opening '{currentConStr}' error :{ex.Message}");
|
||||
}
|
||||
if (rv && !leaveOpen) localConnection?.Close();
|
||||
return rv;
|
||||
}
|
||||
public bool checkConCentral(bool leaveOpen = false)
|
||||
{
|
||||
bool rv = false;
|
||||
|
||||
if (centralConnection != null && centralConnection.State == System.Data.ConnectionState.Open) return true;
|
||||
try
|
||||
{
|
||||
if (centralConnection == null || string.IsNullOrEmpty(centralConnection.ConnectionString)) centralConnection = new SqlConnection(ConCentralStr);
|
||||
centralConnection.Open();
|
||||
rv = true;
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
System.Windows.MessageBox.Show($"Opening '{ConCentralStr}' error :{ex.Message}");
|
||||
}
|
||||
if (rv && !leaveOpen) centralConnection?.Close();
|
||||
return rv;
|
||||
}
|
||||
internal void SetStation(int curIDStation)
|
||||
{
|
||||
ID_Station = curIDStation;
|
||||
LastIDCommand.Parameters["ID_Station"].Value = curIDStation;
|
||||
VisitInitCommand.Parameters["ID_Station"].Value = curIDStation;
|
||||
CheckStatus.Parameters["ID_Station"].Value = curIDStation;
|
||||
}
|
||||
public bool isOnline()
|
||||
{
|
||||
bool? online = false;
|
||||
if (checkCon(true))
|
||||
{
|
||||
online = CheckStatus.ExecuteScalar() as bool?;
|
||||
if (!online.HasValue) online = false;
|
||||
}
|
||||
isLocal = !online.Value;
|
||||
return online.Value;
|
||||
}
|
||||
static public void first()
|
||||
{
|
||||
var cb = new System.Data.SqlClient.SqlConnectionStringBuilder(Properties.Settings.Default.localConnectionString);
|
||||
if (string.IsNullOrEmpty(cb.Password))
|
||||
{
|
||||
var f = new AskPwd();
|
||||
f.ShowDialog();
|
||||
string pwd = f.ResponseText;
|
||||
string cfg = System.IO.Path.Combine(Environment.CurrentDirectory, System.AppDomain.CurrentDomain.FriendlyName);
|
||||
Config.ToggleConfigEncryption(cfg, pwd);
|
||||
System.Windows.Application.Current.Shutdown();
|
||||
}
|
||||
}
|
||||
private void init()
|
||||
{
|
||||
stationLog?.WriteLine($"Datainterface.Init start {tnow()}");
|
||||
try
|
||||
{
|
||||
var flog = System.Configuration.ConfigurationManager.AppSettings["sqlLogFolder"];
|
||||
if (System.IO.Directory.Exists(flog))
|
||||
{
|
||||
string fn = System.IO.Path.Combine(flog, "station.log");
|
||||
if (System.IO.File.Exists(fn))
|
||||
{
|
||||
stationLog = new System.IO.StreamWriter(fn, false, System.Text.Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
|
||||
first();
|
||||
currentConStr = System.Configuration.ConfigurationManager.ConnectionStrings["eDosStation.Properties.Settings.localConnectionString"].ConnectionString;
|
||||
ConCentralStr = System.Configuration.ConfigurationManager.ConnectionStrings["eDosConnectionString"].ConnectionString;
|
||||
localConnection = new SqlConnection(currentConStr);
|
||||
NextIDCommand = new SqlCommand("SELECT NEXT VALUE FOR VisitSequence as VisitID", localConnection);
|
||||
isLocal = true;
|
||||
MakeCommands();
|
||||
bool rv = checkCon(false);
|
||||
} catch (Exception ex)
|
||||
{
|
||||
System.Windows.MessageBox.Show($"Init error {ex.Message} con={currentConStr}");
|
||||
stationLog.WriteLine($"Init error {ex.Message} con={currentConStr}");
|
||||
}
|
||||
stationLog?.WriteLine($"Datainterface.Init end {tnow()}");
|
||||
}
|
||||
public DataInterface( )
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
// DataSet1TableAdapters.GetTaskInfoTableAdapter TaskInfoTa()
|
||||
//{
|
||||
// return new DataSet1TableAdapters.GetTaskInfoTableAdapter();
|
||||
// //var ta = DataSet1TableAdapters.GetTaskInfoTableAdapter();
|
||||
// //if (ta.Connection.ConnectionString!= currentConStr) ta.Connection.ConnectionString = currentConStr;
|
||||
// //return
|
||||
//}
|
||||
|
||||
// DataSet1TableAdapters.GetTaskListTableAdapter TaskListTA()
|
||||
//{
|
||||
// return new DataSet1TableAdapters.GetTaskListTableAdapter();
|
||||
// //ta.Connection.ConnectionString = currentConStr;
|
||||
// //return ta;
|
||||
//}
|
||||
|
||||
internal void SetCheckUser(bool pCheckUser)
|
||||
{
|
||||
this.CheckUser = pCheckUser;
|
||||
}
|
||||
|
||||
//DataSet1TableAdapters.CommentOnEventTableAdapter CommentTA()
|
||||
//{
|
||||
// var ta = new DataSet1TableAdapters.CommentOnEventTableAdapter();
|
||||
// ta.Connection.ConnectionString = currentConStr;
|
||||
// return ta;
|
||||
//}
|
||||
|
||||
public System.Data.SqlClient.SqlConnection getCon(bool LeaveOpen)
|
||||
{
|
||||
checkCon(LeaveOpen);
|
||||
return localConnection;
|
||||
}
|
||||
|
||||
public System.Data.SqlClient.SqlConnection getConCentral(bool LeaveOpen)
|
||||
{
|
||||
checkConCentral(LeaveOpen);
|
||||
return centralConnection;
|
||||
}
|
||||
|
||||
void MakeCommands()
|
||||
{
|
||||
LastIDCommand = new SqlCommand("VisitIDLast", localConnection);
|
||||
LastIDCommand.CommandType = CommandType.StoredProcedure;
|
||||
var pa = new System.Data.SqlClient.SqlParameter("ID_Station", SqlDbType.Int, 4); LastIDCommand.Parameters.Add(pa);
|
||||
|
||||
CheckStatus = new SqlCommand("[syncLoc].[SyncStatusIsOK]", localConnection);
|
||||
CheckStatus.CommandType = CommandType.StoredProcedure;
|
||||
pa = new System.Data.SqlClient.SqlParameter("ID_Station", SqlDbType.Int, 4); CheckStatus.Parameters.Add(pa);
|
||||
|
||||
VisitInitCommand = new System.Data.SqlClient.SqlCommand("[dbo].[VisitInit]", localConnection) { CommandType = System.Data.CommandType.StoredProcedure };
|
||||
VisitInitCommand.Parameters.AddRange(new System.Data.SqlClient.SqlParameter[] {
|
||||
new System.Data.SqlClient.SqlParameter("PersID",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("ID_Task",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("Inst_CODE",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("EPD_InternalID",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("isBG",SqlDbType.Bit,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("EPDVisitID",SqlDbType.Int,0,System.Data.ParameterDirection.Output,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("ID_Station",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("ID_Visit",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("ENTRY_EPD_CLOCK",SqlDbType.Decimal,0,System.Data.ParameterDirection.Input,false,10,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("epdType",SqlDbType.TinyInt,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
});
|
||||
|
||||
//VisitExitCommand = new SqlCommand("VisitExit", localConnection);
|
||||
//VisitExitCommand.CommandType = CommandType.StoredProcedure;
|
||||
//pa = new System.Data.SqlClient.SqlParameter("EPDVisitID", SqlDbType.Int, 4); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("HP07", SqlDbType.Float); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("HP10", SqlDbType.Float); VisitExitCommand.Parameters.Add(pa);
|
||||
|
||||
//pa = new System.Data.SqlClient.SqlParameter("Hp07Total", SqlDbType.Float); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("Hp10Total", SqlDbType.Float); VisitExitCommand.Parameters.Add(pa);
|
||||
|
||||
//pa = new System.Data.SqlClient.SqlParameter("Hp07Peak", SqlDbType.Float); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("Hp10Peak", SqlDbType.Float); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("HP07PeakTime", SqlDbType.DateTime); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("HP10PeakTime", SqlDbType.DateTime); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("K1", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("K2", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("K3", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("K4", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("K5", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("K6", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("SG", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("BC", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("FB", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("HG", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||
|
||||
//pa = new System.Data.SqlClient.SqlParameter("QualityData", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||
|
||||
//pa = new System.Data.SqlClient.SqlParameter("alarmStatus", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("otherAlarms", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("errorStatus", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("operatingStatus", SqlDbType.Int); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("ENTRY_EPD_CLOCK", SqlDbType.Decimal, 9); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("EXIT_EPD_CLOCK", SqlDbType.Decimal, 9); VisitExitCommand.Parameters.Add(pa);
|
||||
//pa = new System.Data.SqlClient.SqlParameter("PersID", SqlDbType.Int, 4); VisitExitCommand.Parameters.Add(pa);
|
||||
|
||||
VisitExitCommand = new System.Data.SqlClient.SqlCommand("[dbo].[VisitExit]", localConnection) { CommandType = System.Data.CommandType.StoredProcedure };
|
||||
VisitExitCommand.Parameters.AddRange(new System.Data.SqlClient.SqlParameter[] {
|
||||
new System.Data.SqlClient.SqlParameter("EPDVisitID",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("HP07",SqlDbType.Float,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("HP10",SqlDbType.Float,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("HP07Peak",SqlDbType.Float,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("HP10Peak",SqlDbType.Float,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("HP07PeakTime",SqlDbType.DateTime,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("HP10PeakTime",SqlDbType.DateTime,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("HP07Total",SqlDbType.Float,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("HP10Total",SqlDbType.Float,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("K1",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("K2",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("K3",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("K4",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("K5",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("K6",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("SG",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("BC",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("FB",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("HG",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("QualityData",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("alarmStatus",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("otherAlarms",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("errorStatus",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("operatingStatus",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("ENTRY_EPD_CLOCK",SqlDbType.Decimal,0,System.Data.ParameterDirection.Input,false,10,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("EXIT_EPD_CLOCK",SqlDbType.Decimal,0,System.Data.ParameterDirection.Input,false,10,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("PersID",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("eDosBatteryWarning",SqlDbType.Bit,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("eDosDose07Warning",SqlDbType.Bit,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("eDosDose07Alarm",SqlDbType.Bit,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("eDosRate07Warning",SqlDbType.Bit,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("eDosRate07Alarm",SqlDbType.Bit,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("eDosDose10Warning",SqlDbType.Bit,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("eDosDose10Alarm",SqlDbType.Bit,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("eDosRate10Warning",SqlDbType.Bit,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("eDosRate10Alarm",SqlDbType.Bit,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
});
|
||||
}
|
||||
|
||||
public bool SetBoolParam(SqlCommand c, string pa, bool value)
|
||||
{
|
||||
bool found = true;
|
||||
if (c.Parameters.Contains(pa)) c.Parameters[pa].Value = value;
|
||||
else
|
||||
{
|
||||
if (pa[0] != '@') pa = "@" + pa; else pa = pa.Substring(1);
|
||||
if (c.Parameters.Contains(pa)) c.Parameters[pa].Value = value;
|
||||
else found = false;
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
public void VisitExit(int EpdVisitID, EpdBaseClr.Epd2 ep)
|
||||
{
|
||||
VisitExitCommand.Parameters["EPDVisitID"].Value = EpdVisitID;
|
||||
VisitExitCommand.Parameters["HP07"].Value = ep.Hp07;
|
||||
VisitExitCommand.Parameters["HP10"].Value = ep.Hp10;
|
||||
|
||||
VisitExitCommand.Parameters["Hp07Total"].Value = ep.Hp07Total;
|
||||
VisitExitCommand.Parameters["Hp10Total"].Value = ep.Hp10Total;
|
||||
|
||||
VisitExitCommand.Parameters["Hp07Peak"].Value = ep.Hp07Peak;
|
||||
VisitExitCommand.Parameters["Hp10Peak"].Value = ep.Hp10Peak;
|
||||
if (ep.Hp07PeakTime != null)
|
||||
VisitExitCommand.Parameters["HP07PeakTime"].Value = ep.Hp07PeakTime;
|
||||
else
|
||||
VisitExitCommand.Parameters["HP07PeakTime"].Value = DBNull.Value;
|
||||
if (ep.Hp10PeakTime != null)
|
||||
VisitExitCommand.Parameters["Hp10PeakTime"].Value = ep.Hp07PeakTime;
|
||||
else
|
||||
VisitExitCommand.Parameters["Hp10PeakTime"].Value = DBNull.Value;
|
||||
|
||||
VisitExitCommand.Parameters["K1"].Value = ep.K1;
|
||||
VisitExitCommand.Parameters["K2"].Value = ep.K2;
|
||||
VisitExitCommand.Parameters["K3"].Value = ep.K3;
|
||||
VisitExitCommand.Parameters["K4"].Value = ep.K4;
|
||||
VisitExitCommand.Parameters["K5"].Value = ep.K5;
|
||||
VisitExitCommand.Parameters["K6"].Value = ep.K6;
|
||||
VisitExitCommand.Parameters["SG"].Value = ep.SG;
|
||||
VisitExitCommand.Parameters["BC"].Value = ep.BC;
|
||||
VisitExitCommand.Parameters["FB"].Value = ep.FB;
|
||||
VisitExitCommand.Parameters["HG"].Value = ep.HG;
|
||||
|
||||
VisitExitCommand.Parameters["QualityData"].Value = ep.QualityData;
|
||||
|
||||
//VisitExitCommand.Parameters["D1"].Value = ep.D1;
|
||||
//VisitExitCommand.Parameters["D2"].Value = ep.D2;
|
||||
//VisitExitCommand.Parameters["D3"].Value = ep.D3;
|
||||
//VisitExitCommand.Parameters["D4"].Value = ep.D4;
|
||||
|
||||
VisitExitCommand.Parameters["alarmStatus"].Value = ep.alarmStatus;
|
||||
VisitExitCommand.Parameters["otherAlarms"].Value = ep.otherAlarms;
|
||||
VisitExitCommand.Parameters["errorStatus"].Value = ep.errorStatus;
|
||||
VisitExitCommand.Parameters["operatingStatus"].Value = ep.operatingStatus;
|
||||
VisitExitCommand.Parameters["ENTRY_EPD_CLOCK"].Value = ep.CountsClockBase;
|
||||
VisitExitCommand.Parameters["EXIT_EPD_CLOCK"].Value = ep.CountsClock;
|
||||
|
||||
if (int.TryParse(ep.WearerName, out int WearerPersID))
|
||||
VisitExitCommand.Parameters["PersID"].Value = WearerPersID;
|
||||
else
|
||||
VisitExitCommand.Parameters["PersID"].Value = DBNull.Value;
|
||||
|
||||
SetBoolParam(VisitExitCommand,"eDosBatteryWarning",ep.eDosBatteryWarning);
|
||||
SetBoolParam(VisitExitCommand, "eDosDose07Warning", ep.eDosDose07Warning);
|
||||
SetBoolParam(VisitExitCommand, "eDosDose07Alarm", ep.eDosDose07Alarm);
|
||||
SetBoolParam(VisitExitCommand, "eDosRate07Warning", ep.eDosRate07Warning);
|
||||
SetBoolParam(VisitExitCommand, "eDosRate07Alarm", ep.eDosRate07Alarm);
|
||||
SetBoolParam(VisitExitCommand, "eDosDose10Warning", ep.eDosDose10Warning);
|
||||
SetBoolParam(VisitExitCommand, "eDosDose10Alarm", ep.eDosDose10Alarm);
|
||||
SetBoolParam(VisitExitCommand, "eDosRate10Warning", ep.eDosRate10Warning);
|
||||
SetBoolParam(VisitExitCommand, "eDosRate10Alarm", ep.eDosRate10Alarm);
|
||||
|
||||
checkCon(true);
|
||||
VisitExitCommand.Connection = localConnection;
|
||||
VisitExitCommand.ExecuteNonQuery();
|
||||
localConnection.Close();
|
||||
}
|
||||
|
||||
public void FillComment()
|
||||
{
|
||||
if (dtCOE == null) dtCOE = new DataSet1.CommentOnEventDataTable();
|
||||
using (var dt = new DataSet1TableAdapters.CommentOnEventTableAdapter())
|
||||
{
|
||||
dt.Fill(dtCOE);
|
||||
}
|
||||
}
|
||||
|
||||
public DataSet1.CommentOnEventRow GetCommentOnEventRow(int id)
|
||||
{
|
||||
return dtCOE.FindByID_CommnentOnEvent(id);
|
||||
}
|
||||
|
||||
public void FillTaskInfo(User _User, DataSet1 dataSet1)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var dataSet1GetTaskInfoTableAdapter = new DataSet1TableAdapters.GetTaskInfoTableAdapter()) // new eDosStation.DataSet1TableAdapters.GetTaskInfoTableAdapter())
|
||||
{
|
||||
//dataSet1GetTaskInfoTableAdapter.Connection.ConnectionString = currentConStr;
|
||||
stationLog?.WriteLine($"dataSet1GetTaskInfoTableAdapter Fillin {System.DateTime.Now}");
|
||||
dataSet1GetTaskInfoTableAdapter.Fill(dataSet1.GetTaskInfo, null, _User.Margin);
|
||||
stationLog?.WriteLine($"dataSet1GetTaskInfoTableAdapter Filled {System.DateTime.Now}");
|
||||
}
|
||||
}
|
||||
catch (System.Exception ex) {
|
||||
if (stationLog != null) stationLog.WriteLine($"FillTaskInfo error {ex.Message} {System.DateTime.Now}");
|
||||
}
|
||||
}
|
||||
|
||||
public User GetUser( string CSN, string Code, bool isEntry)
|
||||
{
|
||||
User u = new User();
|
||||
//object[] Values = null;
|
||||
try
|
||||
{
|
||||
using (var cmd = new SqlCommand("GetPersonInfo", localConnection) { CommandType = System.Data.CommandType.StoredProcedure } )
|
||||
{
|
||||
if (int.TryParse(Code, out int PersID)) cmd.Parameters.AddWithValue("PersID", PersID);
|
||||
if (!string.IsNullOrEmpty(CSN)) cmd.Parameters.AddWithValue("csn", CSN);
|
||||
else cmd.Parameters.AddWithValue("csn", DBNull.Value);
|
||||
checkCon(true);
|
||||
var rs = cmd.ExecuteReader(System.Data.CommandBehavior.SingleRow);
|
||||
using (var tb = new DataTable())
|
||||
{
|
||||
tb.Load(rs);
|
||||
if (tb.Rows.Count > 0)
|
||||
{
|
||||
DataRow dr = tb.Rows[0];
|
||||
//Values = new object[rs.FieldCount];
|
||||
//int rv = rs.GetValues(Values);
|
||||
u.PersID = (int)dr["PersID"];
|
||||
u.LastName = dr["LastName"].ToString();
|
||||
u.FirstName = dr["FirstName"].ToString();
|
||||
//u.conCode = Values[rs.GetOrdinal("conCode")].ToString();
|
||||
u.Language = dr["Language"].ToString();
|
||||
u.AccessAllow = dr["AccessAllow"] as bool?;
|
||||
decimal? m = dr["Margin"] as decimal?;
|
||||
if (m.HasValue) u.Margin = (double)m.Value; else u.Margin = null;
|
||||
//u.Margin = (double ?)Values[rs.GetOrdinal("Margin")] ;
|
||||
u.VisitIDLocked = dr["VisitIDLocked"] as int?;
|
||||
u.ReasonNoAccess = dr["ReasonNoAccess"].ToString().Replace("\\n", "\n");
|
||||
u.UserComment = dr["Comment"].ToString();
|
||||
|
||||
if (isEntry && tb.Columns.Contains("hasEPD"))
|
||||
{
|
||||
u.hasEPD = (bool)dr["hasEPD"];
|
||||
if (u.hasEPD) u.ReasonNoAccess = "You have an EPD in use"; //!!! not for return !!!!
|
||||
}
|
||||
else u.hasEPD = false;
|
||||
u.activeVisit = dr["activeVisit"] as int?;
|
||||
u.AllOk = ( !CheckUser || (u.AccessAllow == true && u.VisitIDLocked == 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not found
|
||||
u.PersID = 0;
|
||||
u.LastName = "Not Found";
|
||||
u.FirstName = "Not Found";
|
||||
//u.conCode = "A1";
|
||||
u.Language = "N";
|
||||
u.AccessAllow = false;
|
||||
u.Margin = 0;
|
||||
u.VisitIDLocked = 0;
|
||||
u.ReasonNoAccess = "Not found";
|
||||
u.UserComment = string.Empty;
|
||||
u.hasEPD = false;
|
||||
u.AllOk = !CheckUser || (u.AccessAllow == true && u.VisitIDLocked == 0);
|
||||
}
|
||||
rs.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
if (stationLog != null) stationLog.WriteLine($"GetUser error {ex.Message} {System.DateTime.Now.ToString("HH:mm:ss:nnn")}");
|
||||
|
||||
}
|
||||
return u;
|
||||
}
|
||||
}
|
||||
}
|
||||
using LSWLib;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace eDosStation
|
||||
{
|
||||
public class DataInterface
|
||||
{
|
||||
const string moduleName = "DataInterface";
|
||||
public int ID_Station;
|
||||
public bool isLocal = false;
|
||||
private string currentConStr, ConCentralStr;
|
||||
public System.IO.StreamWriter stationLog;
|
||||
|
||||
public SqlConnection localConnection, centralConnection;
|
||||
internal CLog splunkLog;
|
||||
public System.Data.SqlClient.SqlCommand VisitInitCommand;
|
||||
public static SqlCommand VisitExitCommand;
|
||||
public static SqlCommand NextIDCommand;
|
||||
public static SqlCommand LastIDCommand;
|
||||
public static SqlCommand CheckStatus;
|
||||
public DataSet1.CommentOnEventDataTable dtCOE;
|
||||
private bool CheckUser,AllowMultipleEPD;
|
||||
private SqlCommand ReverseSyncCommand;
|
||||
|
||||
public static string tnow()
|
||||
{
|
||||
return DateTime.Now.ToString("HH:mm:ss.fff");
|
||||
}
|
||||
public static int? NextID()
|
||||
{
|
||||
int? nxtValue = null;
|
||||
if (NextIDCommand.Connection.State == ConnectionState.Closed) NextIDCommand.Connection.Open();
|
||||
nxtValue = NextIDCommand.ExecuteScalar() as int?;
|
||||
return nxtValue;
|
||||
}
|
||||
public static int? LastID()
|
||||
{
|
||||
int? lastValue = null;
|
||||
if (NextIDCommand.Connection.State == ConnectionState.Closed) LastIDCommand.Connection.Open();
|
||||
lastValue = LastIDCommand.ExecuteScalar() as int?;
|
||||
return lastValue;
|
||||
}
|
||||
/// <summary>
|
||||
/// Check connenction. If closed then open oand optianly leave open.
|
||||
/// </summary>
|
||||
/// <param name="leaveOpen">If opened leave it open</param>
|
||||
/// <returns>true if connection ok</returns>
|
||||
public bool checkCon(bool leaveOpen = false)
|
||||
{
|
||||
bool rv = false;
|
||||
if (localConnection != null && localConnection.State == System.Data.ConnectionState.Open) return true;
|
||||
try
|
||||
{
|
||||
if (localConnection == null || string.IsNullOrEmpty(localConnection.ConnectionString)) localConnection = new SqlConnection(currentConStr);
|
||||
localConnection.Open();
|
||||
rv = true;
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
System.Windows.MessageBox.Show($"Opening '{currentConStr}' error :{ex.Message}");
|
||||
}
|
||||
if (rv && !leaveOpen) localConnection?.Close();
|
||||
return rv;
|
||||
}
|
||||
public bool checkConCentral(bool leaveOpen = false)
|
||||
{
|
||||
bool rv = false;
|
||||
|
||||
if (centralConnection != null && centralConnection.State == System.Data.ConnectionState.Open) return true;
|
||||
try
|
||||
{
|
||||
if (centralConnection == null || string.IsNullOrEmpty(centralConnection.ConnectionString)) centralConnection = new SqlConnection(ConCentralStr);
|
||||
centralConnection.Open();
|
||||
rv = true;
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
System.Windows.MessageBox.Show($"Opening '{ConCentralStr}' error :{ex.Message}");
|
||||
}
|
||||
if (rv && !leaveOpen) centralConnection?.Close();
|
||||
return rv;
|
||||
}
|
||||
internal void SetStation(int curIDStation)
|
||||
{
|
||||
ID_Station = curIDStation;
|
||||
LastIDCommand.Parameters["ID_Station"].Value = curIDStation;
|
||||
VisitInitCommand.Parameters["ID_Station"].Value = curIDStation;
|
||||
CheckStatus.Parameters["ID_Station"].Value = curIDStation;
|
||||
}
|
||||
public bool isOnline()
|
||||
{
|
||||
bool? online = false;
|
||||
if (checkCon(true))
|
||||
{
|
||||
online = CheckStatus.ExecuteScalar() as bool?;
|
||||
if (!online.HasValue) online = false;
|
||||
}
|
||||
isLocal = !online.Value;
|
||||
return online.Value;
|
||||
}
|
||||
static public void first()
|
||||
{
|
||||
var cb = new System.Data.SqlClient.SqlConnectionStringBuilder(Properties.Settings.Default.localConnectionString);
|
||||
if (string.IsNullOrEmpty(cb.Password))
|
||||
{
|
||||
var f = new AskPwd();
|
||||
f.ShowDialog();
|
||||
string pwd = f.ResponseText;
|
||||
string cfg = System.IO.Path.Combine(Environment.CurrentDirectory, System.AppDomain.CurrentDomain.FriendlyName);
|
||||
Config.ToggleConfigEncryption(cfg, pwd);
|
||||
System.Windows.Application.Current.Shutdown();
|
||||
}
|
||||
}
|
||||
private void init()
|
||||
{
|
||||
const string taskName = "init";
|
||||
stationLog?.WriteLine($"{moduleName}.{taskName }start {tnow()}");
|
||||
try
|
||||
{
|
||||
var flog = System.Configuration.ConfigurationManager.AppSettings["sqlLogFolder"];
|
||||
if (System.IO.Directory.Exists(flog))
|
||||
{
|
||||
string fn = System.IO.Path.Combine(flog, "station.log");
|
||||
if (System.IO.File.Exists(fn))
|
||||
{
|
||||
stationLog = new System.IO.StreamWriter(fn, false, System.Text.Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
|
||||
first();
|
||||
currentConStr = System.Configuration.ConfigurationManager.ConnectionStrings["eDosStation.Properties.Settings.localConnectionString"].ConnectionString;
|
||||
ConCentralStr = System.Configuration.ConfigurationManager.ConnectionStrings["eDosConnectionString"].ConnectionString;
|
||||
localConnection = new SqlConnection(currentConStr);
|
||||
NextIDCommand = new SqlCommand("SELECT NEXT VALUE FOR VisitSequence as VisitID", localConnection);
|
||||
isLocal = true;
|
||||
MakeCommands();
|
||||
bool rv = checkCon(false);
|
||||
} catch (Exception ex)
|
||||
{
|
||||
splunkLog?.WriteException(moduleName, taskName, ex);
|
||||
System.Windows.MessageBox.Show($"Init error {ex.Message} con={currentConStr}");
|
||||
stationLog.WriteLine($"Init error {ex.Message} con={currentConStr}");
|
||||
}
|
||||
stationLog?.WriteLine($"Datainterface.Init end {tnow()}");
|
||||
}
|
||||
public DataInterface( )
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
// DataSet1TableAdapters.GetTaskInfoTableAdapter TaskInfoTa()
|
||||
//{
|
||||
// return new DataSet1TableAdapters.GetTaskInfoTableAdapter();
|
||||
// //var ta = DataSet1TableAdapters.GetTaskInfoTableAdapter();
|
||||
// //if (ta.Connection.ConnectionString!= currentConStr) ta.Connection.ConnectionString = currentConStr;
|
||||
// //return
|
||||
//}
|
||||
|
||||
// DataSet1TableAdapters.GetTaskListTableAdapter TaskListTA()
|
||||
//{
|
||||
// return new DataSet1TableAdapters.GetTaskListTableAdapter();
|
||||
// //ta.Connection.ConnectionString = currentConStr;
|
||||
// //return ta;
|
||||
//}
|
||||
|
||||
internal void SetCheckUser(bool pCheckUser)
|
||||
{
|
||||
this.CheckUser = pCheckUser;
|
||||
}
|
||||
|
||||
internal void SetAllowMultipleEPD(bool pAllowMultipleEPD)
|
||||
{
|
||||
this.AllowMultipleEPD = pAllowMultipleEPD;
|
||||
}
|
||||
//DataSet1TableAdapters.CommentOnEventTableAdapter CommentTA()
|
||||
//{
|
||||
// var ta = new DataSet1TableAdapters.CommentOnEventTableAdapter();
|
||||
// ta.Connection.ConnectionString = currentConStr;
|
||||
// return ta;
|
||||
//}
|
||||
|
||||
public System.Data.SqlClient.SqlConnection getCon(bool LeaveOpen)
|
||||
{
|
||||
checkCon(LeaveOpen);
|
||||
return localConnection;
|
||||
}
|
||||
|
||||
public System.Data.SqlClient.SqlConnection getConCentral(bool LeaveOpen)
|
||||
{
|
||||
checkConCentral(LeaveOpen);
|
||||
return centralConnection;
|
||||
}
|
||||
|
||||
void MakeCommands()
|
||||
{
|
||||
LastIDCommand = new SqlCommand("VisitIDLast", localConnection);
|
||||
LastIDCommand.CommandType = CommandType.StoredProcedure;
|
||||
var pa = new System.Data.SqlClient.SqlParameter("ID_Station", SqlDbType.Int, 4); LastIDCommand.Parameters.Add(pa);
|
||||
|
||||
CheckStatus = new SqlCommand("[syncLoc].[SyncStatusIsOK]", localConnection);
|
||||
CheckStatus.CommandType = CommandType.StoredProcedure;
|
||||
pa = new System.Data.SqlClient.SqlParameter("ID_Station", SqlDbType.Int, 4); CheckStatus.Parameters.Add(pa);
|
||||
|
||||
VisitInitCommand = new System.Data.SqlClient.SqlCommand("[dbo].[VisitInit]", localConnection) { CommandType = System.Data.CommandType.StoredProcedure };
|
||||
VisitInitCommand.Parameters.AddRange(new System.Data.SqlClient.SqlParameter[] {
|
||||
new System.Data.SqlClient.SqlParameter("PersID",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("ID_Task",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("Inst_CODE",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("EPD_InternalID",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("isBG",SqlDbType.Bit,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("EPDVisitID",SqlDbType.Int,0,System.Data.ParameterDirection.Output,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("ID_Station",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("ID_Visit",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("ENTRY_EPD_CLOCK",SqlDbType.Decimal,0,System.Data.ParameterDirection.Input,false,10,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("epdType",SqlDbType.TinyInt,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
});
|
||||
|
||||
VisitExitCommand = new System.Data.SqlClient.SqlCommand("[dbo].[VisitExit]", localConnection) { CommandType = System.Data.CommandType.StoredProcedure };
|
||||
VisitExitCommand.Parameters.AddRange(new System.Data.SqlClient.SqlParameter[] {
|
||||
new System.Data.SqlClient.SqlParameter("EPDVisitID",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("HP07",SqlDbType.Float,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("HP10",SqlDbType.Float,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("HP07Peak",SqlDbType.Float,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("HP10Peak",SqlDbType.Float,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("HP07PeakTime",SqlDbType.DateTime,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("HP10PeakTime",SqlDbType.DateTime,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("HP07Total",SqlDbType.Float,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("HP10Total",SqlDbType.Float,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("K1",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("K2",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("K3",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("K4",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("K5",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("K6",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("SG",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("BC",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("FB",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("HG",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("QualityData",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("alarmStatus",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("otherAlarms",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("errorStatus",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("operatingStatus",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("ENTRY_EPD_CLOCK",SqlDbType.Decimal,0,System.Data.ParameterDirection.Input,false,10,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("EXIT_EPD_CLOCK",SqlDbType.Decimal,0,System.Data.ParameterDirection.Input,false,10,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("PersID",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("eDosBatteryWarning",SqlDbType.Bit,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("eDosDose07Warning",SqlDbType.Bit,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("eDosDose07Alarm",SqlDbType.Bit,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("eDosRate07Warning",SqlDbType.Bit,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("eDosRate07Alarm",SqlDbType.Bit,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("eDosDose10Warning",SqlDbType.Bit,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("eDosDose10Alarm",SqlDbType.Bit,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("eDosRate10Warning",SqlDbType.Bit,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
, new System.Data.SqlClient.SqlParameter("eDosRate10Alarm",SqlDbType.Bit,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
});
|
||||
|
||||
ReverseSyncCommand = new System.Data.SqlClient.SqlCommand("syncLoc.UpdateRemoteReturns", localConnection) { CommandType = System.Data.CommandType.StoredProcedure };
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void VisitExit(int EpdVisitID, EpdBaseClr.Epd2 ep)
|
||||
{
|
||||
const string taskName = "VisitExit";
|
||||
VisitExitCommand.Parameters["EPDVisitID"].Value = EpdVisitID;
|
||||
VisitExitCommand.Parameters["HP07"].Value = ep.Hp07;
|
||||
VisitExitCommand.Parameters["HP10"].Value = ep.Hp10;
|
||||
|
||||
VisitExitCommand.Parameters["Hp07Total"].Value = ep.Hp07Total;
|
||||
VisitExitCommand.Parameters["Hp10Total"].Value = ep.Hp10Total;
|
||||
|
||||
VisitExitCommand.Parameters["Hp07Peak"].Value = ep.Hp07Peak;
|
||||
VisitExitCommand.Parameters["Hp10Peak"].Value = ep.Hp10Peak;
|
||||
if (ep.Hp07PeakTime != null)
|
||||
VisitExitCommand.Parameters["HP07PeakTime"].Value = ep.Hp07PeakTime;
|
||||
else
|
||||
VisitExitCommand.Parameters["HP07PeakTime"].Value = DBNull.Value;
|
||||
if (ep.Hp10PeakTime != null)
|
||||
VisitExitCommand.Parameters["Hp10PeakTime"].Value = ep.Hp07PeakTime;
|
||||
else
|
||||
VisitExitCommand.Parameters["Hp10PeakTime"].Value = DBNull.Value;
|
||||
|
||||
VisitExitCommand.Parameters["K1"].Value = ep.K1;
|
||||
VisitExitCommand.Parameters["K2"].Value = ep.K2;
|
||||
VisitExitCommand.Parameters["K3"].Value = ep.K3;
|
||||
VisitExitCommand.Parameters["K4"].Value = ep.K4;
|
||||
VisitExitCommand.Parameters["K5"].Value = ep.K5;
|
||||
VisitExitCommand.Parameters["K6"].Value = ep.K6;
|
||||
VisitExitCommand.Parameters["SG"].Value = ep.SG;
|
||||
VisitExitCommand.Parameters["BC"].Value = ep.BC;
|
||||
VisitExitCommand.Parameters["FB"].Value = ep.FB;
|
||||
VisitExitCommand.Parameters["HG"].Value = ep.HG;
|
||||
|
||||
VisitExitCommand.Parameters["QualityData"].Value = ep.QualityData;
|
||||
|
||||
//VisitExitCommand.Parameters["D1"].Value = ep.D1;
|
||||
//VisitExitCommand.Parameters["D2"].Value = ep.D2;
|
||||
//VisitExitCommand.Parameters["D3"].Value = ep.D3;
|
||||
//VisitExitCommand.Parameters["D4"].Value = ep.D4;
|
||||
|
||||
VisitExitCommand.Parameters["alarmStatus"].Value = ep.alarmStatus;
|
||||
VisitExitCommand.Parameters["otherAlarms"].Value = ep.otherAlarms;
|
||||
VisitExitCommand.Parameters["errorStatus"].Value = ep.errorStatus;
|
||||
VisitExitCommand.Parameters["operatingStatus"].Value = ep.operatingStatus;
|
||||
VisitExitCommand.Parameters["ENTRY_EPD_CLOCK"].Value = ep.CountsClockBase;
|
||||
VisitExitCommand.Parameters["EXIT_EPD_CLOCK"].Value = ep.CountsClock;
|
||||
|
||||
if (int.TryParse(ep.WearerName, out int WearerPersID))
|
||||
VisitExitCommand.Parameters["PersID"].Value = WearerPersID;
|
||||
else
|
||||
VisitExitCommand.Parameters["PersID"].Value = DBNull.Value;
|
||||
|
||||
VisitExitCommand.SetBoolParam("eDosBatteryWarning",ep.eDosBatteryWarning);
|
||||
VisitExitCommand.SetBoolParam("eDosDose07Warning", ep.eDosDose07Warning);
|
||||
VisitExitCommand.SetBoolParam("eDosDose07Alarm", ep.eDosDose07Alarm);
|
||||
VisitExitCommand.SetBoolParam("eDosRate07Warning", ep.eDosRate07Warning);
|
||||
VisitExitCommand.SetBoolParam("eDosRate07Alarm", ep.eDosRate07Alarm);
|
||||
VisitExitCommand.SetBoolParam("eDosDose10Warning", ep.eDosDose10Warning);
|
||||
VisitExitCommand.SetBoolParam("eDosDose10Alarm", ep.eDosDose10Alarm);
|
||||
VisitExitCommand.SetBoolParam("eDosRate10Warning", ep.eDosRate10Warning);
|
||||
VisitExitCommand.SetBoolParam("eDosRate10Alarm", ep.eDosRate10Alarm);
|
||||
|
||||
checkCon(true);
|
||||
VisitExitCommand.Connection = localConnection;
|
||||
try
|
||||
{
|
||||
VisitExitCommand.ExecuteNonQuery();
|
||||
} catch (System.Exception ex)
|
||||
{
|
||||
splunkLog?.WriteException(moduleName, taskName, ex);
|
||||
}
|
||||
localConnection.Close();
|
||||
}
|
||||
|
||||
public void FillComment()
|
||||
{
|
||||
if (dtCOE == null) dtCOE = new DataSet1.CommentOnEventDataTable();
|
||||
using (var dt = new DataSet1TableAdapters.CommentOnEventTableAdapter())
|
||||
{
|
||||
dt.Fill(dtCOE);
|
||||
}
|
||||
}
|
||||
|
||||
public DataSet1.CommentOnEventRow GetCommentOnEventRow(int id)
|
||||
{
|
||||
return dtCOE.FindByID_CommnentOnEvent(id);
|
||||
}
|
||||
|
||||
public void FillTaskInfo(User _User, DataSet1 dataSet1)
|
||||
{
|
||||
const string taskName = "FillTaskInfo";
|
||||
try
|
||||
{
|
||||
using (var dataSet1GetTaskInfoTableAdapter = new DataSet1TableAdapters.GetTaskInfoTableAdapter()) // new eDosStation.DataSet1TableAdapters.GetTaskInfoTableAdapter())
|
||||
{
|
||||
//dataSet1GetTaskInfoTableAdapter.Connection.ConnectionString = currentConStr;
|
||||
stationLog?.WriteLine($"dataSet1GetTaskInfoTableAdapter Fillin {System.DateTime.Now}");
|
||||
dataSet1GetTaskInfoTableAdapter.Fill(dataSet1.GetTaskInfo, null, _User.Margin);
|
||||
stationLog?.WriteLine($"dataSet1GetTaskInfoTableAdapter Filled {System.DateTime.Now}");
|
||||
}
|
||||
}
|
||||
catch (System.Exception ex) {
|
||||
splunkLog?.WriteException(moduleName, taskName, ex);
|
||||
if (stationLog != null) stationLog.WriteLine($"{taskName} error {ex.Message} {System.DateTime.Now}");
|
||||
}
|
||||
}
|
||||
|
||||
public User GetUser( string CSN, string Code, bool isEntry)
|
||||
{
|
||||
const string taskName = "GetUser";
|
||||
User u = new User();
|
||||
//object[] Values = null;
|
||||
try
|
||||
{
|
||||
using (var cmd = new SqlCommand("GetPersonInfo", localConnection) { CommandType = System.Data.CommandType.StoredProcedure } )
|
||||
{
|
||||
if (int.TryParse(Code, out int PersID)) cmd.Parameters.AddWithValue("PersID", PersID);
|
||||
if (!string.IsNullOrEmpty(CSN)) cmd.Parameters.AddWithValue("csn", CSN);
|
||||
else cmd.Parameters.AddWithValue("csn", DBNull.Value);
|
||||
checkCon(true);
|
||||
var rs = cmd.ExecuteReader(System.Data.CommandBehavior.SingleRow);
|
||||
using (var tb = new DataTable())
|
||||
{
|
||||
tb.Load(rs);
|
||||
if (tb.Rows.Count > 0)
|
||||
{
|
||||
DataRow dr = tb.Rows[0];
|
||||
//Values = new object[rs.FieldCount];
|
||||
//int rv = rs.GetValues(Values);
|
||||
u.PersID = (int)dr["PersID"];
|
||||
u.LastName = dr["LastName"].ToString();
|
||||
u.FirstName = dr["FirstName"].ToString();
|
||||
//u.conCode = Values[rs.GetOrdinal("conCode")].ToString();
|
||||
u.Language = dr["Language"].ToString();
|
||||
u.AccessAllow = dr["AccessAllow"] as bool?;
|
||||
decimal? m = dr["Margin"] as decimal?;
|
||||
if (m.HasValue) u.Margin = (double)m.Value; else u.Margin = null;
|
||||
//u.Margin = (double ?)Values[rs.GetOrdinal("Margin")] ;
|
||||
u.VisitIDLocked = dr["VisitIDLocked"] as int?;
|
||||
u.ReasonNoAccess = dr["ReasonNoAccess"].ToString().Replace("\\n", "\n");
|
||||
u.UserComment = dr["Comment"].ToString();
|
||||
|
||||
if (isEntry && tb.Columns.Contains("hasEPD"))
|
||||
{
|
||||
u.hasEPD = (bool)dr["hasEPD"];
|
||||
if (u.hasEPD) u.ReasonNoAccess = "You have an EPD in use"; //!!! not for return !!!!
|
||||
}
|
||||
else u.hasEPD = false;
|
||||
u.activeVisit = dr["activeVisit"] as int?;
|
||||
u.AllOk = ( !CheckUser || (u.AccessAllow == true && u.VisitIDLocked == 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not found
|
||||
u.PersID = 0;
|
||||
u.LastName = "Not Found";
|
||||
u.FirstName = "Not Found";
|
||||
//u.conCode = "A1";
|
||||
u.Language = "N";
|
||||
u.AccessAllow = false;
|
||||
u.Margin = 0;
|
||||
u.VisitIDLocked = 0;
|
||||
u.ReasonNoAccess = "Not found";
|
||||
u.UserComment = string.Empty;
|
||||
u.hasEPD = false;
|
||||
u.AllOk = !CheckUser || (u.AccessAllow == true && u.VisitIDLocked == 0);
|
||||
}
|
||||
rs.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
splunkLog?.WriteException(moduleName, taskName, ex);
|
||||
if (stationLog != null) stationLog.WriteLine($"{taskName} error {ex.Message} {System.DateTime.Now.ToString("HH:mm:ss:nnn")}");
|
||||
}
|
||||
return u;
|
||||
}
|
||||
|
||||
|
||||
public bool ReverseSync()
|
||||
{
|
||||
const string taskName = "ReverseSync";
|
||||
bool rv = false;
|
||||
checkCon(true);
|
||||
VisitExitCommand.Connection = localConnection;
|
||||
try
|
||||
{
|
||||
ReverseSyncCommand.ExecuteNonQuery();
|
||||
rv = true;
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
splunkLog?.WriteException(moduleName, taskName, ex);
|
||||
}
|
||||
localConnection.Close();
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,8 +21,10 @@
|
|||
</Menu.ItemsPanel>
|
||||
<MenuItem Header="E_xit" Name="mExit" Click="mExit_Click" HorizontalAlignment="Right" />
|
||||
<MenuItem Header="Settings" Click="MenuItem_Click" />
|
||||
<MenuItem Header="Advanced Settings" >
|
||||
<MenuItem Header="Enc" Name="mEnc" Click="MEnc_Click" />
|
||||
<MenuItem Header="Advanced" >
|
||||
<MenuItem Header="Sync From Central Db" Name="mReverseSync" Click="mReverseSync_Click" />
|
||||
<Separator />
|
||||
<MenuItem Header="Enc" Name="mEnc" Click="MEnc_Click" IsEnabled="False" />
|
||||
</MenuItem>
|
||||
<MenuItem Header="About" Name="mAbout" Click="mAbout_Click" HorizontalAlignment="Right" />
|
||||
</Menu>
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ namespace eDosStation
|
|||
{
|
||||
dataInterface = new DataInterface();
|
||||
thisStation = new Station(dataInterface, string.Empty);
|
||||
dataInterface.splunkLog = thisStation.splunkLog;
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
|
|
@ -219,5 +220,14 @@ namespace eDosStation
|
|||
Application.Current.Shutdown();
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
private void mReverseSync_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
bool ok = dataInterface.ReverseSync();
|
||||
if (ok)
|
||||
MessageBox.Show("Success", null, MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
else
|
||||
MessageBox.Show("Fout", null, MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,5 +51,5 @@ using System.Windows;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.6.0.1")]
|
||||
[assembly: AssemblyFileVersion("2.6.0.1")]
|
||||
[assembly: AssemblyVersion("2.6.1.1")]
|
||||
[assembly: AssemblyFileVersion("2.6.1.1")]
|
||||
|
|
|
|||
|
|
@ -1,72 +1,76 @@
|
|||
<Window x:Class="eDosStation.Settings"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:eDosStation"
|
||||
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
|
||||
mc:Ignorable="d"
|
||||
Title="Settings" Height="448.033" Width="702.744"
|
||||
FontFamily="Segoe UI" FontSize="20"
|
||||
Loaded="Window_Loaded">
|
||||
<Grid >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="20" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="250"/>
|
||||
<ColumnDefinition Width="400"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="EPD Reader Com port"></TextBlock>
|
||||
<telerik:RadComboBox Name="cComPort" Grid.Column="1" />
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Installation 1"></TextBlock>
|
||||
<telerik:RadComboBox Name="CIns1" Grid.Row="1" Grid.Column="1" SelectedValuePath="Inst_CODE" DisplayMemberPath="InstallationName" />
|
||||
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="Installation 2"></TextBlock>
|
||||
<telerik:RadComboBox Name="CIns2" Grid.Row="2" Grid.Column="1" SelectedValuePath="Inst_CODE" DisplayMemberPath="InstallationName" />
|
||||
|
||||
<TextBlock Grid.Row="4" Grid.Column="0" Text="Badgelezers" Height="23" Margin="0,0,0.2,0" VerticalAlignment="Top"></TextBlock>
|
||||
<telerik:RadComboBox Grid.Row="4" Grid.Column="1" Name="cbReaders" SelectedValuePath="Text" DisplayMemberPath="Text" />
|
||||
|
||||
<TextBlock Grid.Row="5" Grid.Column="0" Text="Check user status" Height="23" Margin="0,0,0.2,0" VerticalAlignment="Top"></TextBlock>
|
||||
<CheckBox Grid.Row="5" Grid.ColumnSpan="2" Name="cbCheckUsers" Grid.Column="1" Padding="10,0,10,0" VerticalAlignment="Center" />
|
||||
|
||||
<TextBlock Grid.Row="6" Grid.Column="0" Text="ValidationButtons" Height="23" Margin="0,0,0.2,0" VerticalAlignment="Top"></TextBlock>
|
||||
<CheckBox Grid.Row="6" Grid.ColumnSpan="2" Name="cbValidation" Grid.Column="1" Padding="10,0,10,0" VerticalAlignment="Center" />
|
||||
|
||||
<TextBlock Grid.Row="7" Grid.Column="0" Text="Beep EPD" Height="23" Margin="0,0,0.2,0" VerticalAlignment="Top"></TextBlock>
|
||||
<telerik:RadComboBox Grid.Row="7" Grid.ColumnSpan="2" Name="tBeep" Grid.Column="1" SelectedValuePath="Value" DisplayMemberPath="Text" >
|
||||
</telerik:RadComboBox>
|
||||
|
||||
|
||||
<TextBlock Grid.Row="8" Grid.Column="0" Text="Timeout EPD (ms)" Height="23" Margin="0,0,0.2,0" VerticalAlignment="Top"></TextBlock>
|
||||
<TextBox Grid.Row="8" Grid.ColumnSpan="2" Name="tEPDTimeout" Text="" Grid.Column="1" />
|
||||
|
||||
<TextBlock Grid.Row="9" Grid.Column="0" Text="Restart COM" Height="23" Margin="0,0,0.2,0" VerticalAlignment="Top"></TextBlock>
|
||||
<CheckBox Grid.Row="9" Grid.ColumnSpan="2" Name="cbRestartCom" Grid.Column="1" Padding="10,0,10,0" VerticalAlignment="Center" />
|
||||
|
||||
<TextBlock Grid.Row="10" Grid.Column="0" Text="Restart COM voor entry/exit" Height="23" Margin="0,0,0.2,0" VerticalAlignment="Top"></TextBlock>
|
||||
<CheckBox Grid.Row="10" Grid.ColumnSpan="2" Name="cbRestartComFirst" Grid.Column="1" Padding="10,0,10,0" VerticalAlignment="Center" />
|
||||
|
||||
<TextBlock Grid.Row="11" Grid.Column="0" Text="Alleen MK2" Height="23" Margin="0,0,0.2,0" VerticalAlignment="Top"></TextBlock>
|
||||
<CheckBox Grid.Row="11" Grid.ColumnSpan="2" Name="cbOnlyMK2" Grid.Column="1" Padding="10,0,10,0" VerticalAlignment="Center" />
|
||||
|
||||
|
||||
<telerik:RadButton Grid.Row="13" Grid.Column="0" Name="bOK" Content="OK" Click="BOK_Click" Style="{DynamicResource OkCancelButton}" />
|
||||
<telerik:RadButton Grid.Row="13" Grid.Column="1" Name="bCancel" Content="Cancel" Click="BCancel_Click" Style="{DynamicResource OkCancelButton}" HorizontalAlignment="Right" />
|
||||
</Grid>
|
||||
</Window>
|
||||
<Window x:Class="eDosStation.Settings"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:eDosStation"
|
||||
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
|
||||
mc:Ignorable="d"
|
||||
Title="Settings" Height="448.033" Width="702.744"
|
||||
FontFamily="Segoe UI" FontSize="20"
|
||||
Loaded="Window_Loaded">
|
||||
<Grid >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="20" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="250"/>
|
||||
<ColumnDefinition Width="400"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="EPD Reader Com port"></TextBlock>
|
||||
<telerik:RadComboBox Name="cComPort" Grid.Column="1" />
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Installation 1"></TextBlock>
|
||||
<telerik:RadComboBox Name="CIns1" Grid.Row="1" Grid.Column="1" SelectedValuePath="Inst_CODE" DisplayMemberPath="InstallationName" />
|
||||
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="Installation 2"></TextBlock>
|
||||
<telerik:RadComboBox Name="CIns2" Grid.Row="2" Grid.Column="1" SelectedValuePath="Inst_CODE" DisplayMemberPath="InstallationName" />
|
||||
|
||||
<TextBlock Grid.Row="4" Grid.Column="0" Text="Badgelezers" Height="23" Margin="0,0,0.2,0" VerticalAlignment="Top"></TextBlock>
|
||||
<telerik:RadComboBox Grid.Row="4" Grid.Column="1" Name="cbReaders" SelectedValuePath="Text" DisplayMemberPath="Text" />
|
||||
|
||||
<TextBlock Grid.Row="5" Grid.Column="0" Text="Check user status" Height="23" Margin="0,0,0.2,0" VerticalAlignment="Top"></TextBlock>
|
||||
<CheckBox Grid.Row="5" Grid.ColumnSpan="2" Name="cbCheckUsers" Grid.Column="1" Padding="10,0,10,0" VerticalAlignment="Center" />
|
||||
|
||||
<TextBlock Grid.Row="6" Grid.Column="0" Text="ValidationButtons" Height="23" Margin="0,0,0.2,0" VerticalAlignment="Top"></TextBlock>
|
||||
<CheckBox Grid.Row="6" Grid.ColumnSpan="2" Name="cbValidation" Grid.Column="1" Padding="10,0,10,0" VerticalAlignment="Center" />
|
||||
|
||||
<TextBlock Grid.Row="7" Grid.Column="0" Text="Beep EPD" Height="23" Margin="0,0,0.2,0" VerticalAlignment="Top"></TextBlock>
|
||||
<telerik:RadComboBox Grid.Row="7" Grid.ColumnSpan="2" Name="tBeep" Grid.Column="1" SelectedValuePath="Value" DisplayMemberPath="Text" >
|
||||
</telerik:RadComboBox>
|
||||
|
||||
|
||||
<TextBlock Grid.Row="8" Grid.Column="0" Text="Timeout EPD (ms)" Height="23" Margin="0,0,0.2,0" VerticalAlignment="Top"></TextBlock>
|
||||
<TextBox Grid.Row="8" Grid.ColumnSpan="2" Name="tEPDTimeout" Text="" Grid.Column="1" />
|
||||
|
||||
<TextBlock Grid.Row="9" Grid.Column="0" Text="Restart COM" Height="23" Margin="0,0,0.2,0" VerticalAlignment="Top"></TextBlock>
|
||||
<CheckBox Grid.Row="9" Grid.ColumnSpan="2" Name="cbRestartCom" Grid.Column="1" Padding="10,0,10,0" VerticalAlignment="Center" />
|
||||
|
||||
<TextBlock Grid.Row="10" Grid.Column="0" Text="Restart COM voor entry/exit" Height="23" Margin="0,0,0.2,0" VerticalAlignment="Top"></TextBlock>
|
||||
<CheckBox Grid.Row="10" Grid.ColumnSpan="2" Name="cbRestartComFirst" Grid.Column="1" Padding="10,0,10,0" VerticalAlignment="Center" />
|
||||
|
||||
<TextBlock Grid.Row="11" Grid.Column="0" Text="Alleen MK2" Height="23" Margin="0,0,0.2,0" VerticalAlignment="Top"></TextBlock>
|
||||
<CheckBox Grid.Row="11" Grid.ColumnSpan="2" Name="cbOnlyMK2" Grid.Column="1" Padding="10,0,10,0" VerticalAlignment="Center" />
|
||||
|
||||
<TextBlock Grid.Row="12" Grid.Column="0" Text="Meedere EPD toegalaten" Height="23" Margin="0,0,0.2,0" VerticalAlignment="Top"></TextBlock>
|
||||
<CheckBox Grid.Row="12" Grid.ColumnSpan="2" Name="cbAllowMultipleEPD" Grid.Column="1" Padding="10,0,10,0" VerticalAlignment="Center" />
|
||||
|
||||
|
||||
<telerik:RadButton Grid.Row="14" Grid.Column="0" Name="bOK" Content="OK" Click="BOK_Click" Style="{DynamicResource OkCancelButton}" />
|
||||
<telerik:RadButton Grid.Row="14" Grid.Column="1" Name="bCancel" Content="Cancel" Click="BCancel_Click" Style="{DynamicResource OkCancelButton}" HorizontalAlignment="Right" />
|
||||
</Grid>
|
||||
</Window>
|
||||
|
|
|
|||
|
|
@ -1,202 +1,205 @@
|
|||
using System.Collections.ObjectModel;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
|
||||
namespace eDosStation
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for Settings.xaml
|
||||
/// </summary>
|
||||
public class beepclass
|
||||
{
|
||||
public string Text { get; set; }
|
||||
public byte Value { get; set; }
|
||||
public beepclass(string txt, byte val)
|
||||
{
|
||||
Text = txt; Value = val;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public class readerclass
|
||||
{
|
||||
public string Text { get; set; }
|
||||
public readerclass(string txt)
|
||||
{
|
||||
Text = txt;
|
||||
}
|
||||
}
|
||||
|
||||
public partial class Settings : Window
|
||||
{
|
||||
Station thisStation;
|
||||
ObservableCollection<beepclass> beepValues = new ObservableCollection<beepclass>();
|
||||
ObservableCollection<readerclass> readerValues = new ObservableCollection<readerclass>();
|
||||
|
||||
public Settings( Station tStation)
|
||||
{
|
||||
thisStation = tStation;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void BOK_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string thiscom = cComPort.SelectedItem.ToString().Replace("COM","");
|
||||
thisStation.ComPort = int.Parse(thiscom);
|
||||
|
||||
DataSet1.InstallationRow ir = CIns1.SelectedItem as DataSet1.InstallationRow;
|
||||
thisStation.Inst_CODE1 = ir.Inst_CODE;
|
||||
thisStation.Inst_Name1 = ir.InstallationName;
|
||||
|
||||
ir = CIns2.SelectedItem as DataSet1.InstallationRow;
|
||||
thisStation.Inst_CODE2 = ir.Inst_CODE;
|
||||
thisStation.Inst_Name2 = ir.InstallationName;
|
||||
|
||||
thisStation.useBeep = (byte)tBeep.SelectedValue;
|
||||
|
||||
if (cbValidation.IsChecked == null) cbValidation.IsChecked = false;
|
||||
thisStation.useTestButtons = cbValidation.IsChecked.Value;
|
||||
thisStation.Reader = (string)cbReaders.SelectedValue;
|
||||
thisStation.checkUser = cbCheckUsers.IsChecked != null ? cbCheckUsers.IsChecked.Value : false;
|
||||
thisStation.RestartCom = cbRestartCom.IsChecked != null ? cbRestartCom.IsChecked.Value : false;
|
||||
thisStation.EPDTimeOut = int.Parse(tEPDTimeout.Text);
|
||||
|
||||
thisStation.OnlyMK2 = cbOnlyMK2.IsChecked != null ? cbOnlyMK2.IsChecked.Value : false;
|
||||
thisStation.RestartComFirst = cbRestartComFirst.IsChecked != null ? cbRestartComFirst.IsChecked.Value : false;
|
||||
|
||||
|
||||
thisStation.Update();
|
||||
this.Close();
|
||||
if (thisStation.Error > 0)
|
||||
{
|
||||
MessageBox.Show($"Error {thisStation.ErrorMessage}");
|
||||
}
|
||||
}
|
||||
|
||||
private void BCancel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string eDosCom = devcon.FindEdosCom();
|
||||
try
|
||||
{
|
||||
using (var a = new LSWDesfirePublic.CCard())
|
||||
{
|
||||
a.GetReaderList();
|
||||
foreach (string s in a.readersList) { readerValues.Add(new readerclass(s)); }
|
||||
}
|
||||
cbReaders.ItemsSource = readerValues;
|
||||
cbReaders.SelectedValue = thisStation.Reader;
|
||||
} catch (System.Exception ex)
|
||||
{
|
||||
MessageBox.Show($"Readers err {ex.Message}");
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
foreach (string cn in System.IO.Ports.SerialPort.GetPortNames())
|
||||
{
|
||||
cComPort.Items.Add(cn);
|
||||
}
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
MessageBox.Show($"Serial err {ex.Message}");
|
||||
}
|
||||
|
||||
|
||||
beepValues.Add(new beepclass("Loud High freq Beep" , 0b00010111 ));
|
||||
beepValues.Add(new beepclass("Loud Low freq Beep" , 0b00011111 ));
|
||||
beepValues.Add(new beepclass("Normal High freq Beep", 0b00010110 ));
|
||||
beepValues.Add(new beepclass("Normal Low freq Beep" , 0b00011110 ));
|
||||
beepValues.Add(new beepclass("No Beep (only led)" , 0b00011010 ));
|
||||
|
||||
|
||||
// 7 6 5 4 3210
|
||||
// 1 0 0 1 1 1 0 0 1 1 1 0 0001
|
||||
// 1 0 0 1 1 1 0 0 1 1 0 0 0001
|
||||
// 1 0 0 1 1 1 0 0 1 0 1 0 0001
|
||||
// 1 0 0 1 1 1 0 0 1 0 0 0 0001
|
||||
// 1 0 0 1 1 1 0 0 0 0 0 0 0000
|
||||
|
||||
//MK3
|
||||
//Bits 0-3 = Graphic Wearer Name, displayed in EPD Assignment menu
|
||||
//0000 : Off(no sounder)
|
||||
//0001 : Continuous Single Tone
|
||||
//0010 : Continuous Dual Tone Slow
|
||||
//0011 : Continuous Dual Tone Fast
|
||||
//0100 : Intermittent Single Slow
|
||||
//0101 : Intermittent Single Fast
|
||||
//0110 : Intermittent Double Slow
|
||||
//0111 : Intermittent Double Fast
|
||||
//1110 : Mirion Style Dose
|
||||
//1111 : Mirion Style Rate
|
||||
//Bit 4 = Not used
|
||||
//Bit 5 = Tone 2kHz = 0, 4kHz = 1
|
||||
//Bit 6 = Volume Loud = 1, Normal = 0
|
||||
//Bit 7 = Sound Enabled = 1
|
||||
//Bit 8, 9 = Not used
|
||||
//Bit 10 = LED Brightness Bright = 1, Normal = 0
|
||||
//Bit 11 = LED Enabled = 1
|
||||
//Bit 12 = Mutable User can mute = 1
|
||||
//Bit 13, 14 = Not Used
|
||||
//Bit 15 = Vibe Enabled = 1
|
||||
|
||||
//beepValues.Add(new beepclass("Beep", 22));
|
||||
//beepValues.Add(new beepclass("No Beep", 18));
|
||||
tBeep.ItemsSource = beepValues;
|
||||
|
||||
string thisComport = $"COM{thisStation.ComPort}";
|
||||
if (!string.IsNullOrEmpty(eDosCom)) thisComport = eDosCom;
|
||||
if (!cComPort.Items.Contains(thisComport)) cComPort.Items.Add(thisComport);
|
||||
cComPort.SelectedItem = thisComport;
|
||||
|
||||
try {
|
||||
DataSet1.InstallationDataTable tbInstallations;
|
||||
using (var ta = new DataSet1TableAdapters.InstallationTableAdapter())
|
||||
tbInstallations = ta.GetData();
|
||||
tbInstallations.AddInstallationRow(0, "-");
|
||||
foreach (DataSet1.InstallationRow r in tbInstallations.Rows)
|
||||
{
|
||||
CIns1.Items.Add(r);
|
||||
CIns2.Items.Add(r);
|
||||
}
|
||||
CIns1.SelectedValue = thisStation.Inst_CODE1;
|
||||
CIns2.SelectedValue = thisStation.Inst_CODE2;
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
MessageBox.Show($"SerINstallations err {ex.Message}");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
tBeep.SelectedValue = thisStation.useBeep;
|
||||
cbValidation.IsChecked = thisStation.useTestButtons;
|
||||
cbCheckUsers.IsChecked= thisStation.checkUser;
|
||||
cbRestartCom.IsChecked = thisStation.RestartCom;
|
||||
tEPDTimeout.Text = thisStation.EPDTimeOut.ToString();
|
||||
cbRestartComFirst.IsChecked = thisStation.RestartComFirst;
|
||||
cbOnlyMK2.IsChecked = thisStation.OnlyMK2;
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
MessageBox.Show($"Settings err {ex.Message}");
|
||||
}
|
||||
|
||||
try {
|
||||
bool rv = thisStation.dataInterface.checkCon(false);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
MessageBox.Show($"Interface check {ex.Message}");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
|
||||
namespace eDosStation
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for Settings.xaml
|
||||
/// </summary>
|
||||
public class beepclass
|
||||
{
|
||||
public string Text { get; set; }
|
||||
public byte Value { get; set; }
|
||||
public beepclass(string txt, byte val)
|
||||
{
|
||||
Text = txt; Value = val;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public class readerclass
|
||||
{
|
||||
public string Text { get; set; }
|
||||
public readerclass(string txt)
|
||||
{
|
||||
Text = txt;
|
||||
}
|
||||
}
|
||||
|
||||
public partial class Settings : Window
|
||||
{
|
||||
Station thisStation;
|
||||
ObservableCollection<beepclass> beepValues = new ObservableCollection<beepclass>();
|
||||
ObservableCollection<readerclass> readerValues = new ObservableCollection<readerclass>();
|
||||
|
||||
public Settings( Station tStation)
|
||||
{
|
||||
thisStation = tStation;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void BOK_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string thiscom = cComPort.SelectedItem.ToString().Replace("COM","");
|
||||
thisStation.ComPort = int.Parse(thiscom);
|
||||
|
||||
DataSet1.InstallationRow ir = CIns1.SelectedItem as DataSet1.InstallationRow;
|
||||
thisStation.Inst_CODE1 = ir.Inst_CODE;
|
||||
thisStation.Inst_Name1 = ir.InstallationName;
|
||||
|
||||
ir = CIns2.SelectedItem as DataSet1.InstallationRow;
|
||||
thisStation.Inst_CODE2 = ir.Inst_CODE;
|
||||
thisStation.Inst_Name2 = ir.InstallationName;
|
||||
|
||||
thisStation.useBeep = (byte)tBeep.SelectedValue;
|
||||
|
||||
if (cbValidation.IsChecked == null) cbValidation.IsChecked = false;
|
||||
thisStation.useTestButtons = cbValidation.IsChecked.Value;
|
||||
thisStation.Reader = (string)cbReaders.SelectedValue;
|
||||
thisStation.checkUser = cbCheckUsers.IsChecked != null ? cbCheckUsers.IsChecked.Value : false;
|
||||
thisStation.RestartCom = cbRestartCom.IsChecked != null ? cbRestartCom.IsChecked.Value : false;
|
||||
thisStation.EPDTimeOut = int.Parse(tEPDTimeout.Text);
|
||||
|
||||
thisStation.OnlyMK2 = cbOnlyMK2.IsChecked != null ? cbOnlyMK2.IsChecked.Value : false;
|
||||
|
||||
thisStation.RestartComFirst = cbRestartComFirst.IsChecked != null ? cbRestartComFirst.IsChecked.Value : false;
|
||||
|
||||
thisStation.AllowMultipleEPD = cbAllowMultipleEPD.IsChecked != null ? cbAllowMultipleEPD.IsChecked.Value : false;
|
||||
|
||||
thisStation.Update();
|
||||
this.Close();
|
||||
if (thisStation.Error > 0)
|
||||
{
|
||||
MessageBox.Show($"Error {thisStation.ErrorMessage}");
|
||||
}
|
||||
}
|
||||
|
||||
private void BCancel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string eDosCom = devcon.FindEdosCom();
|
||||
try
|
||||
{
|
||||
using (var a = new LSWDesfirePublic.CCard())
|
||||
{
|
||||
a.GetReaderList();
|
||||
foreach (string s in a.readersList) { readerValues.Add(new readerclass(s)); }
|
||||
}
|
||||
cbReaders.ItemsSource = readerValues;
|
||||
cbReaders.SelectedValue = thisStation.Reader;
|
||||
} catch (System.Exception ex)
|
||||
{
|
||||
MessageBox.Show($"Readers err {ex.Message}");
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
foreach (string cn in System.IO.Ports.SerialPort.GetPortNames())
|
||||
{
|
||||
cComPort.Items.Add(cn);
|
||||
}
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
MessageBox.Show($"Serial err {ex.Message}");
|
||||
}
|
||||
|
||||
|
||||
beepValues.Add(new beepclass("Loud High freq Beep" , 0b00010111 ));
|
||||
beepValues.Add(new beepclass("Loud Low freq Beep" , 0b00011111 ));
|
||||
beepValues.Add(new beepclass("Normal High freq Beep", 0b00010110 ));
|
||||
beepValues.Add(new beepclass("Normal Low freq Beep" , 0b00011110 ));
|
||||
beepValues.Add(new beepclass("No Beep (only led)" , 0b00011010 ));
|
||||
|
||||
|
||||
// 7 6 5 4 3210
|
||||
// 1 0 0 1 1 1 0 0 1 1 1 0 0001
|
||||
// 1 0 0 1 1 1 0 0 1 1 0 0 0001
|
||||
// 1 0 0 1 1 1 0 0 1 0 1 0 0001
|
||||
// 1 0 0 1 1 1 0 0 1 0 0 0 0001
|
||||
// 1 0 0 1 1 1 0 0 0 0 0 0 0000
|
||||
|
||||
//MK3
|
||||
//Bits 0-3 = Graphic Wearer Name, displayed in EPD Assignment menu
|
||||
//0000 : Off(no sounder)
|
||||
//0001 : Continuous Single Tone
|
||||
//0010 : Continuous Dual Tone Slow
|
||||
//0011 : Continuous Dual Tone Fast
|
||||
//0100 : Intermittent Single Slow
|
||||
//0101 : Intermittent Single Fast
|
||||
//0110 : Intermittent Double Slow
|
||||
//0111 : Intermittent Double Fast
|
||||
//1110 : Mirion Style Dose
|
||||
//1111 : Mirion Style Rate
|
||||
//Bit 4 = Not used
|
||||
//Bit 5 = Tone 2kHz = 0, 4kHz = 1
|
||||
//Bit 6 = Volume Loud = 1, Normal = 0
|
||||
//Bit 7 = Sound Enabled = 1
|
||||
//Bit 8, 9 = Not used
|
||||
//Bit 10 = LED Brightness Bright = 1, Normal = 0
|
||||
//Bit 11 = LED Enabled = 1
|
||||
//Bit 12 = Mutable User can mute = 1
|
||||
//Bit 13, 14 = Not Used
|
||||
//Bit 15 = Vibe Enabled = 1
|
||||
|
||||
//beepValues.Add(new beepclass("Beep", 22));
|
||||
//beepValues.Add(new beepclass("No Beep", 18));
|
||||
tBeep.ItemsSource = beepValues;
|
||||
|
||||
string thisComport = $"COM{thisStation.ComPort}";
|
||||
if (!string.IsNullOrEmpty(eDosCom)) thisComport = eDosCom;
|
||||
if (!cComPort.Items.Contains(thisComport)) cComPort.Items.Add(thisComport);
|
||||
cComPort.SelectedItem = thisComport;
|
||||
|
||||
try {
|
||||
DataSet1.InstallationDataTable tbInstallations;
|
||||
using (var ta = new DataSet1TableAdapters.InstallationTableAdapter())
|
||||
tbInstallations = ta.GetData();
|
||||
tbInstallations.AddInstallationRow(0, "-");
|
||||
foreach (DataSet1.InstallationRow r in tbInstallations.Rows)
|
||||
{
|
||||
CIns1.Items.Add(r);
|
||||
CIns2.Items.Add(r);
|
||||
}
|
||||
CIns1.SelectedValue = thisStation.Inst_CODE1;
|
||||
CIns2.SelectedValue = thisStation.Inst_CODE2;
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
MessageBox.Show($"SerINstallations err {ex.Message}");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
tBeep.SelectedValue = thisStation.useBeep;
|
||||
cbValidation.IsChecked = thisStation.useTestButtons;
|
||||
cbCheckUsers.IsChecked= thisStation.checkUser;
|
||||
cbRestartCom.IsChecked = thisStation.RestartCom;
|
||||
tEPDTimeout.Text = thisStation.EPDTimeOut.ToString();
|
||||
cbRestartComFirst.IsChecked = thisStation.RestartComFirst;
|
||||
cbOnlyMK2.IsChecked = thisStation.OnlyMK2;
|
||||
cbAllowMultipleEPD.IsChecked = thisStation.AllowMultipleEPD;
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
MessageBox.Show($"Settings err {ex.Message}");
|
||||
}
|
||||
|
||||
try {
|
||||
bool rv = thisStation.dataInterface.checkCon(false);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
MessageBox.Show($"Interface check {ex.Message}");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,332 +1,277 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using spl1 = LSWLib.CLog;
|
||||
namespace eDosStation
|
||||
{
|
||||
public class Station
|
||||
{
|
||||
public spl1 splunkLog;
|
||||
private bool doLog;
|
||||
public System.IO.StreamWriter stationLog=null;
|
||||
public int ID_Station { get; set; }
|
||||
public int ComPort { get; set; }
|
||||
public int Inst_CODE1 { get; set; }
|
||||
public int Inst_CODE2 { get; set; }
|
||||
public string Inst_Name1 { get; set; }
|
||||
public string Inst_Name2 { get; set; }
|
||||
public string TestCSN { get; set; }
|
||||
public string TestCode { get; set; }
|
||||
public string Reader { get; internal set; }
|
||||
public bool useTestButtons { get; set; }
|
||||
public byte useBeep { get; set; }
|
||||
public bool checkUser { get; internal set; }
|
||||
public bool RestartCom { get; set; }
|
||||
public int EPDTimeOut { get; internal set; }
|
||||
public int EPDRetries { get; internal set; }
|
||||
public bool OnlyMK2 { get; internal set; }
|
||||
public bool RestartComFirst { get; internal set; }
|
||||
public bool Changed = false;
|
||||
public int Error = 0;
|
||||
public string ErrorMessage;
|
||||
public StringBuilder insComments;
|
||||
public TextBlock tbComments;
|
||||
public DataInterface dataInterface;
|
||||
public System.Collections.Generic.Dictionary<byte, ushort> beepMk3Map;
|
||||
public ushort useBeepMK3()
|
||||
{
|
||||
if (beepMk3Map.ContainsKey(useBeep))
|
||||
return beepMk3Map[useBeep];
|
||||
else return beepMk3Map[0b00011010];
|
||||
}
|
||||
public Station(DataInterface mDataInterface, string Station)
|
||||
{
|
||||
splunkLog = new spl1(Environment.MachineName);
|
||||
stationLog = null;
|
||||
dataInterface = mDataInterface;
|
||||
Error = 0;
|
||||
ErrorMessage = string.Empty;
|
||||
ComPort = 0;
|
||||
Inst_CODE1 = 1;
|
||||
Inst_CODE2 = 11;
|
||||
Inst_Name1 = "BR1";
|
||||
Inst_Name2 = "Venus";
|
||||
TestCSN = System.Configuration.ConfigurationManager.AppSettings["TestCSN"];
|
||||
TestCode = System.Configuration.ConfigurationManager.AppSettings["TestCode"];
|
||||
insComments = new StringBuilder();
|
||||
tbComments = new TextBlock();
|
||||
tbComments.FontSize = 20;
|
||||
tbComments.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
|
||||
tbComments.TextAlignment = System.Windows.TextAlignment.Center;
|
||||
EPDTimeOut = 10000; //ms
|
||||
EPDRetries = 2;
|
||||
|
||||
beepMk3Map = new Dictionary<byte, ushort>();
|
||||
beepMk3Map.Add(0b00010111, 0b1001110011100001);
|
||||
beepMk3Map.Add(0b00011111, 0b1001110011000001);
|
||||
beepMk3Map.Add(0b00010110, 0b1001110010100001);
|
||||
beepMk3Map.Add(0b00011110, 0b1001110010000001);
|
||||
beepMk3Map.Add(0b00011010, 0b1001110000000000);
|
||||
|
||||
stationLog = mDataInterface.stationLog;
|
||||
|
||||
var co = dataInterface.getCon(true); // No dispose
|
||||
{
|
||||
using (var cmd = new SqlCommand("StationSettingsSelect", co))
|
||||
{
|
||||
cmd.CommandType = System.Data.CommandType.StoredProcedure;
|
||||
try
|
||||
{
|
||||
var rs = cmd.ExecuteReader(System.Data.CommandBehavior.SingleRow);
|
||||
if (rs.HasRows && rs.Read())
|
||||
{
|
||||
object[] Values = new object[rs.FieldCount];
|
||||
int rv = rs.GetValues(Values);
|
||||
ID_Station = (int)Values[rs.GetOrdinal("ID_Station")];
|
||||
ComPort = (int)Values[rs.GetOrdinal("ComPort")];
|
||||
|
||||
Inst_CODE1 = rs.IntOrDefault("Inst_CODE1", 0);
|
||||
//int c = rs.GetOrdinal("Inst_CODE1");
|
||||
//if (rs.IsDBNull(c)) Inst_CODE1 = 0; else Inst_CODE1 = (int)Values[c];
|
||||
Inst_CODE2 = rs.IntOrDefault("Inst_CODE2", 0);
|
||||
//c = rs.GetOrdinal("Inst_CODE2");
|
||||
//if (rs.IsDBNull(c)) Inst_CODE2 = 0; else Inst_CODE2 = (int)Values[c];
|
||||
Inst_Name1 = rs.StringOrDefault("Inst_Name1", string.Empty);
|
||||
//c = rs.GetOrdinal("Inst_Name1");
|
||||
//if (rs.IsDBNull(c)) Inst_Name1=string.Empty; else Inst_Name1 = Values[c].ToString();
|
||||
Inst_Name2 = rs.StringOrDefault("Inst_Name2", string.Empty);
|
||||
//c = rs.GetOrdinal("Inst_Name2");
|
||||
//if (rs.IsDBNull(c)) Inst_Name2 = string.Empty; else Inst_Name2 = Values[c].ToString();
|
||||
TestCSN = rs.StringOrDefault("TestCSN", string.Empty);
|
||||
//c = rs.GetOrdinal("TestCSN");
|
||||
//if (rs.IsDBNull(c)) TestCSN = string.Empty; else TestCSN = Values[c].ToString();
|
||||
Reader = rs.StringOrDefault("Reader", string.Empty);
|
||||
//c = rs.GetOrdinal("Reader");
|
||||
//if (rs.IsDBNull(c)) Reader = string.Empty; else Reader = Values[c].ToString();
|
||||
|
||||
useTestButtons = rs.BoolOrDefault("useTestButtons", false);
|
||||
//try
|
||||
//{
|
||||
// c = rs.GetOrdinal("useTestButtons");
|
||||
// if (rs.IsDBNull(c)) useTestButtons = false; else useTestButtons = (bool)Values[c];
|
||||
//}
|
||||
//catch { useTestButtons = false; }
|
||||
useBeep = rs.ByteOrDefault("useBeep", 0b00010110);
|
||||
//try
|
||||
//{
|
||||
// c = rs.GetOrdinal("useBeep");
|
||||
// if (rs.IsDBNull(c)) useBeep = 0b00010110; else useBeep = (byte)Values[c];
|
||||
//}
|
||||
//catch { useBeep = 0b00010110; }
|
||||
|
||||
doLog = rs.BoolOrDefault("doLog", false);
|
||||
//try
|
||||
//{
|
||||
// c = rs.GetOrdinal("doLog");
|
||||
// if (rs.IsDBNull(c)) doLog = false; else doLog = (bool)Values[c];
|
||||
//}
|
||||
//catch { doLog = false; }
|
||||
|
||||
checkUser = rs.BoolOrDefault("checkUser", false);
|
||||
//try
|
||||
//{
|
||||
// c = rs.GetOrdinal("checkUser");
|
||||
// if (rs.IsDBNull(c)) checkUser = false; else checkUser= (bool)Values[c];
|
||||
//}
|
||||
//catch { checkUser=false; }
|
||||
|
||||
EPDTimeOut = rs.IntOrDefault("EPDTimeout", 10000);
|
||||
//try
|
||||
//{
|
||||
// c = rs.GetOrdinal("EPDTimeout");
|
||||
// if (rs.IsDBNull(c)) EPDTimeOut = 10000; else EPDTimeOut= (int)Values[c];
|
||||
//}
|
||||
//catch { EPDTimeOut= 10000; }
|
||||
|
||||
EPDRetries = rs.IntOrDefault("EPDRetries", 2);
|
||||
//try
|
||||
//{
|
||||
// c = rs.GetOrdinal("EPDRetries");
|
||||
// if (rs.IsDBNull(c)) EPDRetries = 2; else EPDRetries = (int)Values[c];
|
||||
//}
|
||||
//catch { EPDRetries = 2; }
|
||||
|
||||
RestartCom = rs.BoolOrDefault("RestartCom", false);
|
||||
//try
|
||||
//{
|
||||
// c = rs.GetOrdinal("RestartCom");
|
||||
// if (rs.IsDBNull(c)) RestartCom= false; else RestartCom = (bool)Values[c];
|
||||
//}
|
||||
//catch { EPDRetries = 2; }
|
||||
|
||||
RestartComFirst = rs.BoolOrDefault("RestartComFirst", false);
|
||||
//try
|
||||
//{
|
||||
// c = rs.GetOrdinal("RestartComFirst");
|
||||
// if (rs.IsDBNull(c)) RestartComFirst = false; else RestartComFirst = (bool)Values[c];
|
||||
//}
|
||||
//catch { RestartComFirst = false; }
|
||||
|
||||
OnlyMK2 = rs.BoolOrDefault("OnlyMK2", false);
|
||||
//try
|
||||
//{
|
||||
// c = rs.GetOrdinal("OnlyMK2");
|
||||
// if (rs.IsDBNull(c)) OnlyMK2 = false; else OnlyMK2= (bool)Values[c];
|
||||
//}
|
||||
//catch { OnlyMK2 = false; }
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ID_Station = 0;
|
||||
ComPort = 0;
|
||||
Inst_CODE1 = 1;
|
||||
Inst_CODE2 = 11;
|
||||
Inst_Name1 = "BR1"; Inst_Name2 = "Venus";
|
||||
TestCSN = System.Configuration.ConfigurationManager.AppSettings["TestCSN"];
|
||||
TestCode = System.Configuration.ConfigurationManager.AppSettings["TestCode"];
|
||||
Changed = true;
|
||||
Reader = System.Configuration.ConfigurationManager.AppSettings["Reader"];
|
||||
checkUser = false;
|
||||
EPDTimeOut = 10000;
|
||||
EPDRetries = 2;
|
||||
}
|
||||
rs.Close();
|
||||
splunkLog.WriteSplunkLog("StationInit", spl1.iseverity.info);
|
||||
Error = 0;
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
Error = 1;
|
||||
ErrorMessage = ex.Message;
|
||||
splunkLog.WriteException(null,"StationInit", ex);
|
||||
if (stationLog != null) stationLog.WriteLine($"GetStationSettings error {ex.Message} {System.DateTime.Now}");
|
||||
}
|
||||
}
|
||||
|
||||
dataInterface.SetStation(ID_Station);
|
||||
dataInterface.SetCheckUser(checkUser);
|
||||
|
||||
if (Error == 0) using (var cmd2 = new SqlCommand("GetInstallationsComments", co))
|
||||
{
|
||||
cmd2.CommandType = System.Data.CommandType.StoredProcedure;
|
||||
cmd2.Parameters.AddWithValue("@Inst_CODE1", Inst_CODE1);
|
||||
if (Inst_CODE2 > 0) cmd2.Parameters.AddWithValue("@Inst_CODE2", Inst_CODE2);
|
||||
try
|
||||
{
|
||||
var rs = cmd2.ExecuteReader(System.Data.CommandBehavior.SingleResult);
|
||||
string curins = string.Empty, thisins = string.Empty, thiscomment = string.Empty;
|
||||
if (rs.HasRows)
|
||||
while (rs.Read())
|
||||
{
|
||||
thisins = rs.GetString(2);
|
||||
thiscomment = rs.GetString(3).Replace("\\n", "\n");
|
||||
if (curins.CompareTo(thisins) != 0)
|
||||
{
|
||||
if (curins != string.Empty) tbComments.Inlines.Add(new LineBreak());
|
||||
tbComments.Inlines.Add(new Bold(new Run($"Installation {thisins}:\n") { FontSize = 25 }));
|
||||
insComments.AppendLine($"Installation {thisins}");
|
||||
curins = thisins;
|
||||
}
|
||||
tbComments.Inlines.Add(new Run(thiscomment));
|
||||
}
|
||||
rs.Close();
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
splunkLog.WriteException("Station", "GetInstallationsComments", ex);
|
||||
Error = 2;
|
||||
ErrorMessage = ex.Message;
|
||||
if (stationLog != null) stationLog.WriteLine($"GetStationComments error {ex.Message} {System.DateTime.Now}");
|
||||
}
|
||||
}
|
||||
co?.Close();
|
||||
}
|
||||
}
|
||||
private void CmdSetParams(SqlCommand cmd)
|
||||
{
|
||||
//for (int ix = 0; ix < cmd.Parameters.Count; ix++)
|
||||
// System.Diagnostics.Debug.WriteLine(cmd.Parameters[ix].ParameterName);
|
||||
|
||||
try
|
||||
{
|
||||
cmd.SetIfExists("ComPort", ComPort);
|
||||
if (!string.IsNullOrEmpty(Inst_Name1) && Inst_CODE1 > 0)
|
||||
{
|
||||
cmd.SetIfExists("Inst_CODE1", Inst_CODE1);
|
||||
cmd.SetIfExists("Inst_Name1", Inst_Name1);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Inst_Name2) && Inst_CODE2 > 0)
|
||||
{
|
||||
cmd.SetIfExists("Inst_CODE2", Inst_CODE2);
|
||||
cmd.SetIfExists("Inst_Name2", Inst_Name2);
|
||||
}
|
||||
//if (!string.IsNullOrEmpty(TestCSN))
|
||||
// cmd.Parameters.AddWithValue("TestCSN", TestCSN);
|
||||
//Reader
|
||||
if (!string.IsNullOrEmpty(Reader)) cmd.SetIfExists("Reader", Reader);
|
||||
cmd.SetIfExists("checkUser", checkUser);
|
||||
cmd.SetIfExists("useBeep", useBeep);
|
||||
cmd.SetIfExists("EPDTimeout", EPDTimeOut);
|
||||
cmd.SetIfExists("EPDRetries", EPDRetries);
|
||||
cmd.SetIfExists("RestartCom", RestartCom);
|
||||
cmd.SetIfExists("RestartComFirst", RestartComFirst);
|
||||
cmd.SetIfExists("OnlyMK2", OnlyMK2);
|
||||
cmd.SetIfExists("useTestButtons", useTestButtons);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
splunkLog.WriteException("Station", "SetParams", ex);
|
||||
Error = 1;
|
||||
ErrorMessage = ex.Message;
|
||||
if (stationLog != null) stationLog.WriteLine($"GetStationSettings error {ex.Message} {System.DateTime.Now}");
|
||||
}
|
||||
}
|
||||
private void UpdateToDb(SqlConnection co, SqlCommand cmd)
|
||||
{
|
||||
cmd.Connection = co;
|
||||
try
|
||||
{
|
||||
cmd.Parameters.Clear();
|
||||
SqlCommandBuilder.DeriveParameters(cmd);
|
||||
CmdSetParams(cmd);
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
catch (System.Exception ex) {
|
||||
splunkLog.WriteException("Station", "UpdateToDb", ex);
|
||||
if (stationLog != null) stationLog.WriteLine($"UpdateToDb error {ex.Message} co {co.DataSource} {System.DateTime.Now}");
|
||||
}
|
||||
}
|
||||
public void Update()
|
||||
{
|
||||
SqlConnection co = null;
|
||||
using (var cmd = new SqlCommand("StationSettingsUpdate"))
|
||||
{
|
||||
cmd.CommandType = System.Data.CommandType.StoredProcedure;
|
||||
try
|
||||
{
|
||||
co = dataInterface.getCon(true);
|
||||
UpdateToDb(co, cmd);
|
||||
co.Close();
|
||||
co = dataInterface.getConCentral(true);
|
||||
UpdateToDb(co, cmd);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
Error = 1;
|
||||
ErrorMessage = ex.Message;
|
||||
splunkLog.WriteException("Station", "Update", ex);
|
||||
if (stationLog != null) stationLog.WriteLine($"UpdateToDb error {ex.Message} co {co.DataSource} {System.DateTime.Now}");
|
||||
}
|
||||
co?.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using spl1 = LSWLib.CLog;
|
||||
namespace eDosStation
|
||||
{
|
||||
public class Station
|
||||
{
|
||||
const string moduleName = "Station";
|
||||
public spl1 splunkLog;
|
||||
private bool doLog;
|
||||
public System.IO.StreamWriter stationLog=null;
|
||||
public int ID_Station { get; set; }
|
||||
public int ComPort { get; set; }
|
||||
public int Inst_CODE1 { get; set; }
|
||||
public int Inst_CODE2 { get; set; }
|
||||
public string Inst_Name1 { get; set; }
|
||||
public string Inst_Name2 { get; set; }
|
||||
public string TestCSN { get; set; }
|
||||
public string TestCode { get; set; }
|
||||
public string Reader { get; internal set; }
|
||||
public bool useTestButtons { get; set; }
|
||||
public byte useBeep { get; set; }
|
||||
public bool checkUser { get; internal set; }
|
||||
public bool RestartCom { get; set; }
|
||||
public int EPDTimeOut { get; internal set; }
|
||||
public int EPDRetries { get; internal set; }
|
||||
public bool OnlyMK2 { get; internal set; }
|
||||
public bool RestartComFirst { get; internal set; }
|
||||
|
||||
public bool AllowMultipleEPD { get; internal set; }
|
||||
|
||||
public bool Changed = false;
|
||||
public int Error = 0;
|
||||
public string ErrorMessage;
|
||||
public StringBuilder insComments;
|
||||
public TextBlock tbComments;
|
||||
public DataInterface dataInterface;
|
||||
public System.Collections.Generic.Dictionary<byte, ushort> beepMk3Map;
|
||||
public ushort useBeepMK3()
|
||||
{
|
||||
if (beepMk3Map.ContainsKey(useBeep))
|
||||
return beepMk3Map[useBeep];
|
||||
else return beepMk3Map[0b00011010];
|
||||
}
|
||||
public Station(DataInterface mDataInterface, string Station)
|
||||
{
|
||||
const string taskName = "StationInit";
|
||||
splunkLog = new spl1(Environment.MachineName);
|
||||
stationLog = null;
|
||||
dataInterface = mDataInterface;
|
||||
Error = 0;
|
||||
ErrorMessage = string.Empty;
|
||||
ComPort = 0;
|
||||
Inst_CODE1 = 1;
|
||||
Inst_CODE2 = 11;
|
||||
Inst_Name1 = "BR1";
|
||||
Inst_Name2 = "Venus";
|
||||
TestCSN = System.Configuration.ConfigurationManager.AppSettings["TestCSN"];
|
||||
TestCode = System.Configuration.ConfigurationManager.AppSettings["TestCode"];
|
||||
insComments = new StringBuilder();
|
||||
tbComments = new TextBlock();
|
||||
tbComments.FontSize = 20;
|
||||
tbComments.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
|
||||
tbComments.TextAlignment = System.Windows.TextAlignment.Center;
|
||||
EPDTimeOut = 10000; //ms
|
||||
EPDRetries = 2;
|
||||
|
||||
beepMk3Map = new Dictionary<byte, ushort>();
|
||||
beepMk3Map.Add(0b00010111, 0b1001110011100001);
|
||||
beepMk3Map.Add(0b00011111, 0b1001110011000001);
|
||||
beepMk3Map.Add(0b00010110, 0b1001110010100001);
|
||||
beepMk3Map.Add(0b00011110, 0b1001110010000001);
|
||||
beepMk3Map.Add(0b00011010, 0b1001110000000000);
|
||||
|
||||
stationLog = mDataInterface.stationLog;
|
||||
|
||||
var co = dataInterface.getCon(true); // No dispose
|
||||
{
|
||||
using (var cmd = new SqlCommand("StationSettingsSelect", co))
|
||||
{
|
||||
cmd.CommandType = System.Data.CommandType.StoredProcedure;
|
||||
try
|
||||
{
|
||||
var rs = cmd.ExecuteReader(System.Data.CommandBehavior.SingleRow);
|
||||
if (rs.HasRows && rs.Read())
|
||||
{
|
||||
object[] Values = new object[rs.FieldCount];
|
||||
int rv = rs.GetValues(Values);
|
||||
ID_Station = (int)Values[rs.GetOrdinal("ID_Station")];
|
||||
ComPort = (int)Values[rs.GetOrdinal("ComPort")];
|
||||
|
||||
Inst_CODE1 = rs.IntOrDefault("Inst_CODE1", 0);
|
||||
Inst_CODE2 = rs.IntOrDefault("Inst_CODE2", 0);
|
||||
Inst_Name1 = rs.StringOrDefault("Inst_Name1", string.Empty);
|
||||
Inst_Name2 = rs.StringOrDefault("Inst_Name2", string.Empty);
|
||||
TestCSN = rs.StringOrDefault("TestCSN", string.Empty);
|
||||
Reader = rs.StringOrDefault("Reader", string.Empty);
|
||||
useTestButtons = rs.BoolOrDefault("useTestButtons", false);
|
||||
useBeep = rs.ByteOrDefault("useBeep", 0b00010110);
|
||||
doLog = rs.BoolOrDefault("doLog", false);
|
||||
checkUser = rs.BoolOrDefault("checkUser", false);
|
||||
EPDTimeOut = rs.IntOrDefault("EPDTimeout", 10000);
|
||||
EPDRetries = rs.IntOrDefault("EPDRetries", 2);
|
||||
RestartCom = rs.BoolOrDefault("RestartCom", false);
|
||||
RestartComFirst = rs.BoolOrDefault("RestartComFirst", false);
|
||||
OnlyMK2 = rs.BoolOrDefault("OnlyMK2", false);
|
||||
AllowMultipleEPD = rs.BoolOrDefault("AllowMultipleEPD", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
ID_Station = 0;
|
||||
ComPort = 0;
|
||||
Inst_CODE1 = 1;
|
||||
Inst_CODE2 = 11;
|
||||
Inst_Name1 = "BR1"; Inst_Name2 = "Venus";
|
||||
TestCSN = System.Configuration.ConfigurationManager.AppSettings["TestCSN"];
|
||||
TestCode = System.Configuration.ConfigurationManager.AppSettings["TestCode"];
|
||||
Changed = true;
|
||||
Reader = System.Configuration.ConfigurationManager.AppSettings["Reader"];
|
||||
checkUser = false;
|
||||
EPDTimeOut = 10000;
|
||||
EPDRetries = 2;
|
||||
AllowMultipleEPD = false;
|
||||
}
|
||||
rs.Close();
|
||||
splunkLog.WriteSplunkLog("StationInit", spl1.iseverity.info);
|
||||
Error = 0;
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
Error = 1;
|
||||
ErrorMessage = ex.Message;
|
||||
splunkLog.WriteException(moduleName,taskName, ex);
|
||||
if (stationLog != null) stationLog.WriteLine($"GetStationSettings error {ex.Message} {System.DateTime.Now}");
|
||||
}
|
||||
}
|
||||
|
||||
dataInterface.SetStation(ID_Station);
|
||||
dataInterface.SetCheckUser(checkUser);
|
||||
dataInterface.SetAllowMultipleEPD(AllowMultipleEPD);
|
||||
|
||||
const string sProc2 = "GetInstallationsComments";
|
||||
if (Error == 0) using (var cmd2 = new SqlCommand(sProc2, co))
|
||||
{
|
||||
cmd2.CommandType = System.Data.CommandType.StoredProcedure;
|
||||
cmd2.Parameters.AddWithValue("@Inst_CODE1", Inst_CODE1);
|
||||
if (Inst_CODE2 > 0) cmd2.Parameters.AddWithValue("@Inst_CODE2", Inst_CODE2);
|
||||
try
|
||||
{
|
||||
var rs = cmd2.ExecuteReader(System.Data.CommandBehavior.SingleResult);
|
||||
string curins = string.Empty, thisins = string.Empty, thiscomment = string.Empty;
|
||||
if (rs.HasRows)
|
||||
while (rs.Read())
|
||||
{
|
||||
thisins = rs.GetString(2);
|
||||
thiscomment = rs.GetString(3).Replace("\\n", "\n");
|
||||
if (curins.CompareTo(thisins) != 0)
|
||||
{
|
||||
if (curins != string.Empty) tbComments.Inlines.Add(new LineBreak());
|
||||
tbComments.Inlines.Add(new Bold(new Run($"Installation {thisins}:\n") { FontSize = 25 }));
|
||||
insComments.AppendLine($"Installation {thisins}");
|
||||
curins = thisins;
|
||||
}
|
||||
tbComments.Inlines.Add(new Run(thiscomment));
|
||||
}
|
||||
rs.Close();
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
splunkLog.WriteException(moduleName, sProc2, ex);
|
||||
Error = 2;
|
||||
ErrorMessage = ex.Message;
|
||||
if (stationLog != null) stationLog.WriteLine($"{sProc2} error {ex.Message} {System.DateTime.Now}");
|
||||
}
|
||||
}
|
||||
co?.Close();
|
||||
}
|
||||
}
|
||||
private void CmdSetParams(SqlCommand cmd)
|
||||
{
|
||||
//for (int ix = 0; ix < cmd.Parameters.Count; ix++)
|
||||
// System.Diagnostics.Debug.WriteLine(cmd.Parameters[ix].ParameterName);
|
||||
|
||||
try
|
||||
{
|
||||
cmd.SetIfExists("ComPort", ComPort);
|
||||
if (!string.IsNullOrEmpty(Inst_Name1) && Inst_CODE1 > 0)
|
||||
{
|
||||
cmd.SetIfExists("Inst_CODE1", Inst_CODE1);
|
||||
cmd.SetIfExists("Inst_Name1", Inst_Name1);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Inst_Name2) && Inst_CODE2 > 0)
|
||||
{
|
||||
cmd.SetIfExists("Inst_CODE2", Inst_CODE2);
|
||||
cmd.SetIfExists("Inst_Name2", Inst_Name2);
|
||||
}
|
||||
//if (!string.IsNullOrEmpty(TestCSN))
|
||||
// cmd.Parameters.AddWithValue("TestCSN", TestCSN);
|
||||
//Reader
|
||||
if (!string.IsNullOrEmpty(Reader)) cmd.SetIfExists("Reader", Reader);
|
||||
cmd.SetIfExists("checkUser", checkUser);
|
||||
cmd.SetIfExists("useBeep", useBeep);
|
||||
cmd.SetIfExists("EPDTimeout", EPDTimeOut);
|
||||
cmd.SetIfExists("EPDRetries", EPDRetries);
|
||||
cmd.SetIfExists("RestartCom", RestartCom);
|
||||
cmd.SetIfExists("RestartComFirst", RestartComFirst);
|
||||
cmd.SetIfExists("OnlyMK2", OnlyMK2);
|
||||
cmd.SetIfExists("AllowMultipleEPD", AllowMultipleEPD);
|
||||
cmd.SetIfExists("useTestButtons", useTestButtons);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
splunkLog.WriteException("Station", "SetParams", ex);
|
||||
Error = 1;
|
||||
ErrorMessage = ex.Message;
|
||||
if (stationLog != null) stationLog.WriteLine($"GetStationSettings error {ex.Message} {System.DateTime.Now}");
|
||||
}
|
||||
}
|
||||
private void UpdateToDb(SqlConnection co, SqlCommand cmd)
|
||||
{
|
||||
const string taskName = "UpdateToDb";
|
||||
cmd.Connection = co;
|
||||
try
|
||||
{
|
||||
cmd.Parameters.Clear();
|
||||
SqlCommandBuilder.DeriveParameters(cmd);
|
||||
CmdSetParams(cmd);
|
||||
splunkLog.KvAddCommand(spl1.skeys.sqlQuery, cmd);
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
catch (System.Exception ex) {
|
||||
splunkLog.WriteException(moduleName, taskName, ex);
|
||||
if (stationLog != null) stationLog.WriteLine($"{taskName} error {ex.Message} co {co.DataSource} {System.DateTime.Now}");
|
||||
}
|
||||
splunkLog.KvClear();
|
||||
}
|
||||
public void Update()
|
||||
{
|
||||
const string taskName = "Update";
|
||||
SqlConnection co = null;
|
||||
using (var cmd = new SqlCommand("StationSettingsUpdate"))
|
||||
{
|
||||
|
||||
cmd.CommandType = System.Data.CommandType.StoredProcedure;
|
||||
try
|
||||
{
|
||||
co = dataInterface.getCon(true);
|
||||
splunkLog.KvAddCommand(spl1.skeys.sqlQuery,cmd);
|
||||
UpdateToDb(co, cmd);
|
||||
co.Close();
|
||||
|
||||
co = dataInterface.getConCentral(true);
|
||||
splunkLog.KvClear(spl1.skeys.sqlQuery);
|
||||
splunkLog.KvAddCommand(spl1.skeys.sqlQuery, cmd);
|
||||
UpdateToDb(co, cmd);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
Error = 1;
|
||||
ErrorMessage = ex.Message;
|
||||
splunkLog.WriteException(moduleName, taskName, ex);
|
||||
if (stationLog != null) stationLog.WriteLine($"{taskName} error {ex.Message} co {co.DataSource} {System.DateTime.Now}");
|
||||
}
|
||||
co?.Close();
|
||||
splunkLog.KvClear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\LSWLib.3.0.8\build\LSWLib.props" Condition="Exists('..\packages\LSWLib.3.0.8\build\LSWLib.props')" />
|
||||
<Import Project="..\packages\LSWLib.3.0.9\build\LSWLib.props" Condition="Exists('..\packages\LSWLib.3.0.9\build\LSWLib.props')" />
|
||||
<Import Project="..\packages\LSWDesfirePublic.1.3.9\build\LSWDesfirePublic.props" Condition="Exists('..\packages\LSWDesfirePublic.1.3.9\build\LSWDesfirePublic.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
|
|
@ -336,13 +336,13 @@
|
|||
<Error Condition="!Exists('..\packages\Microsoft.VisualStudio.SlowCheetah.4.0.8\build\Microsoft.VisualStudio.SlowCheetah.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.VisualStudio.SlowCheetah.4.0.8\build\Microsoft.VisualStudio.SlowCheetah.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\LSWDesfirePublic.1.3.9\build\LSWDesfirePublic.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LSWDesfirePublic.1.3.9\build\LSWDesfirePublic.props'))" />
|
||||
<Error Condition="!Exists('..\packages\LSWDesfirePublic.1.3.9\build\LSWDesfirePublic.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LSWDesfirePublic.1.3.9\build\LSWDesfirePublic.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\LSWLib.3.0.8\build\LSWLib.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LSWLib.3.0.8\build\LSWLib.props'))" />
|
||||
<Error Condition="!Exists('..\packages\LSWLib.3.0.8\build\LSWLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LSWLib.3.0.8\build\LSWLib.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\LSWLib.3.0.9\build\LSWLib.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LSWLib.3.0.9\build\LSWLib.props'))" />
|
||||
<Error Condition="!Exists('..\packages\LSWLib.3.0.9\build\LSWLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LSWLib.3.0.9\build\LSWLib.targets'))" />
|
||||
</Target>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>"C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /sha1 857150b64ef7d3e679c8cbde425d2a0b5e58ffaa /fd sha256 /d "Integrity & Authenticity" /tr "http://timestamp.digicert.com" $(TargetPath)</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\packages\Microsoft.VisualStudio.SlowCheetah.4.0.8\build\Microsoft.VisualStudio.SlowCheetah.targets" Condition="Exists('..\packages\Microsoft.VisualStudio.SlowCheetah.4.0.8\build\Microsoft.VisualStudio.SlowCheetah.targets')" />
|
||||
<Import Project="..\packages\LSWDesfirePublic.1.3.9\build\LSWDesfirePublic.targets" Condition="Exists('..\packages\LSWDesfirePublic.1.3.9\build\LSWDesfirePublic.targets')" />
|
||||
<Import Project="..\packages\LSWLib.3.0.8\build\LSWLib.targets" Condition="Exists('..\packages\LSWLib.3.0.8\build\LSWLib.targets')" />
|
||||
<Import Project="..\packages\LSWLib.3.0.9\build\LSWLib.targets" Condition="Exists('..\packages\LSWLib.3.0.9\build\LSWLib.targets')" />
|
||||
</Project>
|
||||
|
|
@ -1,67 +1,80 @@
|
|||
using System;
|
||||
|
||||
|
||||
static public class extensions
|
||||
{
|
||||
static public bool SetIfExists(this System.Data.SqlClient.SqlCommand cmd, string paramname, object value)
|
||||
{
|
||||
bool rv = true;
|
||||
if (value == null) value = DBNull.Value;
|
||||
string p1;
|
||||
if (paramname[0] != '@') p1 = "@" + paramname; else {p1 = paramname; paramname = paramname.Substring(1); }
|
||||
if (cmd.Parameters.Contains(p1))
|
||||
cmd.Parameters[p1].Value = value;
|
||||
else if (cmd.Parameters.Contains(paramname))
|
||||
cmd.Parameters[paramname].Value = value;
|
||||
else rv = false;
|
||||
return rv;
|
||||
}
|
||||
|
||||
public static bool BoolOrDefault( this System.Data.SqlClient.SqlDataReader rs, string colName, bool defaultValue)
|
||||
{
|
||||
bool rv = defaultValue;
|
||||
try
|
||||
{
|
||||
int c = rs.GetOrdinal(colName);
|
||||
if (!rs.IsDBNull(c)) rv = rs.GetBoolean(c);
|
||||
}
|
||||
catch { rv = defaultValue; }
|
||||
return rv;
|
||||
}
|
||||
|
||||
public static byte ByteOrDefault(this System.Data.SqlClient.SqlDataReader rs, string colName, byte defaultValue)
|
||||
{
|
||||
byte rv = defaultValue;
|
||||
try
|
||||
{
|
||||
int c = rs.GetOrdinal(colName);
|
||||
if (!rs.IsDBNull(c)) rv = rs.GetByte(c);
|
||||
}
|
||||
catch { rv = defaultValue; }
|
||||
return rv;
|
||||
}
|
||||
|
||||
public static int IntOrDefault(this System.Data.SqlClient.SqlDataReader rs, string colName, int defaultValue)
|
||||
{
|
||||
int rv = defaultValue;
|
||||
try
|
||||
{
|
||||
int c = rs.GetOrdinal(colName);
|
||||
if (!rs.IsDBNull(c)) rv = rs.GetInt32(c);
|
||||
}
|
||||
catch { rv = defaultValue; }
|
||||
return rv;
|
||||
}
|
||||
public static string StringOrDefault(this System.Data.SqlClient.SqlDataReader rs, string colName, string defaultValue)
|
||||
{
|
||||
string rv = defaultValue;
|
||||
try
|
||||
{
|
||||
int c = rs.GetOrdinal(colName);
|
||||
if (!rs.IsDBNull(c)) rv = rs.GetString(c);
|
||||
}
|
||||
catch { rv = defaultValue; }
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
using System;
|
||||
|
||||
|
||||
static public class extensions
|
||||
{
|
||||
static public bool SetIfExists(this System.Data.SqlClient.SqlCommand cmd, string paramname, object value)
|
||||
{
|
||||
bool found = true;
|
||||
if (value == null) value = DBNull.Value;
|
||||
if (cmd.Parameters.Contains(paramname)) cmd.Parameters[paramname].Value = value;
|
||||
else {
|
||||
if (paramname[0] != '@') paramname = "@" + paramname; else paramname = paramname.Substring(1);
|
||||
if (cmd.Parameters.Contains(paramname))
|
||||
cmd.Parameters[paramname].Value = value;
|
||||
else found = false;
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
static public bool SetBoolParam(this System.Data.SqlClient.SqlCommand c, string paramname, bool value)
|
||||
{
|
||||
bool found = true;
|
||||
if (c.Parameters.Contains(paramname)) c.Parameters[paramname].Value = value;
|
||||
else
|
||||
{
|
||||
if (paramname[0] != '@') paramname = "@" + paramname; else paramname = paramname.Substring(1);
|
||||
if (c.Parameters.Contains(paramname)) c.Parameters[paramname].Value = value;
|
||||
else found = false;
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
public static bool BoolOrDefault( this System.Data.SqlClient.SqlDataReader rs, string colName, bool defaultValue)
|
||||
{
|
||||
bool rv = defaultValue;
|
||||
try
|
||||
{
|
||||
int c = rs.GetOrdinal(colName);
|
||||
if (!rs.IsDBNull(c)) rv = rs.GetBoolean(c);
|
||||
}
|
||||
catch { rv = defaultValue; }
|
||||
return rv;
|
||||
}
|
||||
|
||||
public static byte ByteOrDefault(this System.Data.SqlClient.SqlDataReader rs, string colName, byte defaultValue)
|
||||
{
|
||||
byte rv = defaultValue;
|
||||
try
|
||||
{
|
||||
int c = rs.GetOrdinal(colName);
|
||||
if (!rs.IsDBNull(c)) rv = rs.GetByte(c);
|
||||
}
|
||||
catch { rv = defaultValue; }
|
||||
return rv;
|
||||
}
|
||||
|
||||
public static int IntOrDefault(this System.Data.SqlClient.SqlDataReader rs, string colName, int defaultValue)
|
||||
{
|
||||
int rv = defaultValue;
|
||||
try
|
||||
{
|
||||
int c = rs.GetOrdinal(colName);
|
||||
if (!rs.IsDBNull(c)) rv = rs.GetInt32(c);
|
||||
}
|
||||
catch { rv = defaultValue; }
|
||||
return rv;
|
||||
}
|
||||
public static string StringOrDefault(this System.Data.SqlClient.SqlDataReader rs, string colName, string defaultValue)
|
||||
{
|
||||
string rv = defaultValue;
|
||||
try
|
||||
{
|
||||
int c = rs.GetOrdinal(colName);
|
||||
if (!rs.IsDBNull(c)) rv = rs.GetString(c);
|
||||
}
|
||||
catch { rv = defaultValue; }
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="LSWDesfirePublic" version="1.3.9" targetFramework="net48" />
|
||||
<package id="LSWLib" version="3.0.8" targetFramework="net48" />
|
||||
<package id="Microsoft.VisualStudio.SlowCheetah" version="4.0.8" targetFramework="net48" developmentDependency="true" />
|
||||
<package id="SharpDX" version="4.2.0" targetFramework="net48" />
|
||||
<package id="SharpDX.D3DCompiler" version="4.2.0" targetFramework="net48" />
|
||||
<package id="SharpDX.Direct2D1" version="4.2.0" targetFramework="net48" />
|
||||
<package id="SharpDX.Direct3D10" version="4.2.0" targetFramework="net48" />
|
||||
<package id="SharpDX.Direct3D9" version="4.2.0" targetFramework="net48" />
|
||||
<package id="SharpDX.DXGI" version="4.2.0" targetFramework="net48" />
|
||||
<package id="Telerik.Windows.Controls.for.Wpf.Xaml" version="2022.1.222" targetFramework="net48" />
|
||||
<package id="Telerik.Windows.Controls.GridView.for.Wpf.Xaml" version="2022.1.222" targetFramework="net48" />
|
||||
<package id="Telerik.Windows.Controls.Input.for.Wpf.Xaml" version="2022.1.222" targetFramework="net48" />
|
||||
<package id="Telerik.Windows.Data.for.Wpf.Xaml" version="2022.1.222" targetFramework="net48" />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="LSWDesfirePublic" version="1.3.9" targetFramework="net48" />
|
||||
<package id="LSWLib" version="3.0.9" targetFramework="net48" />
|
||||
<package id="Microsoft.VisualStudio.SlowCheetah" version="4.0.8" targetFramework="net48" developmentDependency="true" />
|
||||
<package id="SharpDX" version="4.2.0" targetFramework="net48" />
|
||||
<package id="SharpDX.D3DCompiler" version="4.2.0" targetFramework="net48" />
|
||||
<package id="SharpDX.Direct2D1" version="4.2.0" targetFramework="net48" />
|
||||
<package id="SharpDX.Direct3D10" version="4.2.0" targetFramework="net48" />
|
||||
<package id="SharpDX.Direct3D9" version="4.2.0" targetFramework="net48" />
|
||||
<package id="SharpDX.DXGI" version="4.2.0" targetFramework="net48" />
|
||||
<package id="Telerik.Windows.Controls.for.Wpf.Xaml" version="2022.1.222" targetFramework="net48" />
|
||||
<package id="Telerik.Windows.Controls.GridView.for.Wpf.Xaml" version="2022.1.222" targetFramework="net48" />
|
||||
<package id="Telerik.Windows.Controls.Input.for.Wpf.Xaml" version="2022.1.222" targetFramework="net48" />
|
||||
<package id="Telerik.Windows.Data.for.Wpf.Xaml" version="2022.1.222" targetFramework="net48" />
|
||||
</packages>
|
||||
12876
syncEdosLocal/DataSet1.Designer.cs
generated
12876
syncEdosLocal/DataSet1.Designer.cs
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DataSetUISetting Version="1.00" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<TableUISettings />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DataSetUISetting Version="1.00" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<TableUISettings />
|
||||
</DataSetUISetting>
|
||||
|
|
@ -1,410 +1,434 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema id="DataSet1" targetNamespace="http://tempuri.org/DataSet1.xsd" xmlns:mstns="http://tempuri.org/DataSet1.xsd" xmlns="http://tempuri.org/DataSet1.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
|
||||
<xs:annotation>
|
||||
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<DataSource DefaultConnectionIndex="1" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<Connections>
|
||||
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="eDosLocalConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="eDosLocalConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.syncEdosLocal.Properties.Settings.GlobalReference.Default.eDosLocalConnectionString" Provider="System.Data.SqlClient" />
|
||||
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="eDosConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="eDosConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.syncEdosLocal.Properties.Settings.GlobalReference.Default.eDosConnectionString" Provider="System.Data.SqlClient" />
|
||||
</Connections>
|
||||
<Tables>
|
||||
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="LocalVisitsTableAdapter" GeneratorDataComponentClassName="LocalVisitsTableAdapter" Name="LocalVisits" UserDataComponentName="LocalVisitsTableAdapter">
|
||||
<MainSource>
|
||||
<DbSource ConnectionRef="eDosLocalConnectionString (Settings)" DbObjectName="eDosLocal.export.VisitsSelect" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>export.VisitsSelect</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
<UpdateCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>export.VisitsUpdate</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Station" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_Station" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Visit" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_Visit" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@syncedEntry" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="syncedEntry" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@syncedExit" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="syncedExit" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</UpdateCommand>
|
||||
</DbSource>
|
||||
</MainSource>
|
||||
<Mappings>
|
||||
<Mapping SourceColumn="ID_Station" DataSetColumn="ID_Station" />
|
||||
<Mapping SourceColumn="ID_Visit" DataSetColumn="ID_Visit" />
|
||||
<Mapping SourceColumn="Inst_CODE" DataSetColumn="Inst_CODE" />
|
||||
<Mapping SourceColumn="PersID" DataSetColumn="PersID" />
|
||||
<Mapping SourceColumn="ID_Task" DataSetColumn="ID_Task" />
|
||||
<Mapping SourceColumn="EntryTime" DataSetColumn="EntryTime" />
|
||||
<Mapping SourceColumn="ReturnTime" DataSetColumn="ReturnTime" />
|
||||
<Mapping SourceColumn="Hp10Dose" DataSetColumn="Hp10Dose" />
|
||||
<Mapping SourceColumn="Hp07Dose" DataSetColumn="Hp07Dose" />
|
||||
<Mapping SourceColumn="Hp10Total" DataSetColumn="Hp10Total" />
|
||||
<Mapping SourceColumn="Hp07Total" DataSetColumn="Hp07Total" />
|
||||
<Mapping SourceColumn="Hp10Peak" DataSetColumn="Hp10Peak" />
|
||||
<Mapping SourceColumn="Hp07Peak" DataSetColumn="Hp07Peak" />
|
||||
<Mapping SourceColumn="Hp10Time" DataSetColumn="Hp10Time" />
|
||||
<Mapping SourceColumn="Hp07Time" DataSetColumn="Hp07Time" />
|
||||
<Mapping SourceColumn="ID_EPD" DataSetColumn="ID_EPD" />
|
||||
<Mapping SourceColumn="QualityData" DataSetColumn="QualityData" />
|
||||
<Mapping SourceColumn="K1" DataSetColumn="K1" />
|
||||
<Mapping SourceColumn="K2" DataSetColumn="K2" />
|
||||
<Mapping SourceColumn="K3" DataSetColumn="K3" />
|
||||
<Mapping SourceColumn="K4" DataSetColumn="K4" />
|
||||
<Mapping SourceColumn="K5" DataSetColumn="K5" />
|
||||
<Mapping SourceColumn="K6" DataSetColumn="K6" />
|
||||
<Mapping SourceColumn="SG" DataSetColumn="SG" />
|
||||
<Mapping SourceColumn="BC" DataSetColumn="BC" />
|
||||
<Mapping SourceColumn="FB" DataSetColumn="FB" />
|
||||
<Mapping SourceColumn="HG" DataSetColumn="HG" />
|
||||
<Mapping SourceColumn="alarmStatus" DataSetColumn="alarmStatus" />
|
||||
<Mapping SourceColumn="otherAlarms" DataSetColumn="otherAlarms" />
|
||||
<Mapping SourceColumn="errorStatus" DataSetColumn="errorStatus" />
|
||||
<Mapping SourceColumn="operatingStatus" DataSetColumn="operatingStatus" />
|
||||
<Mapping SourceColumn="isBG" DataSetColumn="isBG" />
|
||||
<Mapping SourceColumn="isComplete" DataSetColumn="isComplete" />
|
||||
<Mapping SourceColumn="isDeleted" DataSetColumn="isDeleted" />
|
||||
<Mapping SourceColumn="isAlarm" DataSetColumn="isAlarm" />
|
||||
<Mapping SourceColumn="isAlarmCleared" DataSetColumn="isAlarmCleared" />
|
||||
<Mapping SourceColumn="isManualExit" DataSetColumn="isManualExit" />
|
||||
<Mapping SourceColumn="ID_Station_Return" DataSetColumn="ID_Station_Return" />
|
||||
<Mapping SourceColumn="ENTRY_EPD_CLOCK" DataSetColumn="ENTRY_EPD_CLOCK" />
|
||||
<Mapping SourceColumn="EXIT_EPD_CLOCK" DataSetColumn="EXIT_EPD_CLOCK" />
|
||||
<Mapping SourceColumn="TIME_LOST" DataSetColumn="TIME_LOST" />
|
||||
<Mapping SourceColumn="VisitStatus" DataSetColumn="VisitStatus" />
|
||||
<Mapping SourceColumn="syncedEntry" DataSetColumn="syncedEntry" />
|
||||
<Mapping SourceColumn="SyncedExit" DataSetColumn="syncedExit" />
|
||||
<Mapping SourceColumn="syncedExit" DataSetColumn="syncedExit" />
|
||||
<Mapping SourceColumn="epdType" DataSetColumn="epdType" />
|
||||
<Mapping SourceColumn="eDosBatteryWarning" DataSetColumn="eDosBatteryWarning" />
|
||||
<Mapping SourceColumn="eDosDose07Warning" DataSetColumn="eDosDose07Warning" />
|
||||
<Mapping SourceColumn="eDosDose07Alarm" DataSetColumn="eDosDose07Alarm" />
|
||||
<Mapping SourceColumn="eDosRate07Warning" DataSetColumn="eDosRate07Warning" />
|
||||
<Mapping SourceColumn="eDosRate07Alarm" DataSetColumn="eDosRate07Alarm" />
|
||||
<Mapping SourceColumn="eDosDose10Warning" DataSetColumn="eDosDose10Warning" />
|
||||
<Mapping SourceColumn="eDosDose10Alarm" DataSetColumn="eDosDose10Alarm" />
|
||||
<Mapping SourceColumn="eDosRate10Warning" DataSetColumn="eDosRate10Warning" />
|
||||
<Mapping SourceColumn="eDosRate10Alarm" DataSetColumn="eDosRate10Alarm" />
|
||||
</Mappings>
|
||||
<Sources />
|
||||
</TableAdapter>
|
||||
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="CentralVisitsTableAdapter" GeneratorDataComponentClassName="CentralVisitsTableAdapter" Name="CentralVisits" UserDataComponentName="CentralVisitsTableAdapter">
|
||||
<MainSource>
|
||||
<DbSource ConnectionRef="eDosConnectionString (Settings)" DbObjectName="eDos.import.VisitsSelect" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||
<InsertCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>import.VisitsInsert</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Station" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_Station" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Visit" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_Visit" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Inst_CODE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Inst_CODE" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@PersID" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="PersID" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Task" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_Task" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@EntryTime" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="EntryTime" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@ReturnTime" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="ReturnTime" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp10Dose" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp10Dose" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp07Dose" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp07Dose" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp10Total" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp10Total" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp07Total" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp07Total" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp10Peak" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp10Peak" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp07Peak" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp07Peak" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@Hp10Time" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="Hp10Time" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@Hp07Time" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="Hp07Time" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_EPD" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_EPD" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@QualityData" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="QualityData" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K1" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K1" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K2" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K2" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K3" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K3" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K4" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K5" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K5" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K6" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K6" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@SG" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="SG" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@BC" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="BC" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@FB" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="FB" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@HG" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="HG" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@alarmStatus" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="alarmStatus" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@otherAlarms" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="otherAlarms" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@errorStatus" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="errorStatus" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@operatingStatus" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="operatingStatus" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isBG" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isBG" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isComplete" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isComplete" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isDeleted" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isDeleted" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isAlarm" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isAlarm" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isAlarmCleared" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isAlarmCleared" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isManualExit" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isManualExit" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Station_Return" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_Station_Return" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="numeric" DbType="Decimal" Direction="Input" ParameterName="@ENTRY_EPD_CLOCK" Precision="10" ProviderType="Decimal" Scale="0" Size="9" SourceColumn="ENTRY_EPD_CLOCK" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="numeric" DbType="Decimal" Direction="Input" ParameterName="@EXIT_EPD_CLOCK" Precision="10" ProviderType="Decimal" Scale="0" Size="9" SourceColumn="EXIT_EPD_CLOCK" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@TIME_LOST" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="TIME_LOST" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="tinyint" DbType="Byte" Direction="Input" ParameterName="@epdType" Precision="3" ProviderType="TinyInt" Scale="0" Size="1" SourceColumn="epdType" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</InsertCommand>
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>import.VisitsSelect</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Station" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Visit" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
<UpdateCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>import.VisitsUpdate</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Station" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_Station" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Visit" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_Visit" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Inst_CODE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Inst_CODE" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@PersID" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="PersID" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Task" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_Task" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@EntryTime" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="EntryTime" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@ReturnTime" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="ReturnTime" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp10Dose" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp10Dose" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp07Dose" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp07Dose" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp10Total" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp10Total" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp07Total" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp07Total" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp10Peak" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp10Peak" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp07Peak" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp07Peak" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@Hp10Time" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="Hp10Time" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@Hp07Time" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="Hp07Time" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_EPD" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_EPD" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@QualityData" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="QualityData" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K1" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K1" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K2" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K2" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K3" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K3" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K4" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K5" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K5" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K6" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K6" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@SG" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="SG" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@BC" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="BC" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@FB" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="FB" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@HG" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="HG" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@alarmStatus" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="alarmStatus" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@otherAlarms" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="otherAlarms" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@errorStatus" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="errorStatus" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@operatingStatus" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="operatingStatus" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isBG" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isBG" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isComplete" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isComplete" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isDeleted" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isDeleted" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isAlarm" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isAlarm" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isAlarmCleared" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isAlarmCleared" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isManualExit" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isManualExit" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Station_Return" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_Station_Return" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="numeric" DbType="Decimal" Direction="Input" ParameterName="@ENTRY_EPD_CLOCK" Precision="10" ProviderType="Decimal" Scale="0" Size="9" SourceColumn="ENTRY_EPD_CLOCK" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="numeric" DbType="Decimal" Direction="Input" ParameterName="@EXIT_EPD_CLOCK" Precision="10" ProviderType="Decimal" Scale="0" Size="9" SourceColumn="EXIT_EPD_CLOCK" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@TIME_LOST" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="TIME_LOST" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="tinyint" DbType="Byte" Direction="Input" ParameterName="@epdType" Precision="3" ProviderType="TinyInt" Scale="0" Size="1" SourceColumn="epdType" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</UpdateCommand>
|
||||
</DbSource>
|
||||
</MainSource>
|
||||
<Mappings>
|
||||
<Mapping SourceColumn="ID_Station" DataSetColumn="ID_Station" />
|
||||
<Mapping SourceColumn="ID_Visit" DataSetColumn="ID_Visit" />
|
||||
<Mapping SourceColumn="Inst_CODE" DataSetColumn="Inst_CODE" />
|
||||
<Mapping SourceColumn="PersID" DataSetColumn="PersID" />
|
||||
<Mapping SourceColumn="ID_Task" DataSetColumn="ID_Task" />
|
||||
<Mapping SourceColumn="EntryTime" DataSetColumn="EntryTime" />
|
||||
<Mapping SourceColumn="ReturnTime" DataSetColumn="ReturnTime" />
|
||||
<Mapping SourceColumn="Hp10Dose" DataSetColumn="Hp10Dose" />
|
||||
<Mapping SourceColumn="Hp07Dose" DataSetColumn="Hp07Dose" />
|
||||
<Mapping SourceColumn="Hp10Total" DataSetColumn="Hp10Total" />
|
||||
<Mapping SourceColumn="Hp07Total" DataSetColumn="Hp07Total" />
|
||||
<Mapping SourceColumn="Hp10Peak" DataSetColumn="Hp10Peak" />
|
||||
<Mapping SourceColumn="Hp07Peak" DataSetColumn="Hp07Peak" />
|
||||
<Mapping SourceColumn="Hp10Time" DataSetColumn="Hp10Time" />
|
||||
<Mapping SourceColumn="Hp07Time" DataSetColumn="Hp07Time" />
|
||||
<Mapping SourceColumn="ID_EPD" DataSetColumn="ID_EPD" />
|
||||
<Mapping SourceColumn="QualityData" DataSetColumn="QualityData" />
|
||||
<Mapping SourceColumn="K1" DataSetColumn="K1" />
|
||||
<Mapping SourceColumn="K2" DataSetColumn="K2" />
|
||||
<Mapping SourceColumn="K3" DataSetColumn="K3" />
|
||||
<Mapping SourceColumn="K4" DataSetColumn="K4" />
|
||||
<Mapping SourceColumn="K5" DataSetColumn="K5" />
|
||||
<Mapping SourceColumn="K6" DataSetColumn="K6" />
|
||||
<Mapping SourceColumn="SG" DataSetColumn="SG" />
|
||||
<Mapping SourceColumn="BC" DataSetColumn="BC" />
|
||||
<Mapping SourceColumn="FB" DataSetColumn="FB" />
|
||||
<Mapping SourceColumn="HG" DataSetColumn="HG" />
|
||||
<Mapping SourceColumn="alarmStatus" DataSetColumn="alarmStatus" />
|
||||
<Mapping SourceColumn="otherAlarms" DataSetColumn="otherAlarms" />
|
||||
<Mapping SourceColumn="errorStatus" DataSetColumn="errorStatus" />
|
||||
<Mapping SourceColumn="operatingStatus" DataSetColumn="operatingStatus" />
|
||||
<Mapping SourceColumn="isBG" DataSetColumn="isBG" />
|
||||
<Mapping SourceColumn="isComplete" DataSetColumn="isComplete" />
|
||||
<Mapping SourceColumn="isDeleted" DataSetColumn="isDeleted" />
|
||||
<Mapping SourceColumn="isAlarm" DataSetColumn="isAlarm" />
|
||||
<Mapping SourceColumn="isAlarmCleared" DataSetColumn="isAlarmCleared" />
|
||||
<Mapping SourceColumn="isManualExit" DataSetColumn="isManualExit" />
|
||||
<Mapping SourceColumn="ID_Station_Return" DataSetColumn="ID_Station_Return" />
|
||||
<Mapping SourceColumn="ENTRY_EPD_CLOCK" DataSetColumn="ENTRY_EPD_CLOCK" />
|
||||
<Mapping SourceColumn="EXIT_EPD_CLOCK" DataSetColumn="EXIT_EPD_CLOCK" />
|
||||
<Mapping SourceColumn="TIME_LOST" DataSetColumn="TIME_LOST" />
|
||||
<Mapping SourceColumn="VisitStatus" DataSetColumn="VisitStatus" />
|
||||
<Mapping SourceColumn="syncedEntry" DataSetColumn="syncedEntry" />
|
||||
<Mapping SourceColumn="SyncedExit" DataSetColumn="syncedExit" />
|
||||
<Mapping SourceColumn="syncedExit" DataSetColumn="syncedExit" />
|
||||
<Mapping SourceColumn="epdType" DataSetColumn="epdType" />
|
||||
<Mapping SourceColumn="eDosBatteryWarning" DataSetColumn="eDosBatteryWarning" />
|
||||
<Mapping SourceColumn="eDosDose07Warning" DataSetColumn="eDosDose07Warning" />
|
||||
<Mapping SourceColumn="eDosDose07Alarm" DataSetColumn="eDosDose07Alarm" />
|
||||
<Mapping SourceColumn="eDosRate07Warning" DataSetColumn="eDosRate07Warning" />
|
||||
<Mapping SourceColumn="eDosRate07Alarm" DataSetColumn="eDosRate07Alarm" />
|
||||
<Mapping SourceColumn="eDosDose10Warning" DataSetColumn="eDosDose10Warning" />
|
||||
<Mapping SourceColumn="eDosDose10Alarm" DataSetColumn="eDosDose10Alarm" />
|
||||
<Mapping SourceColumn="eDosRate10Warning" DataSetColumn="eDosRate10Warning" />
|
||||
<Mapping SourceColumn="eDosRate10Alarm" DataSetColumn="eDosRate10Alarm" />
|
||||
</Mappings>
|
||||
<Sources />
|
||||
</TableAdapter>
|
||||
</Tables>
|
||||
<Sources />
|
||||
</DataSource>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:element name="DataSet1" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="DataSet1" msprop:Generator_UserDSName="DataSet1">
|
||||
<xs:complexType>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="LocalVisits" msprop:Generator_TableClassName="LocalVisitsDataTable" msprop:Generator_TableVarName="tableLocalVisits" msprop:Generator_TablePropName="LocalVisits" msprop:Generator_RowDeletingName="LocalVisitsRowDeleting" msprop:Generator_RowChangingName="LocalVisitsRowChanging" msprop:Generator_RowEvHandlerName="LocalVisitsRowChangeEventHandler" msprop:Generator_RowDeletedName="LocalVisitsRowDeleted" msprop:Generator_UserTableName="LocalVisits" msprop:Generator_RowChangedName="LocalVisitsRowChanged" msprop:Generator_RowEvArgName="LocalVisitsRowChangeEvent" msprop:Generator_RowClassName="LocalVisitsRow">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="ID_Station" msprop:Generator_ColumnVarNameInTable="columnID_Station" msprop:Generator_ColumnPropNameInRow="ID_Station" msprop:Generator_ColumnPropNameInTable="ID_StationColumn" msprop:Generator_UserColumnName="ID_Station" type="xs:int" />
|
||||
<xs:element name="ID_Visit" msprop:Generator_ColumnVarNameInTable="columnID_Visit" msprop:Generator_ColumnPropNameInRow="ID_Visit" msprop:Generator_ColumnPropNameInTable="ID_VisitColumn" msprop:Generator_UserColumnName="ID_Visit" type="xs:int" />
|
||||
<xs:element name="Inst_CODE" msprop:Generator_ColumnVarNameInTable="columnInst_CODE" msprop:Generator_ColumnPropNameInRow="Inst_CODE" msprop:Generator_ColumnPropNameInTable="Inst_CODEColumn" msprop:Generator_UserColumnName="Inst_CODE" type="xs:int" />
|
||||
<xs:element name="PersID" msprop:Generator_ColumnVarNameInTable="columnPersID" msprop:Generator_ColumnPropNameInRow="PersID" msprop:Generator_ColumnPropNameInTable="PersIDColumn" msprop:Generator_UserColumnName="PersID" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="ID_Task" msprop:Generator_ColumnVarNameInTable="columnID_Task" msprop:Generator_ColumnPropNameInRow="ID_Task" msprop:Generator_ColumnPropNameInTable="ID_TaskColumn" msprop:Generator_UserColumnName="ID_Task" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="EntryTime" msprop:Generator_ColumnVarNameInTable="columnEntryTime" msprop:Generator_ColumnPropNameInRow="EntryTime" msprop:Generator_ColumnPropNameInTable="EntryTimeColumn" msprop:Generator_UserColumnName="EntryTime" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="ReturnTime" msprop:Generator_ColumnVarNameInTable="columnReturnTime" msprop:Generator_ColumnPropNameInRow="ReturnTime" msprop:Generator_ColumnPropNameInTable="ReturnTimeColumn" msprop:Generator_UserColumnName="ReturnTime" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="Hp10Dose" msprop:Generator_ColumnVarNameInTable="columnHp10Dose" msprop:Generator_ColumnPropNameInRow="Hp10Dose" msprop:Generator_ColumnPropNameInTable="Hp10DoseColumn" msprop:Generator_UserColumnName="Hp10Dose" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp07Dose" msprop:Generator_ColumnVarNameInTable="columnHp07Dose" msprop:Generator_ColumnPropNameInRow="Hp07Dose" msprop:Generator_ColumnPropNameInTable="Hp07DoseColumn" msprop:Generator_UserColumnName="Hp07Dose" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp10Total" msprop:Generator_ColumnVarNameInTable="columnHp10Total" msprop:Generator_ColumnPropNameInRow="Hp10Total" msprop:Generator_ColumnPropNameInTable="Hp10TotalColumn" msprop:Generator_UserColumnName="Hp10Total" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp07Total" msprop:Generator_ColumnVarNameInTable="columnHp07Total" msprop:Generator_ColumnPropNameInRow="Hp07Total" msprop:Generator_ColumnPropNameInTable="Hp07TotalColumn" msprop:Generator_UserColumnName="Hp07Total" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp10Peak" msprop:Generator_ColumnVarNameInTable="columnHp10Peak" msprop:Generator_ColumnPropNameInRow="Hp10Peak" msprop:Generator_ColumnPropNameInTable="Hp10PeakColumn" msprop:Generator_UserColumnName="Hp10Peak" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp07Peak" msprop:Generator_ColumnVarNameInTable="columnHp07Peak" msprop:Generator_ColumnPropNameInRow="Hp07Peak" msprop:Generator_ColumnPropNameInTable="Hp07PeakColumn" msprop:Generator_UserColumnName="Hp07Peak" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp10Time" msprop:Generator_ColumnVarNameInTable="columnHp10Time" msprop:Generator_ColumnPropNameInRow="Hp10Time" msprop:Generator_ColumnPropNameInTable="Hp10TimeColumn" msprop:Generator_UserColumnName="Hp10Time" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="Hp07Time" msprop:Generator_ColumnVarNameInTable="columnHp07Time" msprop:Generator_ColumnPropNameInRow="Hp07Time" msprop:Generator_ColumnPropNameInTable="Hp07TimeColumn" msprop:Generator_UserColumnName="Hp07Time" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="ID_EPD" msprop:Generator_ColumnVarNameInTable="columnID_EPD" msprop:Generator_ColumnPropNameInRow="ID_EPD" msprop:Generator_ColumnPropNameInTable="ID_EPDColumn" msprop:Generator_UserColumnName="ID_EPD" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="QualityData" msprop:Generator_ColumnVarNameInTable="columnQualityData" msprop:Generator_ColumnPropNameInRow="QualityData" msprop:Generator_ColumnPropNameInTable="QualityDataColumn" msprop:Generator_UserColumnName="QualityData" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K1" msprop:Generator_ColumnVarNameInTable="columnK1" msprop:Generator_ColumnPropNameInRow="K1" msprop:Generator_ColumnPropNameInTable="K1Column" msprop:Generator_UserColumnName="K1" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K2" msprop:Generator_ColumnVarNameInTable="columnK2" msprop:Generator_ColumnPropNameInRow="K2" msprop:Generator_ColumnPropNameInTable="K2Column" msprop:Generator_UserColumnName="K2" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K3" msprop:Generator_ColumnVarNameInTable="columnK3" msprop:Generator_ColumnPropNameInRow="K3" msprop:Generator_ColumnPropNameInTable="K3Column" msprop:Generator_UserColumnName="K3" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K4" msprop:Generator_ColumnVarNameInTable="columnK4" msprop:Generator_ColumnPropNameInRow="K4" msprop:Generator_ColumnPropNameInTable="K4Column" msprop:Generator_UserColumnName="K4" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K5" msprop:Generator_ColumnVarNameInTable="columnK5" msprop:Generator_ColumnPropNameInRow="K5" msprop:Generator_ColumnPropNameInTable="K5Column" msprop:Generator_UserColumnName="K5" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K6" msprop:Generator_ColumnVarNameInTable="columnK6" msprop:Generator_ColumnPropNameInRow="K6" msprop:Generator_ColumnPropNameInTable="K6Column" msprop:Generator_UserColumnName="K6" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="SG" msprop:Generator_ColumnVarNameInTable="columnSG" msprop:Generator_ColumnPropNameInRow="SG" msprop:Generator_ColumnPropNameInTable="SGColumn" msprop:Generator_UserColumnName="SG" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="BC" msprop:Generator_ColumnVarNameInTable="columnBC" msprop:Generator_ColumnPropNameInRow="BC" msprop:Generator_ColumnPropNameInTable="BCColumn" msprop:Generator_UserColumnName="BC" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="FB" msprop:Generator_ColumnVarNameInTable="columnFB" msprop:Generator_ColumnPropNameInRow="FB" msprop:Generator_ColumnPropNameInTable="FBColumn" msprop:Generator_UserColumnName="FB" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="HG" msprop:Generator_ColumnVarNameInTable="columnHG" msprop:Generator_ColumnPropNameInRow="HG" msprop:Generator_ColumnPropNameInTable="HGColumn" msprop:Generator_UserColumnName="HG" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="alarmStatus" msprop:Generator_ColumnVarNameInTable="columnalarmStatus" msprop:Generator_ColumnPropNameInRow="alarmStatus" msprop:Generator_ColumnPropNameInTable="alarmStatusColumn" msprop:Generator_UserColumnName="alarmStatus" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="otherAlarms" msprop:Generator_ColumnVarNameInTable="columnotherAlarms" msprop:Generator_ColumnPropNameInRow="otherAlarms" msprop:Generator_ColumnPropNameInTable="otherAlarmsColumn" msprop:Generator_UserColumnName="otherAlarms" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="errorStatus" msprop:Generator_ColumnVarNameInTable="columnerrorStatus" msprop:Generator_ColumnPropNameInRow="errorStatus" msprop:Generator_ColumnPropNameInTable="errorStatusColumn" msprop:Generator_UserColumnName="errorStatus" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="operatingStatus" msprop:Generator_ColumnVarNameInTable="columnoperatingStatus" msprop:Generator_ColumnPropNameInRow="operatingStatus" msprop:Generator_ColumnPropNameInTable="operatingStatusColumn" msprop:Generator_UserColumnName="operatingStatus" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="isBG" msprop:Generator_ColumnVarNameInTable="columnisBG" msprop:Generator_ColumnPropNameInRow="isBG" msprop:Generator_ColumnPropNameInTable="isBGColumn" msprop:Generator_UserColumnName="isBG" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="isComplete" msprop:Generator_ColumnVarNameInTable="columnisComplete" msprop:Generator_ColumnPropNameInRow="isComplete" msprop:Generator_ColumnPropNameInTable="isCompleteColumn" msprop:Generator_UserColumnName="isComplete" type="xs:boolean" />
|
||||
<xs:element name="isDeleted" msprop:Generator_ColumnVarNameInTable="columnisDeleted" msprop:Generator_ColumnPropNameInRow="isDeleted" msprop:Generator_ColumnPropNameInTable="isDeletedColumn" msprop:Generator_UserColumnName="isDeleted" type="xs:boolean" />
|
||||
<xs:element name="isAlarm" msprop:Generator_ColumnVarNameInTable="columnisAlarm" msprop:Generator_ColumnPropNameInRow="isAlarm" msprop:Generator_ColumnPropNameInTable="isAlarmColumn" msprop:Generator_UserColumnName="isAlarm" type="xs:boolean" />
|
||||
<xs:element name="isAlarmCleared" msprop:Generator_ColumnVarNameInTable="columnisAlarmCleared" msprop:Generator_ColumnPropNameInRow="isAlarmCleared" msprop:Generator_ColumnPropNameInTable="isAlarmClearedColumn" msprop:Generator_UserColumnName="isAlarmCleared" type="xs:boolean" />
|
||||
<xs:element name="isManualExit" msprop:Generator_ColumnVarNameInTable="columnisManualExit" msprop:Generator_ColumnPropNameInRow="isManualExit" msprop:Generator_ColumnPropNameInTable="isManualExitColumn" msprop:Generator_UserColumnName="isManualExit" type="xs:boolean" />
|
||||
<xs:element name="ID_Station_Return" msprop:Generator_ColumnVarNameInTable="columnID_Station_Return" msprop:Generator_ColumnPropNameInRow="ID_Station_Return" msprop:Generator_ColumnPropNameInTable="ID_Station_ReturnColumn" msprop:Generator_UserColumnName="ID_Station_Return" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="ENTRY_EPD_CLOCK" msprop:Generator_ColumnVarNameInTable="columnENTRY_EPD_CLOCK" msprop:Generator_ColumnPropNameInRow="ENTRY_EPD_CLOCK" msprop:Generator_ColumnPropNameInTable="ENTRY_EPD_CLOCKColumn" msprop:Generator_UserColumnName="ENTRY_EPD_CLOCK" type="xs:decimal" minOccurs="0" />
|
||||
<xs:element name="EXIT_EPD_CLOCK" msprop:Generator_ColumnVarNameInTable="columnEXIT_EPD_CLOCK" msprop:Generator_ColumnPropNameInRow="EXIT_EPD_CLOCK" msprop:Generator_ColumnPropNameInTable="EXIT_EPD_CLOCKColumn" msprop:Generator_UserColumnName="EXIT_EPD_CLOCK" type="xs:decimal" minOccurs="0" />
|
||||
<xs:element name="TIME_LOST" msprop:Generator_ColumnVarNameInTable="columnTIME_LOST" msprop:Generator_ColumnPropNameInRow="TIME_LOST" msprop:Generator_ColumnPropNameInTable="TIME_LOSTColumn" msprop:Generator_UserColumnName="TIME_LOST" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="VisitStatus" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnVisitStatus" msprop:Generator_ColumnPropNameInRow="VisitStatus" msprop:Generator_ColumnPropNameInTable="VisitStatusColumn" msprop:Generator_UserColumnName="VisitStatus" type="xs:unsignedByte" minOccurs="0" />
|
||||
<xs:element name="syncedEntry" msprop:Generator_ColumnVarNameInTable="columnsyncedEntry" msprop:Generator_ColumnPropNameInRow="syncedEntry" msprop:Generator_ColumnPropNameInTable="syncedEntryColumn" msprop:Generator_UserColumnName="syncedEntry" type="xs:boolean" />
|
||||
<xs:element name="syncedExit" msprop:Generator_ColumnVarNameInTable="columnsyncedExit" msprop:Generator_ColumnPropNameInRow="syncedExit" msprop:Generator_ColumnPropNameInTable="syncedExitColumn" msprop:Generator_UserColumnName="syncedExit" type="xs:boolean" />
|
||||
<xs:element name="epdType" msprop:Generator_ColumnVarNameInTable="columnepdType" msprop:Generator_ColumnPropNameInRow="epdType" msprop:Generator_ColumnPropNameInTable="epdTypeColumn" msprop:Generator_UserColumnName="epdType" type="xs:unsignedByte" minOccurs="0" />
|
||||
<xs:element name="eDosBatteryWarning" msprop:Generator_ColumnVarNameInTable="columneDosBatteryWarning" msprop:Generator_ColumnPropNameInRow="eDosBatteryWarning" msprop:Generator_ColumnPropNameInTable="eDosBatteryWarningColumn" msprop:Generator_UserColumnName="eDosBatteryWarning" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosDose07Warning" msprop:Generator_ColumnVarNameInTable="columneDosDose07Warning" msprop:Generator_ColumnPropNameInRow="eDosDose07Warning" msprop:Generator_ColumnPropNameInTable="eDosDose07WarningColumn" msprop:Generator_UserColumnName="eDosDose07Warning" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosDose07Alarm" msprop:Generator_ColumnVarNameInTable="columneDosDose07Alarm" msprop:Generator_ColumnPropNameInRow="eDosDose07Alarm" msprop:Generator_ColumnPropNameInTable="eDosDose07AlarmColumn" msprop:Generator_UserColumnName="eDosDose07Alarm" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosRate07Warning" msprop:Generator_ColumnVarNameInTable="columneDosRate07Warning" msprop:Generator_ColumnPropNameInRow="eDosRate07Warning" msprop:Generator_ColumnPropNameInTable="eDosRate07WarningColumn" msprop:Generator_UserColumnName="eDosRate07Warning" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosRate07Alarm" msprop:Generator_ColumnVarNameInTable="columneDosRate07Alarm" msprop:Generator_ColumnPropNameInRow="eDosRate07Alarm" msprop:Generator_ColumnPropNameInTable="eDosRate07AlarmColumn" msprop:Generator_UserColumnName="eDosRate07Alarm" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosDose10Warning" msprop:Generator_ColumnVarNameInTable="columneDosDose10Warning" msprop:Generator_ColumnPropNameInRow="eDosDose10Warning" msprop:Generator_ColumnPropNameInTable="eDosDose10WarningColumn" msprop:Generator_UserColumnName="eDosDose10Warning" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosDose10Alarm" msprop:Generator_ColumnVarNameInTable="columneDosDose10Alarm" msprop:Generator_ColumnPropNameInRow="eDosDose10Alarm" msprop:Generator_ColumnPropNameInTable="eDosDose10AlarmColumn" msprop:Generator_UserColumnName="eDosDose10Alarm" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosRate10Warning" msprop:Generator_ColumnVarNameInTable="columneDosRate10Warning" msprop:Generator_ColumnPropNameInRow="eDosRate10Warning" msprop:Generator_ColumnPropNameInTable="eDosRate10WarningColumn" msprop:Generator_UserColumnName="eDosRate10Warning" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosRate10Alarm" msprop:Generator_ColumnVarNameInTable="columneDosRate10Alarm" msprop:Generator_ColumnPropNameInRow="eDosRate10Alarm" msprop:Generator_ColumnPropNameInTable="eDosRate10AlarmColumn" msprop:Generator_UserColumnName="eDosRate10Alarm" type="xs:boolean" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="CentralVisits" msprop:Generator_TableClassName="CentralVisitsDataTable" msprop:Generator_TableVarName="tableCentralVisits" msprop:Generator_TablePropName="CentralVisits" msprop:Generator_RowDeletingName="CentralVisitsRowDeleting" msprop:Generator_RowChangingName="CentralVisitsRowChanging" msprop:Generator_RowEvHandlerName="CentralVisitsRowChangeEventHandler" msprop:Generator_RowDeletedName="CentralVisitsRowDeleted" msprop:Generator_UserTableName="CentralVisits" msprop:Generator_RowChangedName="CentralVisitsRowChanged" msprop:Generator_RowEvArgName="CentralVisitsRowChangeEvent" msprop:Generator_RowClassName="CentralVisitsRow">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="ID_Station" msprop:Generator_ColumnVarNameInTable="columnID_Station" msprop:Generator_ColumnPropNameInRow="ID_Station" msprop:Generator_ColumnPropNameInTable="ID_StationColumn" msprop:Generator_UserColumnName="ID_Station" type="xs:int" />
|
||||
<xs:element name="ID_Visit" msprop:Generator_ColumnVarNameInTable="columnID_Visit" msprop:Generator_ColumnPropNameInRow="ID_Visit" msprop:Generator_ColumnPropNameInTable="ID_VisitColumn" msprop:Generator_UserColumnName="ID_Visit" type="xs:int" />
|
||||
<xs:element name="Inst_CODE" msprop:Generator_ColumnVarNameInTable="columnInst_CODE" msprop:Generator_ColumnPropNameInRow="Inst_CODE" msprop:Generator_ColumnPropNameInTable="Inst_CODEColumn" msprop:Generator_UserColumnName="Inst_CODE" type="xs:int" />
|
||||
<xs:element name="PersID" msprop:Generator_ColumnVarNameInTable="columnPersID" msprop:Generator_ColumnPropNameInRow="PersID" msprop:Generator_ColumnPropNameInTable="PersIDColumn" msprop:Generator_UserColumnName="PersID" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="ID_Task" msprop:Generator_ColumnVarNameInTable="columnID_Task" msprop:Generator_ColumnPropNameInRow="ID_Task" msprop:Generator_ColumnPropNameInTable="ID_TaskColumn" msprop:Generator_UserColumnName="ID_Task" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="EntryTime" msprop:Generator_ColumnVarNameInTable="columnEntryTime" msprop:Generator_ColumnPropNameInRow="EntryTime" msprop:Generator_ColumnPropNameInTable="EntryTimeColumn" msprop:Generator_UserColumnName="EntryTime" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="ReturnTime" msprop:Generator_ColumnVarNameInTable="columnReturnTime" msprop:Generator_ColumnPropNameInRow="ReturnTime" msprop:Generator_ColumnPropNameInTable="ReturnTimeColumn" msprop:Generator_UserColumnName="ReturnTime" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="Hp10Dose" msprop:Generator_ColumnVarNameInTable="columnHp10Dose" msprop:Generator_ColumnPropNameInRow="Hp10Dose" msprop:Generator_ColumnPropNameInTable="Hp10DoseColumn" msprop:Generator_UserColumnName="Hp10Dose" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp07Dose" msprop:Generator_ColumnVarNameInTable="columnHp07Dose" msprop:Generator_ColumnPropNameInRow="Hp07Dose" msprop:Generator_ColumnPropNameInTable="Hp07DoseColumn" msprop:Generator_UserColumnName="Hp07Dose" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp10Total" msprop:Generator_ColumnVarNameInTable="columnHp10Total" msprop:Generator_ColumnPropNameInRow="Hp10Total" msprop:Generator_ColumnPropNameInTable="Hp10TotalColumn" msprop:Generator_UserColumnName="Hp10Total" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp07Total" msprop:Generator_ColumnVarNameInTable="columnHp07Total" msprop:Generator_ColumnPropNameInRow="Hp07Total" msprop:Generator_ColumnPropNameInTable="Hp07TotalColumn" msprop:Generator_UserColumnName="Hp07Total" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp10Peak" msprop:Generator_ColumnVarNameInTable="columnHp10Peak" msprop:Generator_ColumnPropNameInRow="Hp10Peak" msprop:Generator_ColumnPropNameInTable="Hp10PeakColumn" msprop:Generator_UserColumnName="Hp10Peak" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp07Peak" msprop:Generator_ColumnVarNameInTable="columnHp07Peak" msprop:Generator_ColumnPropNameInRow="Hp07Peak" msprop:Generator_ColumnPropNameInTable="Hp07PeakColumn" msprop:Generator_UserColumnName="Hp07Peak" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp10Time" msprop:Generator_ColumnVarNameInTable="columnHp10Time" msprop:Generator_ColumnPropNameInRow="Hp10Time" msprop:Generator_ColumnPropNameInTable="Hp10TimeColumn" msprop:Generator_UserColumnName="Hp10Time" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="Hp07Time" msprop:Generator_ColumnVarNameInTable="columnHp07Time" msprop:Generator_ColumnPropNameInRow="Hp07Time" msprop:Generator_ColumnPropNameInTable="Hp07TimeColumn" msprop:Generator_UserColumnName="Hp07Time" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="ID_EPD" msprop:Generator_ColumnVarNameInTable="columnID_EPD" msprop:Generator_ColumnPropNameInRow="ID_EPD" msprop:Generator_ColumnPropNameInTable="ID_EPDColumn" msprop:Generator_UserColumnName="ID_EPD" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="QualityData" msprop:Generator_ColumnVarNameInTable="columnQualityData" msprop:Generator_ColumnPropNameInRow="QualityData" msprop:Generator_ColumnPropNameInTable="QualityDataColumn" msprop:Generator_UserColumnName="QualityData" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K1" msprop:Generator_ColumnVarNameInTable="columnK1" msprop:Generator_ColumnPropNameInRow="K1" msprop:Generator_ColumnPropNameInTable="K1Column" msprop:Generator_UserColumnName="K1" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K2" msprop:Generator_ColumnVarNameInTable="columnK2" msprop:Generator_ColumnPropNameInRow="K2" msprop:Generator_ColumnPropNameInTable="K2Column" msprop:Generator_UserColumnName="K2" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K3" msprop:Generator_ColumnVarNameInTable="columnK3" msprop:Generator_ColumnPropNameInRow="K3" msprop:Generator_ColumnPropNameInTable="K3Column" msprop:Generator_UserColumnName="K3" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K4" msprop:Generator_ColumnVarNameInTable="columnK4" msprop:Generator_ColumnPropNameInRow="K4" msprop:Generator_ColumnPropNameInTable="K4Column" msprop:Generator_UserColumnName="K4" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K5" msprop:Generator_ColumnVarNameInTable="columnK5" msprop:Generator_ColumnPropNameInRow="K5" msprop:Generator_ColumnPropNameInTable="K5Column" msprop:Generator_UserColumnName="K5" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K6" msprop:Generator_ColumnVarNameInTable="columnK6" msprop:Generator_ColumnPropNameInRow="K6" msprop:Generator_ColumnPropNameInTable="K6Column" msprop:Generator_UserColumnName="K6" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="SG" msprop:Generator_ColumnVarNameInTable="columnSG" msprop:Generator_ColumnPropNameInRow="SG" msprop:Generator_ColumnPropNameInTable="SGColumn" msprop:Generator_UserColumnName="SG" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="BC" msprop:Generator_ColumnVarNameInTable="columnBC" msprop:Generator_ColumnPropNameInRow="BC" msprop:Generator_ColumnPropNameInTable="BCColumn" msprop:Generator_UserColumnName="BC" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="FB" msprop:Generator_ColumnVarNameInTable="columnFB" msprop:Generator_ColumnPropNameInRow="FB" msprop:Generator_ColumnPropNameInTable="FBColumn" msprop:Generator_UserColumnName="FB" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="HG" msprop:Generator_ColumnVarNameInTable="columnHG" msprop:Generator_ColumnPropNameInRow="HG" msprop:Generator_ColumnPropNameInTable="HGColumn" msprop:Generator_UserColumnName="HG" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="alarmStatus" msprop:Generator_ColumnVarNameInTable="columnalarmStatus" msprop:Generator_ColumnPropNameInRow="alarmStatus" msprop:Generator_ColumnPropNameInTable="alarmStatusColumn" msprop:Generator_UserColumnName="alarmStatus" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="otherAlarms" msprop:Generator_ColumnVarNameInTable="columnotherAlarms" msprop:Generator_ColumnPropNameInRow="otherAlarms" msprop:Generator_ColumnPropNameInTable="otherAlarmsColumn" msprop:Generator_UserColumnName="otherAlarms" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="errorStatus" msprop:Generator_ColumnVarNameInTable="columnerrorStatus" msprop:Generator_ColumnPropNameInRow="errorStatus" msprop:Generator_ColumnPropNameInTable="errorStatusColumn" msprop:Generator_UserColumnName="errorStatus" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="operatingStatus" msprop:Generator_ColumnVarNameInTable="columnoperatingStatus" msprop:Generator_ColumnPropNameInRow="operatingStatus" msprop:Generator_ColumnPropNameInTable="operatingStatusColumn" msprop:Generator_UserColumnName="operatingStatus" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="isBG" msprop:Generator_ColumnVarNameInTable="columnisBG" msprop:Generator_ColumnPropNameInRow="isBG" msprop:Generator_ColumnPropNameInTable="isBGColumn" msprop:Generator_UserColumnName="isBG" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="isComplete" msprop:Generator_ColumnVarNameInTable="columnisComplete" msprop:Generator_ColumnPropNameInRow="isComplete" msprop:Generator_ColumnPropNameInTable="isCompleteColumn" msprop:Generator_UserColumnName="isComplete" type="xs:boolean" />
|
||||
<xs:element name="isDeleted" msprop:Generator_ColumnVarNameInTable="columnisDeleted" msprop:Generator_ColumnPropNameInRow="isDeleted" msprop:Generator_ColumnPropNameInTable="isDeletedColumn" msprop:Generator_UserColumnName="isDeleted" type="xs:boolean" />
|
||||
<xs:element name="isAlarm" msprop:Generator_ColumnVarNameInTable="columnisAlarm" msprop:Generator_ColumnPropNameInRow="isAlarm" msprop:Generator_ColumnPropNameInTable="isAlarmColumn" msprop:Generator_UserColumnName="isAlarm" type="xs:boolean" />
|
||||
<xs:element name="isAlarmCleared" msprop:Generator_ColumnVarNameInTable="columnisAlarmCleared" msprop:Generator_ColumnPropNameInRow="isAlarmCleared" msprop:Generator_ColumnPropNameInTable="isAlarmClearedColumn" msprop:Generator_UserColumnName="isAlarmCleared" type="xs:boolean" />
|
||||
<xs:element name="isManualExit" msprop:Generator_ColumnVarNameInTable="columnisManualExit" msprop:Generator_ColumnPropNameInRow="isManualExit" msprop:Generator_ColumnPropNameInTable="isManualExitColumn" msprop:Generator_UserColumnName="isManualExit" type="xs:boolean" />
|
||||
<xs:element name="ID_Station_Return" msprop:Generator_ColumnVarNameInTable="columnID_Station_Return" msprop:Generator_ColumnPropNameInRow="ID_Station_Return" msprop:Generator_ColumnPropNameInTable="ID_Station_ReturnColumn" msprop:Generator_UserColumnName="ID_Station_Return" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="ENTRY_EPD_CLOCK" msprop:Generator_ColumnVarNameInTable="columnENTRY_EPD_CLOCK" msprop:Generator_ColumnPropNameInRow="ENTRY_EPD_CLOCK" msprop:Generator_ColumnPropNameInTable="ENTRY_EPD_CLOCKColumn" msprop:Generator_UserColumnName="ENTRY_EPD_CLOCK" type="xs:decimal" minOccurs="0" />
|
||||
<xs:element name="EXIT_EPD_CLOCK" msprop:Generator_ColumnVarNameInTable="columnEXIT_EPD_CLOCK" msprop:Generator_ColumnPropNameInRow="EXIT_EPD_CLOCK" msprop:Generator_ColumnPropNameInTable="EXIT_EPD_CLOCKColumn" msprop:Generator_UserColumnName="EXIT_EPD_CLOCK" type="xs:decimal" minOccurs="0" />
|
||||
<xs:element name="TIME_LOST" msprop:Generator_ColumnVarNameInTable="columnTIME_LOST" msprop:Generator_ColumnPropNameInRow="TIME_LOST" msprop:Generator_ColumnPropNameInTable="TIME_LOSTColumn" msprop:Generator_UserColumnName="TIME_LOST" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="VisitStatus" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnVisitStatus" msprop:Generator_ColumnPropNameInRow="VisitStatus" msprop:Generator_ColumnPropNameInTable="VisitStatusColumn" msprop:Generator_UserColumnName="VisitStatus" type="xs:unsignedByte" minOccurs="0" />
|
||||
<xs:element name="syncedEntry" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnsyncedEntry" msprop:Generator_ColumnPropNameInRow="syncedEntry" msprop:Generator_ColumnPropNameInTable="syncedEntryColumn" msprop:Generator_UserColumnName="syncedEntry" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="syncedExit" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnsyncedExit" msprop:Generator_ColumnPropNameInRow="syncedExit" msprop:Generator_ColumnPropNameInTable="syncedExitColumn" msprop:Generator_UserColumnName="syncedExit" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="epdType" msprop:Generator_ColumnVarNameInTable="columnepdType" msprop:Generator_ColumnPropNameInRow="epdType" msprop:Generator_ColumnPropNameInTable="epdTypeColumn" msprop:Generator_UserColumnName="epdType" type="xs:unsignedByte" minOccurs="0" />
|
||||
<xs:element name="eDosBatteryWarning" msprop:Generator_ColumnVarNameInTable="columneDosBatteryWarning" msprop:Generator_ColumnPropNameInRow="eDosBatteryWarning" msprop:Generator_ColumnPropNameInTable="eDosBatteryWarningColumn" msprop:Generator_UserColumnName="eDosBatteryWarning" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosDose07Warning" msprop:Generator_ColumnVarNameInTable="columneDosDose07Warning" msprop:Generator_ColumnPropNameInRow="eDosDose07Warning" msprop:Generator_ColumnPropNameInTable="eDosDose07WarningColumn" msprop:Generator_UserColumnName="eDosDose07Warning" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosDose07Alarm" msprop:Generator_ColumnVarNameInTable="columneDosDose07Alarm" msprop:Generator_ColumnPropNameInRow="eDosDose07Alarm" msprop:Generator_ColumnPropNameInTable="eDosDose07AlarmColumn" msprop:Generator_UserColumnName="eDosDose07Alarm" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosRate07Warning" msprop:Generator_ColumnVarNameInTable="columneDosRate07Warning" msprop:Generator_ColumnPropNameInRow="eDosRate07Warning" msprop:Generator_ColumnPropNameInTable="eDosRate07WarningColumn" msprop:Generator_UserColumnName="eDosRate07Warning" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosRate07Alarm" msprop:Generator_ColumnVarNameInTable="columneDosRate07Alarm" msprop:Generator_ColumnPropNameInRow="eDosRate07Alarm" msprop:Generator_ColumnPropNameInTable="eDosRate07AlarmColumn" msprop:Generator_UserColumnName="eDosRate07Alarm" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosDose10Warning" msprop:Generator_ColumnVarNameInTable="columneDosDose10Warning" msprop:Generator_ColumnPropNameInRow="eDosDose10Warning" msprop:Generator_ColumnPropNameInTable="eDosDose10WarningColumn" msprop:Generator_UserColumnName="eDosDose10Warning" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosDose10Alarm" msprop:Generator_ColumnVarNameInTable="columneDosDose10Alarm" msprop:Generator_ColumnPropNameInRow="eDosDose10Alarm" msprop:Generator_ColumnPropNameInTable="eDosDose10AlarmColumn" msprop:Generator_UserColumnName="eDosDose10Alarm" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosRate10Warning" msprop:Generator_ColumnVarNameInTable="columneDosRate10Warning" msprop:Generator_ColumnPropNameInRow="eDosRate10Warning" msprop:Generator_ColumnPropNameInTable="eDosRate10WarningColumn" msprop:Generator_UserColumnName="eDosRate10Warning" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosRate10Alarm" msprop:Generator_ColumnVarNameInTable="columneDosRate10Alarm" msprop:Generator_ColumnPropNameInRow="eDosRate10Alarm" msprop:Generator_ColumnPropNameInTable="eDosRate10AlarmColumn" msprop:Generator_UserColumnName="eDosRate10Alarm" type="xs:boolean" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
<xs:unique name="Constraint1" msdata:PrimaryKey="true">
|
||||
<xs:selector xpath=".//mstns:LocalVisits" />
|
||||
<xs:field xpath="mstns:ID_Station" />
|
||||
<xs:field xpath="mstns:ID_Visit" />
|
||||
</xs:unique>
|
||||
<xs:unique name="CentralVisits_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
|
||||
<xs:selector xpath=".//mstns:CentralVisits" />
|
||||
<xs:field xpath="mstns:ID_Station" />
|
||||
<xs:field xpath="mstns:ID_Visit" />
|
||||
</xs:unique>
|
||||
</xs:element>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema id="DataSet1" targetNamespace="http://tempuri.org/DataSet1.xsd" xmlns:mstns="http://tempuri.org/DataSet1.xsd" xmlns="http://tempuri.org/DataSet1.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
|
||||
<xs:annotation>
|
||||
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<DataSource DefaultConnectionIndex="1" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<Connections>
|
||||
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="eDosLocalConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="eDosLocalConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.syncEdosLocal.Properties.Settings.GlobalReference.Default.eDosLocalConnectionString" Provider="System.Data.SqlClient" />
|
||||
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="eDosConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="eDosConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.syncEdosLocal.Properties.Settings.GlobalReference.Default.eDosConnectionString" Provider="System.Data.SqlClient" />
|
||||
</Connections>
|
||||
<Tables>
|
||||
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="LocalVisitsTableAdapter" GeneratorDataComponentClassName="LocalVisitsTableAdapter" Name="LocalVisits" UserDataComponentName="LocalVisitsTableAdapter">
|
||||
<MainSource>
|
||||
<DbSource ConnectionRef="eDosLocalConnectionString (Settings)" DbObjectName="eDosLocal.export.VisitsSelect" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>export.VisitsSelect</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
<UpdateCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>export.VisitsUpdate</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Station" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_Station" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Visit" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_Visit" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@syncedEntry" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="syncedEntry" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@syncedExit" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="syncedExit" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</UpdateCommand>
|
||||
</DbSource>
|
||||
</MainSource>
|
||||
<Mappings>
|
||||
<Mapping SourceColumn="ID_Station" DataSetColumn="ID_Station" />
|
||||
<Mapping SourceColumn="ID_Visit" DataSetColumn="ID_Visit" />
|
||||
<Mapping SourceColumn="Inst_CODE" DataSetColumn="Inst_CODE" />
|
||||
<Mapping SourceColumn="PersID" DataSetColumn="PersID" />
|
||||
<Mapping SourceColumn="ID_Task" DataSetColumn="ID_Task" />
|
||||
<Mapping SourceColumn="EntryTime" DataSetColumn="EntryTime" />
|
||||
<Mapping SourceColumn="ReturnTime" DataSetColumn="ReturnTime" />
|
||||
<Mapping SourceColumn="Hp10Dose" DataSetColumn="Hp10Dose" />
|
||||
<Mapping SourceColumn="Hp07Dose" DataSetColumn="Hp07Dose" />
|
||||
<Mapping SourceColumn="Hp10Total" DataSetColumn="Hp10Total" />
|
||||
<Mapping SourceColumn="Hp07Total" DataSetColumn="Hp07Total" />
|
||||
<Mapping SourceColumn="Hp10Peak" DataSetColumn="Hp10Peak" />
|
||||
<Mapping SourceColumn="Hp07Peak" DataSetColumn="Hp07Peak" />
|
||||
<Mapping SourceColumn="Hp10Time" DataSetColumn="Hp10Time" />
|
||||
<Mapping SourceColumn="Hp07Time" DataSetColumn="Hp07Time" />
|
||||
<Mapping SourceColumn="ID_EPD" DataSetColumn="ID_EPD" />
|
||||
<Mapping SourceColumn="QualityData" DataSetColumn="QualityData" />
|
||||
<Mapping SourceColumn="K1" DataSetColumn="K1" />
|
||||
<Mapping SourceColumn="K2" DataSetColumn="K2" />
|
||||
<Mapping SourceColumn="K3" DataSetColumn="K3" />
|
||||
<Mapping SourceColumn="K4" DataSetColumn="K4" />
|
||||
<Mapping SourceColumn="K5" DataSetColumn="K5" />
|
||||
<Mapping SourceColumn="K6" DataSetColumn="K6" />
|
||||
<Mapping SourceColumn="SG" DataSetColumn="SG" />
|
||||
<Mapping SourceColumn="BC" DataSetColumn="BC" />
|
||||
<Mapping SourceColumn="FB" DataSetColumn="FB" />
|
||||
<Mapping SourceColumn="HG" DataSetColumn="HG" />
|
||||
<Mapping SourceColumn="alarmStatus" DataSetColumn="alarmStatus" />
|
||||
<Mapping SourceColumn="otherAlarms" DataSetColumn="otherAlarms" />
|
||||
<Mapping SourceColumn="errorStatus" DataSetColumn="errorStatus" />
|
||||
<Mapping SourceColumn="operatingStatus" DataSetColumn="operatingStatus" />
|
||||
<Mapping SourceColumn="isBG" DataSetColumn="isBG" />
|
||||
<Mapping SourceColumn="isComplete" DataSetColumn="isComplete" />
|
||||
<Mapping SourceColumn="isDeleted" DataSetColumn="isDeleted" />
|
||||
<Mapping SourceColumn="isAlarm" DataSetColumn="isAlarm" />
|
||||
<Mapping SourceColumn="isAlarmCleared" DataSetColumn="isAlarmCleared" />
|
||||
<Mapping SourceColumn="isManualExit" DataSetColumn="isManualExit" />
|
||||
<Mapping SourceColumn="ID_Station_Return" DataSetColumn="ID_Station_Return" />
|
||||
<Mapping SourceColumn="ENTRY_EPD_CLOCK" DataSetColumn="ENTRY_EPD_CLOCK" />
|
||||
<Mapping SourceColumn="EXIT_EPD_CLOCK" DataSetColumn="EXIT_EPD_CLOCK" />
|
||||
<Mapping SourceColumn="TIME_LOST" DataSetColumn="TIME_LOST" />
|
||||
<Mapping SourceColumn="VisitStatus" DataSetColumn="VisitStatus" />
|
||||
<Mapping SourceColumn="syncedEntry" DataSetColumn="syncedEntry" />
|
||||
<Mapping SourceColumn="SyncedExit" DataSetColumn="syncedExit" />
|
||||
<Mapping SourceColumn="syncedExit" DataSetColumn="syncedExit" />
|
||||
<Mapping SourceColumn="epdType" DataSetColumn="epdType" />
|
||||
<Mapping SourceColumn="eDosBatteryWarning" DataSetColumn="eDosBatteryWarning" />
|
||||
<Mapping SourceColumn="eDosDose07Warning" DataSetColumn="eDosDose07Warning" />
|
||||
<Mapping SourceColumn="eDosDose07Alarm" DataSetColumn="eDosDose07Alarm" />
|
||||
<Mapping SourceColumn="eDosRate07Warning" DataSetColumn="eDosRate07Warning" />
|
||||
<Mapping SourceColumn="eDosRate07Alarm" DataSetColumn="eDosRate07Alarm" />
|
||||
<Mapping SourceColumn="eDosDose10Warning" DataSetColumn="eDosDose10Warning" />
|
||||
<Mapping SourceColumn="eDosDose10Alarm" DataSetColumn="eDosDose10Alarm" />
|
||||
<Mapping SourceColumn="eDosRate10Warning" DataSetColumn="eDosRate10Warning" />
|
||||
<Mapping SourceColumn="eDosRate10Alarm" DataSetColumn="eDosRate10Alarm" />
|
||||
<Mapping SourceColumn="epdID" DataSetColumn="epdID" />
|
||||
</Mappings>
|
||||
<Sources />
|
||||
</TableAdapter>
|
||||
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="CentralVisitsTableAdapter" GeneratorDataComponentClassName="CentralVisitsTableAdapter" Name="CentralVisits" UserDataComponentName="CentralVisitsTableAdapter">
|
||||
<MainSource>
|
||||
<DbSource ConnectionRef="eDosConnectionString (Settings)" DbObjectName="eDos.import.VisitsSelect" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||
<InsertCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>import.VisitsInsert</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Station" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_Station" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Visit" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_Visit" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Inst_CODE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Inst_CODE" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@PersID" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="PersID" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Task" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_Task" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@EntryTime" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="EntryTime" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@ReturnTime" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="ReturnTime" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp10Dose" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp10Dose" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp07Dose" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp07Dose" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp10Total" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp10Total" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp07Total" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp07Total" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp10Peak" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp10Peak" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp07Peak" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp07Peak" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@Hp10Time" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="Hp10Time" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@Hp07Time" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="Hp07Time" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_EPD" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_EPD" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@QualityData" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="QualityData" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K1" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K1" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K2" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K2" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K3" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K3" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K4" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K5" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K5" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K6" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K6" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@SG" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="SG" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@BC" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="BC" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@FB" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="FB" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@HG" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="HG" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@alarmStatus" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="alarmStatus" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@otherAlarms" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="otherAlarms" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@errorStatus" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="errorStatus" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@operatingStatus" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="operatingStatus" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isBG" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isBG" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isComplete" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isComplete" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isDeleted" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isDeleted" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isAlarm" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isAlarm" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isAlarmCleared" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isAlarmCleared" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isManualExit" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isManualExit" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Station_Return" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_Station_Return" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="numeric" DbType="Decimal" Direction="Input" ParameterName="@ENTRY_EPD_CLOCK" Precision="10" ProviderType="Decimal" Scale="0" Size="9" SourceColumn="ENTRY_EPD_CLOCK" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="numeric" DbType="Decimal" Direction="Input" ParameterName="@EXIT_EPD_CLOCK" Precision="10" ProviderType="Decimal" Scale="0" Size="9" SourceColumn="EXIT_EPD_CLOCK" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@TIME_LOST" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="TIME_LOST" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="tinyint" DbType="Byte" Direction="Input" ParameterName="@epdType" Precision="3" ProviderType="TinyInt" Scale="0" Size="1" SourceColumn="epdType" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@epdID" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="epdID" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@eDosBatteryWarning" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="eDosBatteryWarning" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@eDosDose07Warning" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="eDosDose07Warning" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@eDosDose07Alarm" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="eDosDose07Alarm" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@eDosRate07Warning" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="eDosRate07Warning" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@eDosRate07Alarm" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="eDosRate07Alarm" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@eDosDose10Warning" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="eDosDose10Warning" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@eDosDose10Alarm" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="eDosDose10Alarm" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@eDosRate10Warning" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="eDosRate10Warning" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@eDosRate10Alarm" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="eDosRate10Alarm" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</InsertCommand>
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>import.VisitsSelect</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Station" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Visit" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
<UpdateCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>import.VisitsUpdate</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Station" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_Station" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Visit" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_Visit" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Inst_CODE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="Inst_CODE" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@PersID" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="PersID" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Task" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_Task" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@EntryTime" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="EntryTime" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@ReturnTime" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="ReturnTime" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp10Dose" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp10Dose" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp07Dose" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp07Dose" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp10Total" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp10Total" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp07Total" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp07Total" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp10Peak" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp10Peak" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="float" DbType="Double" Direction="Input" ParameterName="@Hp07Peak" Precision="53" ProviderType="Float" Scale="0" Size="8" SourceColumn="Hp07Peak" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@Hp10Time" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="Hp10Time" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@Hp07Time" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="Hp07Time" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_EPD" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_EPD" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@QualityData" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="QualityData" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K1" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K1" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K2" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K2" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K3" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K3" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K4" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K5" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K5" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K6" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K6" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@SG" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="SG" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@BC" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="BC" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@FB" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="FB" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@HG" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="HG" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@alarmStatus" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="alarmStatus" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@otherAlarms" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="otherAlarms" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@errorStatus" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="errorStatus" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@operatingStatus" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="operatingStatus" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isBG" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isBG" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isComplete" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isComplete" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isDeleted" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isDeleted" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isAlarm" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isAlarm" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isAlarmCleared" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isAlarmCleared" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@isManualExit" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="isManualExit" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Station_Return" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="ID_Station_Return" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="numeric" DbType="Decimal" Direction="Input" ParameterName="@ENTRY_EPD_CLOCK" Precision="10" ProviderType="Decimal" Scale="0" Size="9" SourceColumn="ENTRY_EPD_CLOCK" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="numeric" DbType="Decimal" Direction="Input" ParameterName="@EXIT_EPD_CLOCK" Precision="10" ProviderType="Decimal" Scale="0" Size="9" SourceColumn="EXIT_EPD_CLOCK" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@TIME_LOST" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="TIME_LOST" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="tinyint" DbType="Byte" Direction="Input" ParameterName="@epdType" Precision="3" ProviderType="TinyInt" Scale="0" Size="1" SourceColumn="epdType" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@epdID" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="epdID" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@eDosBatteryWarning" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="eDosBatteryWarning" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@eDosDose07Warning" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="eDosDose07Warning" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@eDosDose07Alarm" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="eDosDose07Alarm" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@eDosRate07Warning" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="eDosRate07Warning" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@eDosRate07Alarm" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="eDosRate07Alarm" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@eDosDose10Warning" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="eDosDose10Warning" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@eDosDose10Alarm" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="eDosDose10Alarm" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@eDosRate10Warning" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="eDosRate10Warning" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@eDosRate10Alarm" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="eDosRate10Alarm" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</UpdateCommand>
|
||||
</DbSource>
|
||||
</MainSource>
|
||||
<Mappings>
|
||||
<Mapping SourceColumn="ID_Station" DataSetColumn="ID_Station" />
|
||||
<Mapping SourceColumn="ID_Visit" DataSetColumn="ID_Visit" />
|
||||
<Mapping SourceColumn="Inst_CODE" DataSetColumn="Inst_CODE" />
|
||||
<Mapping SourceColumn="PersID" DataSetColumn="PersID" />
|
||||
<Mapping SourceColumn="ID_Task" DataSetColumn="ID_Task" />
|
||||
<Mapping SourceColumn="EntryTime" DataSetColumn="EntryTime" />
|
||||
<Mapping SourceColumn="ReturnTime" DataSetColumn="ReturnTime" />
|
||||
<Mapping SourceColumn="Hp10Dose" DataSetColumn="Hp10Dose" />
|
||||
<Mapping SourceColumn="Hp07Dose" DataSetColumn="Hp07Dose" />
|
||||
<Mapping SourceColumn="Hp10Total" DataSetColumn="Hp10Total" />
|
||||
<Mapping SourceColumn="Hp07Total" DataSetColumn="Hp07Total" />
|
||||
<Mapping SourceColumn="Hp10Peak" DataSetColumn="Hp10Peak" />
|
||||
<Mapping SourceColumn="Hp07Peak" DataSetColumn="Hp07Peak" />
|
||||
<Mapping SourceColumn="Hp10Time" DataSetColumn="Hp10Time" />
|
||||
<Mapping SourceColumn="Hp07Time" DataSetColumn="Hp07Time" />
|
||||
<Mapping SourceColumn="ID_EPD" DataSetColumn="ID_EPD" />
|
||||
<Mapping SourceColumn="QualityData" DataSetColumn="QualityData" />
|
||||
<Mapping SourceColumn="K1" DataSetColumn="K1" />
|
||||
<Mapping SourceColumn="K2" DataSetColumn="K2" />
|
||||
<Mapping SourceColumn="K3" DataSetColumn="K3" />
|
||||
<Mapping SourceColumn="K4" DataSetColumn="K4" />
|
||||
<Mapping SourceColumn="K5" DataSetColumn="K5" />
|
||||
<Mapping SourceColumn="K6" DataSetColumn="K6" />
|
||||
<Mapping SourceColumn="SG" DataSetColumn="SG" />
|
||||
<Mapping SourceColumn="BC" DataSetColumn="BC" />
|
||||
<Mapping SourceColumn="FB" DataSetColumn="FB" />
|
||||
<Mapping SourceColumn="HG" DataSetColumn="HG" />
|
||||
<Mapping SourceColumn="alarmStatus" DataSetColumn="alarmStatus" />
|
||||
<Mapping SourceColumn="otherAlarms" DataSetColumn="otherAlarms" />
|
||||
<Mapping SourceColumn="errorStatus" DataSetColumn="errorStatus" />
|
||||
<Mapping SourceColumn="operatingStatus" DataSetColumn="operatingStatus" />
|
||||
<Mapping SourceColumn="isBG" DataSetColumn="isBG" />
|
||||
<Mapping SourceColumn="isComplete" DataSetColumn="isComplete" />
|
||||
<Mapping SourceColumn="isDeleted" DataSetColumn="isDeleted" />
|
||||
<Mapping SourceColumn="isAlarm" DataSetColumn="isAlarm" />
|
||||
<Mapping SourceColumn="isAlarmCleared" DataSetColumn="isAlarmCleared" />
|
||||
<Mapping SourceColumn="isManualExit" DataSetColumn="isManualExit" />
|
||||
<Mapping SourceColumn="ID_Station_Return" DataSetColumn="ID_Station_Return" />
|
||||
<Mapping SourceColumn="ENTRY_EPD_CLOCK" DataSetColumn="ENTRY_EPD_CLOCK" />
|
||||
<Mapping SourceColumn="EXIT_EPD_CLOCK" DataSetColumn="EXIT_EPD_CLOCK" />
|
||||
<Mapping SourceColumn="TIME_LOST" DataSetColumn="TIME_LOST" />
|
||||
<Mapping SourceColumn="VisitStatus" DataSetColumn="VisitStatus" />
|
||||
<Mapping SourceColumn="syncedEntry" DataSetColumn="syncedEntry" />
|
||||
<Mapping SourceColumn="SyncedExit" DataSetColumn="syncedExit" />
|
||||
<Mapping SourceColumn="syncedExit" DataSetColumn="syncedExit" />
|
||||
<Mapping SourceColumn="epdType" DataSetColumn="epdType" />
|
||||
<Mapping SourceColumn="eDosBatteryWarning" DataSetColumn="eDosBatteryWarning" />
|
||||
<Mapping SourceColumn="eDosDose07Warning" DataSetColumn="eDosDose07Warning" />
|
||||
<Mapping SourceColumn="eDosDose07Alarm" DataSetColumn="eDosDose07Alarm" />
|
||||
<Mapping SourceColumn="eDosRate07Warning" DataSetColumn="eDosRate07Warning" />
|
||||
<Mapping SourceColumn="eDosRate07Alarm" DataSetColumn="eDosRate07Alarm" />
|
||||
<Mapping SourceColumn="eDosDose10Warning" DataSetColumn="eDosDose10Warning" />
|
||||
<Mapping SourceColumn="eDosDose10Alarm" DataSetColumn="eDosDose10Alarm" />
|
||||
<Mapping SourceColumn="eDosRate10Warning" DataSetColumn="eDosRate10Warning" />
|
||||
<Mapping SourceColumn="eDosRate10Alarm" DataSetColumn="eDosRate10Alarm" />
|
||||
<Mapping SourceColumn="epdID" DataSetColumn="epdID" />
|
||||
</Mappings>
|
||||
<Sources />
|
||||
</TableAdapter>
|
||||
</Tables>
|
||||
<Sources />
|
||||
</DataSource>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:element name="DataSet1" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="DataSet1" msprop:Generator_UserDSName="DataSet1">
|
||||
<xs:complexType>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="LocalVisits" msprop:Generator_TableClassName="LocalVisitsDataTable" msprop:Generator_TableVarName="tableLocalVisits" msprop:Generator_RowChangedName="LocalVisitsRowChanged" msprop:Generator_TablePropName="LocalVisits" msprop:Generator_RowDeletingName="LocalVisitsRowDeleting" msprop:Generator_RowChangingName="LocalVisitsRowChanging" msprop:Generator_RowEvHandlerName="LocalVisitsRowChangeEventHandler" msprop:Generator_RowDeletedName="LocalVisitsRowDeleted" msprop:Generator_RowClassName="LocalVisitsRow" msprop:Generator_UserTableName="LocalVisits" msprop:Generator_RowEvArgName="LocalVisitsRowChangeEvent">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="ID_Station" msprop:Generator_ColumnVarNameInTable="columnID_Station" msprop:Generator_ColumnPropNameInRow="ID_Station" msprop:Generator_ColumnPropNameInTable="ID_StationColumn" msprop:Generator_UserColumnName="ID_Station" type="xs:int" />
|
||||
<xs:element name="ID_Visit" msprop:Generator_ColumnVarNameInTable="columnID_Visit" msprop:Generator_ColumnPropNameInRow="ID_Visit" msprop:Generator_ColumnPropNameInTable="ID_VisitColumn" msprop:Generator_UserColumnName="ID_Visit" type="xs:int" />
|
||||
<xs:element name="Inst_CODE" msprop:Generator_ColumnVarNameInTable="columnInst_CODE" msprop:Generator_ColumnPropNameInRow="Inst_CODE" msprop:Generator_ColumnPropNameInTable="Inst_CODEColumn" msprop:Generator_UserColumnName="Inst_CODE" type="xs:int" />
|
||||
<xs:element name="PersID" msprop:Generator_ColumnVarNameInTable="columnPersID" msprop:Generator_ColumnPropNameInRow="PersID" msprop:Generator_ColumnPropNameInTable="PersIDColumn" msprop:Generator_UserColumnName="PersID" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="ID_Task" msprop:Generator_ColumnVarNameInTable="columnID_Task" msprop:Generator_ColumnPropNameInRow="ID_Task" msprop:Generator_ColumnPropNameInTable="ID_TaskColumn" msprop:Generator_UserColumnName="ID_Task" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="EntryTime" msprop:Generator_ColumnVarNameInTable="columnEntryTime" msprop:Generator_ColumnPropNameInRow="EntryTime" msprop:Generator_ColumnPropNameInTable="EntryTimeColumn" msprop:Generator_UserColumnName="EntryTime" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="ReturnTime" msprop:Generator_ColumnVarNameInTable="columnReturnTime" msprop:Generator_ColumnPropNameInRow="ReturnTime" msprop:Generator_ColumnPropNameInTable="ReturnTimeColumn" msprop:Generator_UserColumnName="ReturnTime" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="Hp10Dose" msprop:Generator_ColumnVarNameInTable="columnHp10Dose" msprop:Generator_ColumnPropNameInRow="Hp10Dose" msprop:Generator_ColumnPropNameInTable="Hp10DoseColumn" msprop:Generator_UserColumnName="Hp10Dose" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp07Dose" msprop:Generator_ColumnVarNameInTable="columnHp07Dose" msprop:Generator_ColumnPropNameInRow="Hp07Dose" msprop:Generator_ColumnPropNameInTable="Hp07DoseColumn" msprop:Generator_UserColumnName="Hp07Dose" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp10Total" msprop:Generator_ColumnVarNameInTable="columnHp10Total" msprop:Generator_ColumnPropNameInRow="Hp10Total" msprop:Generator_ColumnPropNameInTable="Hp10TotalColumn" msprop:Generator_UserColumnName="Hp10Total" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp07Total" msprop:Generator_ColumnVarNameInTable="columnHp07Total" msprop:Generator_ColumnPropNameInRow="Hp07Total" msprop:Generator_ColumnPropNameInTable="Hp07TotalColumn" msprop:Generator_UserColumnName="Hp07Total" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp10Peak" msprop:Generator_ColumnVarNameInTable="columnHp10Peak" msprop:Generator_ColumnPropNameInRow="Hp10Peak" msprop:Generator_ColumnPropNameInTable="Hp10PeakColumn" msprop:Generator_UserColumnName="Hp10Peak" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp07Peak" msprop:Generator_ColumnVarNameInTable="columnHp07Peak" msprop:Generator_ColumnPropNameInRow="Hp07Peak" msprop:Generator_ColumnPropNameInTable="Hp07PeakColumn" msprop:Generator_UserColumnName="Hp07Peak" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp10Time" msprop:Generator_ColumnVarNameInTable="columnHp10Time" msprop:Generator_ColumnPropNameInRow="Hp10Time" msprop:Generator_ColumnPropNameInTable="Hp10TimeColumn" msprop:Generator_UserColumnName="Hp10Time" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="Hp07Time" msprop:Generator_ColumnVarNameInTable="columnHp07Time" msprop:Generator_ColumnPropNameInRow="Hp07Time" msprop:Generator_ColumnPropNameInTable="Hp07TimeColumn" msprop:Generator_UserColumnName="Hp07Time" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="ID_EPD" msprop:Generator_ColumnVarNameInTable="columnID_EPD" msprop:Generator_ColumnPropNameInRow="ID_EPD" msprop:Generator_ColumnPropNameInTable="ID_EPDColumn" msprop:Generator_UserColumnName="ID_EPD" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="QualityData" msprop:Generator_ColumnVarNameInTable="columnQualityData" msprop:Generator_ColumnPropNameInRow="QualityData" msprop:Generator_ColumnPropNameInTable="QualityDataColumn" msprop:Generator_UserColumnName="QualityData" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K1" msprop:Generator_ColumnVarNameInTable="columnK1" msprop:Generator_ColumnPropNameInRow="K1" msprop:Generator_ColumnPropNameInTable="K1Column" msprop:Generator_UserColumnName="K1" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K2" msprop:Generator_ColumnVarNameInTable="columnK2" msprop:Generator_ColumnPropNameInRow="K2" msprop:Generator_ColumnPropNameInTable="K2Column" msprop:Generator_UserColumnName="K2" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K3" msprop:Generator_ColumnVarNameInTable="columnK3" msprop:Generator_ColumnPropNameInRow="K3" msprop:Generator_ColumnPropNameInTable="K3Column" msprop:Generator_UserColumnName="K3" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K4" msprop:Generator_ColumnVarNameInTable="columnK4" msprop:Generator_ColumnPropNameInRow="K4" msprop:Generator_ColumnPropNameInTable="K4Column" msprop:Generator_UserColumnName="K4" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K5" msprop:Generator_ColumnVarNameInTable="columnK5" msprop:Generator_ColumnPropNameInRow="K5" msprop:Generator_ColumnPropNameInTable="K5Column" msprop:Generator_UserColumnName="K5" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K6" msprop:Generator_ColumnVarNameInTable="columnK6" msprop:Generator_ColumnPropNameInRow="K6" msprop:Generator_ColumnPropNameInTable="K6Column" msprop:Generator_UserColumnName="K6" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="SG" msprop:Generator_ColumnVarNameInTable="columnSG" msprop:Generator_ColumnPropNameInRow="SG" msprop:Generator_ColumnPropNameInTable="SGColumn" msprop:Generator_UserColumnName="SG" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="BC" msprop:Generator_ColumnVarNameInTable="columnBC" msprop:Generator_ColumnPropNameInRow="BC" msprop:Generator_ColumnPropNameInTable="BCColumn" msprop:Generator_UserColumnName="BC" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="FB" msprop:Generator_ColumnVarNameInTable="columnFB" msprop:Generator_ColumnPropNameInRow="FB" msprop:Generator_ColumnPropNameInTable="FBColumn" msprop:Generator_UserColumnName="FB" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="HG" msprop:Generator_ColumnVarNameInTable="columnHG" msprop:Generator_ColumnPropNameInRow="HG" msprop:Generator_ColumnPropNameInTable="HGColumn" msprop:Generator_UserColumnName="HG" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="alarmStatus" msprop:Generator_ColumnVarNameInTable="columnalarmStatus" msprop:Generator_ColumnPropNameInRow="alarmStatus" msprop:Generator_ColumnPropNameInTable="alarmStatusColumn" msprop:Generator_UserColumnName="alarmStatus" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="otherAlarms" msprop:Generator_ColumnVarNameInTable="columnotherAlarms" msprop:Generator_ColumnPropNameInRow="otherAlarms" msprop:Generator_ColumnPropNameInTable="otherAlarmsColumn" msprop:Generator_UserColumnName="otherAlarms" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="errorStatus" msprop:Generator_ColumnVarNameInTable="columnerrorStatus" msprop:Generator_ColumnPropNameInRow="errorStatus" msprop:Generator_ColumnPropNameInTable="errorStatusColumn" msprop:Generator_UserColumnName="errorStatus" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="operatingStatus" msprop:Generator_ColumnVarNameInTable="columnoperatingStatus" msprop:Generator_ColumnPropNameInRow="operatingStatus" msprop:Generator_ColumnPropNameInTable="operatingStatusColumn" msprop:Generator_UserColumnName="operatingStatus" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="isBG" msprop:Generator_ColumnVarNameInTable="columnisBG" msprop:Generator_ColumnPropNameInRow="isBG" msprop:Generator_ColumnPropNameInTable="isBGColumn" msprop:Generator_UserColumnName="isBG" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="isComplete" msprop:Generator_ColumnVarNameInTable="columnisComplete" msprop:Generator_ColumnPropNameInRow="isComplete" msprop:Generator_ColumnPropNameInTable="isCompleteColumn" msprop:Generator_UserColumnName="isComplete" type="xs:boolean" />
|
||||
<xs:element name="isDeleted" msprop:Generator_ColumnVarNameInTable="columnisDeleted" msprop:Generator_ColumnPropNameInRow="isDeleted" msprop:Generator_ColumnPropNameInTable="isDeletedColumn" msprop:Generator_UserColumnName="isDeleted" type="xs:boolean" />
|
||||
<xs:element name="isAlarm" msprop:Generator_ColumnVarNameInTable="columnisAlarm" msprop:Generator_ColumnPropNameInRow="isAlarm" msprop:Generator_ColumnPropNameInTable="isAlarmColumn" msprop:Generator_UserColumnName="isAlarm" type="xs:boolean" />
|
||||
<xs:element name="isAlarmCleared" msprop:Generator_ColumnVarNameInTable="columnisAlarmCleared" msprop:Generator_ColumnPropNameInRow="isAlarmCleared" msprop:Generator_ColumnPropNameInTable="isAlarmClearedColumn" msprop:Generator_UserColumnName="isAlarmCleared" type="xs:boolean" />
|
||||
<xs:element name="isManualExit" msprop:Generator_ColumnVarNameInTable="columnisManualExit" msprop:Generator_ColumnPropNameInRow="isManualExit" msprop:Generator_ColumnPropNameInTable="isManualExitColumn" msprop:Generator_UserColumnName="isManualExit" type="xs:boolean" />
|
||||
<xs:element name="ID_Station_Return" msprop:Generator_ColumnVarNameInTable="columnID_Station_Return" msprop:Generator_ColumnPropNameInRow="ID_Station_Return" msprop:Generator_ColumnPropNameInTable="ID_Station_ReturnColumn" msprop:Generator_UserColumnName="ID_Station_Return" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="ENTRY_EPD_CLOCK" msprop:Generator_ColumnVarNameInTable="columnENTRY_EPD_CLOCK" msprop:Generator_ColumnPropNameInRow="ENTRY_EPD_CLOCK" msprop:Generator_ColumnPropNameInTable="ENTRY_EPD_CLOCKColumn" msprop:Generator_UserColumnName="ENTRY_EPD_CLOCK" type="xs:decimal" minOccurs="0" />
|
||||
<xs:element name="EXIT_EPD_CLOCK" msprop:Generator_ColumnVarNameInTable="columnEXIT_EPD_CLOCK" msprop:Generator_ColumnPropNameInRow="EXIT_EPD_CLOCK" msprop:Generator_ColumnPropNameInTable="EXIT_EPD_CLOCKColumn" msprop:Generator_UserColumnName="EXIT_EPD_CLOCK" type="xs:decimal" minOccurs="0" />
|
||||
<xs:element name="TIME_LOST" msprop:Generator_ColumnVarNameInTable="columnTIME_LOST" msprop:Generator_ColumnPropNameInRow="TIME_LOST" msprop:Generator_ColumnPropNameInTable="TIME_LOSTColumn" msprop:Generator_UserColumnName="TIME_LOST" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="VisitStatus" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnVisitStatus" msprop:Generator_ColumnPropNameInRow="VisitStatus" msprop:Generator_ColumnPropNameInTable="VisitStatusColumn" msprop:Generator_UserColumnName="VisitStatus" type="xs:unsignedByte" minOccurs="0" />
|
||||
<xs:element name="syncedEntry" msprop:Generator_ColumnVarNameInTable="columnsyncedEntry" msprop:Generator_ColumnPropNameInRow="syncedEntry" msprop:Generator_ColumnPropNameInTable="syncedEntryColumn" msprop:Generator_UserColumnName="syncedEntry" type="xs:boolean" />
|
||||
<xs:element name="syncedExit" msprop:Generator_ColumnVarNameInTable="columnsyncedExit" msprop:Generator_ColumnPropNameInRow="syncedExit" msprop:Generator_ColumnPropNameInTable="syncedExitColumn" msprop:Generator_UserColumnName="syncedExit" type="xs:boolean" />
|
||||
<xs:element name="epdType" msprop:Generator_ColumnVarNameInTable="columnepdType" msprop:Generator_ColumnPropNameInRow="epdType" msprop:Generator_ColumnPropNameInTable="epdTypeColumn" msprop:Generator_UserColumnName="epdType" type="xs:unsignedByte" minOccurs="0" />
|
||||
<xs:element name="epdID" msprop:Generator_ColumnVarNameInTable="columnepdID" msprop:Generator_ColumnPropNameInRow="epdID" msprop:Generator_ColumnPropNameInTable="epdIDColumn" msprop:Generator_UserColumnName="epdID" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="eDosBatteryWarning" msprop:Generator_ColumnVarNameInTable="columneDosBatteryWarning" msprop:Generator_ColumnPropNameInRow="eDosBatteryWarning" msprop:Generator_ColumnPropNameInTable="eDosBatteryWarningColumn" msprop:Generator_UserColumnName="eDosBatteryWarning" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosDose07Warning" msprop:Generator_ColumnVarNameInTable="columneDosDose07Warning" msprop:Generator_ColumnPropNameInRow="eDosDose07Warning" msprop:Generator_ColumnPropNameInTable="eDosDose07WarningColumn" msprop:Generator_UserColumnName="eDosDose07Warning" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosDose07Alarm" msprop:Generator_ColumnVarNameInTable="columneDosDose07Alarm" msprop:Generator_ColumnPropNameInRow="eDosDose07Alarm" msprop:Generator_ColumnPropNameInTable="eDosDose07AlarmColumn" msprop:Generator_UserColumnName="eDosDose07Alarm" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosRate07Warning" msprop:Generator_ColumnVarNameInTable="columneDosRate07Warning" msprop:Generator_ColumnPropNameInRow="eDosRate07Warning" msprop:Generator_ColumnPropNameInTable="eDosRate07WarningColumn" msprop:Generator_UserColumnName="eDosRate07Warning" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosRate07Alarm" msprop:Generator_ColumnVarNameInTable="columneDosRate07Alarm" msprop:Generator_ColumnPropNameInRow="eDosRate07Alarm" msprop:Generator_ColumnPropNameInTable="eDosRate07AlarmColumn" msprop:Generator_UserColumnName="eDosRate07Alarm" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosDose10Warning" msprop:Generator_ColumnVarNameInTable="columneDosDose10Warning" msprop:Generator_ColumnPropNameInRow="eDosDose10Warning" msprop:Generator_ColumnPropNameInTable="eDosDose10WarningColumn" msprop:Generator_UserColumnName="eDosDose10Warning" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosDose10Alarm" msprop:Generator_ColumnVarNameInTable="columneDosDose10Alarm" msprop:Generator_ColumnPropNameInRow="eDosDose10Alarm" msprop:Generator_ColumnPropNameInTable="eDosDose10AlarmColumn" msprop:Generator_UserColumnName="eDosDose10Alarm" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosRate10Warning" msprop:Generator_ColumnVarNameInTable="columneDosRate10Warning" msprop:Generator_ColumnPropNameInRow="eDosRate10Warning" msprop:Generator_ColumnPropNameInTable="eDosRate10WarningColumn" msprop:Generator_UserColumnName="eDosRate10Warning" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosRate10Alarm" msprop:Generator_ColumnVarNameInTable="columneDosRate10Alarm" msprop:Generator_ColumnPropNameInRow="eDosRate10Alarm" msprop:Generator_ColumnPropNameInTable="eDosRate10AlarmColumn" msprop:Generator_UserColumnName="eDosRate10Alarm" type="xs:boolean" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="CentralVisits" msprop:Generator_TableClassName="CentralVisitsDataTable" msprop:Generator_TableVarName="tableCentralVisits" msprop:Generator_RowChangedName="CentralVisitsRowChanged" msprop:Generator_TablePropName="CentralVisits" msprop:Generator_RowDeletingName="CentralVisitsRowDeleting" msprop:Generator_RowChangingName="CentralVisitsRowChanging" msprop:Generator_RowEvHandlerName="CentralVisitsRowChangeEventHandler" msprop:Generator_RowDeletedName="CentralVisitsRowDeleted" msprop:Generator_RowClassName="CentralVisitsRow" msprop:Generator_UserTableName="CentralVisits" msprop:Generator_RowEvArgName="CentralVisitsRowChangeEvent">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="ID_Station" msprop:Generator_ColumnVarNameInTable="columnID_Station" msprop:Generator_ColumnPropNameInRow="ID_Station" msprop:Generator_ColumnPropNameInTable="ID_StationColumn" msprop:Generator_UserColumnName="ID_Station" type="xs:int" />
|
||||
<xs:element name="ID_Visit" msprop:Generator_ColumnVarNameInTable="columnID_Visit" msprop:Generator_ColumnPropNameInRow="ID_Visit" msprop:Generator_ColumnPropNameInTable="ID_VisitColumn" msprop:Generator_UserColumnName="ID_Visit" type="xs:int" />
|
||||
<xs:element name="Inst_CODE" msprop:Generator_ColumnVarNameInTable="columnInst_CODE" msprop:Generator_ColumnPropNameInRow="Inst_CODE" msprop:Generator_ColumnPropNameInTable="Inst_CODEColumn" msprop:Generator_UserColumnName="Inst_CODE" type="xs:int" />
|
||||
<xs:element name="PersID" msprop:Generator_ColumnVarNameInTable="columnPersID" msprop:Generator_ColumnPropNameInRow="PersID" msprop:Generator_ColumnPropNameInTable="PersIDColumn" msprop:Generator_UserColumnName="PersID" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="ID_Task" msprop:Generator_ColumnVarNameInTable="columnID_Task" msprop:Generator_ColumnPropNameInRow="ID_Task" msprop:Generator_ColumnPropNameInTable="ID_TaskColumn" msprop:Generator_UserColumnName="ID_Task" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="EntryTime" msprop:Generator_ColumnVarNameInTable="columnEntryTime" msprop:Generator_ColumnPropNameInRow="EntryTime" msprop:Generator_ColumnPropNameInTable="EntryTimeColumn" msprop:Generator_UserColumnName="EntryTime" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="ReturnTime" msprop:Generator_ColumnVarNameInTable="columnReturnTime" msprop:Generator_ColumnPropNameInRow="ReturnTime" msprop:Generator_ColumnPropNameInTable="ReturnTimeColumn" msprop:Generator_UserColumnName="ReturnTime" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="Hp10Dose" msprop:Generator_ColumnVarNameInTable="columnHp10Dose" msprop:Generator_ColumnPropNameInRow="Hp10Dose" msprop:Generator_ColumnPropNameInTable="Hp10DoseColumn" msprop:Generator_UserColumnName="Hp10Dose" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp07Dose" msprop:Generator_ColumnVarNameInTable="columnHp07Dose" msprop:Generator_ColumnPropNameInRow="Hp07Dose" msprop:Generator_ColumnPropNameInTable="Hp07DoseColumn" msprop:Generator_UserColumnName="Hp07Dose" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp10Total" msprop:Generator_ColumnVarNameInTable="columnHp10Total" msprop:Generator_ColumnPropNameInRow="Hp10Total" msprop:Generator_ColumnPropNameInTable="Hp10TotalColumn" msprop:Generator_UserColumnName="Hp10Total" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp07Total" msprop:Generator_ColumnVarNameInTable="columnHp07Total" msprop:Generator_ColumnPropNameInRow="Hp07Total" msprop:Generator_ColumnPropNameInTable="Hp07TotalColumn" msprop:Generator_UserColumnName="Hp07Total" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp10Peak" msprop:Generator_ColumnVarNameInTable="columnHp10Peak" msprop:Generator_ColumnPropNameInRow="Hp10Peak" msprop:Generator_ColumnPropNameInTable="Hp10PeakColumn" msprop:Generator_UserColumnName="Hp10Peak" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp07Peak" msprop:Generator_ColumnVarNameInTable="columnHp07Peak" msprop:Generator_ColumnPropNameInRow="Hp07Peak" msprop:Generator_ColumnPropNameInTable="Hp07PeakColumn" msprop:Generator_UserColumnName="Hp07Peak" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp10Time" msprop:Generator_ColumnVarNameInTable="columnHp10Time" msprop:Generator_ColumnPropNameInRow="Hp10Time" msprop:Generator_ColumnPropNameInTable="Hp10TimeColumn" msprop:Generator_UserColumnName="Hp10Time" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="Hp07Time" msprop:Generator_ColumnVarNameInTable="columnHp07Time" msprop:Generator_ColumnPropNameInRow="Hp07Time" msprop:Generator_ColumnPropNameInTable="Hp07TimeColumn" msprop:Generator_UserColumnName="Hp07Time" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="ID_EPD" msprop:Generator_ColumnVarNameInTable="columnID_EPD" msprop:Generator_ColumnPropNameInRow="ID_EPD" msprop:Generator_ColumnPropNameInTable="ID_EPDColumn" msprop:Generator_UserColumnName="ID_EPD" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="QualityData" msprop:Generator_ColumnVarNameInTable="columnQualityData" msprop:Generator_ColumnPropNameInRow="QualityData" msprop:Generator_ColumnPropNameInTable="QualityDataColumn" msprop:Generator_UserColumnName="QualityData" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K1" msprop:Generator_ColumnVarNameInTable="columnK1" msprop:Generator_ColumnPropNameInRow="K1" msprop:Generator_ColumnPropNameInTable="K1Column" msprop:Generator_UserColumnName="K1" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K2" msprop:Generator_ColumnVarNameInTable="columnK2" msprop:Generator_ColumnPropNameInRow="K2" msprop:Generator_ColumnPropNameInTable="K2Column" msprop:Generator_UserColumnName="K2" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K3" msprop:Generator_ColumnVarNameInTable="columnK3" msprop:Generator_ColumnPropNameInRow="K3" msprop:Generator_ColumnPropNameInTable="K3Column" msprop:Generator_UserColumnName="K3" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K4" msprop:Generator_ColumnVarNameInTable="columnK4" msprop:Generator_ColumnPropNameInRow="K4" msprop:Generator_ColumnPropNameInTable="K4Column" msprop:Generator_UserColumnName="K4" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K5" msprop:Generator_ColumnVarNameInTable="columnK5" msprop:Generator_ColumnPropNameInRow="K5" msprop:Generator_ColumnPropNameInTable="K5Column" msprop:Generator_UserColumnName="K5" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="K6" msprop:Generator_ColumnVarNameInTable="columnK6" msprop:Generator_ColumnPropNameInRow="K6" msprop:Generator_ColumnPropNameInTable="K6Column" msprop:Generator_UserColumnName="K6" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="SG" msprop:Generator_ColumnVarNameInTable="columnSG" msprop:Generator_ColumnPropNameInRow="SG" msprop:Generator_ColumnPropNameInTable="SGColumn" msprop:Generator_UserColumnName="SG" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="BC" msprop:Generator_ColumnVarNameInTable="columnBC" msprop:Generator_ColumnPropNameInRow="BC" msprop:Generator_ColumnPropNameInTable="BCColumn" msprop:Generator_UserColumnName="BC" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="FB" msprop:Generator_ColumnVarNameInTable="columnFB" msprop:Generator_ColumnPropNameInRow="FB" msprop:Generator_ColumnPropNameInTable="FBColumn" msprop:Generator_UserColumnName="FB" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="HG" msprop:Generator_ColumnVarNameInTable="columnHG" msprop:Generator_ColumnPropNameInRow="HG" msprop:Generator_ColumnPropNameInTable="HGColumn" msprop:Generator_UserColumnName="HG" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="alarmStatus" msprop:Generator_ColumnVarNameInTable="columnalarmStatus" msprop:Generator_ColumnPropNameInRow="alarmStatus" msprop:Generator_ColumnPropNameInTable="alarmStatusColumn" msprop:Generator_UserColumnName="alarmStatus" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="otherAlarms" msprop:Generator_ColumnVarNameInTable="columnotherAlarms" msprop:Generator_ColumnPropNameInRow="otherAlarms" msprop:Generator_ColumnPropNameInTable="otherAlarmsColumn" msprop:Generator_UserColumnName="otherAlarms" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="errorStatus" msprop:Generator_ColumnVarNameInTable="columnerrorStatus" msprop:Generator_ColumnPropNameInRow="errorStatus" msprop:Generator_ColumnPropNameInTable="errorStatusColumn" msprop:Generator_UserColumnName="errorStatus" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="operatingStatus" msprop:Generator_ColumnVarNameInTable="columnoperatingStatus" msprop:Generator_ColumnPropNameInRow="operatingStatus" msprop:Generator_ColumnPropNameInTable="operatingStatusColumn" msprop:Generator_UserColumnName="operatingStatus" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="isBG" msprop:Generator_ColumnVarNameInTable="columnisBG" msprop:Generator_ColumnPropNameInRow="isBG" msprop:Generator_ColumnPropNameInTable="isBGColumn" msprop:Generator_UserColumnName="isBG" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="isComplete" msprop:Generator_ColumnVarNameInTable="columnisComplete" msprop:Generator_ColumnPropNameInRow="isComplete" msprop:Generator_ColumnPropNameInTable="isCompleteColumn" msprop:Generator_UserColumnName="isComplete" type="xs:boolean" />
|
||||
<xs:element name="isDeleted" msprop:Generator_ColumnVarNameInTable="columnisDeleted" msprop:Generator_ColumnPropNameInRow="isDeleted" msprop:Generator_ColumnPropNameInTable="isDeletedColumn" msprop:Generator_UserColumnName="isDeleted" type="xs:boolean" />
|
||||
<xs:element name="isAlarm" msprop:Generator_ColumnVarNameInTable="columnisAlarm" msprop:Generator_ColumnPropNameInRow="isAlarm" msprop:Generator_ColumnPropNameInTable="isAlarmColumn" msprop:Generator_UserColumnName="isAlarm" type="xs:boolean" />
|
||||
<xs:element name="isAlarmCleared" msprop:Generator_ColumnVarNameInTable="columnisAlarmCleared" msprop:Generator_ColumnPropNameInRow="isAlarmCleared" msprop:Generator_ColumnPropNameInTable="isAlarmClearedColumn" msprop:Generator_UserColumnName="isAlarmCleared" type="xs:boolean" />
|
||||
<xs:element name="isManualExit" msprop:Generator_ColumnVarNameInTable="columnisManualExit" msprop:Generator_ColumnPropNameInRow="isManualExit" msprop:Generator_ColumnPropNameInTable="isManualExitColumn" msprop:Generator_UserColumnName="isManualExit" type="xs:boolean" />
|
||||
<xs:element name="ID_Station_Return" msprop:Generator_ColumnVarNameInTable="columnID_Station_Return" msprop:Generator_ColumnPropNameInRow="ID_Station_Return" msprop:Generator_ColumnPropNameInTable="ID_Station_ReturnColumn" msprop:Generator_UserColumnName="ID_Station_Return" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="ENTRY_EPD_CLOCK" msprop:Generator_ColumnVarNameInTable="columnENTRY_EPD_CLOCK" msprop:Generator_ColumnPropNameInRow="ENTRY_EPD_CLOCK" msprop:Generator_ColumnPropNameInTable="ENTRY_EPD_CLOCKColumn" msprop:Generator_UserColumnName="ENTRY_EPD_CLOCK" type="xs:decimal" minOccurs="0" />
|
||||
<xs:element name="EXIT_EPD_CLOCK" msprop:Generator_ColumnVarNameInTable="columnEXIT_EPD_CLOCK" msprop:Generator_ColumnPropNameInRow="EXIT_EPD_CLOCK" msprop:Generator_ColumnPropNameInTable="EXIT_EPD_CLOCKColumn" msprop:Generator_UserColumnName="EXIT_EPD_CLOCK" type="xs:decimal" minOccurs="0" />
|
||||
<xs:element name="TIME_LOST" msprop:Generator_ColumnVarNameInTable="columnTIME_LOST" msprop:Generator_ColumnPropNameInRow="TIME_LOST" msprop:Generator_ColumnPropNameInTable="TIME_LOSTColumn" msprop:Generator_UserColumnName="TIME_LOST" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="VisitStatus" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnVisitStatus" msprop:Generator_ColumnPropNameInRow="VisitStatus" msprop:Generator_ColumnPropNameInTable="VisitStatusColumn" msprop:Generator_UserColumnName="VisitStatus" type="xs:unsignedByte" minOccurs="0" />
|
||||
<xs:element name="syncedEntry" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnsyncedEntry" msprop:Generator_ColumnPropNameInRow="syncedEntry" msprop:Generator_ColumnPropNameInTable="syncedEntryColumn" msprop:Generator_UserColumnName="syncedEntry" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="syncedExit" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnsyncedExit" msprop:Generator_ColumnPropNameInRow="syncedExit" msprop:Generator_ColumnPropNameInTable="syncedExitColumn" msprop:Generator_UserColumnName="syncedExit" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="epdType" msprop:Generator_ColumnVarNameInTable="columnepdType" msprop:Generator_ColumnPropNameInRow="epdType" msprop:Generator_ColumnPropNameInTable="epdTypeColumn" msprop:Generator_UserColumnName="epdType" type="xs:unsignedByte" minOccurs="0" />
|
||||
<xs:element name="eDosBatteryWarning" msprop:Generator_ColumnVarNameInTable="columneDosBatteryWarning" msprop:Generator_ColumnPropNameInRow="eDosBatteryWarning" msprop:Generator_ColumnPropNameInTable="eDosBatteryWarningColumn" msprop:Generator_UserColumnName="eDosBatteryWarning" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosDose07Warning" msprop:Generator_ColumnVarNameInTable="columneDosDose07Warning" msprop:Generator_ColumnPropNameInRow="eDosDose07Warning" msprop:Generator_ColumnPropNameInTable="eDosDose07WarningColumn" msprop:Generator_UserColumnName="eDosDose07Warning" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosDose07Alarm" msprop:Generator_ColumnVarNameInTable="columneDosDose07Alarm" msprop:Generator_ColumnPropNameInRow="eDosDose07Alarm" msprop:Generator_ColumnPropNameInTable="eDosDose07AlarmColumn" msprop:Generator_UserColumnName="eDosDose07Alarm" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosRate07Warning" msprop:Generator_ColumnVarNameInTable="columneDosRate07Warning" msprop:Generator_ColumnPropNameInRow="eDosRate07Warning" msprop:Generator_ColumnPropNameInTable="eDosRate07WarningColumn" msprop:Generator_UserColumnName="eDosRate07Warning" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosRate07Alarm" msprop:Generator_ColumnVarNameInTable="columneDosRate07Alarm" msprop:Generator_ColumnPropNameInRow="eDosRate07Alarm" msprop:Generator_ColumnPropNameInTable="eDosRate07AlarmColumn" msprop:Generator_UserColumnName="eDosRate07Alarm" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosDose10Warning" msprop:Generator_ColumnVarNameInTable="columneDosDose10Warning" msprop:Generator_ColumnPropNameInRow="eDosDose10Warning" msprop:Generator_ColumnPropNameInTable="eDosDose10WarningColumn" msprop:Generator_UserColumnName="eDosDose10Warning" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosDose10Alarm" msprop:Generator_ColumnVarNameInTable="columneDosDose10Alarm" msprop:Generator_ColumnPropNameInRow="eDosDose10Alarm" msprop:Generator_ColumnPropNameInTable="eDosDose10AlarmColumn" msprop:Generator_UserColumnName="eDosDose10Alarm" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosRate10Warning" msprop:Generator_ColumnVarNameInTable="columneDosRate10Warning" msprop:Generator_ColumnPropNameInRow="eDosRate10Warning" msprop:Generator_ColumnPropNameInTable="eDosRate10WarningColumn" msprop:Generator_UserColumnName="eDosRate10Warning" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="eDosRate10Alarm" msprop:Generator_ColumnVarNameInTable="columneDosRate10Alarm" msprop:Generator_ColumnPropNameInRow="eDosRate10Alarm" msprop:Generator_ColumnPropNameInTable="eDosRate10AlarmColumn" msprop:Generator_UserColumnName="eDosRate10Alarm" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="epdID" msprop:Generator_ColumnVarNameInTable="columnepdID" msprop:Generator_ColumnPropNameInRow="epdID" msprop:Generator_ColumnPropNameInTable="epdIDColumn" msprop:Generator_UserColumnName="epdID" type="xs:int" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
<xs:unique name="Constraint1" msdata:PrimaryKey="true">
|
||||
<xs:selector xpath=".//mstns:LocalVisits" />
|
||||
<xs:field xpath="mstns:ID_Station" />
|
||||
<xs:field xpath="mstns:ID_Visit" />
|
||||
</xs:unique>
|
||||
<xs:unique name="CentralVisits_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
|
||||
<xs:selector xpath=".//mstns:CentralVisits" />
|
||||
<xs:field xpath="mstns:ID_Station" />
|
||||
<xs:field xpath="mstns:ID_Visit" />
|
||||
</xs:unique>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool to store the dataset designer's layout information.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="0" ViewPortY="0" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:LocalVisits" ZOrder="2" X="369" Y="19" Height="365" Width="241" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="306" />
|
||||
<Shape ID="DesignTable:CentralVisits" ZOrder="1" X="630" Y="19" Height="365" Width="273" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="306" />
|
||||
</Shapes>
|
||||
<Connectors />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool to store the dataset designer's layout information.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="0" ViewPortY="0" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:LocalVisits" ZOrder="2" X="369" Y="19" Height="365" Width="241" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="306" />
|
||||
<Shape ID="DesignTable:CentralVisits" ZOrder="1" X="630" Y="19" Height="419" Width="218" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="351" />
|
||||
</Shapes>
|
||||
<Connectors />
|
||||
</DiagramLayout>
|
||||
|
|
@ -1,480 +1,499 @@
|
|||
using LSWLib;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Text;
|
||||
using spl = LSWLib.CLog;
|
||||
|
||||
namespace syncEdosLocal
|
||||
{
|
||||
class cResult
|
||||
{
|
||||
public DateTime timestamp;
|
||||
public int VisitsNew, VisitsSkipped, VisitsAddedExits, VisitsAddedEntries;
|
||||
public int ID_Visit_Min, ID_Visit_Max;
|
||||
public int Persons, Tasks;
|
||||
public string ErrorMessage;
|
||||
System.Data.SqlClient.SqlCommand cmd;
|
||||
spl spLog;
|
||||
internal int ID_Station;
|
||||
|
||||
public cResult(int ? iID_station, SqlConnection co, spl Log)
|
||||
{
|
||||
if (iID_station.HasValue) ID_Station = iID_station.Value; else ID_Station = -1;
|
||||
ErrorMessage = string.Empty;
|
||||
VisitsNew = VisitsSkipped = VisitsAddedExits = VisitsAddedEntries = 0;
|
||||
ID_Visit_Min = int.MaxValue; ID_Visit_Max = int.MinValue;
|
||||
Persons = Tasks = 0;
|
||||
spLog = Log;
|
||||
MakeCmd(co);
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Success: {VisitsNew} new , {VisitsAddedEntries} Added Entries, {VisitsAddedExits} Added Exits, {VisitsSkipped} skipped";
|
||||
}
|
||||
|
||||
private void MakeCmd(SqlConnection co)
|
||||
{
|
||||
cmd = new System.Data.SqlClient.SqlCommand("[syncLoc].[SyncStatusUpdate]", co) { CommandType = System.Data.CommandType.StoredProcedure };
|
||||
cmd.Parameters.AddRange(new System.Data.SqlClient.SqlParameter[] {
|
||||
new System.Data.SqlClient.SqlParameter("ID_Station",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
,new System.Data.SqlClient.SqlParameter("TimeStamp",SqlDbType.DateTime,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
,new System.Data.SqlClient.SqlParameter("New",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
,new System.Data.SqlClient.SqlParameter("Entries",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
,new System.Data.SqlClient.SqlParameter("Exits",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
,new System.Data.SqlClient.SqlParameter("Skipped",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
,new System.Data.SqlClient.SqlParameter("ErrorMessage",SqlDbType.VarChar,512,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
,new System.Data.SqlClient.SqlParameter("ID_Visit_Min",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
,new System.Data.SqlClient.SqlParameter("ID_Visit_Max",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
,new System.Data.SqlClient.SqlParameter("Persons",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
,new System.Data.SqlClient.SqlParameter("Tasks",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
});
|
||||
}
|
||||
|
||||
public void Write( )
|
||||
{
|
||||
try
|
||||
{
|
||||
spLog.SeverityReset();
|
||||
timestamp = DateTime.Now;
|
||||
if (ID_Station > 0)
|
||||
{
|
||||
cmd.Parameters["ID_Station"].Value = ID_Station;
|
||||
cmd.Parameters["TimeStamp"].Value = timestamp;
|
||||
cmd.Parameters["New"].Value = VisitsNew;
|
||||
cmd.Parameters["Entries"].Value = VisitsAddedEntries;
|
||||
cmd.Parameters["Exits"].Value = VisitsAddedEntries;
|
||||
cmd.Parameters["Skipped"].Value = VisitsSkipped;
|
||||
cmd.Parameters["ErrorMessage"].Value = ErrorMessage;
|
||||
cmd.Parameters["ID_Visit_Min"].Value = ID_Visit_Min;
|
||||
cmd.Parameters["ID_Visit_Max"].Value = ID_Visit_Max;
|
||||
cmd.Parameters["Persons"].Value = Persons;
|
||||
cmd.Parameters["Tasks"].Value = Tasks;
|
||||
ConnectionState cs = cmd.Connection.State;
|
||||
if (cs != ConnectionState.Open) cmd.Connection.Open();
|
||||
cmd.ExecuteNonQuery();
|
||||
if (cs != ConnectionState.Open) cmd.Connection.Close();
|
||||
spLog.WriteSplunkLog("Result", spLog.splunkSeverity, null, this.ToString()); ;
|
||||
}
|
||||
} catch (System.Exception ex)
|
||||
{
|
||||
spLog.setErrorException(ex);
|
||||
spLog.WriteSplunkLog("Result", spLog.splunkSeverity, null, spLog.splunkError);
|
||||
}
|
||||
}
|
||||
|
||||
internal void CheckVisitID(int iD_Visit)
|
||||
{
|
||||
if (ID_Visit_Max < iD_Visit) ID_Visit_Max = iD_Visit;
|
||||
if (ID_Visit_Min > iD_Visit) ID_Visit_Min = iD_Visit;
|
||||
}
|
||||
}
|
||||
|
||||
class Program
|
||||
{
|
||||
public static DataSet ds = null;
|
||||
static System.Data.SqlClient.SqlInfoMessageEventHandler iMessage = new SqlInfoMessageEventHandler(Connection_InfoMessage);
|
||||
static bool error = false;
|
||||
static bool warning = false;
|
||||
static StringBuilder messages = null;
|
||||
static string splunkMessage = string.Empty;
|
||||
static spl spLog;
|
||||
static LSWLib.Bulker Bulker;
|
||||
static cResult Result;
|
||||
|
||||
public static int? CreateStationID (SqlConnection eDosLocalCon, SqlConnection eDosCon )
|
||||
{
|
||||
var c1 = eDosCon.State;
|
||||
if (c1 != ConnectionState.Open) eDosCon.Open();
|
||||
var c2 = eDosLocalCon.State;
|
||||
if (c2 != ConnectionState.Open) eDosLocalCon.Open();
|
||||
int? StationID = Bulker.SqlCommands.ExecProcScalar("Get Station ID", eDosCon, "GetNewID_LocalStation", true, ref error) as int?;
|
||||
if (StationID.HasValue)
|
||||
{
|
||||
Bulker.SqlCommands.ExecProcScalar("Set Station ID", eDosLocalCon, $"SetNewID_LocalStation {StationID.Value}", true, ref error);
|
||||
}
|
||||
else StationID = null;
|
||||
if (c2 != ConnectionState.Open) eDosLocalCon.Close();
|
||||
if (c1 != ConnectionState.Open) eDosCon.Close();
|
||||
return StationID;
|
||||
}
|
||||
public static bool DoorloopToDo(System.Data.SqlClient.SqlConnection fromConnection, string toConstr, System.Data.SqlClient.SqlInfoMessageEventHandler im, ref bool error, ref bool warning)
|
||||
{
|
||||
ds = new DataSet();
|
||||
DataTable dtTables = new DataTable("Tables");
|
||||
ds.Tables.Add(dtTables);
|
||||
DataTable dtActions = new DataTable("Actions");
|
||||
ds.Tables.Add(dtActions);
|
||||
{
|
||||
using (var cmd = new System.Data.SqlClient.SqlCommand("syncloc.SynchroToLocalTables", fromConnection))
|
||||
{
|
||||
spLog.KvClear();
|
||||
cmd.CommandType = CommandType.StoredProcedure;
|
||||
spLog.KvAddCommand(spl.skeys.sqlQuery, cmd);
|
||||
using (var ncta = new System.Data.SqlClient.SqlDataAdapter(cmd))
|
||||
{
|
||||
try
|
||||
{
|
||||
ncta.Fill(dtTables);
|
||||
int r = dtTables.Rows.Count;
|
||||
spLog.KvAdd(spl.skeys.recordsAffected, r);
|
||||
spLog.WriteSplunkLog(string.Empty, spl.iseverity.info, "LoadTables");
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
spLog.WriteSplunkLog(string.Empty, spl.iseverity.err, "LoadTables", ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
spLog.KvClear();
|
||||
dtTables.PrimaryKey = new DataColumn[] { dtTables.Columns["object_id"] };
|
||||
|
||||
using (var cmd = new System.Data.SqlClient.SqlCommand("syncloc.SynchroToLocalActions", fromConnection))
|
||||
{
|
||||
cmd.CommandType = CommandType.StoredProcedure;
|
||||
using (var ncta = new System.Data.SqlClient.SqlDataAdapter(cmd))
|
||||
{
|
||||
try
|
||||
{
|
||||
ncta.Fill(dtActions);
|
||||
spLog.KvAdd(spl.skeys.recordsAffected, dtActions.Rows.Count);
|
||||
spLog.WriteSplunkLog(string.Empty, spl.iseverity.info, "LoadActions");
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
spLog.WriteSplunkLog(string.Empty, spl.iseverity.err, "LoadActions", ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
dtActions.PrimaryKey = new DataColumn[] { dtActions.Columns["object_id"], dtActions.Columns["Type"], dtActions.Columns["r"] };
|
||||
dtActions.ParentRelations.Add(new DataRelation("pObject", dtTables.Columns["object_id"], dtActions.Columns["object_id"]));
|
||||
|
||||
StringBuilder sqlCmdsActivate = null;
|
||||
StringBuilder sqlCmdsDeActivate = null;
|
||||
string Task = string.Empty;
|
||||
string dest = string.Empty;
|
||||
string qry = string.Empty;
|
||||
|
||||
using (System.Data.SqlClient.SqlConnection toConnection = new SqlConnection(toConstr))
|
||||
{
|
||||
spLog.KvClear();
|
||||
spLog.KvAdd(toConnection);
|
||||
toConnection.InfoMessage += im;
|
||||
toConnection.Open();
|
||||
if (toConnection.State == ConnectionState.Open)
|
||||
using (var ucmd = new System.Data.SqlClient.SqlCommand("syncloc.SynchroToLocalTablesUpdate",fromConnection))
|
||||
{
|
||||
ucmd.CommandType = CommandType.StoredProcedure;
|
||||
SqlParameter pa = new SqlParameter("ID_Station", SqlDbType.Int, 4); ucmd.Parameters.Add(pa); pa.Value = Result.ID_Station;
|
||||
pa = new SqlParameter("OBJECT_ID", SqlDbType.Int, 4); pa.Value = Result.ID_Station; ucmd.Parameters.Add(pa);
|
||||
pa = new SqlParameter("lastRecords", SqlDbType.Int, 4); ucmd.Parameters.Add(pa);
|
||||
pa = new SqlParameter("constraintsDeactivated", SqlDbType.Bit); ucmd.Parameters.Add(pa);
|
||||
pa = new SqlParameter("constraintsActivated", SqlDbType.Bit); ucmd.Parameters.Add(pa);
|
||||
pa = new SqlParameter("syncError", SqlDbType.Bit); ucmd.Parameters.Add(pa);
|
||||
|
||||
if (fromConnection.State == ConnectionState.Closed) fromConnection.Open();
|
||||
|
||||
foreach (DataRow rtr in dtTables.Rows)
|
||||
{
|
||||
ucmd.Parameters["OBJECT_ID"].Value = (int)rtr[0];
|
||||
string src=rtr[1].ToString();
|
||||
dest = rtr[2].ToString();
|
||||
var x = rtr.GetChildRows(dtActions.ParentRelations[0]);
|
||||
Task = $"Table {dest}";
|
||||
System.Console.WriteLine($"*** Step {rtr[1].ToString()}");
|
||||
if (x.Length > 0)
|
||||
{
|
||||
sqlCmdsActivate = new StringBuilder();
|
||||
sqlCmdsDeActivate = new StringBuilder();
|
||||
foreach (DataRow aa in x)
|
||||
{
|
||||
sqlCmdsDeActivate.Append($" {aa["ActionDeActivate"].ToString()};");
|
||||
sqlCmdsActivate.Append($" {aa["ActionActivate"].ToString()};");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sqlCmdsActivate = sqlCmdsDeActivate = null;
|
||||
}
|
||||
|
||||
int res = 0;
|
||||
if (sqlCmdsDeActivate != null)
|
||||
using (var cmd = new System.Data.SqlClient.SqlCommand(sqlCmdsDeActivate.ToString(), toConnection))
|
||||
{
|
||||
cmd.CommandType = CommandType.Text;
|
||||
try
|
||||
{
|
||||
spLog.SeverityReset();
|
||||
res = cmd.ExecuteNonQuery();
|
||||
messages.AppendLine($"Success:Query={sqlCmdsDeActivate.ToString()}");
|
||||
ucmd.Parameters["constraintsDeactivated"].Value = true;
|
||||
spLog.WriteSplunkLog(string.Empty, spLog.splunkSeverity, "constraintsDeactivated", string.Empty);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
spLog.setErrorException(ex);
|
||||
error = true;
|
||||
messages.AppendLine(spLog.splunkError);
|
||||
ucmd.Parameters["constraintsDeactivated"].Value = false;
|
||||
spLog.WriteSplunkLog(string.Empty, spLog.splunkSeverity, "constraintsDeactivated", spLog.splunkError);
|
||||
}
|
||||
}
|
||||
|
||||
int cnt = 0;
|
||||
qry = LSWLib.SqlCommands.getColumnsQry(fromConnection, src);
|
||||
SqlConnection[] curDests = new SqlConnection[] { toConnection };
|
||||
cnt = Bulker.Execute(Task, fromConnection, curDests, qry, CommandType.Text, dest, 0, ref error);
|
||||
ucmd.Parameters["lastRecords"].Value = cnt;
|
||||
if (dest.Contains("PersonInfo"))
|
||||
Result.Persons = cnt;
|
||||
else if (dest.Contains("TaskInfo")) Result.Tasks = cnt;
|
||||
|
||||
|
||||
if (sqlCmdsActivate != null)
|
||||
using (var cmd = new System.Data.SqlClient.SqlCommand(sqlCmdsActivate.ToString(), toConnection))
|
||||
{
|
||||
cmd.CommandType = CommandType.Text;
|
||||
spLog.KvClear();
|
||||
spLog.KvAddCommand(spl.skeys.sqlQuery, cmd);
|
||||
try
|
||||
{
|
||||
spLog.SeverityReset();
|
||||
res = cmd.ExecuteNonQuery();
|
||||
messages.AppendLine($"Success:Query={sqlCmdsActivate.ToString()}");
|
||||
ucmd.Parameters["constraintsActivated"].Value = true;
|
||||
spLog.WriteSplunkLog(string.Empty, spLog.splunkSeverity, "constraintsActivated", spLog.splunkError);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
spLog.setErrorException(ex);
|
||||
error = true;
|
||||
ucmd.Parameters["constraintsActivated"].Value = false;
|
||||
messages.AppendLine(spLog.splunkError);
|
||||
spLog.WriteSplunkLog(string.Empty, spLog.splunkSeverity, "constraintsActivated", spLog.splunkError);
|
||||
}
|
||||
}
|
||||
ucmd.Parameters["syncError"].Value = error;
|
||||
|
||||
ucmd.ExecuteNonQuery();
|
||||
if (error) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return error;
|
||||
}
|
||||
static void Main(string[] args)
|
||||
{
|
||||
spLog = new spl("SynceDosLocal");
|
||||
Bulker = new LSWLib.Bulker(spLog,false);
|
||||
messages = Bulker.messages;
|
||||
messages.AppendLine(spLog.GetStartInfoString());
|
||||
|
||||
//Sync need both
|
||||
var SourceCoStr = new SqlConnectionStringBuilder(System.Configuration.ConfigurationManager.ConnectionStrings["eDosConnectionString"].ConnectionString);
|
||||
var LocalCoStr = new SqlConnectionStringBuilder(System.Configuration.ConfigurationManager.ConnectionStrings["LocalConnectionString"].ConnectionString);
|
||||
|
||||
SourceCoStr.TrustServerCertificate = LocalCoStr.TrustServerCertificate= true;
|
||||
SourceCoStr.ApplicationName = LocalCoStr.ApplicationName = "eDosSync";
|
||||
SourceCoStr.WorkstationID = LocalCoStr.WorkstationID = Environment.MachineName;
|
||||
|
||||
string reDos = string.Empty;
|
||||
string reDosLocal = string.Empty;
|
||||
try
|
||||
{
|
||||
using (var key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\\WOW6432Node\\Microsoft\\MSSQLServer\\Client\\ConnectTo"))
|
||||
{
|
||||
reDos = key.GetValue("eDos").ToString();
|
||||
reDosLocal = key.GetValue("eDosLocal").ToString();
|
||||
}
|
||||
} catch (System.Exception ex)
|
||||
{
|
||||
spLog.setErrorException(ex);
|
||||
spLog.WriteSplunkLog("init", spLog.splunkSeverity, null, spLog.splunkError);
|
||||
messages.AppendLine($"Error reading reg key");
|
||||
}
|
||||
|
||||
messages.AppendLine($"Remote {SourceCoStr.DataSource} db {SourceCoStr.InitialCatalog} Logon= { SourceCoStr.UserID} alias:{ reDos }");
|
||||
messages.AppendLine($"Local {LocalCoStr.DataSource} db {LocalCoStr.InitialCatalog} Logon= { LocalCoStr.UserID} alias:{ reDosLocal }");
|
||||
|
||||
System.Console.WriteLine($"Opening {LocalCoStr.ConnectionString}");
|
||||
try
|
||||
{
|
||||
using (System.Data.SqlClient.SqlConnection eDosLocalCon = new SqlConnection(LocalCoStr.ConnectionString))
|
||||
{
|
||||
eDosLocalCon.Open();
|
||||
int? StationID = Bulker.SqlCommands.ExecProcScalar("Get Station ID", eDosLocalCon, "GetID_LocalStation", true, ref error) as int?;
|
||||
if (!StationID.HasValue)
|
||||
{
|
||||
System.Console.WriteLine($"No stationID for this computer [{Environment.MachineName}]");
|
||||
}
|
||||
else
|
||||
{
|
||||
Result = new cResult(StationID, eDosLocalCon, spLog);
|
||||
using (System.Data.SqlClient.SqlConnection eDosCon = new SqlConnection(SourceCoStr.ConnectionString))
|
||||
{
|
||||
eDosCon.InfoMessage += Connection_InfoMessage;
|
||||
DoorloopToDo(eDosCon, LocalCoStr.ConnectionString, iMessage, ref error, ref warning);
|
||||
DoorloopVisits(eDosLocalCon, eDosCon, Bulker.spLog, ref error);
|
||||
}
|
||||
Result.Write();
|
||||
}
|
||||
eDosLocalCon.Close();
|
||||
}
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
System.Console.WriteLine($"Opening fail {ex.Message}");
|
||||
error = true;
|
||||
spLog.WriteSplunkLog(string.Empty, spl.iseverity.err, "syncEdosLocal", ex.Message);
|
||||
}
|
||||
if (error) goto final;
|
||||
|
||||
final:
|
||||
messages.AppendLine($"Process:End,tm={System.DateTime.Now.ToString("yyyy-MM-ddTHH:mm")}, Errors={error}, Warnings={warning}");
|
||||
System.Diagnostics.Debug.WriteLine(messages.ToString());
|
||||
Console.WriteLine(messages.ToString());
|
||||
|
||||
//var smtpFrom = System.Configuration.ConfigurationManager.AppSettings["smtpFrom"];
|
||||
//var smtpServer = System.Configuration.ConfigurationManager.AppSettings["smtpServer"];
|
||||
//int smtpPort = 25;
|
||||
//if (int.TryParse(System.Configuration.ConfigurationManager.AppSettings["smtpPort"], out int newSMTPPort)) smtpPort = newSMTPPort; ;
|
||||
//using (System.Net.Mail.MailMessage m = new System.Net.Mail.MailMessage())
|
||||
//{
|
||||
// m.From = new System.Net.Mail.MailAddress(smtpFrom);
|
||||
// m.To.Add("lvandenb@sckcen.be");
|
||||
// m.Subject = "SynceDosLocal " + (error ? "Error" : "No errors") + (warning ? " Warnings" : "");
|
||||
// m.IsBodyHtml = true;
|
||||
// m.Body = Bulker.htmlLog.ToString();
|
||||
// using (var mc = new System.Net.Mail.SmtpClient(smtpServer, smtpPort)) { mc.Send(m); }
|
||||
//}
|
||||
spLog.CloseSplunkLog();
|
||||
}
|
||||
static void DoorloopVisits(SqlConnection coLocal, SqlConnection coCentral, spl spLog, ref bool error)
|
||||
{
|
||||
const string sStep = "Doorloop Visits";
|
||||
//int VisitsNew = 0, VisitsAddedEntries = 0, VisitsAddedExits = 0, VisitsSkipped = 0;
|
||||
spLog.WriteSplunkLog(sStep, spl.iseverity.info);
|
||||
DataSet1 ds = new DataSet1();
|
||||
DataSet1.CentralVisitsRow cr;
|
||||
try
|
||||
{
|
||||
using (var ta = new DataSet1TableAdapters.LocalVisitsTableAdapter())
|
||||
using (var tc = new DataSet1TableAdapters.CentralVisitsTableAdapter())
|
||||
{
|
||||
ta.Connection = coLocal;
|
||||
tc.Connection = coCentral;
|
||||
tc.ClearBeforeFill = false;
|
||||
ta.Fill(ds.LocalVisits);
|
||||
spLog.KvAdd(spl.skeys.recordsAffected, ds.LocalVisits.Rows.Count);
|
||||
foreach (DataSet1.LocalVisitsRow lr in ds.LocalVisits.Rows)
|
||||
{
|
||||
Result.CheckVisitID(lr.ID_Visit);
|
||||
tc.Fill(ds.CentralVisits, lr.ID_Station, lr.ID_Visit);
|
||||
cr = ds.CentralVisits.FindByID_StationID_Visit(lr.ID_Station, lr.ID_Visit);
|
||||
if (cr == null)
|
||||
{
|
||||
Result.VisitsNew++;
|
||||
copyrow(lr, ds.CentralVisits);
|
||||
if ((lr.VisitStatus & 1) > 0) { lr.syncedEntry = true; Result.VisitsAddedEntries++;}
|
||||
if ((lr.VisitStatus & 2) > 0) { lr.syncedExit = true; Result.VisitsAddedExits++; }
|
||||
}
|
||||
else switch (cr.VisitStatus)
|
||||
{
|
||||
case 3: lr.syncedEntry = lr.syncedExit = true; Result.VisitsSkipped++; break;
|
||||
case 1: if ((lr.VisitStatus & 2) == 2) { copyExit(lr, cr); lr.syncedEntry=lr.syncedExit = true; Result.VisitsAddedExits++; } break;
|
||||
case 2: if ((lr.VisitStatus & 1) == 1) { copyEntry(lr, cr); lr.syncedEntry=lr.syncedExit= true; Result.VisitsAddedEntries++; } break;
|
||||
}
|
||||
}
|
||||
ta.Update(ds.LocalVisits);
|
||||
tc.Update(ds.CentralVisits);
|
||||
}
|
||||
spLog.KvClear();
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
error = true;
|
||||
Result.ErrorMessage = ex.Message;
|
||||
spLog.setErrorException(ex);
|
||||
spLog.WriteSplunkLog(sStep, spLog.splunkSeverity, null, spLog.splunkError);
|
||||
}
|
||||
}
|
||||
private static void copyEntry(DataSet1.LocalVisitsRow lr, DataSet1.CentralVisitsRow cr)
|
||||
{
|
||||
cr["ID_Station"] = lr["ID_Station"];
|
||||
cr["ID_Visit"] = lr["ID_Visit"];
|
||||
cr["Inst_CODE"] = lr["Inst_CODE"];
|
||||
cr["PersID"] = lr["PersID"];
|
||||
cr["ID_Task"] = lr["ID_Task"];
|
||||
cr["EntryTime"] = lr["EntryTime"];
|
||||
cr["ID_EPD"] = lr["ID_EPD"];
|
||||
cr["isBG"] = lr["isBG"];
|
||||
cr["ENTRY_EPD_CLOCK"] = lr["ENTRY_EPD_CLOCK"];
|
||||
cr["epdType"] = lr["epdType"];
|
||||
}
|
||||
private static void copyExit(DataSet1.LocalVisitsRow lr, DataSet1.CentralVisitsRow cr)
|
||||
{
|
||||
cr["ReturnTime"] = lr["ReturnTime"];
|
||||
cr["Hp10Dose"] = lr["Hp10Dose"];
|
||||
cr["Hp07Dose"] = lr["Hp07Dose"];
|
||||
cr["Hp10Total"] = lr["Hp10Total"];
|
||||
cr["Hp07Total"] = lr["Hp07Total"];
|
||||
cr["Hp10Peak"] = lr["Hp10Peak"];
|
||||
cr["Hp07Peak"] = lr["Hp07Peak"];
|
||||
cr["Hp10Time"] = lr["Hp10Time"];
|
||||
cr["Hp07Time"] = lr["Hp07Time"];
|
||||
cr["QualityData"] = lr["QualityData"];
|
||||
cr["K1"] = lr["K1"];
|
||||
cr["K2"] = lr["K2"];
|
||||
cr["K3"] = lr["K3"];
|
||||
cr["K4"] = lr["K4"];
|
||||
cr["K5"] = lr["K5"];
|
||||
cr["K6"] = lr["K6"];
|
||||
cr["SG"] = lr["SG"];
|
||||
cr["BC"] = lr["BC"];
|
||||
cr["FB"] = lr["FB"];
|
||||
cr["HG"] = lr["HG"];
|
||||
cr["alarmStatus"] = lr["alarmStatus"];
|
||||
cr["otherAlarms"] = lr["otherAlarms"];
|
||||
cr["errorStatus"] = lr["errorStatus"];
|
||||
cr["operatingStatus"] = lr["operatingStatus"];
|
||||
cr["isAlarm"] = lr["isAlarm"];
|
||||
cr["isAlarmCleared"] = lr["isAlarmCleared"];
|
||||
cr["ENTRY_EPD_CLOCK"] = lr["ENTRY_EPD_CLOCK"];
|
||||
cr["EXIT_EPD_CLOCK"] = lr["EXIT_EPD_CLOCK"];
|
||||
cr["TIME_LOST"] = lr["TIME_LOST"];
|
||||
}
|
||||
private static DataSet1.CentralVisitsRow copyrow(DataSet1.LocalVisitsRow lr, DataSet1.CentralVisitsDataTable centralVisits)
|
||||
{
|
||||
DataSet1.CentralVisitsRow cr = centralVisits.NewCentralVisitsRow();
|
||||
foreach (DataColumn sc in lr.Table.Columns)
|
||||
if (lr.Table.Columns.Contains(sc.ColumnName) ) cr[sc.ColumnName] = lr[sc.ColumnName];
|
||||
centralVisits.AddCentralVisitsRow(cr);
|
||||
return cr;
|
||||
}
|
||||
private static void Connection_InfoMessage(object sender, System.Data.SqlClient.SqlInfoMessageEventArgs e)
|
||||
{
|
||||
spLog.Connection_InfoMessageLog(e, ref messages);
|
||||
}
|
||||
}
|
||||
}
|
||||
using LSWLib;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Text;
|
||||
using spl = LSWLib.CLog;
|
||||
|
||||
namespace syncEdosLocal
|
||||
{
|
||||
class cResult
|
||||
{
|
||||
public DateTime timestamp;
|
||||
public int VisitsNew, VisitsSkipped, VisitsAddedExits, VisitsAddedEntries;
|
||||
public int ID_Visit_Min, ID_Visit_Max;
|
||||
public int Persons, Tasks;
|
||||
public string ErrorMessage;
|
||||
System.Data.SqlClient.SqlCommand cmd;
|
||||
spl spLog;
|
||||
internal int ID_Station;
|
||||
|
||||
public cResult(int ? iID_station, SqlConnection co, spl Log)
|
||||
{
|
||||
if (iID_station.HasValue) ID_Station = iID_station.Value; else ID_Station = -1;
|
||||
ErrorMessage = string.Empty;
|
||||
VisitsNew = VisitsSkipped = VisitsAddedExits = VisitsAddedEntries = 0;
|
||||
ID_Visit_Min = int.MaxValue; ID_Visit_Max = int.MinValue;
|
||||
Persons = Tasks = 0;
|
||||
spLog = Log;
|
||||
MakeCmd(co);
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Success: {VisitsNew} new , {VisitsAddedEntries} Added Entries, {VisitsAddedExits} Added Exits, {VisitsSkipped} skipped";
|
||||
}
|
||||
|
||||
private void MakeCmd(SqlConnection co)
|
||||
{
|
||||
cmd = new System.Data.SqlClient.SqlCommand("[syncLoc].[SyncStatusUpdate]", co) { CommandType = System.Data.CommandType.StoredProcedure };
|
||||
cmd.Parameters.AddRange(new System.Data.SqlClient.SqlParameter[] {
|
||||
new System.Data.SqlClient.SqlParameter("ID_Station",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
,new System.Data.SqlClient.SqlParameter("TimeStamp",SqlDbType.DateTime,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
,new System.Data.SqlClient.SqlParameter("New",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
,new System.Data.SqlClient.SqlParameter("Entries",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
,new System.Data.SqlClient.SqlParameter("Exits",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
,new System.Data.SqlClient.SqlParameter("Skipped",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
,new System.Data.SqlClient.SqlParameter("ErrorMessage",SqlDbType.VarChar,512,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
,new System.Data.SqlClient.SqlParameter("ID_Visit_Min",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
,new System.Data.SqlClient.SqlParameter("ID_Visit_Max",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
,new System.Data.SqlClient.SqlParameter("Persons",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
,new System.Data.SqlClient.SqlParameter("Tasks",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
|
||||
});
|
||||
}
|
||||
|
||||
public void Write( )
|
||||
{
|
||||
try
|
||||
{
|
||||
spLog.SeverityReset();
|
||||
timestamp = DateTime.Now;
|
||||
if (ID_Station > 0)
|
||||
{
|
||||
cmd.Parameters["ID_Station"].Value = ID_Station;
|
||||
cmd.Parameters["TimeStamp"].Value = timestamp;
|
||||
cmd.Parameters["New"].Value = VisitsNew;
|
||||
cmd.Parameters["Entries"].Value = VisitsAddedEntries;
|
||||
cmd.Parameters["Exits"].Value = VisitsAddedEntries;
|
||||
cmd.Parameters["Skipped"].Value = VisitsSkipped;
|
||||
cmd.Parameters["ErrorMessage"].Value = ErrorMessage;
|
||||
cmd.Parameters["ID_Visit_Min"].Value = ID_Visit_Min;
|
||||
cmd.Parameters["ID_Visit_Max"].Value = ID_Visit_Max;
|
||||
cmd.Parameters["Persons"].Value = Persons;
|
||||
cmd.Parameters["Tasks"].Value = Tasks;
|
||||
ConnectionState cs = cmd.Connection.State;
|
||||
if (cs != ConnectionState.Open) cmd.Connection.Open();
|
||||
cmd.ExecuteNonQuery();
|
||||
if (cs != ConnectionState.Open) cmd.Connection.Close();
|
||||
spLog.WriteSplunkLog("Result", spLog.splunkSeverity, null, this.ToString()); ;
|
||||
}
|
||||
} catch (System.Exception ex)
|
||||
{
|
||||
spLog.setErrorException(ex);
|
||||
spLog.WriteSplunkLog("Result", spLog.splunkSeverity, null, spLog.splunkError);
|
||||
}
|
||||
}
|
||||
|
||||
internal void CheckVisitID(int iD_Visit)
|
||||
{
|
||||
if (ID_Visit_Max < iD_Visit) ID_Visit_Max = iD_Visit;
|
||||
if (ID_Visit_Min > iD_Visit) ID_Visit_Min = iD_Visit;
|
||||
}
|
||||
}
|
||||
|
||||
class Program
|
||||
{
|
||||
public static int Verbose;
|
||||
public static DataSet ds = null;
|
||||
static System.Data.SqlClient.SqlInfoMessageEventHandler iMessage = new SqlInfoMessageEventHandler(Connection_InfoMessage);
|
||||
static bool error = false;
|
||||
static bool warning = false;
|
||||
static StringBuilder messages = null;
|
||||
static string splunkMessage = string.Empty;
|
||||
static spl spLog;
|
||||
static LSWLib.Bulker Bulker;
|
||||
static cResult Result;
|
||||
static System.IO.StreamWriter oStream;
|
||||
|
||||
public static int? CreateStationID (SqlConnection eDosLocalCon, SqlConnection eDosCon )
|
||||
{
|
||||
var c1 = eDosCon.State;
|
||||
if (c1 != ConnectionState.Open) eDosCon.Open();
|
||||
var c2 = eDosLocalCon.State;
|
||||
if (c2 != ConnectionState.Open) eDosLocalCon.Open();
|
||||
int? StationID = Bulker.SqlCommands.ExecProcScalar("Get Station ID", eDosCon, "GetNewID_LocalStation", true, ref error) as int?;
|
||||
if (StationID.HasValue)
|
||||
{
|
||||
Bulker.SqlCommands.ExecProcScalar("Set Station ID", eDosLocalCon, $"SetNewID_LocalStation {StationID.Value}", true, ref error);
|
||||
}
|
||||
else StationID = null;
|
||||
if (c2 != ConnectionState.Open) eDosLocalCon.Close();
|
||||
if (c1 != ConnectionState.Open) eDosCon.Close();
|
||||
return StationID;
|
||||
}
|
||||
public static bool DoorloopToDo(System.Data.SqlClient.SqlConnection fromConnection, string toConstr, System.Data.SqlClient.SqlInfoMessageEventHandler im, ref bool error, ref bool warning)
|
||||
{
|
||||
ds = new DataSet();
|
||||
DataTable dtTables = new DataTable("Tables");
|
||||
ds.Tables.Add(dtTables);
|
||||
DataTable dtActions = new DataTable("Actions");
|
||||
ds.Tables.Add(dtActions);
|
||||
{
|
||||
using (var cmd = new System.Data.SqlClient.SqlCommand("syncloc.SynchroToLocalTables", fromConnection))
|
||||
{
|
||||
spLog.KvClear();
|
||||
cmd.CommandType = CommandType.StoredProcedure;
|
||||
spLog.KvAddCommand(spl.skeys.sqlQuery, cmd);
|
||||
using (var ncta = new System.Data.SqlClient.SqlDataAdapter(cmd))
|
||||
{
|
||||
try
|
||||
{
|
||||
ncta.Fill(dtTables);
|
||||
int r = dtTables.Rows.Count;
|
||||
spLog.KvAdd(spl.skeys.recordsAffected, r);
|
||||
spLog.WriteSplunkLog(string.Empty, spl.iseverity.info, "LoadTables");
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
spLog.WriteSplunkLog(string.Empty, spl.iseverity.err, "LoadTables", ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
spLog.KvClear();
|
||||
dtTables.PrimaryKey = new DataColumn[] { dtTables.Columns["object_id"] };
|
||||
|
||||
using (var cmd = new System.Data.SqlClient.SqlCommand("syncloc.SynchroToLocalActions", fromConnection))
|
||||
{
|
||||
cmd.CommandType = CommandType.StoredProcedure;
|
||||
using (var ncta = new System.Data.SqlClient.SqlDataAdapter(cmd))
|
||||
{
|
||||
try
|
||||
{
|
||||
ncta.Fill(dtActions);
|
||||
spLog.KvAdd(spl.skeys.recordsAffected, dtActions.Rows.Count);
|
||||
spLog.WriteSplunkLog(string.Empty, spl.iseverity.info, "LoadActions");
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
spLog.WriteSplunkLog(string.Empty, spl.iseverity.err, "LoadActions", ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
dtActions.PrimaryKey = new DataColumn[] { dtActions.Columns["object_id"], dtActions.Columns["Type"], dtActions.Columns["r"] };
|
||||
dtActions.ParentRelations.Add(new DataRelation("pObject", dtTables.Columns["object_id"], dtActions.Columns["object_id"]));
|
||||
|
||||
StringBuilder sqlCmdsActivate = null;
|
||||
StringBuilder sqlCmdsDeActivate = null;
|
||||
string Task = string.Empty;
|
||||
string dest = string.Empty;
|
||||
string qry = string.Empty;
|
||||
|
||||
using (System.Data.SqlClient.SqlConnection toConnection = new SqlConnection(toConstr))
|
||||
{
|
||||
spLog.KvClear();
|
||||
spLog.KvAdd(toConnection);
|
||||
toConnection.InfoMessage += im;
|
||||
toConnection.Open();
|
||||
if (toConnection.State == ConnectionState.Open)
|
||||
using (var ucmd = new System.Data.SqlClient.SqlCommand("syncloc.SynchroToLocalTablesUpdate",fromConnection))
|
||||
{
|
||||
ucmd.CommandType = CommandType.StoredProcedure;
|
||||
SqlParameter pa = new SqlParameter("ID_Station", SqlDbType.Int, 4); ucmd.Parameters.Add(pa); pa.Value = Result.ID_Station;
|
||||
pa = new SqlParameter("OBJECT_ID", SqlDbType.Int, 4); pa.Value = Result.ID_Station; ucmd.Parameters.Add(pa);
|
||||
pa = new SqlParameter("lastRecords", SqlDbType.Int, 4); ucmd.Parameters.Add(pa);
|
||||
pa = new SqlParameter("constraintsDeactivated", SqlDbType.Bit); ucmd.Parameters.Add(pa);
|
||||
pa = new SqlParameter("constraintsActivated", SqlDbType.Bit); ucmd.Parameters.Add(pa);
|
||||
pa = new SqlParameter("syncError", SqlDbType.Bit); ucmd.Parameters.Add(pa);
|
||||
|
||||
if (fromConnection.State == ConnectionState.Closed) fromConnection.Open();
|
||||
|
||||
foreach (DataRow rtr in dtTables.Rows)
|
||||
{
|
||||
ucmd.Parameters["OBJECT_ID"].Value = (int)rtr[0];
|
||||
string src=rtr[1].ToString();
|
||||
dest = rtr[2].ToString();
|
||||
var x = rtr.GetChildRows(dtActions.ParentRelations[0]);
|
||||
Task = $"Table {dest}";
|
||||
oStream?.WriteLine($"*** Step {rtr[1].ToString()}");
|
||||
if (x.Length > 0)
|
||||
{
|
||||
sqlCmdsActivate = new StringBuilder();
|
||||
sqlCmdsDeActivate = new StringBuilder();
|
||||
foreach (DataRow aa in x)
|
||||
{
|
||||
sqlCmdsDeActivate.Append($" {aa["ActionDeActivate"].ToString()};");
|
||||
sqlCmdsActivate.Append($" {aa["ActionActivate"].ToString()};");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sqlCmdsActivate = sqlCmdsDeActivate = null;
|
||||
}
|
||||
|
||||
int res = 0;
|
||||
if (sqlCmdsDeActivate != null)
|
||||
using (var cmd = new System.Data.SqlClient.SqlCommand(sqlCmdsDeActivate.ToString(), toConnection))
|
||||
{
|
||||
cmd.CommandType = CommandType.Text;
|
||||
try
|
||||
{
|
||||
spLog.SeverityReset();
|
||||
res = cmd.ExecuteNonQuery();
|
||||
messages.AppendLine($"Success:Query={sqlCmdsDeActivate.ToString()}");
|
||||
ucmd.Parameters["constraintsDeactivated"].Value = true;
|
||||
spLog.WriteSplunkLog(string.Empty, spLog.splunkSeverity, "constraintsDeactivated", string.Empty);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
spLog.setErrorException(ex);
|
||||
error = true;
|
||||
messages.AppendLine(spLog.splunkError);
|
||||
ucmd.Parameters["constraintsDeactivated"].Value = false;
|
||||
spLog.WriteSplunkLog(string.Empty, spLog.splunkSeverity, "constraintsDeactivated", spLog.splunkError);
|
||||
}
|
||||
}
|
||||
|
||||
int cnt = 0;
|
||||
qry = LSWLib.SqlCommands.getColumnsQry(fromConnection, src);
|
||||
SqlConnection[] curDests = new SqlConnection[] { toConnection };
|
||||
cnt = Bulker.Execute(Task, fromConnection, curDests, qry, CommandType.Text, dest, 0, ref error);
|
||||
ucmd.Parameters["lastRecords"].Value = cnt;
|
||||
if (dest.Contains("PersonInfo"))
|
||||
Result.Persons = cnt;
|
||||
else if (dest.Contains("TaskInfo")) Result.Tasks = cnt;
|
||||
|
||||
|
||||
if (sqlCmdsActivate != null)
|
||||
using (var cmd = new System.Data.SqlClient.SqlCommand(sqlCmdsActivate.ToString(), toConnection))
|
||||
{
|
||||
cmd.CommandType = CommandType.Text;
|
||||
spLog.KvClear();
|
||||
spLog.KvAddCommand(spl.skeys.sqlQuery, cmd);
|
||||
try
|
||||
{
|
||||
spLog.SeverityReset();
|
||||
res = cmd.ExecuteNonQuery();
|
||||
messages.AppendLine($"Success:Query={sqlCmdsActivate.ToString()}");
|
||||
ucmd.Parameters["constraintsActivated"].Value = true;
|
||||
spLog.WriteSplunkLog(string.Empty, spLog.splunkSeverity, "constraintsActivated", spLog.splunkError);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
spLog.setErrorException(ex);
|
||||
error = true;
|
||||
ucmd.Parameters["constraintsActivated"].Value = false;
|
||||
messages.AppendLine(spLog.splunkError);
|
||||
spLog.WriteSplunkLog(string.Empty, spLog.splunkSeverity, "constraintsActivated", spLog.splunkError);
|
||||
}
|
||||
}
|
||||
ucmd.Parameters["syncError"].Value = error;
|
||||
|
||||
ucmd.ExecuteNonQuery();
|
||||
if (error) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return error;
|
||||
}
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Verbose = 1;
|
||||
for (int ai=0;ai<args.Length;ai++)
|
||||
{
|
||||
if (args[ai][0]=='-' && args[ai].Length>1)
|
||||
{
|
||||
switch (args[ai][1])
|
||||
{
|
||||
case 's': Verbose = 0; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Verbose > 0)
|
||||
oStream = new System.IO.StreamWriter(System.Console.OpenStandardOutput());
|
||||
else
|
||||
oStream = null; // new System.IO.StreamWriter( System.IO.Stream.Null);
|
||||
|
||||
spLog = new spl("SynceDosLocal");
|
||||
Bulker = new LSWLib.Bulker(spLog,false);
|
||||
messages = Bulker.messages;
|
||||
messages.AppendLine(spLog.GetStartInfoString());
|
||||
|
||||
//Sync need both
|
||||
var SourceCoStr = new SqlConnectionStringBuilder(System.Configuration.ConfigurationManager.ConnectionStrings["eDosConnectionString"].ConnectionString);
|
||||
var LocalCoStr = new SqlConnectionStringBuilder(System.Configuration.ConfigurationManager.ConnectionStrings["LocalConnectionString"].ConnectionString);
|
||||
|
||||
SourceCoStr.TrustServerCertificate = LocalCoStr.TrustServerCertificate= true;
|
||||
SourceCoStr.ApplicationName = LocalCoStr.ApplicationName = "eDosSync";
|
||||
SourceCoStr.WorkstationID = LocalCoStr.WorkstationID = Environment.MachineName;
|
||||
|
||||
string reDos = string.Empty;
|
||||
string reDosLocal = string.Empty;
|
||||
try
|
||||
{
|
||||
using (var key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\\WOW6432Node\\Microsoft\\MSSQLServer\\Client\\ConnectTo"))
|
||||
{
|
||||
reDos = key.GetValue("eDos").ToString();
|
||||
reDosLocal = key.GetValue("eDosLocal").ToString();
|
||||
}
|
||||
} catch (System.Exception ex)
|
||||
{
|
||||
spLog.setErrorException(ex);
|
||||
spLog.WriteSplunkLog("init", spLog.splunkSeverity, null, spLog.splunkError);
|
||||
messages.AppendLine($"Error reading reg key");
|
||||
}
|
||||
|
||||
messages.AppendLine($"Remote {SourceCoStr.DataSource} db {SourceCoStr.InitialCatalog} Logon= { SourceCoStr.UserID} alias:{ reDos }");
|
||||
messages.AppendLine($"Local {LocalCoStr.DataSource} db {LocalCoStr.InitialCatalog} Logon= { LocalCoStr.UserID} alias:{ reDosLocal }");
|
||||
|
||||
oStream?.WriteLine($"Opening {LocalCoStr.ConnectionString}");
|
||||
try
|
||||
{
|
||||
using (System.Data.SqlClient.SqlConnection eDosLocalCon = new SqlConnection(LocalCoStr.ConnectionString))
|
||||
{
|
||||
eDosLocalCon.Open();
|
||||
int? StationID = Bulker.SqlCommands.ExecProcScalar("Get Station ID", eDosLocalCon, "GetID_LocalStation", true, ref error) as int?;
|
||||
if (!StationID.HasValue)
|
||||
{
|
||||
oStream?.WriteLine($"No stationID for this computer [{Environment.MachineName}]");
|
||||
}
|
||||
else
|
||||
{
|
||||
Result = new cResult(StationID, eDosLocalCon, spLog);
|
||||
using (System.Data.SqlClient.SqlConnection eDosCon = new SqlConnection(SourceCoStr.ConnectionString))
|
||||
{
|
||||
eDosCon.InfoMessage += Connection_InfoMessage;
|
||||
DoorloopToDo(eDosCon, LocalCoStr.ConnectionString, iMessage, ref error, ref warning);
|
||||
DoorloopVisits(eDosLocalCon, eDosCon, Bulker.spLog, ref error);
|
||||
}
|
||||
Result.Write();
|
||||
}
|
||||
eDosLocalCon.Close();
|
||||
}
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
oStream?.WriteLine($"Opening fail {ex.Message}");
|
||||
error = true;
|
||||
spLog.WriteSplunkLog(string.Empty, spl.iseverity.err, "syncEdosLocal", ex.Message);
|
||||
}
|
||||
if (error) goto final;
|
||||
|
||||
final:
|
||||
messages.AppendLine($"Process:End,tm={System.DateTime.Now.ToString("yyyy-MM-ddTHH:mm")}, Errors={error}, Warnings={warning}");
|
||||
//System.Diagnostics.Debug.WriteLine(messages.ToString());
|
||||
oStream?.WriteLine(messages.ToString());
|
||||
|
||||
//var smtpFrom = System.Configuration.ConfigurationManager.AppSettings["smtpFrom"];
|
||||
//var smtpServer = System.Configuration.ConfigurationManager.AppSettings["smtpServer"];
|
||||
//int smtpPort = 25;
|
||||
//if (int.TryParse(System.Configuration.ConfigurationManager.AppSettings["smtpPort"], out int newSMTPPort)) smtpPort = newSMTPPort; ;
|
||||
//using (System.Net.Mail.MailMessage m = new System.Net.Mail.MailMessage())
|
||||
//{
|
||||
// m.From = new System.Net.Mail.MailAddress(smtpFrom);
|
||||
// m.To.Add("lvandenb@sckcen.be");
|
||||
// m.Subject = "SynceDosLocal " + (error ? "Error" : "No errors") + (warning ? " Warnings" : "");
|
||||
// m.IsBodyHtml = true;
|
||||
// m.Body = Bulker.htmlLog.ToString();
|
||||
// using (var mc = new System.Net.Mail.SmtpClient(smtpServer, smtpPort)) { mc.Send(m); }
|
||||
//}
|
||||
spLog.CloseSplunkLog();
|
||||
}
|
||||
static void DoorloopVisits(SqlConnection coLocal, SqlConnection coCentral, spl spLog, ref bool error)
|
||||
{
|
||||
const string sStep = "Doorloop Visits";
|
||||
oStream?.WriteLine(sStep);
|
||||
//int VisitsNew = 0, VisitsAddedEntries = 0, VisitsAddedExits = 0, VisitsSkipped = 0;
|
||||
spLog.WriteSplunkLog(sStep, spl.iseverity.info);
|
||||
DataSet1 ds = new DataSet1();
|
||||
DataSet1.CentralVisitsRow cr;
|
||||
try
|
||||
{
|
||||
using (var ta = new DataSet1TableAdapters.LocalVisitsTableAdapter())
|
||||
using (var tc = new DataSet1TableAdapters.CentralVisitsTableAdapter())
|
||||
{
|
||||
ta.Connection = coLocal;
|
||||
tc.Connection = coCentral;
|
||||
tc.ClearBeforeFill = false;
|
||||
ta.Fill(ds.LocalVisits);
|
||||
spLog.KvAdd(spl.skeys.recordsAffected, ds.LocalVisits.Rows.Count);
|
||||
foreach (DataSet1.LocalVisitsRow lr in ds.LocalVisits.Rows)
|
||||
{
|
||||
Result.CheckVisitID(lr.ID_Visit);
|
||||
tc.Fill(ds.CentralVisits, lr.ID_Station, lr.ID_Visit);
|
||||
cr = ds.CentralVisits.FindByID_StationID_Visit(lr.ID_Station, lr.ID_Visit);
|
||||
if (cr == null)
|
||||
{
|
||||
Result.VisitsNew++;
|
||||
copyrow(lr, ds.CentralVisits);
|
||||
if ((lr.VisitStatus & 1) > 0) { lr.syncedEntry = true; Result.VisitsAddedEntries++;}
|
||||
if ((lr.VisitStatus & 2) > 0) { lr.syncedExit = true; Result.VisitsAddedExits++; }
|
||||
}
|
||||
else switch (cr.VisitStatus)
|
||||
{
|
||||
case 3: lr.syncedEntry = lr.syncedExit = true; Result.VisitsSkipped++; break;
|
||||
case 1: if ((lr.VisitStatus & 2) == 2) { copyExit(lr, cr); lr.syncedEntry=lr.syncedExit = true; Result.VisitsAddedExits++; } break;
|
||||
case 2: if ((lr.VisitStatus & 1) == 1) { copyEntry(lr, cr); lr.syncedEntry=lr.syncedExit= true; Result.VisitsAddedEntries++; } break;
|
||||
}
|
||||
}
|
||||
ta.Update(ds.LocalVisits);
|
||||
tc.Update(ds.CentralVisits);
|
||||
}
|
||||
spLog.KvClear();
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
error = true;
|
||||
Result.ErrorMessage = ex.Message;
|
||||
spLog.setErrorException(ex);
|
||||
spLog.WriteSplunkLog(sStep, spLog.splunkSeverity, null, spLog.splunkError);
|
||||
}
|
||||
}
|
||||
private static void copyEntry(DataSet1.LocalVisitsRow lr, DataSet1.CentralVisitsRow cr)
|
||||
{
|
||||
cr["ID_Station"] = lr["ID_Station"];
|
||||
cr["ID_Visit"] = lr["ID_Visit"];
|
||||
cr["Inst_CODE"] = lr["Inst_CODE"];
|
||||
cr["PersID"] = lr["PersID"];
|
||||
cr["ID_Task"] = lr["ID_Task"];
|
||||
cr["EntryTime"] = lr["EntryTime"];
|
||||
cr["ID_EPD"] = lr["ID_EPD"];
|
||||
cr["isBG"] = lr["isBG"];
|
||||
cr["ENTRY_EPD_CLOCK"] = lr["ENTRY_EPD_CLOCK"];
|
||||
cr["epdType"] = lr["epdType"];
|
||||
}
|
||||
private static void copyExit(DataSet1.LocalVisitsRow lr, DataSet1.CentralVisitsRow cr)
|
||||
{
|
||||
cr["ReturnTime"] = lr["ReturnTime"];
|
||||
cr["Hp10Dose"] = lr["Hp10Dose"];
|
||||
cr["Hp07Dose"] = lr["Hp07Dose"];
|
||||
cr["Hp10Total"] = lr["Hp10Total"];
|
||||
cr["Hp07Total"] = lr["Hp07Total"];
|
||||
cr["Hp10Peak"] = lr["Hp10Peak"];
|
||||
cr["Hp07Peak"] = lr["Hp07Peak"];
|
||||
cr["Hp10Time"] = lr["Hp10Time"];
|
||||
cr["Hp07Time"] = lr["Hp07Time"];
|
||||
cr["QualityData"] = lr["QualityData"];
|
||||
cr["K1"] = lr["K1"];
|
||||
cr["K2"] = lr["K2"];
|
||||
cr["K3"] = lr["K3"];
|
||||
cr["K4"] = lr["K4"];
|
||||
cr["K5"] = lr["K5"];
|
||||
cr["K6"] = lr["K6"];
|
||||
cr["SG"] = lr["SG"];
|
||||
cr["BC"] = lr["BC"];
|
||||
cr["FB"] = lr["FB"];
|
||||
cr["HG"] = lr["HG"];
|
||||
cr["alarmStatus"] = lr["alarmStatus"];
|
||||
cr["otherAlarms"] = lr["otherAlarms"];
|
||||
cr["errorStatus"] = lr["errorStatus"];
|
||||
cr["operatingStatus"] = lr["operatingStatus"];
|
||||
cr["isAlarm"] = lr["isAlarm"];
|
||||
cr["isAlarmCleared"] = lr["isAlarmCleared"];
|
||||
cr["ENTRY_EPD_CLOCK"] = lr["ENTRY_EPD_CLOCK"];
|
||||
cr["EXIT_EPD_CLOCK"] = lr["EXIT_EPD_CLOCK"];
|
||||
cr["TIME_LOST"] = lr["TIME_LOST"];
|
||||
}
|
||||
private static DataSet1.CentralVisitsRow copyrow(DataSet1.LocalVisitsRow lr, DataSet1.CentralVisitsDataTable centralVisits)
|
||||
{
|
||||
DataSet1.CentralVisitsRow cr = centralVisits.NewCentralVisitsRow();
|
||||
foreach (DataColumn sc in lr.Table.Columns)
|
||||
if (lr.Table.Columns.Contains(sc.ColumnName) ) cr[sc.ColumnName] = lr[sc.ColumnName];
|
||||
centralVisits.AddCentralVisitsRow(cr);
|
||||
return cr;
|
||||
}
|
||||
private static void Connection_InfoMessage(object sender, System.Data.SqlClient.SqlInfoMessageEventArgs e)
|
||||
{
|
||||
spLog.Connection_InfoMessageLog(e, ref messages);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,36 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("syncEdosLocal")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("syncEdosLocal")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("b2264ff1-0f36-401b-91fe-db3087ce05f5")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.5.7.0")]
|
||||
[assembly: AssemblyFileVersion("1.5.7.0")]
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("syncEdosLocal")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("syncEdosLocal")]
|
||||
[assembly: AssemblyCopyright("Copyright © Luc Vandenbroucke 2020-2022")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("b2264ff1-0f36-401b-91fe-db3087ce05f5")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.6.1.0")]
|
||||
[assembly: AssemblyFileVersion("1.6.1.0")]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="LSWLib" version="3.0.8" targetFramework="net48" />
|
||||
<package id="Microsoft.VisualStudio.SlowCheetah" version="4.0.8" targetFramework="net48" developmentDependency="true" />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="LSWLib" version="3.0.9" targetFramework="net48" />
|
||||
<package id="Microsoft.VisualStudio.SlowCheetah" version="4.0.8" targetFramework="net48" developmentDependency="true" />
|
||||
</packages>
|
||||
|
|
@ -1,114 +1,114 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\LSWLib.3.0.8\build\LSWLib.props" Condition="Exists('..\packages\LSWLib.3.0.8\build\LSWLib.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{B2264FF1-0F36-401B-91FE-DB3087CE05F5}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>syncEdosLocal</RootNamespace>
|
||||
<AssemblyName>syncEdosLocal</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Runtime" />
|
||||
<Reference Include="System.Runtime.InteropServices" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DataSet1.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>DataSet1.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config">
|
||||
<TransformOnBuild>true</TransformOnBuild>
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="App.Debug.config">
|
||||
<DependentUpon>App.config</DependentUpon>
|
||||
<IsTransformFile>true</IsTransformFile>
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="App.Release.config">
|
||||
<DependentUpon>App.config</DependentUpon>
|
||||
<IsTransformFile>true</IsTransformFile>
|
||||
</None>
|
||||
<None Include="DataSet1.xsc">
|
||||
<DependentUpon>DataSet1.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="DataSet1.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSDataSetGenerator</Generator>
|
||||
<LastGenOutput>DataSet1.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="DataSet1.xss">
|
||||
<DependentUpon>DataSet1.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="edossync.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\LSWLib.3.0.8\build\LSWLib.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LSWLib.3.0.8\build\LSWLib.props'))" />
|
||||
<Error Condition="!Exists('..\packages\LSWLib.3.0.8\build\LSWLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LSWLib.3.0.8\build\LSWLib.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\Microsoft.VisualStudio.SlowCheetah.4.0.8\build\Microsoft.VisualStudio.SlowCheetah.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.VisualStudio.SlowCheetah.4.0.8\build\Microsoft.VisualStudio.SlowCheetah.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\LSWLib.3.0.8\build\LSWLib.targets" Condition="Exists('..\packages\LSWLib.3.0.8\build\LSWLib.targets')" />
|
||||
<Import Project="..\packages\Microsoft.VisualStudio.SlowCheetah.4.0.8\build\Microsoft.VisualStudio.SlowCheetah.targets" Condition="Exists('..\packages\Microsoft.VisualStudio.SlowCheetah.4.0.8\build\Microsoft.VisualStudio.SlowCheetah.targets')" />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\LSWLib.3.0.9\build\LSWLib.props" Condition="Exists('..\packages\LSWLib.3.0.9\build\LSWLib.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{B2264FF1-0F36-401B-91FE-DB3087CE05F5}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>syncEdosLocal</RootNamespace>
|
||||
<AssemblyName>syncEdosLocal</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Runtime" />
|
||||
<Reference Include="System.Runtime.InteropServices" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DataSet1.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>DataSet1.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config">
|
||||
<TransformOnBuild>true</TransformOnBuild>
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="App.Debug.config">
|
||||
<DependentUpon>App.config</DependentUpon>
|
||||
<IsTransformFile>true</IsTransformFile>
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="App.Release.config">
|
||||
<DependentUpon>App.config</DependentUpon>
|
||||
<IsTransformFile>true</IsTransformFile>
|
||||
</None>
|
||||
<None Include="DataSet1.xsc">
|
||||
<DependentUpon>DataSet1.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="DataSet1.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSDataSetGenerator</Generator>
|
||||
<LastGenOutput>DataSet1.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="DataSet1.xss">
|
||||
<DependentUpon>DataSet1.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="edossync.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\Microsoft.VisualStudio.SlowCheetah.4.0.8\build\Microsoft.VisualStudio.SlowCheetah.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.VisualStudio.SlowCheetah.4.0.8\build\Microsoft.VisualStudio.SlowCheetah.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\LSWLib.3.0.9\build\LSWLib.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LSWLib.3.0.9\build\LSWLib.props'))" />
|
||||
<Error Condition="!Exists('..\packages\LSWLib.3.0.9\build\LSWLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LSWLib.3.0.9\build\LSWLib.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\Microsoft.VisualStudio.SlowCheetah.4.0.8\build\Microsoft.VisualStudio.SlowCheetah.targets" Condition="Exists('..\packages\Microsoft.VisualStudio.SlowCheetah.4.0.8\build\Microsoft.VisualStudio.SlowCheetah.targets')" />
|
||||
<Import Project="..\packages\LSWLib.3.0.9\build\LSWLib.targets" Condition="Exists('..\packages\LSWLib.3.0.9\build\LSWLib.targets')" />
|
||||
</Project>
|
||||
Loading…
Add table
Reference in a new issue