기능추가
- 요금제 구분 기능 추가 - 발표 화면 차량번호로 수정 - 일반 차량 없이 입력 가능하게 수정
This commit is contained in:
@@ -26,7 +26,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomForm
|
|||||||
|
|
||||||
dataTable.Columns.Add("이용자번호");
|
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++)
|
||||||
{
|
{
|
||||||
@@ -34,7 +34,9 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomForm
|
|||||||
.Add(
|
.Add(
|
||||||
_resultSetUserListInformation[i].Area,
|
_resultSetUserListInformation[i].Area,
|
||||||
_resultSetUserListInformation[i].No,
|
_resultSetUserListInformation[i].No,
|
||||||
_resultSetUserListInformation[i].ApplicantNo
|
_resultSetUserListInformation[i].ApplicantNo,
|
||||||
|
_resultSetUserListInformation[i].CargoVehicleNumber
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -7,10 +7,11 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomForm
|
|||||||
{
|
{
|
||||||
public partial class LotsScreen : Form
|
public partial class LotsScreen : Form
|
||||||
{
|
{
|
||||||
List<ResultSetUserListInformation> _resultSetUserLists;
|
private List<ResultSetUserListInformation> _resultSetUserLists;
|
||||||
int pageMax = 0;
|
private int pageMax = 0;
|
||||||
int nowPage = 0;
|
private int nowPage = 0;
|
||||||
int totalPage = 1;
|
private int totalPage = 1;
|
||||||
|
|
||||||
public LotsScreen(List<ResultSetUserListInformation> resultSetUserListInformation)
|
public LotsScreen(List<ResultSetUserListInformation> resultSetUserListInformation)
|
||||||
{
|
{
|
||||||
_resultSetUserLists = resultSetUserListInformation;
|
_resultSetUserLists = resultSetUserListInformation;
|
||||||
@@ -37,7 +38,6 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomForm
|
|||||||
widthCount--;
|
widthCount--;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
int heightCount = 0; // 세로 최종 갯수
|
int heightCount = 0; // 세로 최종 갯수
|
||||||
while (true)
|
while (true)
|
||||||
@@ -49,12 +49,10 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomForm
|
|||||||
heightCount--;
|
heightCount--;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
pageMax = widthCount * heightCount; // 한페이지에 표시가능한 총 갯수
|
pageMax = widthCount * heightCount; // 한페이지에 표시가능한 총 갯수
|
||||||
if (pageMax < _resultSetUserLists.Count)
|
if (pageMax < _resultSetUserLists.Count)
|
||||||
{
|
{
|
||||||
|
|
||||||
totalPage = _resultSetUserLists.Count / pageMax;
|
totalPage = _resultSetUserLists.Count / pageMax;
|
||||||
if (_resultSetUserLists.Count % pageMax != 0)
|
if (_resultSetUserLists.Count % pageMax != 0)
|
||||||
{
|
{
|
||||||
@@ -65,22 +63,15 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomForm
|
|||||||
timer.Interval = 5000; //5초
|
timer.Interval = 5000; //5초
|
||||||
timer.Tick += Timer_Tick;
|
timer.Tick += Timer_Tick;
|
||||||
timer.Start();
|
timer.Start();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
ViewChange();
|
ViewChange();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Timer_Tick(object sender, EventArgs e)
|
private void Timer_Tick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
ViewChange();
|
ViewChange();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ViewChange()
|
private void ViewChange()
|
||||||
{
|
{
|
||||||
nowPage++;
|
nowPage++;
|
||||||
@@ -94,15 +85,12 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomForm
|
|||||||
for (int i = 0; i < _resultSetUserLists.Count; i++)
|
for (int i = 0; i < _resultSetUserLists.Count; i++)
|
||||||
|
|
||||||
{
|
{
|
||||||
CustomUserControl.Lot lot = new CustomUserControl.Lot(_resultSetUserLists[i].Area, _resultSetUserLists[i].ApplicantNo);
|
CustomUserControl.Lot lot = new CustomUserControl.Lot(_resultSetUserLists[i].Area, _resultSetUserLists[i].CargoVehicleNumber);
|
||||||
flowLayoutPanel_Lots.Controls.Add(lot);
|
flowLayoutPanel_Lots.Controls.Add(lot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.flowLayoutPanel_Lots.Controls.Clear();
|
this.flowLayoutPanel_Lots.Controls.Clear();
|
||||||
int totalCount = _resultSetUserLists.Count;
|
int totalCount = _resultSetUserLists.Count;
|
||||||
int limit = nowPage * (pageMax);
|
int limit = nowPage * (pageMax);
|
||||||
@@ -115,16 +103,13 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomForm
|
|||||||
|
|
||||||
for (int i = start; i < limit; i++)
|
for (int i = start; i < limit; i++)
|
||||||
{
|
{
|
||||||
|
CustomUserControl.Lot lot = new CustomUserControl.Lot(_resultSetUserLists[i].Area, _resultSetUserLists[i].CargoVehicleNumber);
|
||||||
CustomUserControl.Lot lot = new CustomUserControl.Lot(_resultSetUserLists[i].Area, _resultSetUserLists[i].ApplicantNo);
|
|
||||||
|
|
||||||
flowLayoutPanel_Lots.Controls.Add(lot);
|
flowLayoutPanel_Lots.Controls.Add(lot);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void button_Close_Click(object sender, EventArgs e)
|
private void button_Close_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Close();
|
Close();
|
||||||
|
@@ -61,6 +61,8 @@
|
|||||||
this.metroComboBox_VehicleType.ItemHeight = 23;
|
this.metroComboBox_VehicleType.ItemHeight = 23;
|
||||||
this.metroComboBox_VehicleType.Items.AddRange(new object[] {
|
this.metroComboBox_VehicleType.Items.AddRange(new object[] {
|
||||||
"대형(4.5톤 미만)",
|
"대형(4.5톤 미만)",
|
||||||
|
"대형(4.5톤 이상)",
|
||||||
|
"특대형(4.5톤 미만)",
|
||||||
"특대형(4.5톤 이상)"});
|
"특대형(4.5톤 이상)"});
|
||||||
this.metroComboBox_VehicleType.Location = new System.Drawing.Point(140, 290);
|
this.metroComboBox_VehicleType.Location = new System.Drawing.Point(140, 290);
|
||||||
this.metroComboBox_VehicleType.Name = "metroComboBox_VehicleType";
|
this.metroComboBox_VehicleType.Name = "metroComboBox_VehicleType";
|
||||||
|
@@ -425,6 +425,8 @@
|
|||||||
this.metroComboBox_VehicleType.ItemHeight = 23;
|
this.metroComboBox_VehicleType.ItemHeight = 23;
|
||||||
this.metroComboBox_VehicleType.Items.AddRange(new object[] {
|
this.metroComboBox_VehicleType.Items.AddRange(new object[] {
|
||||||
"대형(4.5톤 미만)",
|
"대형(4.5톤 미만)",
|
||||||
|
"대형(4.5톤 이상)",
|
||||||
|
"특대형(4.5톤 미만)",
|
||||||
"특대형(4.5톤 이상)"});
|
"특대형(4.5톤 이상)"});
|
||||||
this.metroComboBox_VehicleType.Location = new System.Drawing.Point(150, 290);
|
this.metroComboBox_VehicleType.Location = new System.Drawing.Point(150, 290);
|
||||||
this.metroComboBox_VehicleType.Name = "metroComboBox_VehicleType";
|
this.metroComboBox_VehicleType.Name = "metroComboBox_VehicleType";
|
||||||
|
@@ -36,20 +36,6 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
|||||||
metroTextBox_CargoVehicleName.Focus();
|
metroTextBox_CargoVehicleName.Focus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (metroTextBox_PassengerVehicleNumber.Text.Trim() == string.Empty)
|
|
||||||
{
|
|
||||||
MetroMessageBox.Show(this, "차량번호(승용)가 입력되지 않았습니다.", "Fatal Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
||||||
metroTextBox_PassengerVehicleNumber.Text = string.Empty;
|
|
||||||
metroTextBox_PassengerVehicleNumber.Focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (metroTextBox_PassengerVehicleName.Text.Trim() == string.Empty)
|
|
||||||
{
|
|
||||||
MetroMessageBox.Show(this, "차 종(승용)이 입력되지 않았습니다.", "Fatal Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
||||||
metroTextBox_PassengerVehicleName.Text = string.Empty;
|
|
||||||
metroTextBox_PassengerVehicleName.Focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (metroTextBox_Name.Text.Trim() == string.Empty)
|
if (metroTextBox_Name.Text.Trim() == string.Empty)
|
||||||
{
|
{
|
||||||
MetroMessageBox.Show(this, "이름이 입력되지 않았습니다.", "Fatal Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MetroMessageBox.Show(this, "이름이 입력되지 않았습니다.", "Fatal Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
@@ -77,7 +77,22 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
|||||||
owner = "법인";
|
owner = "법인";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
string vehicleType = "";
|
||||||
|
switch (applicants[i].VehicleType)
|
||||||
|
{
|
||||||
|
case EVehicleType.Large_Down:
|
||||||
|
vehicleType = "대형(4.5톤 미만)";
|
||||||
|
break;
|
||||||
|
case EVehicleType.Large_Up:
|
||||||
|
vehicleType = "대형(4.5톤 이상)";
|
||||||
|
break;
|
||||||
|
case EVehicleType.Oversized_Down:
|
||||||
|
vehicleType = "특대형(4.5톤 미만)";
|
||||||
|
break;
|
||||||
|
case EVehicleType.Oversized_Up:
|
||||||
|
vehicleType = "특대형(4.5톤 이상)";
|
||||||
|
break;
|
||||||
|
}
|
||||||
dataTable.Rows
|
dataTable.Rows
|
||||||
.Add(
|
.Add(
|
||||||
applicants[i].No,
|
applicants[i].No,
|
||||||
@@ -90,10 +105,10 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
|||||||
applicants[i].CargoVehicleName,
|
applicants[i].CargoVehicleName,
|
||||||
applicants[i].PassengerVehicleNumber,
|
applicants[i].PassengerVehicleNumber,
|
||||||
applicants[i].PassengerVehicleName,
|
applicants[i].PassengerVehicleName,
|
||||||
applicants[i].VehicleType == 0 ? "대형(4.5톤 미만)" : "특대형(4.5톤 이상)",
|
vehicleType,
|
||||||
applicants[i].Date.DateTimeDatabase()
|
applicants[i].Date.DateTimeDatabase()
|
||||||
|
|
||||||
);
|
) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
dataGridView_List.DataSource = dataTable;
|
dataGridView_List.DataSource = dataTable;
|
||||||
|
@@ -71,7 +71,7 @@
|
|||||||
this.label2.Name = "label2";
|
this.label2.Name = "label2";
|
||||||
this.label2.Size = new System.Drawing.Size(141, 37);
|
this.label2.Size = new System.Drawing.Size(141, 37);
|
||||||
this.label2.TabIndex = 3;
|
this.label2.TabIndex = 3;
|
||||||
this.label2.Text = "접수번호 :";
|
this.label2.Text = "차량번호 :";
|
||||||
//
|
//
|
||||||
// label_Area
|
// label_Area
|
||||||
//
|
//
|
||||||
|
@@ -332,18 +332,18 @@
|
|||||||
this.metroLabel5.AutoSize = true;
|
this.metroLabel5.AutoSize = true;
|
||||||
this.metroLabel5.Location = new System.Drawing.Point(30, 60);
|
this.metroLabel5.Location = new System.Drawing.Point(30, 60);
|
||||||
this.metroLabel5.Name = "metroLabel5";
|
this.metroLabel5.Name = "metroLabel5";
|
||||||
this.metroLabel5.Size = new System.Drawing.Size(51, 19);
|
this.metroLabel5.Size = new System.Drawing.Size(72, 19);
|
||||||
this.metroLabel5.TabIndex = 11;
|
this.metroLabel5.TabIndex = 11;
|
||||||
this.metroLabel5.Text = "특대형";
|
this.metroLabel5.Text = "4.5톤 이상";
|
||||||
//
|
//
|
||||||
// metroLabel6
|
// metroLabel6
|
||||||
//
|
//
|
||||||
this.metroLabel6.AutoSize = true;
|
this.metroLabel6.AutoSize = true;
|
||||||
this.metroLabel6.Location = new System.Drawing.Point(30, 30);
|
this.metroLabel6.Location = new System.Drawing.Point(30, 30);
|
||||||
this.metroLabel6.Name = "metroLabel6";
|
this.metroLabel6.Name = "metroLabel6";
|
||||||
this.metroLabel6.Size = new System.Drawing.Size(51, 19);
|
this.metroLabel6.Size = new System.Drawing.Size(72, 19);
|
||||||
this.metroLabel6.TabIndex = 10;
|
this.metroLabel6.TabIndex = 10;
|
||||||
this.metroLabel6.Text = "대 형";
|
this.metroLabel6.Text = "4.5톤 미만";
|
||||||
//
|
//
|
||||||
// groupBox3
|
// groupBox3
|
||||||
//
|
//
|
||||||
@@ -358,7 +358,7 @@
|
|||||||
this.groupBox3.Size = new System.Drawing.Size(304, 100);
|
this.groupBox3.Size = new System.Drawing.Size(304, 100);
|
||||||
this.groupBox3.TabIndex = 21;
|
this.groupBox3.TabIndex = 21;
|
||||||
this.groupBox3.TabStop = false;
|
this.groupBox3.TabStop = false;
|
||||||
this.groupBox3.Text = "증명서 발급 금액";
|
this.groupBox3.Text = "증명서 발급 금액(1월)";
|
||||||
//
|
//
|
||||||
// metroLabel18
|
// metroLabel18
|
||||||
//
|
//
|
||||||
@@ -495,7 +495,6 @@
|
|||||||
this.Controls.Add(this.metroButton_Save);
|
this.Controls.Add(this.metroButton_Save);
|
||||||
this.Name = "SettingControl";
|
this.Name = "SettingControl";
|
||||||
this.Size = new System.Drawing.Size(346, 505);
|
this.Size = new System.Drawing.Size(346, 505);
|
||||||
|
|
||||||
this.groupBox1.ResumeLayout(false);
|
this.groupBox1.ResumeLayout(false);
|
||||||
this.groupBox1.PerformLayout();
|
this.groupBox1.PerformLayout();
|
||||||
this.groupBox2.ResumeLayout(false);
|
this.groupBox2.ResumeLayout(false);
|
||||||
|
@@ -4,6 +4,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.Remoting.Channels;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
@@ -149,6 +150,22 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
|||||||
owner = "법인";
|
owner = "법인";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
string vehicleType = "";
|
||||||
|
switch(nowUserList[i].VehicleType)
|
||||||
|
{
|
||||||
|
case EVehicleType.Large_Down:
|
||||||
|
vehicleType = "대형(4.5톤 미만)";
|
||||||
|
break;
|
||||||
|
case EVehicleType.Large_Up:
|
||||||
|
vehicleType = "대형(4.5톤 이상)";
|
||||||
|
break;
|
||||||
|
case EVehicleType.Oversized_Down:
|
||||||
|
vehicleType = "특대형(4.5톤 미만)";
|
||||||
|
break;
|
||||||
|
case EVehicleType.Oversized_Up:
|
||||||
|
vehicleType = "특대형(4.5톤 이상)";
|
||||||
|
break;
|
||||||
|
}
|
||||||
dataTable.Rows
|
dataTable.Rows
|
||||||
.Add(
|
.Add(
|
||||||
nowUserList[i].No,
|
nowUserList[i].No,
|
||||||
@@ -161,7 +178,8 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
|||||||
nowUserList[i].Phone,
|
nowUserList[i].Phone,
|
||||||
nowUserList[i].Address,
|
nowUserList[i].Address,
|
||||||
nowUserList[i].Area,
|
nowUserList[i].Area,
|
||||||
nowUserList[i].VehicleType == 0 ? "대형(4.5톤 미만)" : "특대형(4.5톤 이상)",
|
|
||||||
|
vehicleType,
|
||||||
nowUserList[i].CargoVehicleNumber,
|
nowUserList[i].CargoVehicleNumber,
|
||||||
nowUserList[i].CargoVehicleName,
|
nowUserList[i].CargoVehicleName,
|
||||||
nowUserList[i].PassengerVehicleNumber,
|
nowUserList[i].PassengerVehicleNumber,
|
||||||
@@ -242,8 +260,17 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 연장 금액 가져오기
|
// 연장 금액 가져오기
|
||||||
EVehicleType eVehicleType = Database.GetVehicleType(no);
|
EVehicleType eVehicleType = Database.GetUserListVehicleType(no);
|
||||||
int amount = eVehicleType == EVehicleType.Large ? Global.GlobalSettings.CargoLargeFee : Global.GlobalSettings.CargoOversizedFee;
|
int amount = 0;
|
||||||
|
if (eVehicleType == EVehicleType.Large_Down || eVehicleType == EVehicleType.Oversized_Down)
|
||||||
|
{
|
||||||
|
amount = Global.GlobalSettings.CargoLargeFee;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
amount = Global.GlobalSettings.CargoOversizedFee;
|
||||||
|
}
|
||||||
|
|
||||||
amount = amount * 12; // 한달치
|
amount = amount * 12; // 한달치
|
||||||
string cargoNumber = dataGridView_List.SelectedRows[0].Cells[9].Value.ToString();
|
string cargoNumber = dataGridView_List.SelectedRows[0].Cells[9].Value.ToString();
|
||||||
var message = $"선태하신 차량 {cargoNumber}을 연장하시겠습니까?\r\n연장금액 : {String.Format("{0:n0}", amount)}원";
|
var message = $"선태하신 차량 {cargoNumber}을 연장하시겠습니까?\r\n연장금액 : {String.Format("{0:n0}", amount)}원";
|
||||||
@@ -390,11 +417,13 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
|||||||
MetroMessageBox.Show(this, "선택된 이용자가 없습니다.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MetroMessageBox.Show(this, "선택된 이용자가 없습니다.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
string no = dataGridView_List.SelectedRows[0].Cells[0].Value.ToString();
|
||||||
|
|
||||||
var result = MetroMessageBox.Show(this, "발급 하시겠습니까?", "증명서 발급", MessageBoxButtons.YesNo,
|
var result = MetroMessageBox.Show(this, "발급 하시겠습니까?", "증명서 발급", MessageBoxButtons.YesNo,
|
||||||
MessageBoxIcon.Question);
|
MessageBoxIcon.Question);
|
||||||
if (result == DialogResult.No) return;
|
if (result == DialogResult.No) return;
|
||||||
|
|
||||||
string no = dataGridView_List.SelectedRows[0].Cells[0].Value.ToString();
|
|
||||||
CertificateInformation certificateInformation = Database.GetUserCertificate(no);
|
CertificateInformation certificateInformation = Database.GetUserCertificate(no);
|
||||||
Promotion promotion = new Promotion("증명서 인증 기간", "증명 시작일", "증명 종료일");
|
Promotion promotion = new Promotion("증명서 인증 기간", "증명 시작일", "증명 종료일");
|
||||||
DialogResult promotionDialogResult = promotion.ShowDialog();
|
DialogResult promotionDialogResult = promotion.ShowDialog();
|
||||||
@@ -427,8 +456,16 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
|||||||
setCertificateInformation.Amount = certificateInformation.Amount;
|
setCertificateInformation.Amount = certificateInformation.Amount;
|
||||||
|
|
||||||
// 증명서 발급 요금 계산
|
// 증명서 발급 요금 계산
|
||||||
EVehicleType eVehicleType = Database.GetVehicleType(setCertificateInformation.UserNo);
|
EVehicleType eVehicleType = Database.GetUserListVehicleType(setCertificateInformation.UserNo);
|
||||||
int payBase = eVehicleType == EVehicleType.Large ? Global.GlobalSettings.CargoLargeCertificateFee : Global.GlobalSettings.CargoOversizedCertificateFee;
|
int payBase = 0;
|
||||||
|
if (eVehicleType == EVehicleType.Large_Down || eVehicleType == EVehicleType.Large_Up)
|
||||||
|
{
|
||||||
|
payBase = Global.GlobalSettings.CargoLargeCertificateFee;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
payBase = Global.GlobalSettings.CargoOversizedCertificateFee;
|
||||||
|
}
|
||||||
int month = Extends.GetProgressDays(promotion.StartDate, promotion.EndDate).Month;
|
int month = Extends.GetProgressDays(promotion.StartDate, promotion.EndDate).Month;
|
||||||
int pay = month * payBase;
|
int pay = month * payBase;
|
||||||
|
|
||||||
@@ -477,7 +514,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GetPaymentBaseInformation getPaymentBaseInformation = Database.GetPaymentBase(no);
|
GetPaymentBaseInformation getPaymentBaseInformation = Database.GetPaymentBase(no);
|
||||||
int payBase = getPaymentBaseInformation.VehicleType == EVehicleType.Large ? Global.GlobalSettings.CargoLargeFee : Global.GlobalSettings.CargoOversizedFee;
|
int payBase = getPaymentBaseInformation.VehicleType == EVehicleType.Large_Down || getPaymentBaseInformation.VehicleType == EVehicleType.Oversized_Down ? Global.GlobalSettings.CargoLargeFee : Global.GlobalSettings.CargoOversizedFee;
|
||||||
int pay = getPaymentBaseInformation.Month * payBase;
|
int pay = getPaymentBaseInformation.Month * payBase;
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.AppendLine("선택하신 사용자의 수납을 확인하시겠습니까 ?");
|
sb.AppendLine("선택하신 사용자의 수납을 확인하시겠습니까 ?");
|
||||||
@@ -526,6 +563,8 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
|||||||
MetroMessageBox.Show(this, "현재 사용자는 삭제처리할수 없는 사용자 입니다.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MetroMessageBox.Show(this, "현재 사용자는 삭제처리할수 없는 사용자 입니다.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Database.DeleteUser(no);
|
Database.DeleteUser(no);
|
||||||
MetroMessageBox.Show(this, "해당 사용자를 제거 완료했습니다.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
MetroMessageBox.Show(this, "해당 사용자를 제거 완료했습니다.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
DataChange();
|
DataChange();
|
||||||
|
@@ -88,8 +88,23 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
|||||||
case EOwner.Corporation:
|
case EOwner.Corporation:
|
||||||
owner = "법인";
|
owner = "법인";
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
string vehicleType = "";
|
||||||
|
switch (applicants[i].VehicleType)
|
||||||
|
{
|
||||||
|
case EVehicleType.Large_Down:
|
||||||
|
vehicleType = "대형(4.5톤 미만)";
|
||||||
|
break;
|
||||||
|
case EVehicleType.Large_Up:
|
||||||
|
vehicleType = "대형(4.5톤 이상)";
|
||||||
|
break;
|
||||||
|
case EVehicleType.Oversized_Down:
|
||||||
|
vehicleType = "특대형(4.5톤 미만)";
|
||||||
|
break;
|
||||||
|
case EVehicleType.Oversized_Up:
|
||||||
|
vehicleType = "특대형(4.5톤 이상)";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
dataTable.Rows
|
dataTable.Rows
|
||||||
.Add(
|
.Add(
|
||||||
@@ -104,7 +119,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
|||||||
applicants[i].CargoVehicleName,
|
applicants[i].CargoVehicleName,
|
||||||
applicants[i].PassengerVehicleNumber,
|
applicants[i].PassengerVehicleNumber,
|
||||||
applicants[i].PassengerVehicleName,
|
applicants[i].PassengerVehicleName,
|
||||||
applicants[i].VehicleType == 0 ? "대형(4.5톤 미만)" : "특대형(4.5톤 이상)",
|
vehicleType,
|
||||||
applicants[i].Date.DateTimeDatabase()
|
applicants[i].Date.DateTimeDatabase()
|
||||||
|
|
||||||
);
|
);
|
||||||
@@ -241,16 +256,16 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DateTime startDate = promotion.StartDate;
|
DateTime startDate = promotion.StartDate;
|
||||||
EVehicleType eVehicleType = Database.GetVehicleType(no);
|
EVehicleType eVehicleType = Database.GetApplicantVehicleType(no);
|
||||||
LeftAreaInformation leftAreaInformation = Database.GetLeftArea(startDate, Global.GlobalSettings.CargoLargeMaxCount, Global.GlobalSettings.CargoOversizedMaxCount);
|
LeftAreaInformation leftAreaInformation = Database.GetLeftArea(startDate, Global.GlobalSettings.CargoLargeMaxCount, Global.GlobalSettings.CargoOversizedMaxCount);
|
||||||
List<int> leftArea = eVehicleType == EVehicleType.Large ? leftAreaInformation.Large : leftAreaInformation.OverSized;
|
List<int> leftArea = eVehicleType == EVehicleType.Large_Up || eVehicleType == EVehicleType.Large_Down ? leftAreaInformation.Large : leftAreaInformation.OverSized;
|
||||||
if (leftArea.Count == 0)
|
if (leftArea.Count == 0)
|
||||||
{
|
{
|
||||||
MetroMessageBox.Show(this, "현재 당첨 가능한 사람/자리 가 없습니다.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MetroMessageBox.Show(this, "현재 당첨 가능한 사람/자리 가 없습니다.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ManualPermission manualPermission = new ManualPermission(eVehicleType == EVehicleType.Large ? "대형" : "특대형", leftArea);
|
ManualPermission manualPermission = new ManualPermission(eVehicleType == EVehicleType.Large_Down || eVehicleType == EVehicleType.Large_Up ? "대형" : "특대형", leftArea);
|
||||||
DialogResult result = manualPermission.ShowDialog();
|
DialogResult result = manualPermission.ShowDialog();
|
||||||
if (result == DialogResult.OK)
|
if (result == DialogResult.OK)
|
||||||
{
|
{
|
||||||
|
@@ -36,7 +36,8 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
public string CargoVehicleName { get; set; } // 화물차종
|
public string CargoVehicleName { get; set; } // 화물차종
|
||||||
public string PassengerVehicleNumber { get; set; } // 승용차량번호
|
public string PassengerVehicleNumber { get; set; } // 승용차량번호
|
||||||
public string PassengerVehicleName { get; set; } // 승용차종
|
public string PassengerVehicleName { get; set; } // 승용차종
|
||||||
public EVehicleType VehicleType { get; set; } // 차종 구분 4.5톤 이상 미만
|
public EVehicleType VehicleType { get; set; } // 차종 구분
|
||||||
|
// 이상 미만
|
||||||
public string Name { get; set; } // 성명
|
public string Name { get; set; } // 성명
|
||||||
public string PersonalNumber { get; set; } //생년월일 혹은 법인번호
|
public string PersonalNumber { get; set; } //생년월일 혹은 법인번호
|
||||||
public string Phone { get; set; } // 연락처
|
public string Phone { get; set; } // 연락처
|
||||||
@@ -164,6 +165,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
public string Area { get; set; }
|
public string Area { get; set; }
|
||||||
public string ApplicantNo { get; set; }
|
public string ApplicantNo { get; set; }
|
||||||
public int UID { get; set; }
|
public int UID { get; set; }
|
||||||
|
public string CargoVehicleNumber { get; set; }
|
||||||
public DateTime Date { get; set; }
|
public DateTime Date { get; set; }
|
||||||
public EVehicleType VehicleType { get; set; }
|
public EVehicleType VehicleType { get; set; }
|
||||||
}
|
}
|
||||||
@@ -173,6 +175,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
public string Area { get; set; }
|
public string Area { get; set; }
|
||||||
public string No { get; set; }
|
public string No { get; set; }
|
||||||
public string ApplicantNo { get; set; }
|
public string ApplicantNo { get; set; }
|
||||||
|
public string CargoVehicleNumber { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct GetPaymentBaseInformation
|
public struct GetPaymentBaseInformation
|
||||||
@@ -202,8 +205,10 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
|
|
||||||
public enum EVehicleType
|
public enum EVehicleType
|
||||||
{
|
{
|
||||||
Large,
|
Large_Down,
|
||||||
Oversized
|
Large_Up,
|
||||||
|
Oversized_Down,
|
||||||
|
Oversized_Up
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum EGetLastNumber
|
public enum EGetLastNumber
|
||||||
|
@@ -816,6 +816,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
setUserListInformation.UID = int.Parse(reader["UID"].ToString());
|
setUserListInformation.UID = int.Parse(reader["UID"].ToString());
|
||||||
setUserListInformation.Date = DateTime.Parse(reader["Date"].ToString());
|
setUserListInformation.Date = DateTime.Parse(reader["Date"].ToString());
|
||||||
setUserListInformation.VehicleType = (EVehicleType)int.Parse(reader["VehicleType"].ToString());
|
setUserListInformation.VehicleType = (EVehicleType)int.Parse(reader["VehicleType"].ToString());
|
||||||
|
setUserListInformation.CargoVehicleNumber = reader["CargoVehicleNumber"].ToString();
|
||||||
setUserListInformations.Add(setUserListInformation);
|
setUserListInformations.Add(setUserListInformation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -824,10 +825,11 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
|
|
||||||
List<SetUserListInformation> setUserListInformationLarge = new List<SetUserListInformation>();
|
List<SetUserListInformation> setUserListInformationLarge = new List<SetUserListInformation>();
|
||||||
List<SetUserListInformation> setUserListInformationOversized = new List<SetUserListInformation>();
|
List<SetUserListInformation> setUserListInformationOversized = new List<SetUserListInformation>();
|
||||||
setUserListInformationLarge.AddRange(setUserListInformations.Where(x => x.VehicleType == EVehicleType.Large).Take(leftAreaInformation.Large.Count));
|
setUserListInformationLarge.AddRange(setUserListInformations.Where(x => x.VehicleType == EVehicleType.Large_Down || x.VehicleType == EVehicleType.Large_Up).Take(leftAreaInformation.Large.Count));
|
||||||
setUserListInformationOversized.AddRange(setUserListInformations.Where(x => x.VehicleType == EVehicleType.Oversized).Take(leftAreaInformation.OverSized.Count));
|
setUserListInformationOversized.AddRange(setUserListInformations.Where(x => x.VehicleType == EVehicleType.Oversized_Down || x.VehicleType == EVehicleType.Oversized_Up).Take(leftAreaInformation.OverSized.Count));
|
||||||
|
|
||||||
List<SetUserListInformation> setUserListInformationFinal = new List<SetUserListInformation>();
|
List<SetUserListInformation> setUserListInformationFinal = new List<SetUserListInformation>();
|
||||||
|
|
||||||
for (int i = 0; i < setUserListInformationLarge.Count; i++)
|
for (int i = 0; i < setUserListInformationLarge.Count; i++)
|
||||||
{
|
{
|
||||||
SetUserListInformation setUserListInformation = setUserListInformationLarge[i];
|
SetUserListInformation setUserListInformation = setUserListInformationLarge[i];
|
||||||
@@ -867,13 +869,14 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
{
|
{
|
||||||
setUserListInformation.ApplicantNo = reader["No"].ToString();
|
setUserListInformation.ApplicantNo = reader["No"].ToString();
|
||||||
setUserListInformation.UID = int.Parse(reader["UID"].ToString());
|
setUserListInformation.UID = int.Parse(reader["UID"].ToString());
|
||||||
|
setUserListInformation.CargoVehicleNumber = reader["CargoVehicleNumber"].ToString();
|
||||||
setUserListInformation.Date = DateTime.Parse(reader["Date"].ToString());
|
setUserListInformation.Date = DateTime.Parse(reader["Date"].ToString());
|
||||||
setUserListInformation.VehicleType = (EVehicleType)int.Parse(reader["VehicleType"].ToString());
|
setUserListInformation.VehicleType = (EVehicleType)int.Parse(reader["VehicleType"].ToString());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setUserListInformation.Area = setUserListInformation.VehicleType == EVehicleType.Large ? $"대형-{area}" : $"특대형-{area}";
|
setUserListInformation.Area = setUserListInformation.VehicleType == EVehicleType.Large_Down || setUserListInformation.VehicleType == EVehicleType.Large_Up ? $"대형-{area}" : $"특대형-{area}";
|
||||||
var result = SetUserList(new List<SetUserListInformation>() { setUserListInformation }, startDate, endDate);
|
var result = SetUserList(new List<SetUserListInformation>() { setUserListInformation }, startDate, endDate);
|
||||||
return result.Count != 0;
|
return result.Count != 0;
|
||||||
}
|
}
|
||||||
@@ -914,14 +917,15 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
setUserListInformation.UID = int.Parse(reader["UID"].ToString());
|
setUserListInformation.UID = int.Parse(reader["UID"].ToString());
|
||||||
setUserListInformation.Date = DateTime.Parse(reader["Date"].ToString());
|
setUserListInformation.Date = DateTime.Parse(reader["Date"].ToString());
|
||||||
setUserListInformation.VehicleType = (EVehicleType)int.Parse(reader["VehicleType"].ToString());
|
setUserListInformation.VehicleType = (EVehicleType)int.Parse(reader["VehicleType"].ToString());
|
||||||
|
setUserListInformation.CargoVehicleNumber = reader["CargoVehicleNumber"].ToString();
|
||||||
setUserListInformations.Add(setUserListInformation);
|
setUserListInformations.Add(setUserListInformation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<SetUserListInformation> setUserListInformationLarge = new List<SetUserListInformation>();
|
List<SetUserListInformation> setUserListInformationLarge = new List<SetUserListInformation>();
|
||||||
List<SetUserListInformation> setUserListInformationOversized = new List<SetUserListInformation>();
|
List<SetUserListInformation> setUserListInformationOversized = new List<SetUserListInformation>();
|
||||||
setUserListInformationLarge.AddRange(setUserListInformations.Where(x => x.VehicleType == EVehicleType.Large).Take(leftAreaInformation.Large.Count));
|
setUserListInformationLarge.AddRange(setUserListInformations.Where(x => x.VehicleType == EVehicleType.Large_Down || x.VehicleType == EVehicleType.Large_Up).Take(leftAreaInformation.Large.Count));
|
||||||
setUserListInformationOversized.AddRange(setUserListInformations.Where(x => x.VehicleType == EVehicleType.Oversized).Take(leftAreaInformation.OverSized.Count));
|
setUserListInformationOversized.AddRange(setUserListInformations.Where(x => x.VehicleType == EVehicleType.Oversized_Down || x.VehicleType == EVehicleType.Oversized_Up).Take(leftAreaInformation.OverSized.Count));
|
||||||
|
|
||||||
setUserListInformationLarge.Shuffle();
|
setUserListInformationLarge.Shuffle();
|
||||||
setUserListInformationOversized.Shuffle();
|
setUserListInformationOversized.Shuffle();
|
||||||
@@ -968,6 +972,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
ResultSetUserListInformation.Area = setUserListInformation[i].Area;
|
ResultSetUserListInformation.Area = setUserListInformation[i].Area;
|
||||||
ResultSetUserListInformation.No = noPrefix + lastNo;
|
ResultSetUserListInformation.No = noPrefix + lastNo;
|
||||||
ResultSetUserListInformation.ApplicantNo = setUserListInformation[i].ApplicantNo;
|
ResultSetUserListInformation.ApplicantNo = setUserListInformation[i].ApplicantNo;
|
||||||
|
ResultSetUserListInformation.CargoVehicleNumber = setUserListInformation[i].CargoVehicleNumber;
|
||||||
ResultSetUserListInformations.Add(ResultSetUserListInformation);
|
ResultSetUserListInformations.Add(ResultSetUserListInformation);
|
||||||
lastNo++;
|
lastNo++;
|
||||||
}
|
}
|
||||||
@@ -1227,8 +1232,25 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
return insertCommand.ExecuteNonQuery() > 0;
|
return insertCommand.ExecuteNonQuery() > 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public static EVehicleType GetApplicantVehicleType(string no)
|
||||||
|
{
|
||||||
|
var query = $"SELECT VehicleType From ViewApplicantList Where No='{no}'";
|
||||||
|
int type = 0;
|
||||||
|
using (var command = _sqLiteConnection.CreateCommand())
|
||||||
|
{
|
||||||
|
command.CommandText = query;
|
||||||
|
|
||||||
public static EVehicleType GetVehicleType(string no)
|
using (var reader = command.ExecuteReader())
|
||||||
|
{
|
||||||
|
while (reader.Read())
|
||||||
|
{
|
||||||
|
type = int.Parse(reader["VehicleType"].ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (EVehicleType)type;
|
||||||
|
}
|
||||||
|
public static EVehicleType GetUserListVehicleType(string no)
|
||||||
{
|
{
|
||||||
var query = $"SELECT VehicleType From ViewUserList Where No='{no}'";
|
var query = $"SELECT VehicleType From ViewUserList Where No='{no}'";
|
||||||
int type = 0;
|
int type = 0;
|
||||||
@@ -1329,10 +1351,12 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
int count = int.Parse(reader["Count"].ToString());
|
int count = int.Parse(reader["Count"].ToString());
|
||||||
switch ((EVehicleType)vehicleType)
|
switch ((EVehicleType)vehicleType)
|
||||||
{
|
{
|
||||||
case EVehicleType.Large:
|
case EVehicleType.Large_Down:
|
||||||
|
case EVehicleType.Large_Up:
|
||||||
leftUser.Large += count;
|
leftUser.Large += count;
|
||||||
break;
|
break;
|
||||||
case EVehicleType.Oversized:
|
case EVehicleType.Oversized_Down:
|
||||||
|
case EVehicleType.Oversized_Up:
|
||||||
leftUser.OverSized += count;
|
leftUser.OverSized += count;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
|||||||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
||||||
// 기본값으로 할 수 있습니다.
|
// 기본값으로 할 수 있습니다.
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.0.*")]
|
[assembly: AssemblyVersion("1.1.*")]
|
||||||
[assembly: AssemblyFileVersion("1.0.*")]
|
[assembly: AssemblyFileVersion("1.1.*")]
|
||||||
|
Reference in New Issue
Block a user