diff --git a/InfoDetail.xaml.cs b/InfoDetail.xaml.cs
index 1ba4739..19c23e1 100644
--- a/InfoDetail.xaml.cs
+++ b/InfoDetail.xaml.cs
@@ -22,7 +22,7 @@ public partial class InfoDetail : ContentPage
InfoDyelotDetailsItems.Add(new DyelotDetailsItem
{ Dyelot = "2134566", Machine = "g01", CreationTime = "", CallTime = "" ,
- ReDye="0",
+ ReDye=0,
Information = "yyjjy\nfxfxdsdg\n",
});
InfoDyelotDetailsItems.Add(new DyelotDetailsItem
diff --git a/Models/DataSource.cs b/Models/DataSource.cs
index f336eac..3e4788a 100644
--- a/Models/DataSource.cs
+++ b/Models/DataSource.cs
@@ -51,7 +51,7 @@ namespace SunlightAggregationTerminal.Models
public class DyelotItem
{
public string? Dyelot { get; set; }
- public string? ReDye { get; set; }
+ public int? ReDye { get; set; }
public string? Machine { get; set; }
public string? CreationTime { get; set; }
public string? FabricName { get; set; }
@@ -62,7 +62,7 @@ namespace SunlightAggregationTerminal.Models
public class DyelotDetailsItem
{
public string? Dyelot { get; set; }
- public string? ReDye { get; set; }
+ public int? ReDye { get; set; }
public string? Step { get; set; }
public string? ProductName { get; set; }
public string? ProductCode { get; set; }
diff --git a/QueryDetail.xaml.cs b/QueryDetail.xaml.cs
index 1a5c0dd..89bbfd0 100644
--- a/QueryDetail.xaml.cs
+++ b/QueryDetail.xaml.cs
@@ -21,7 +21,7 @@ public partial class QueryDetail : ContentPage
CreationTime = "",
DispenserGram="32434",
Gram = "3212",
- ReDye = "0",
+ ReDye = 0,
ProductName="sdvsf1",
Information = "yyjjy\nfxfxdsdg\n",
});
@@ -33,7 +33,7 @@ public partial class QueryDetail : ContentPage
CreationTime = "",
DispenserGram = "32423434",
Gram = "3212434",
- ReDye = "0",
+ ReDye = 0,
ProductName = "sdvsf2",
Information = "yyjjy\nfxfxdsdg\n",
});
@@ -45,7 +45,7 @@ public partial class QueryDetail : ContentPage
DispenserGram = "3212434",
Gram= "3212434",
Step = "4",
- ReDye = "0",
+ ReDye = 0,
ProductName = "sdvsf3",
Information = "yyjjy\nfxfxdsdg\n",
});
diff --git a/QueryPage.xaml b/QueryPage.xaml
index e61c112..fcac371 100644
--- a/QueryPage.xaml
+++ b/QueryPage.xaml
@@ -26,9 +26,9 @@
-
+
-
+
diff --git a/QueryPage.xaml.cs b/QueryPage.xaml.cs
index 0339f0b..85b97e4 100644
--- a/QueryPage.xaml.cs
+++ b/QueryPage.xaml.cs
@@ -3,6 +3,7 @@ using SunlightAggregationTerminal.Class;
using SunlightAggregationTerminal.Models;
using System.Collections.ObjectModel;
using System.Text.Json;
+using TouchSocket.Core;
namespace SunlightAggregationTerminal;
@@ -19,14 +20,14 @@ public partial class QueryPage : ContentPage
ResultEntry.Text = scannedValue;
});
- DyelotItems.Add(new DyelotItem
- {
- Dyelot = "2134566",
- Machine = "g01",
- CreationTime = "",
- ReDye = "0",
- Information = "yyjjy\nfxfxdsdg\n",
- });
+ Dictionary QueryDictionary = new Dictionary();
+ QueryDictionary.Add("Command", "Query");
+ QueryDictionary.Add("StartTime", StartTime.Date.ToString()!);
+ DateTime EndTime_ = (DateTime)EndTime.Date!;
+ QueryDictionary.Add("EndTime", EndTime_.AddDays(1).ToString());
+ TcpServer.TcpTransmit(QueryDictionary.ToJsonString());
+
+
CardCollectionView.ItemsSource = DyelotItems;
}
private async void OnScanButtonClicked(object sender, EventArgs e)
@@ -63,7 +64,8 @@ public partial class QueryPage : ContentPage
}
}
}
- catch (Exception) { }
+ catch (Exception ex) {
+ }
}
public async void Query_Command(string dat)