버그수정

1. 접수시 차량 기본 선택
2. 추첨 결과시 오타 수정
3. 설정 저장시 메세지 출력
4. 신청자 수가 10이상 넘어가면 발생하는 버그 수정
5. 추첨시 데이터베이스 버그 수정
6. 추첨 완료시 남은 사람들 대기자 이동 버그 수정
This commit is contained in:
2023-10-06 15:16:36 +09:00
parent c7a53be962
commit 7c8ad26642
6 changed files with 40 additions and 33 deletions

View File

@@ -25,7 +25,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomForm
dataTable.Columns.Add("이용자번호"); dataTable.Columns.Add("이용자번호");
dataTable.Columns.Add("접 수번호"); dataTable.Columns.Add("접수번호");
for (int i = 0; i < _resultSetUserListInformation.Count; i++) for (int i = 0; i < _resultSetUserListInformation.Count; i++)

View File

@@ -97,10 +97,8 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomForm
for (int i = 0; i < _resultSetUserLists.Count; i++) for (int i = 0; i < _resultSetUserLists.Count; i++)
{ {
List<CustomUserControl.Lot> lots = new List<CustomUserControl.Lot>();
CustomUserControl.Lot lot = new CustomUserControl.Lot(_resultSetUserLists[i].Area, _resultSetUserLists[i].ApplicantNo); CustomUserControl.Lot lot = new CustomUserControl.Lot(_resultSetUserLists[i].Area, _resultSetUserLists[i].ApplicantNo);
lots.Add(lot); flowLayoutPanel_Lots.Controls.Add(lot);
flowLayoutPanel_Lots.Controls.Add(lots[i]);
} }
} }
else else

View File

@@ -453,6 +453,7 @@
this.Margin = new System.Windows.Forms.Padding(0); this.Margin = new System.Windows.Forms.Padding(0);
this.Name = "ApplicantControl"; this.Name = "ApplicantControl";
this.Size = new System.Drawing.Size(480, 480); this.Size = new System.Drawing.Size(480, 480);
this.Load += new System.EventHandler(this.ApplicantControl_Load);
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout(); this.groupBox1.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);

View File

@@ -156,5 +156,10 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
metroTextBox_CargoVehicleNumber.Focus(); metroTextBox_CargoVehicleNumber.Focus();
} }
private void ApplicantControl_Load(object sender, EventArgs e)
{
metroComboBox_VehicleType.SelectedIndex = 0;
}
} }
} }

View File

@@ -1,4 +1,5 @@
using HSUCO_Cargo_Garage_Operation_Program.CustomForm; using HSUCO_Cargo_Garage_Operation_Program.CustomForm;
using MetroFramework;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Windows.Forms; using System.Windows.Forms;
@@ -61,6 +62,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
private void metroButton_init_Click(object sender, EventArgs e) private void metroButton_init_Click(object sender, EventArgs e)
{ {
SettingReset(); SettingReset();
MetroMessageBox.Show(this, "설정어 완료되었습니다.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
} }
private void metroButton_Test_Click(object sender, EventArgs e) private void metroButton_Test_Click(object sender, EventArgs e)

View File

@@ -765,7 +765,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program
// 남은 사람 대기로 // 남은 사람 대기로
query = $"UPDATE ApplicantList SET ApplicantType={(int)EApplicantType.LotsOut} Where ApplicantType={(int)EApplicantType.Lots}"; query = $"UPDATE ApplicantList SET ApplicantType={(int)EApplicantType.LotsOut} Where ApplicantType={(int)EApplicantType.Lots} And RegistrationStatus={(int)ERegistrationStatus.Wait}";
using (var command = _sqLiteConnection.CreateCommand()) using (var command = _sqLiteConnection.CreateCommand())
{ {
command.CommandText = query; command.CommandText = query;
@@ -847,14 +847,14 @@ namespace HSUCO_Cargo_Garage_Operation_Program
for (int i = 0; i < setUserListInformation.Count; i++) for (int i = 0; i < setUserListInformation.Count; i++)
{ {
string query = $"INSERT INTO UserList(No, Area, ApplicantNo, ApplicantDate, UID, Date, DateStart, DateEnd, ExtensionStatus, PaymentStatus) " + string query = $"INSERT INTO UserList(No, Area, ApplicantNo, ApplicantDate, UID, Date, DateStart, DateEnd, ExtensionStatus, PaymentStatus) " +
$"VALUES('{noPrefix + lastNo}','{setUserListInformation[i].Area}','{setUserListInformation[i].ApplicantNo}','{setUserListInformation[i].Date}',{setUserListInformation[i].UID},'{startDate.DateOnly()}','{endDate.DateOnly()}',0,{(int)EPaymentStatus.StandBy})"; $"VALUES('{noPrefix + lastNo}','{setUserListInformation[i].Area}','{setUserListInformation[i].ApplicantNo}','{setUserListInformation[i].Date.DateTimeDatabase()}',{setUserListInformation[i].UID},'{DateTime.Now.DateTimeDatabase()}','{startDate.DateOnly()}','{endDate.DateOnly()}',0,{(int)EPaymentStatus.StandBy})";
using (var command = _sqLiteConnection.CreateCommand()) using (var command = _sqLiteConnection.CreateCommand())
{ {
command.CommandText = query; command.CommandText = query;
command.ExecuteNonQuery(); command.ExecuteNonQuery();
} }
query = $"UPDATE ApplicantList SET RegistrationStatus={(int)ERegistrationStatus.Registration} Where No={setUserListInformation[i].ApplicantNo}"; query = $"UPDATE ApplicantList SET RegistrationStatus={(int)ERegistrationStatus.Registration} Where No='{setUserListInformation[i].ApplicantNo}'";
using (var command = _sqLiteConnection.CreateCommand()) using (var command = _sqLiteConnection.CreateCommand())
{ {
command.CommandText = query; command.CommandText = query;
@@ -1036,7 +1036,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program
suffix = "C"; suffix = "C";
break; break;
} }
var query = $"SELECT No FROM {tableName} Where No Like '{year}-{suffix}%' Order By No DESC LIMIT 1"; var query = $"SELECT No FROM {tableName} Where No Like '{year}-{suffix}%' Order By CAST(substr(No,7) as INTEGER) DESC LIMIT 1";
var lastNo = 0; var lastNo = 0;
using (var command = _sqLiteConnection.CreateCommand()) using (var command = _sqLiteConnection.CreateCommand())
{ {
@@ -1101,6 +1101,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program
public static LeftAreaInformation GetLeftArea(DateTime startDateTime, int large, int overSized) public static LeftAreaInformation GetLeftArea(DateTime startDateTime, int large, int overSized)
{ {
LeftAreaInformation leftAreaInformation = new LeftAreaInformation(); LeftAreaInformation leftAreaInformation = new LeftAreaInformation();
leftAreaInformation.StartDateTime = startDateTime;
leftAreaInformation.Large = new List<int>(); leftAreaInformation.Large = new List<int>();
leftAreaInformation.OverSized = new List<int>(); leftAreaInformation.OverSized = new List<int>();
for (int i = 1; i < large + 1; i++) for (int i = 1; i < large + 1; i++)