버그수정
This commit is contained in:
@@ -8,12 +8,17 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
|||||||
{
|
{
|
||||||
public partial class ApplicantControl : UserControl
|
public partial class ApplicantControl : UserControl
|
||||||
{
|
{
|
||||||
|
|
||||||
public ApplicantControl()
|
public ApplicantControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
label1.Text = $"현 프로그램의 차고지는 {Global.GlobalSettings.GarageName}입니다.\r\n입력시 필히 확인 바랍니다.";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void GarageName(string name)
|
||||||
|
{
|
||||||
|
label1.Text = $"현 프로그램의 차고지는 {Global.GlobalSettings.GarageName}입니다.\r\n입력시 필히 확인 바랍니다.";
|
||||||
|
}
|
||||||
|
|
||||||
void metroButton_Register_Click(object sender, EventArgs e)
|
void metroButton_Register_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
@@ -137,8 +137,6 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
|||||||
|
|
||||||
private void metroButton_UpdateUser_Click(object sender, EventArgs e)
|
private void metroButton_UpdateUser_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var count = dataGridView_List.Rows.Count - 1;
|
|
||||||
if (count == 0) return;
|
|
||||||
|
|
||||||
Promotion promotion = new Promotion("추첨자 이용기간");
|
Promotion promotion = new Promotion("추첨자 이용기간");
|
||||||
DialogResult dialogResult = promotion.ShowDialog();
|
DialogResult dialogResult = promotion.ShowDialog();
|
||||||
|
@@ -211,8 +211,30 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
|||||||
var selectCount = dataGridView_List.SelectedRows.Count;
|
var selectCount = dataGridView_List.SelectedRows.Count;
|
||||||
if (selectCount == 0) return;
|
if (selectCount == 0) return;
|
||||||
|
|
||||||
// 연장 했는가?
|
|
||||||
string no = dataGridView_List.SelectedRows[0].Cells[0].Value.ToString();
|
string no = dataGridView_List.SelectedRows[0].Cells[0].Value.ToString();
|
||||||
|
|
||||||
|
var status = Database.CheckPaymentStatus(no);
|
||||||
|
if (status != EPaymentStatus.Use)
|
||||||
|
{
|
||||||
|
string errorMessage = string.Empty;
|
||||||
|
switch (status)
|
||||||
|
{
|
||||||
|
case EPaymentStatus.StandBy:
|
||||||
|
errorMessage = "아직 이용대기 중인 사용자입니다.";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case EPaymentStatus.Refund:
|
||||||
|
errorMessage = "환불된 사용자입니다..";
|
||||||
|
break;
|
||||||
|
case EPaymentStatus.Delete:
|
||||||
|
errorMessage = "삭제된 사용자입니다.";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
MetroMessageBox.Show(this, errorMessage, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
bool result = Database.CheckExtensionStatus(no);
|
bool result = Database.CheckExtensionStatus(no);
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
@@ -229,7 +251,16 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
|||||||
if (MetroMessageBox.Show(this, message, "1년 연장", MessageBoxButtons.OKCancel,
|
if (MetroMessageBox.Show(this, message, "1년 연장", MessageBoxButtons.OKCancel,
|
||||||
MessageBoxIcon.Information) == DialogResult.OK)
|
MessageBoxIcon.Information) == DialogResult.OK)
|
||||||
{
|
{
|
||||||
Database.UpdateExtended(no, amount);
|
bool updtaeResult = Database.UpdateExtended(no, amount);
|
||||||
|
if (updtaeResult)
|
||||||
|
{
|
||||||
|
MetroMessageBox.Show(this, "연장처리 완료하였습니다.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MetroMessageBox.Show(this, "연장에 실패하였습니다.", "Error", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
|
||||||
DataChange();
|
DataChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -469,6 +500,8 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
|||||||
if (result == DialogResult.Yes)
|
if (result == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
Database.AcceptUser(no, pay);
|
Database.AcceptUser(no, pay);
|
||||||
|
MetroMessageBox.Show(this, "완료되었습니다.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
DataChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -531,7 +531,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
}
|
}
|
||||||
public static void AcceptUser(string no, int pay)
|
public static void AcceptUser(string no, int pay)
|
||||||
{
|
{
|
||||||
var query = $"UPDATE PaymentStatus{(int)EPaymentStatus.Use} FROM UserList Where No='{no}'";
|
var query = $"UPDATE UserList Set PaymentStatus={(int)EPaymentStatus.Use} Where No='{no}'";
|
||||||
using (var command = _sqLiteConnection.CreateCommand())
|
using (var command = _sqLiteConnection.CreateCommand())
|
||||||
{
|
{
|
||||||
command.CommandText = query;
|
command.CommandText = query;
|
||||||
@@ -595,7 +595,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void UpdateExtended(string no, int amount)
|
public static bool UpdateExtended(string no, int amount)
|
||||||
{
|
{
|
||||||
var query = $"SELECT DateEnd From UserList Where No='{no}'";
|
var query = $"SELECT DateEnd From UserList Where No='{no}'";
|
||||||
DateTime endDateTime = DateTime.Now;
|
DateTime endDateTime = DateTime.Now;
|
||||||
@@ -620,7 +620,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
int result = command.ExecuteNonQuery();
|
int result = command.ExecuteNonQuery();
|
||||||
if (result < 1)
|
if (result < 1)
|
||||||
{
|
{
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -631,7 +631,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
int result = command.ExecuteNonQuery();
|
int result = command.ExecuteNonQuery();
|
||||||
if (result < 1)
|
if (result < 1)
|
||||||
{
|
{
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
query = $"UPDATE UserList Set DateEnd='{endDateTime.EndDateTime()}', ExtensionStatus={true.BoolToInt()}, ExtensionStart='{extensionStart.StartDateTime()}' Where No='{no}'";
|
query = $"UPDATE UserList Set DateEnd='{endDateTime.EndDateTime()}', ExtensionStatus={true.BoolToInt()}, ExtensionStart='{extensionStart.StartDateTime()}' Where No='{no}'";
|
||||||
@@ -641,10 +641,10 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
int result = command.ExecuteNonQuery();
|
int result = command.ExecuteNonQuery();
|
||||||
if (result < 1)
|
if (result < 1)
|
||||||
{
|
{
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static GetRefundInformation GetRefundData(string no)
|
public static GetRefundInformation GetRefundData(string no)
|
||||||
@@ -1092,7 +1092,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
|
|
||||||
public static EVehicleType GetVehicleType(string no)
|
public static EVehicleType GetVehicleType(string no)
|
||||||
{
|
{
|
||||||
var query = $"SELECT VehicleType From UserList Where No='{no}'";
|
var query = $"SELECT VehicleType From ViewUserList Where No='{no}'";
|
||||||
int type = 0;
|
int type = 0;
|
||||||
using (var command = _sqLiteConnection.CreateCommand())
|
using (var command = _sqLiteConnection.CreateCommand())
|
||||||
{
|
{
|
||||||
|
@@ -15,6 +15,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
|||||||
Global.GlobalSettings = Database.LoadSettings();
|
Global.GlobalSettings = Database.LoadSettings();
|
||||||
settings1.SettingReset();
|
settings1.SettingReset();
|
||||||
this.Text = $"{Global.GlobalSettings.GarageName} 화물 차고지 운영프로그램 v{System.Reflection.Assembly.GetExecutingAssembly().GetName().Version}";
|
this.Text = $"{Global.GlobalSettings.GarageName} 화물 차고지 운영프로그램 v{System.Reflection.Assembly.GetExecutingAssembly().GetName().Version}";
|
||||||
|
applicant1.GarageName(Global.GlobalSettings.GarageName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
|||||||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
||||||
// 기본값으로 할 수 있습니다.
|
// 기본값으로 할 수 있습니다.
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("0.2.*")]
|
[assembly: AssemblyVersion("0.3.*")]
|
||||||
[assembly: AssemblyFileVersion("0.2.*")]
|
[assembly: AssemblyFileVersion("0.3.*")]
|
||||||
|
Reference in New Issue
Block a user