Commit 486355d8 authored by 姜春辉's avatar 姜春辉

修正宿舍统计页面BUG

parent f9fa9330
......@@ -338,3 +338,12 @@ ASALocalRun/
# BeatPulse healthcheck temp database
healthchecksdb
/Publish/System.ValueTuple.xml
/Publish/Newtonsoft.Json.xml
/Publish/log4net.xml
/Publish/GS.Unitive.Framework.xml
/Publish/GS.Unitive.Framework.Security.xml
/Publish/GS.Unitive.Framework.Persistent.xml
/Publish/GalaSoft.MvvmLight.xml
/Publish/GalaSoft.MvvmLight.Platform.xml
/Publish/GalaSoft.MvvmLight.Extras.xml
......@@ -51,5 +51,5 @@ using System.Windows;
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.1.4")]
[assembly: AssemblyFileVersion("1.0.1.4")]
[assembly: AssemblyVersion("1.0.1.5")]
[assembly: AssemblyFileVersion("1.0.1.5")]
......@@ -25,11 +25,12 @@
</Border.Background>
<Border Margin="50" BorderThickness="0" BorderBrush="#FF0080A9">
<TabControl x:Name="tabControl" Margin="0"
SelectedIndex="0"
ItemsSource="{Binding DormList}"
SelectedIndex="0"
Background="Transparent" BorderThickness="0">
<TabControl.ItemContainerStyle>
<Style TargetType="TabItem">
<Setter Property="IsSelected" Value="{Binding IsSelected}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabItem">
......
......@@ -107,7 +107,7 @@ namespace SchoolSituation
private void Loaddata(Guid id)
{
var serviceUrl = new Uri($"{Source}?DataType=kaoqin&RoomID={id}&NowTime={DateTime.Now.ToString("MM-dd")}");
var serviceUrl = new Uri($"{Source}?DataType=kaoqin&RoomID={id}&NowTime={CurrentDay.Date:MM-dd}");
Task.Run(() =>
{
kqhide = Visibility.Visible;
......@@ -147,7 +147,7 @@ namespace SchoolSituation
}
private void Loaddatapf(Guid id)
{
var serviceUrl = new Uri($"{Source}?DataType=pingfen&RoomID={id}&NowTime={DateTime.Now.ToString("MM-dd")}");
var serviceUrl = new Uri($"{Source}?DataType=pingfen&RoomID={id}&NowTime={CurrentDay.Date:MM-dd}");
Task.Run(() =>
{
pfhide = Visibility.Visible;
......@@ -221,6 +221,8 @@ namespace SchoolSituation
SelectedClass = null;
AllData.Clear();
ShowInSchool = false;
ShowList.Clear();
PF.Clear();
});
private Pager _DayPager;
......
......@@ -54,8 +54,23 @@ namespace SchoolSituation
if (resulta)
{
var writeCacheResulta = Tools.WriteCache($"SuSheBuild.json", backDataa);
if (writeCacheResulta)
{
var entiya = JsonConvert.DeserializeObject<List<DashBoard.ServiceModel.School_SuSheBuild>>(backDataa);
DormList = new ObservableCollection<ViewSuSheBuild>(entiya.Select(r => (ViewSuSheBuild)r).ToList());
foreach (var item in entiya)
{
var old = DormList.FirstOrDefault(ss => ss.Id == item.BuiId);
if (old != null)
{
old.Floors = new ObservableCollection<ViewSuSheState>(item.Floors.Select(ss => (ViewSuSheState)ss).ToList());
}
else
{
DormList.Add((ViewSuSheBuild)item);
}
}
}
//DormList = new ObservableCollection<ViewSuSheBuild>(entiya.Select(r => (ViewSuSheBuild)r).ToList());
updateResult = true;
}
return updateResult;
......
......@@ -26,6 +26,15 @@ namespace SchoolSituation
set { _Name = value; RaisePropertyChanged("Name"); }
}
private bool _IsSelected;
public bool IsSelected
{
get { return _IsSelected; }
set { _IsSelected = value; RaisePropertyChanged("IsSelected"); }
}
private ObservableCollection<ViewSuSheState> _Floors;
public ObservableCollection<ViewSuSheState> Floors
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment