GTB identity employee nr search

This commit is contained in:
Stoyan Zlatev
2024-03-04 14:32:01 +01:00
parent 80e1e7e8de
commit ad7fbc5841
4 changed files with 124 additions and 52 deletions
+25 -21
View File
@@ -9,30 +9,34 @@
{
public static void Main()
{
var connection = new OmniUniProConnection("COM9");
var connection = new OmniIrdaConnection("COM26");
connection.StateChenged += Console.WriteLine;
connection.Open();
connection.FactorySeal(false);
connection.ViewBuildInformation();
connection.ViewFactoryCorrection();
var defaults = connection.ViewInputVolume();
connection.Set(new RegisterSettings
{
IntPart = defaults.IntPart,
Fraction = defaults.Fraction,
Size = defaults.Size,
Range = defaults.Range,
VolumePerPulseUnit = 0,
MeterUnits = (byte)MessurementUnits.CubicMeters,
FlowUnits = (byte)MessurementUnits.CubicMeters,
FlowRate = (byte)TimeUnits.Hours,
FactoryCorrection = 0,
FieldCorrection = 0,
PulseWeight = 0,
PulseWidth = 7,
PulseUpdate = 0,
});
Console.WriteLine(connection.ViewBuildInformation().Value);
Console.WriteLine(connection.ViewFactoryCorrection().Value);
var rs = connection.ViewRegisterSettings();
//connection.ViewBuildInformation();
//connection.ViewFactoryCorrection();
//var defaults = connection.ViewInputVolume();
//connection.Set(new RegisterSettings
//{
// IntPart = defaults.IntPart,
// Fraction = defaults.Fraction,
// Size = defaults.Size,
// Range = defaults.Range,
// VolumePerPulseUnit = 0,
// MeterUnits = (byte)MessurementUnits.CubicMeters,
// FlowUnits = (byte)MessurementUnits.CubicMeters,
// FlowRate = (byte)TimeUnits.Hours,
// FactoryCorrection = 0,
// FieldCorrection = 0,
// PulseWeight = 0,
// PulseWidth = 7,
// PulseUpdate = 0,
//});
connection.Close();
@@ -53,7 +53,11 @@
EmployeeId = user.EmployeeId
});
if (authenticationResponse.StatusCode == HttpStatusCode.OK)
if (authenticationResponse.StatusCode == HttpStatusCode.Accepted)
{
IsRegistrationPending = true;
}
else if (authenticationResponse.StatusCode == HttpStatusCode.OK)
{
bearer = authenticationResponse
?.Content
@@ -66,10 +70,6 @@
UserName = $"{user.FirstName} {user.LastName}";
}
}
else if (authenticationResponse.StatusCode == HttpStatusCode.Accepted)
{
IsRegistrationPending = true;
}
if (string.IsNullOrWhiteSpace(UserName))
{
@@ -253,7 +253,3 @@
}
}
}
/*
* 19207 Stoyan Zlatev +49 (5102) 74 3005 AD True 0 szlatev rd rd NULL 2017-07-18 00:00:00 6271 NULL 0 False Stoyan.Zlatev@xylem.com NULL NULL False False NULL NULL NULL NULL
*/