버그수정
1. 접수시 차량 기본 선택 2. 추첨 결과시 오타 수정 3. 설정 저장시 메세지 출력 4. 신청자 수가 10이상 넘어가면 발생하는 버그 수정 5. 추첨시 데이터베이스 버그 수정 6. 추첨 완료시 남은 사람들 대기자 이동 버그 수정
This commit is contained in:
@@ -25,7 +25,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomForm
|
||||
|
||||
|
||||
dataTable.Columns.Add("이용자번호");
|
||||
dataTable.Columns.Add("접 수번호");
|
||||
dataTable.Columns.Add("접수번호");
|
||||
|
||||
|
||||
for (int i = 0; i < _resultSetUserListInformation.Count; i++)
|
||||
|
@@ -31,19 +31,19 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomForm
|
||||
int controlHeight = 90 + 5; // Lot 컨트롤러 세로사이즈 + 여백
|
||||
int tempSize = 0; // 임시 연상용 사이즈
|
||||
int widthCount = 0; // 가로 최종 갯수
|
||||
while(true)
|
||||
while (true)
|
||||
{
|
||||
widthCount++;
|
||||
tempSize = baseMargin + (controlWidth * (widthCount));
|
||||
if(tempSize > this.flowLayoutPanel_Lots.Size.Width)
|
||||
if (tempSize > this.flowLayoutPanel_Lots.Size.Width)
|
||||
{
|
||||
widthCount--;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
int heightCount=0; // 세로 최종 갯수
|
||||
while(true)
|
||||
int heightCount = 0; // 세로 최종 갯수
|
||||
while (true)
|
||||
{
|
||||
heightCount++;
|
||||
tempSize = baseMargin + (controlHeight * (heightCount));
|
||||
@@ -55,11 +55,11 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomForm
|
||||
|
||||
}
|
||||
pageMax = widthCount * heightCount; // 한페이지에 표시가능한 총 갯수
|
||||
if(pageMax < _resultSetUserLists.Count)
|
||||
if (pageMax < _resultSetUserLists.Count)
|
||||
{
|
||||
|
||||
totalPage = _resultSetUserLists.Count / pageMax;
|
||||
if(_resultSetUserLists.Count % pageMax != 0)
|
||||
if (_resultSetUserLists.Count % pageMax != 0)
|
||||
{
|
||||
totalPage++;
|
||||
}
|
||||
@@ -92,15 +92,13 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomForm
|
||||
nowPage = 1;
|
||||
}
|
||||
label_Page.Text = $"{nowPage}/{totalPage}";
|
||||
if (totalPage ==1)
|
||||
if (totalPage == 1)
|
||||
{
|
||||
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);
|
||||
lots.Add(lot);
|
||||
flowLayoutPanel_Lots.Controls.Add(lots[i]);
|
||||
flowLayoutPanel_Lots.Controls.Add(lot);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@@ -453,6 +453,7 @@
|
||||
this.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.Name = "ApplicantControl";
|
||||
this.Size = new System.Drawing.Size(480, 480);
|
||||
this.Load += new System.EventHandler(this.ApplicantControl_Load);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
@@ -156,5 +156,10 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
||||
|
||||
metroTextBox_CargoVehicleNumber.Focus();
|
||||
}
|
||||
|
||||
private void ApplicantControl_Load(object sender, EventArgs e)
|
||||
{
|
||||
metroComboBox_VehicleType.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,4 +1,5 @@
|
||||
using HSUCO_Cargo_Garage_Operation_Program.CustomForm;
|
||||
using MetroFramework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
@@ -61,6 +62,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
||||
private void metroButton_init_Click(object sender, EventArgs e)
|
||||
{
|
||||
SettingReset();
|
||||
MetroMessageBox.Show(this, "설정어 완료되었습니다.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
private void metroButton_Test_Click(object sender, EventArgs e)
|
||||
|
@@ -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())
|
||||
{
|
||||
command.CommandText = query;
|
||||
@@ -847,14 +847,14 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
||||
for (int i = 0; i < setUserListInformation.Count; i++)
|
||||
{
|
||||
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())
|
||||
{
|
||||
command.CommandText = query;
|
||||
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())
|
||||
{
|
||||
command.CommandText = query;
|
||||
@@ -1036,7 +1036,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
||||
suffix = "C";
|
||||
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;
|
||||
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)
|
||||
{
|
||||
LeftAreaInformation leftAreaInformation = new LeftAreaInformation();
|
||||
leftAreaInformation.StartDateTime = startDateTime;
|
||||
leftAreaInformation.Large = new List<int>();
|
||||
leftAreaInformation.OverSized = new List<int>();
|
||||
for (int i = 1; i < large + 1; i++)
|
||||
|
Reference in New Issue
Block a user