Administrator 2 months ago
parent
commit
dbb91fe0ee
  1. 2
      InfoDetail.xaml.cs
  2. 4
      Models/DataSource.cs
  3. 6
      QueryDetail.xaml.cs
  4. 4
      QueryPage.xaml
  5. 20
      QueryPage.xaml.cs

2
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

4
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; }

6
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",
});

4
QueryPage.xaml

@ -26,9 +26,9 @@
</Button>
<StackLayout Grid.Row="1" Grid.Column="0" >
<HorizontalStackLayout>
<DatePicker Format="yyyy年MM月dd日" FontSize="18"/>
<DatePicker x:Name="StartTime" Format="yyyy-MM-dd" FontSize="18"/>
<Label Text="~" FontSize="32"/>
<DatePicker Format="yyyy年MM月dd日" FontSize="18"/>
<DatePicker x:Name="EndTime" Format="yyyy-MM-dd" FontSize="18"/>
<Button Text="搜索" Margin="5"/>
</HorizontalStackLayout>
</StackLayout>

20
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<string, object> QueryDictionary = new Dictionary<string, object>();
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)

Loading…
Cancel
Save