EveryDB2のデータベースを読み込んでWinFormでGUI表示するサンプル
修訂 | 0579d8dbb27d5259826fcdea6db1c3765ef9a53b (tree) |
---|---|
時間 | 2021-06-06 23:53:44 |
作者 | yoshy <yoshy@user...> |
Commiter | yoshy |
temp_20210606_2352
@@ -0,0 +1,18 @@ | ||
1 | +using System; | |
2 | +using System.Collections.Generic; | |
3 | +using System.Linq; | |
4 | +using System.Text; | |
5 | +using System.Threading.Tasks; | |
6 | +using UmaTest.App.Domain.Model.Repository.Database.Entity.EveryDB2; | |
7 | +using UmaTest.Infra.Helper; | |
8 | + | |
9 | +namespace UmaTest.App.Adaptor.Gateway.ViewModel.Dto | |
10 | +{ | |
11 | + public class RaceInfo : NRace | |
12 | + { | |
13 | + public RaceInfo(NRace race) | |
14 | + { | |
15 | + BeanHelper.Copy(this, race); | |
16 | + } | |
17 | + } | |
18 | +} |
@@ -33,5 +33,10 @@ namespace UmaTest.App.Adaptor.Gateway.ViewModel.Dto | ||
33 | 33 | public string CourseName => CodeHelper.GetInstance().GetTurfDurtName(Trackcd, "不明") + Kyori; |
34 | 34 | |
35 | 35 | public string TosuFormatted => FormatHelper.FormatTosu(this); |
36 | + | |
37 | + public NRace ToNRace() | |
38 | + { | |
39 | + return BeanHelper.CreateAndCopy<NRace>(this); | |
40 | + } | |
36 | 41 | } |
37 | 42 | } |
@@ -3,6 +3,7 @@ using System.Collections.Generic; | ||
3 | 3 | using System.ComponentModel; |
4 | 4 | using UmaTest.App.Adaptor.Gateway.UI; |
5 | 5 | using UmaTest.App.Adaptor.Gateway.ViewModel.Dto; |
6 | +using UmaTest.App.Domain.Model.Repository.Database.Entity.EveryDB2; | |
6 | 7 | using UmaTest.Infra.Adaptor.Command; |
7 | 8 | using UmaTest.Infra.Adaptor.Controller; |
8 | 9 |
@@ -16,7 +17,7 @@ namespace UmaTest.App.Adaptor.Gateway.ViewModel | ||
16 | 17 | ICommand CommandSearchRace { get; } |
17 | 18 | EventHandler EventSelectedHorseChanged { get; } |
18 | 19 | IManualHorseListProxy ManualHorseListProxy { get; } |
19 | - BindingList<UmaRaceRowDto> RaceList { get; set; } | |
20 | + BindingList<UmaRaceRowDto> UmaRaceList { get; set; } | |
20 | 21 | ISearchRaceViewProxy SearchRaceViewProxy { get; } |
21 | 22 | ITokuRaceListProxy TokuRaceListProxy { get; } |
22 | 23 | BindingList<UmaSummaryRowDto> UmaSummaryList { get; set; } |
@@ -25,5 +26,6 @@ namespace UmaTest.App.Adaptor.Gateway.ViewModel | ||
25 | 26 | event PropertyChangedEventHandler PropertyChanged; |
26 | 27 | |
27 | 28 | void RefreshModel(IList<UmaSummaryRowDto> umaSummaryList, IDictionary<string, IList<UmaRaceRowDto>> umaRaceMap); |
29 | + void RefreshModel(NRace race, IList<UmaSummaryRowDto> umaSummaryList, IDictionary<string, IList<UmaRaceRowDto>> umaRaceMap); | |
28 | 30 | } |
29 | 31 | } |
\ No newline at end of file |
@@ -17,6 +17,7 @@ using UmaTest.App.Adaptor.Controller; | ||
17 | 17 | using UmaTest.App.Adaptor.Gateway.UI; |
18 | 18 | using UmaTest.Infra.Adaptor.ViewModel; |
19 | 19 | using System.Collections.ObjectModel; |
20 | +using UmaTest.App.Domain.Model.Repository.Database.Entity.EveryDB2; | |
20 | 21 | |
21 | 22 | namespace UmaTest.App.Adaptor.Gateway.ViewModel |
22 | 23 | { |
@@ -72,6 +73,14 @@ namespace UmaTest.App.Adaptor.Gateway.ViewModel | ||
72 | 73 | set => PropertyChanged.RaiseIfSet(() => Caption, ref _caption, value); |
73 | 74 | } |
74 | 75 | |
76 | + private RaceInfo _race; | |
77 | + | |
78 | + public RaceInfo Race | |
79 | + { | |
80 | + get => _race; | |
81 | + set => PropertyChanged.RaiseIfSet(() => Race, ref _race, value); | |
82 | + } | |
83 | + | |
75 | 84 | private BindingList<UmaSummaryRowDto> _umaSummaryList = new BindingList<UmaSummaryRowDto>(); |
76 | 85 | |
77 | 86 | public BindingList<UmaSummaryRowDto> UmaSummaryList |
@@ -80,16 +89,26 @@ namespace UmaTest.App.Adaptor.Gateway.ViewModel | ||
80 | 89 | set => PropertyChanged.RaiseIfSet(() => UmaSummaryList, ref _umaSummaryList, value); |
81 | 90 | } |
82 | 91 | |
83 | - private BindingList<UmaRaceRowDto> _raceList = new BindingList<UmaRaceRowDto>(); | |
92 | + private BindingList<UmaRaceRowDto> _umaRaceList = new BindingList<UmaRaceRowDto>(); | |
84 | 93 | |
85 | - public BindingList<UmaRaceRowDto> RaceList | |
94 | + public BindingList<UmaRaceRowDto> UmaRaceList | |
86 | 95 | { |
87 | - get => _raceList; | |
88 | - set => PropertyChanged.RaiseIfSet(() => RaceList, ref _raceList, value); | |
96 | + get => _umaRaceList; | |
97 | + set => PropertyChanged.RaiseIfSet(() => UmaRaceList, ref _umaRaceList, value); | |
89 | 98 | } |
90 | 99 | |
91 | 100 | public void RefreshModel(IList<UmaSummaryRowDto> umaSummaryList, IDictionary<string, IList<UmaRaceRowDto>> umaRaceMap) |
92 | 101 | { |
102 | + RefreshModel(null, umaSummaryList, umaRaceMap); | |
103 | + } | |
104 | + | |
105 | + public void RefreshModel(NRace race, IList<UmaSummaryRowDto> umaSummaryList, IDictionary<string, IList<UmaRaceRowDto>> umaRaceMap) | |
106 | + { | |
107 | + if (race != null) | |
108 | + { | |
109 | + Race = new RaceInfo(race); | |
110 | + } | |
111 | + | |
93 | 112 | _umaRaceMap = new ReadOnlyDictionary<string, IList<UmaRaceRowDto>>(umaRaceMap); |
94 | 113 | |
95 | 114 | UmaSummaryList = new BindingList<UmaSummaryRowDto>(umaSummaryList); |
@@ -138,7 +157,7 @@ namespace UmaTest.App.Adaptor.Gateway.ViewModel | ||
138 | 157 | { |
139 | 158 | if (_umaRaceMap.TryGetValue(_umaSummaryList[index].Kettonum, out IList<UmaRaceRowDto> umaRaceList)) |
140 | 159 | { |
141 | - RaceList = new BindingList<UmaRaceRowDto>(umaRaceList); | |
160 | + UmaRaceList = new BindingList<UmaRaceRowDto>(umaRaceList); | |
142 | 161 | } |
143 | 162 | } |
144 | 163 | } |
@@ -67,8 +67,9 @@ namespace UmaTest.App.Gateway.Presenter | ||
67 | 67 | task => |
68 | 68 | { |
69 | 69 | SearchRaceRowDto race = req.Race; |
70 | - vm.Caption = $"レース検索結果:[ {race.YearMonthDay} {race.JyoName}{int.Parse(race.Racenum)}R {race.RaceName} ({race.CourseName}m) ]"; | |
71 | - vm.RefreshModel(umaSummaryList, umaRaceMap); | |
70 | + string dataKbn = CodeHelper.GetInstance().GetName(CodeHelper.RACE_DATA_KUBUN, race.Datakubun, "不明"); | |
71 | + vm.Caption = $"レース検索結果:[ {race.YearMonthDay} {race.JyoName}{int.Parse(race.Racenum)}R {race.RaceName} ({race.CourseName}m) ] - {dataKbn}"; | |
72 | + vm.RefreshModel(race, umaSummaryList, umaRaceMap); | |
72 | 73 | }); |
73 | 74 | } |
74 | 75 | } |
@@ -65,7 +65,7 @@ namespace UmaTest.App.Gateway.Presenter | ||
65 | 65 | { |
66 | 66 | TokuRaceRowDto race = req.Race; |
67 | 67 | vm.Caption = $"特別登録:[ {race.YearMonthDay} {race.JyoName}{int.Parse(race.Racenum)}R {race.RaceName} ({race.CourseName}m) ]"; |
68 | - vm.RefreshModel(umaSummaryList, umaRaceMap); | |
68 | + vm.RefreshModel(race.ToNRace(), umaSummaryList, umaRaceMap); | |
69 | 69 | }); |
70 | 70 | } |
71 | 71 | } |
@@ -26,7 +26,7 @@ namespace UmaTest.App.Domain.Model.Repository.Database.Dao | ||
26 | 26 | return DbHelper.tryQuery(() => |
27 | 27 | { |
28 | 28 | var sql = Sql.Builder |
29 | - .Where("year || monthday > to_char(current_date - 7, 'YYYYMMDD')") | |
29 | + .Where("year || monthday > to_char(current_date - 28, 'YYYYMMDD')") | |
30 | 30 | .OrderBy("year desc, monthday desc, jyocd, kaiji, nichiji, racenum"); |
31 | 31 | |
32 | 32 | return db.Query<NRace>(sql); |
@@ -55,7 +55,9 @@ namespace UmaTest.App.Presentation.View | ||
55 | 55 | InitializeDataGridView(vm); |
56 | 56 | |
57 | 57 | this.vm = vm; |
58 | + | |
58 | 59 | isFormInitialized = true; |
60 | + | |
59 | 61 | this.ResizeBegin += new System.EventHandler(this.MainWindow_ResizeBegin); |
60 | 62 | this.ResizeEnd += new System.EventHandler(this.MainWindow_ResizeEnd); |
61 | 63 | } |
@@ -486,6 +488,8 @@ namespace UmaTest.App.Presentation.View | ||
486 | 488 | //dataGridView1.Columns["馬体重"].HeaderCell.Style.WrapMode = DataGridViewTriState.False; |
487 | 489 | //dataGridView1.Columns["オッズ"].HeaderCell.Style.WrapMode = DataGridViewTriState.False; |
488 | 490 | |
491 | + dataGridView1.Columns["馬名"].Frozen = true; | |
492 | + | |
489 | 493 | dataGridView1.Columns["枠番"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; |
490 | 494 | dataGridView1.Columns["馬番"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; |
491 | 495 | dataGridView1.Columns["戦数"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; |
@@ -520,7 +524,7 @@ namespace UmaTest.App.Presentation.View | ||
520 | 524 | // Initialize DataGridView2 |
521 | 525 | // |
522 | 526 | |
523 | - bindingSource2.DataSource = vm.RaceList; | |
527 | + bindingSource2.DataSource = vm.UmaRaceList; | |
524 | 528 | |
525 | 529 | dataGridView2.AutoGenerateColumns = false; |
526 | 530 | dataGridView2.AutoSize = true; |
@@ -817,10 +821,10 @@ namespace UmaTest.App.Presentation.View | ||
817 | 821 | } |
818 | 822 | break; |
819 | 823 | |
820 | - case "RaceList": | |
824 | + case "UmaRaceList": | |
821 | 825 | { |
822 | - bindingSource2.DataSource = vm.RaceList; | |
823 | - DataGridViewHelper.AdjustDataGridView(dataGridView2, bindingSource2, vm.RaceList.Count, splitContainer2.Panel2); | |
826 | + bindingSource2.DataSource = vm.UmaRaceList; | |
827 | + DataGridViewHelper.AdjustDataGridView(dataGridView2, bindingSource2, vm.UmaRaceList.Count, splitContainer2.Panel2); | |
824 | 828 | |
825 | 829 | ColorizeUmaRaceListView(); |
826 | 830 | } |
@@ -917,109 +921,186 @@ namespace UmaTest.App.Presentation.View | ||
917 | 921 | |
918 | 922 | private void ColorizePCI(DataGridViewCell cellPCI, DataGridViewCell cellJyuni) |
919 | 923 | { |
920 | - if (int.TryParse(cellJyuni.Value.ToString(), out int jyuni) && (jyuni > 6)) | |
924 | + if ( (cellPCI?.Value == null) || (cellJyuni?.Value == null) ) | |
921 | 925 | { |
922 | - ChangeCellBackColor(cellPCI, Color.Silver); | |
923 | 926 | return; |
924 | 927 | } |
925 | 928 | |
929 | + bool isWarningOnly = false; | |
930 | + | |
931 | + if (int.TryParse(cellJyuni.Value.ToString(), out int jyuni) && (jyuni > 6)) | |
932 | + { | |
933 | + isWarningOnly = true; | |
934 | + } | |
935 | + | |
926 | 936 | if (decimal.TryParse(cellPCI.Value.ToString(), out decimal pci)) |
927 | 937 | { |
938 | + Color backColor = SystemColors.Window; | |
939 | + | |
928 | 940 | if (pci >= 115) |
929 | 941 | { |
930 | - ChangeCellBackColor(cellPCI, Color.Yellow); | |
942 | + backColor = Color.Yellow; | |
931 | 943 | } |
932 | 944 | else if (pci >= 105) |
933 | 945 | { |
934 | - ChangeCellBackColor(cellPCI, Color.Cyan); | |
946 | + backColor = Color.Cyan; | |
935 | 947 | } |
936 | 948 | else if (pci >= 95) |
937 | 949 | { |
938 | - ChangeCellBackColor(cellPCI, Color.LightGreen); | |
950 | + backColor = Color.LightGreen; | |
939 | 951 | } |
940 | 952 | else if (pci >= 85) |
941 | 953 | { |
942 | - ChangeCellBackColor(cellPCI, Color.LightSkyBlue); | |
954 | + backColor = Color.LightSkyBlue; | |
943 | 955 | } |
944 | 956 | else if (pci <= 75) |
945 | 957 | { |
946 | - ChangeCellBackColor(cellPCI, Color.Orange); | |
958 | + backColor = Color.Orange; | |
959 | + } | |
960 | + | |
961 | + if (!isWarningOnly) | |
962 | + { | |
963 | + ChangeCellBackColor(cellPCI, backColor); | |
964 | + } | |
965 | + else | |
966 | + { | |
967 | + if (backColor == Color.Orange) | |
968 | + { | |
969 | + ChangeCellBackColor(cellPCI, Color.Sienna); | |
970 | + } | |
971 | + else | |
972 | + { | |
973 | + ChangeCellBackColor(cellPCI, Color.Silver); | |
974 | + } | |
947 | 975 | } |
948 | 976 | } |
949 | 977 | } |
950 | 978 | |
951 | 979 | private void ColorizeAvgHaronTimeMinus3(DataGridViewCell cellAvgHaronTimeMinus3, DataGridViewCell cellJyuni) |
952 | 980 | { |
953 | - if (int.TryParse(cellJyuni.Value.ToString(), out int jyuni) && (jyuni > 6)) | |
981 | + if ((cellAvgHaronTimeMinus3?.Value == null) || (cellJyuni?.Value == null)) | |
954 | 982 | { |
955 | - ChangeCellBackColor(cellAvgHaronTimeMinus3, Color.Silver); | |
956 | 983 | return; |
957 | 984 | } |
958 | 985 | |
986 | + bool isWarningOnly = false; | |
987 | + | |
988 | + if (int.TryParse(cellJyuni.Value.ToString(), out int jyuni) && (jyuni > 6)) | |
989 | + { | |
990 | + isWarningOnly = true; | |
991 | + } | |
992 | + | |
959 | 993 | if (decimal.TryParse(cellAvgHaronTimeMinus3.Value.ToString(), out decimal pci)) |
960 | 994 | { |
995 | + Color backColor = SystemColors.Window; | |
996 | + | |
961 | 997 | if (pci >= 125) |
962 | 998 | { |
963 | - ChangeCellBackColor(cellAvgHaronTimeMinus3, Color.Orange); | |
999 | + backColor = Color.Orange; | |
964 | 1000 | } |
965 | 1001 | else if (pci >= 115) |
966 | 1002 | { |
967 | - ChangeCellBackColor(cellAvgHaronTimeMinus3, Color.Yellow); | |
1003 | + backColor = Color.Yellow; | |
968 | 1004 | } |
969 | 1005 | else if (pci >= 105) |
970 | 1006 | { |
971 | - ChangeCellBackColor(cellAvgHaronTimeMinus3, Color.Cyan); | |
1007 | + backColor = Color.Cyan; | |
972 | 1008 | } |
973 | 1009 | else if (pci >= 95) |
974 | 1010 | { |
975 | - ChangeCellBackColor(cellAvgHaronTimeMinus3, Color.LightGreen); | |
1011 | + backColor = Color.LightGreen; | |
976 | 1012 | } |
977 | 1013 | else if (pci >= 85) |
978 | 1014 | { |
979 | - ChangeCellBackColor(cellAvgHaronTimeMinus3, Color.LightSkyBlue); | |
1015 | + backColor = Color.LightSkyBlue; | |
980 | 1016 | } |
981 | 1017 | else if (pci < 85) |
982 | 1018 | { |
983 | - ChangeCellBackColor(cellAvgHaronTimeMinus3, Color.Orange); | |
1019 | + backColor = Color.Orange; | |
1020 | + } | |
1021 | + | |
1022 | + if (!isWarningOnly) | |
1023 | + { | |
1024 | + ChangeCellBackColor(cellAvgHaronTimeMinus3, backColor); | |
1025 | + } | |
1026 | + else | |
1027 | + { | |
1028 | + if (backColor == Color.Orange) | |
1029 | + { | |
1030 | + ChangeCellBackColor(cellAvgHaronTimeMinus3, Color.Sienna); | |
1031 | + } | |
1032 | + else | |
1033 | + { | |
1034 | + ChangeCellBackColor(cellAvgHaronTimeMinus3, Color.Silver); | |
1035 | + } | |
984 | 1036 | } |
985 | 1037 | } |
986 | 1038 | } |
987 | 1039 | |
988 | 1040 | private void ColorizeHaronTimeL3(DataGridViewCell cellHaronTimeL3, DataGridViewCell cellJyuni) |
989 | 1041 | { |
990 | - if (int.TryParse(cellJyuni.Value.ToString(), out int jyuni) && (jyuni > 6)) | |
1042 | + if ((cellHaronTimeL3?.Value == null) || (cellJyuni?.Value == null)) | |
991 | 1043 | { |
992 | - ChangeCellBackColor(cellHaronTimeL3, Color.Silver); | |
993 | 1044 | return; |
994 | 1045 | } |
995 | 1046 | |
1047 | + bool isWarningOnly = false; | |
1048 | + | |
1049 | + if (int.TryParse(cellJyuni.Value.ToString(), out int jyuni) && (jyuni > 6)) | |
1050 | + { | |
1051 | + isWarningOnly = true; | |
1052 | + } | |
1053 | + | |
996 | 1054 | if (decimal.TryParse(cellHaronTimeL3.Value.ToString(), out decimal pci)) |
997 | 1055 | { |
998 | - if (pci >= 140) | |
1056 | + Color backColor = SystemColors.Window; | |
1057 | + | |
1058 | + if (pci >= 140) | |
999 | 1059 | { |
1000 | - ChangeCellBackColor(cellHaronTimeL3, Color.Yellow); | |
1060 | + backColor = Color.Yellow; | |
1001 | 1061 | } |
1002 | 1062 | else if (pci >= 120) |
1003 | 1063 | { |
1004 | - ChangeCellBackColor(cellHaronTimeL3, Color.Cyan); | |
1064 | + backColor = Color.Cyan; | |
1005 | 1065 | } |
1006 | 1066 | else if (pci >= 100) |
1007 | 1067 | { |
1008 | - ChangeCellBackColor(cellHaronTimeL3, Color.LightGreen); | |
1068 | + backColor = Color.LightGreen; | |
1009 | 1069 | } |
1010 | 1070 | else if (pci >= 80) |
1011 | 1071 | { |
1012 | - ChangeCellBackColor(cellHaronTimeL3, Color.LightSkyBlue); | |
1072 | + backColor = Color.LightSkyBlue; | |
1013 | 1073 | } |
1014 | 1074 | else if (pci < 80) |
1015 | 1075 | { |
1016 | - ChangeCellBackColor(cellHaronTimeL3, Color.Orange); | |
1076 | + backColor = Color.Orange; | |
1077 | + } | |
1078 | + | |
1079 | + if (!isWarningOnly) | |
1080 | + { | |
1081 | + ChangeCellBackColor(cellHaronTimeL3, backColor); | |
1082 | + } | |
1083 | + else | |
1084 | + { | |
1085 | + if (backColor == Color.Orange) | |
1086 | + { | |
1087 | + ChangeCellBackColor(cellHaronTimeL3, Color.Sienna); | |
1088 | + } | |
1089 | + else | |
1090 | + { | |
1091 | + ChangeCellBackColor(cellHaronTimeL3, Color.Silver); | |
1092 | + } | |
1017 | 1093 | } |
1018 | 1094 | } |
1019 | 1095 | } |
1020 | 1096 | |
1021 | 1097 | private static void ColorizeKankaku(DataGridViewCell cellKankaku) |
1022 | 1098 | { |
1099 | + if (cellKankaku?.Value == null) | |
1100 | + { | |
1101 | + return; | |
1102 | + } | |
1103 | + | |
1023 | 1104 | if (int.TryParse(cellKankaku.Value.ToString(), out int kankaku)) |
1024 | 1105 | { |
1025 | 1106 | if (kankaku >= 30) |
@@ -1035,6 +1116,11 @@ namespace UmaTest.App.Presentation.View | ||
1035 | 1116 | |
1036 | 1117 | private static void ColorizeNinki(DataGridViewCell cellNinki) |
1037 | 1118 | { |
1119 | + if (cellNinki?.Value == null) | |
1120 | + { | |
1121 | + return; | |
1122 | + } | |
1123 | + | |
1038 | 1124 | if (int.TryParse(cellNinki.Value.ToString(), out int ninki)) |
1039 | 1125 | { |
1040 | 1126 | switch (ninki) |
@@ -1056,6 +1142,11 @@ namespace UmaTest.App.Presentation.View | ||
1056 | 1142 | |
1057 | 1143 | private static void ColorizeJyuni(DataGridViewCell cellJyuni, DataGridViewCell cellNinki) |
1058 | 1144 | { |
1145 | + if ((cellJyuni?.Value == null) || (cellNinki?.Value == null)) | |
1146 | + { | |
1147 | + return; | |
1148 | + } | |
1149 | + | |
1059 | 1150 | if (int.TryParse(cellJyuni.Value.ToString(), out int jyuni) |
1060 | 1151 | && int.TryParse(cellNinki.Value.ToString(), out int ninki)) |
1061 | 1152 | { |
@@ -1071,7 +1162,7 @@ namespace UmaTest.App.Presentation.View | ||
1071 | 1162 | ChangeCellBackColor(cellJyuni, Color.LightGreen); |
1072 | 1163 | break; |
1073 | 1164 | default: |
1074 | - if ((ninki > 6) && (jyuni <= 6)) | |
1165 | + if ( (ninki >= 6) && (jyuni <= 6) && (ninki - jyuni > 1) ) | |
1075 | 1166 | { |
1076 | 1167 | ChangeCellBackColor(cellJyuni, Color.LightSkyBlue); |
1077 | 1168 | } |
@@ -24,6 +24,7 @@ namespace UmaTest.Infra.Helper | ||
24 | 24 | public static readonly string TOZAI_CODE = "2301"; |
25 | 25 | |
26 | 26 | public static readonly string KYAKUSITU_KUBUN = "9201"; |
27 | + public static readonly string RACE_DATA_KUBUN = "9202"; | |
27 | 28 | |
28 | 29 | public const string TRACK_NAME_TURF_AND_DIRT = "芝ダ"; |
29 | 30 | public const string TRACK_NAME_TURF = "芝"; |
@@ -279,12 +280,26 @@ namespace UmaTest.Infra.Helper | ||
279 | 280 | } |
280 | 281 | |
281 | 282 | var kyakusituKbn = new Dictionary<string, string[]>(); |
282 | - master.Add(KYAKUSITU_KUBUN, kyakusituKbn); | |
283 | 283 | kyakusituKbn.Add("0", new string[] { NODATA }); |
284 | 284 | kyakusituKbn.Add("1", new string[] { "逃げ" }); |
285 | 285 | kyakusituKbn.Add("2", new string[] { "先行" }); |
286 | 286 | kyakusituKbn.Add("3", new string[] { "差し" }); |
287 | 287 | kyakusituKbn.Add("4", new string[] { "追込" }); |
288 | + master.Add(KYAKUSITU_KUBUN, kyakusituKbn); | |
289 | + | |
290 | + var raceDataKbn = new Dictionary<string, string[]>(); | |
291 | + raceDataKbn.Add("0", new string[] { NODATA }); | |
292 | + raceDataKbn.Add("1", new string[] { "出走馬名表" }); | |
293 | + raceDataKbn.Add("2", new string[] { "出馬表" }); | |
294 | + raceDataKbn.Add("3", new string[] { "速報成績(3着まで確定)" }); | |
295 | + raceDataKbn.Add("4", new string[] { "速報成績(5着まで確定)" }); | |
296 | + raceDataKbn.Add("5", new string[] { "速報成績(全馬着順確定)" }); | |
297 | + raceDataKbn.Add("6", new string[] { "速報成績(全馬着順+コーナ通過順)" }); | |
298 | + raceDataKbn.Add("7", new string[] { "成績" }); | |
299 | + raceDataKbn.Add("A", new string[] { "地方競馬" }); | |
300 | + raceDataKbn.Add("B", new string[] { "海外国際レース" }); | |
301 | + raceDataKbn.Add("9", new string[] { "レース中止" }); | |
302 | + master.Add(RACE_DATA_KUBUN, raceDataKbn); | |
288 | 303 | } |
289 | 304 | } |
290 | 305 | } |
@@ -22,6 +22,7 @@ namespace UmaTest.Infra.Helper | ||
22 | 22 | return DatabaseConfiguration.Build() |
23 | 23 | .UsingConnectionString("Host=192.168.0.200;Username=postgres;Password=postgres;Database=everydb2;Port=5432") |
24 | 24 | .UsingProvider<PostgreSQLDatabaseProvider>() |
25 | + .UsingCommandTimeout(60) | |
25 | 26 | .Create(); |
26 | 27 | } |
27 | 28 |
@@ -42,7 +42,7 @@ select distinct | ||
42 | 42 | as kaishudate |
43 | 43 | from |
44 | 44 | v_uma_race_base1 ur |
45 | - inner join n_course c | |
45 | + left join n_course c | |
46 | 46 | using(jyocd, kyori, trackcd) |
47 | 47 | ) |
48 | 48 | SELECT ur.*, r.*, k.*, c.*, ot.*, h1.*, h5.*, urdev.* |
@@ -45,7 +45,7 @@ select | ||
45 | 45 | as kaishudate |
46 | 46 | from |
47 | 47 | v_uma_race_base1 ur |
48 | - inner join n_course c | |
48 | + left join n_course c | |
49 | 49 | using(jyocd, kyori, trackcd) |
50 | 50 | ), v_uma_race_base3 as ( |
51 | 51 | select |
@@ -102,6 +102,7 @@ | ||
102 | 102 | <Reference Include="System.Xml" /> |
103 | 103 | </ItemGroup> |
104 | 104 | <ItemGroup> |
105 | + <Compile Include="App\Adaptor\Gateway\ViewModel\Dto\RaceInfo.cs" /> | |
105 | 106 | <Compile Include="App\Adaptor\Gateway\ViewModel\IMainWindowViewModel.cs" /> |
106 | 107 | <Compile Include="App\Adaptor\Presenter\AbstractAsyncLoadUmaListPresenter.cs" /> |
107 | 108 | <Compile Include="App\Domain\Model\Repository\Database\Dto\ChokyosiInfo.cs" /> |