From 1d57affc14fd3a12746cdf7773f69cd535187428 Mon Sep 17 00:00:00 2001 From: Crudelis Date: Fri, 22 Sep 2023 09:27:57 +0900 Subject: [PATCH] =?UTF-8?q?ApplicantList=20DB=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95=20=EB=B0=8F=20=EC=8B=A0?= =?UTF-8?q?=EC=B2=AD=EC=9E=90=20=EC=82=AD=EC=A0=9C=20=EB=B6=80=EB=B6=84=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomForm/DeleteReason.Designer.cs | 168 ------------------ .../CustomForm/DeleteReason.cs | 51 ------ .../CustomForm/DeleteReason.resx | 120 ------------- .../CustomUserControl/ApplicantControl.cs | 5 +- .../CustomUserControl/WaitingList.Designer.cs | 1 + .../CustomUserControl/WaitingList.cs | 13 -- ...SUCO_Cargo_Garage_Operation_Program.csproj | 9 - 7 files changed, 3 insertions(+), 364 deletions(-) delete mode 100644 HSUCO_Cargo_Garage_Operation_Program/CustomForm/DeleteReason.Designer.cs delete mode 100644 HSUCO_Cargo_Garage_Operation_Program/CustomForm/DeleteReason.cs delete mode 100644 HSUCO_Cargo_Garage_Operation_Program/CustomForm/DeleteReason.resx diff --git a/HSUCO_Cargo_Garage_Operation_Program/CustomForm/DeleteReason.Designer.cs b/HSUCO_Cargo_Garage_Operation_Program/CustomForm/DeleteReason.Designer.cs deleted file mode 100644 index 29f6f2b..0000000 --- a/HSUCO_Cargo_Garage_Operation_Program/CustomForm/DeleteReason.Designer.cs +++ /dev/null @@ -1,168 +0,0 @@ -namespace HSUCO_Cargo_Garage_Operation_Program.CustomForm -{ - partial class DeleteReason - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.metroLabel1 = new MetroFramework.Controls.MetroLabel(); - this.metroLabel2 = new MetroFramework.Controls.MetroLabel(); - this.metroTextBox_Name = new MetroFramework.Controls.MetroTextBox(); - this.metroTextBox_Reason = new MetroFramework.Controls.MetroTextBox(); - this.metroButton_Delete = new MetroFramework.Controls.MetroButton(); - this.metroButton_Cancel = new MetroFramework.Controls.MetroButton(); - this.SuspendLayout(); - // - // metroLabel1 - // - this.metroLabel1.AutoSize = true; - this.metroLabel1.Location = new System.Drawing.Point(30, 100); - this.metroLabel1.Name = "metroLabel1"; - this.metroLabel1.Size = new System.Drawing.Size(83, 19); - this.metroLabel1.TabIndex = 0; - this.metroLabel1.Text = "요청자 이름"; - // - // metroLabel2 - // - this.metroLabel2.AutoSize = true; - this.metroLabel2.Location = new System.Drawing.Point(44, 140); - this.metroLabel2.Name = "metroLabel2"; - this.metroLabel2.Size = new System.Drawing.Size(69, 19); - this.metroLabel2.TabIndex = 0; - this.metroLabel2.Text = "삭제 사유"; - // - // metroTextBox_Name - // - // - // - // - this.metroTextBox_Name.CustomButton.Image = null; - this.metroTextBox_Name.CustomButton.Location = new System.Drawing.Point(168, 1); - this.metroTextBox_Name.CustomButton.Name = ""; - this.metroTextBox_Name.CustomButton.Size = new System.Drawing.Size(21, 21); - this.metroTextBox_Name.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; - this.metroTextBox_Name.CustomButton.TabIndex = 1; - this.metroTextBox_Name.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; - this.metroTextBox_Name.CustomButton.UseSelectable = true; - this.metroTextBox_Name.CustomButton.Visible = false; - this.metroTextBox_Name.Lines = new string[0]; - this.metroTextBox_Name.Location = new System.Drawing.Point(120, 96); - this.metroTextBox_Name.MaxLength = 32767; - this.metroTextBox_Name.Name = "metroTextBox_Name"; - this.metroTextBox_Name.PasswordChar = '\0'; - this.metroTextBox_Name.ScrollBars = System.Windows.Forms.ScrollBars.None; - this.metroTextBox_Name.SelectedText = ""; - this.metroTextBox_Name.SelectionLength = 0; - this.metroTextBox_Name.SelectionStart = 0; - this.metroTextBox_Name.ShortcutsEnabled = true; - this.metroTextBox_Name.Size = new System.Drawing.Size(190, 23); - this.metroTextBox_Name.TabIndex = 1; - this.metroTextBox_Name.UseSelectable = true; - this.metroTextBox_Name.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); - this.metroTextBox_Name.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); - // - // metroTextBox_Reason - // - // - // - // - this.metroTextBox_Reason.CustomButton.Image = null; - this.metroTextBox_Reason.CustomButton.Location = new System.Drawing.Point(202, 2); - this.metroTextBox_Reason.CustomButton.Name = ""; - this.metroTextBox_Reason.CustomButton.Size = new System.Drawing.Size(195, 195); - this.metroTextBox_Reason.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; - this.metroTextBox_Reason.CustomButton.TabIndex = 1; - this.metroTextBox_Reason.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; - this.metroTextBox_Reason.CustomButton.UseSelectable = true; - this.metroTextBox_Reason.CustomButton.Visible = false; - this.metroTextBox_Reason.Lines = new string[0]; - this.metroTextBox_Reason.Location = new System.Drawing.Point(120, 140); - this.metroTextBox_Reason.MaxLength = 32767; - this.metroTextBox_Reason.Multiline = true; - this.metroTextBox_Reason.Name = "metroTextBox_Reason"; - this.metroTextBox_Reason.PasswordChar = '\0'; - this.metroTextBox_Reason.ScrollBars = System.Windows.Forms.ScrollBars.None; - this.metroTextBox_Reason.SelectedText = ""; - this.metroTextBox_Reason.SelectionLength = 0; - this.metroTextBox_Reason.SelectionStart = 0; - this.metroTextBox_Reason.ShortcutsEnabled = true; - this.metroTextBox_Reason.Size = new System.Drawing.Size(400, 200); - this.metroTextBox_Reason.TabIndex = 2; - this.metroTextBox_Reason.UseSelectable = true; - this.metroTextBox_Reason.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); - this.metroTextBox_Reason.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); - // - // metroButton_Delete - // - this.metroButton_Delete.FontSize = MetroFramework.MetroButtonSize.Tall; - this.metroButton_Delete.Location = new System.Drawing.Point(314, 346); - this.metroButton_Delete.Name = "metroButton_Delete"; - this.metroButton_Delete.Size = new System.Drawing.Size(100, 50); - this.metroButton_Delete.TabIndex = 3; - this.metroButton_Delete.Text = "삭 제"; - this.metroButton_Delete.UseSelectable = true; - this.metroButton_Delete.Click += new System.EventHandler(this.metroButton_Delete_Click); - // - // metroButton_Cancel - // - this.metroButton_Cancel.FontSize = MetroFramework.MetroButtonSize.Tall; - this.metroButton_Cancel.Location = new System.Drawing.Point(420, 346); - this.metroButton_Cancel.Name = "metroButton_Cancel"; - this.metroButton_Cancel.Size = new System.Drawing.Size(100, 50); - this.metroButton_Cancel.TabIndex = 4; - this.metroButton_Cancel.Text = "취 소"; - this.metroButton_Cancel.UseSelectable = true; - this.metroButton_Cancel.Click += new System.EventHandler(this.metroButton_Cancel_Click); - // - // DeleteReason - // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BorderStyle = MetroFramework.Forms.MetroFormBorderStyle.FixedSingle; - this.ClientSize = new System.Drawing.Size(570, 430); - this.Controls.Add(this.metroButton_Cancel); - this.Controls.Add(this.metroButton_Delete); - this.Controls.Add(this.metroTextBox_Reason); - this.Controls.Add(this.metroTextBox_Name); - this.Controls.Add(this.metroLabel2); - this.Controls.Add(this.metroLabel1); - this.Name = "DeleteReason"; - this.Text = "삭제 사유 입력"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private MetroFramework.Controls.MetroLabel metroLabel1; - private MetroFramework.Controls.MetroLabel metroLabel2; - private MetroFramework.Controls.MetroTextBox metroTextBox_Name; - private MetroFramework.Controls.MetroTextBox metroTextBox_Reason; - private MetroFramework.Controls.MetroButton metroButton_Delete; - private MetroFramework.Controls.MetroButton metroButton_Cancel; - } -} \ No newline at end of file diff --git a/HSUCO_Cargo_Garage_Operation_Program/CustomForm/DeleteReason.cs b/HSUCO_Cargo_Garage_Operation_Program/CustomForm/DeleteReason.cs deleted file mode 100644 index 7112fec..0000000 --- a/HSUCO_Cargo_Garage_Operation_Program/CustomForm/DeleteReason.cs +++ /dev/null @@ -1,51 +0,0 @@ -using MetroFramework; -using MetroFramework.Forms; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace HSUCO_Cargo_Garage_Operation_Program.CustomForm -{ - public partial class DeleteReason : MetroForm - { - public string ResultName { get; set; } - public string ResultReason { get; set; } - public DeleteReason() - { - InitializeComponent(); - } - - private void metroButton_Delete_Click(object sender, EventArgs e) - { - string name = metroTextBox_Name.Text.Trim(); - string reason = metroTextBox_Reason.Text.Trim(); - if(name == string.Empty) - { - MetroMessageBox.Show(this, "요청자 이름이 입력되지 않았습니다.", "삭제", MessageBoxButtons.OKCancel, MessageBoxIcon.Error); - metroTextBox_Name.Focus(); - return; - } - if(reason == string.Empty) - { - MetroMessageBox.Show(this, "삭제 사유가 입력되지 않았습니다.", "삭제", MessageBoxButtons.OKCancel, MessageBoxIcon.Error); - metroTextBox_Reason.Focus(); - return; - } - - this.ResultName = name; - this.ResultReason = reason; - this.DialogResult = DialogResult.OK; - } - - private void metroButton_Cancel_Click(object sender, EventArgs e) - { - this.DialogResult = DialogResult.Cancel; - } - } -} diff --git a/HSUCO_Cargo_Garage_Operation_Program/CustomForm/DeleteReason.resx b/HSUCO_Cargo_Garage_Operation_Program/CustomForm/DeleteReason.resx deleted file mode 100644 index 1af7de1..0000000 --- a/HSUCO_Cargo_Garage_Operation_Program/CustomForm/DeleteReason.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/HSUCO_Cargo_Garage_Operation_Program/CustomUserControl/ApplicantControl.cs b/HSUCO_Cargo_Garage_Operation_Program/CustomUserControl/ApplicantControl.cs index b2166b4..ef599b8 100644 --- a/HSUCO_Cargo_Garage_Operation_Program/CustomUserControl/ApplicantControl.cs +++ b/HSUCO_Cargo_Garage_Operation_Program/CustomUserControl/ApplicantControl.cs @@ -108,13 +108,12 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl var resultInsert = Database.SetApplicant(applicant); - if (resultInsert.Result) + if (resultInsert != string.Empty) { ResetInput(); MetroMessageBox.Show(this, "정상적으로 등록되었습니다.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); PrintFilingReceiptInformation printFilingReceiptInformation = new PrintFilingReceiptInformation(); - printFilingReceiptInformation.No = resultInsert.No; - printFilingReceiptInformation.WaitingOrder = resultInsert.WaitingOrder; + printFilingReceiptInformation.No = resultInsert; printFilingReceiptInformation.Name = applicant.Name; printFilingReceiptInformation.PersonalNumber = applicant.PersonalNumber; diff --git a/HSUCO_Cargo_Garage_Operation_Program/CustomUserControl/WaitingList.Designer.cs b/HSUCO_Cargo_Garage_Operation_Program/CustomUserControl/WaitingList.Designer.cs index df1089a..cb04924 100644 --- a/HSUCO_Cargo_Garage_Operation_Program/CustomUserControl/WaitingList.Designer.cs +++ b/HSUCO_Cargo_Garage_Operation_Program/CustomUserControl/WaitingList.Designer.cs @@ -210,6 +210,7 @@ this.dataGridView_List.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; this.dataGridView_List.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView_List.Location = new System.Drawing.Point(20, 120); + this.dataGridView_List.MultiSelect = false; this.dataGridView_List.Name = "dataGridView_List"; this.dataGridView_List.ReadOnly = true; this.dataGridView_List.RowTemplate.Height = 23; diff --git a/HSUCO_Cargo_Garage_Operation_Program/CustomUserControl/WaitingList.cs b/HSUCO_Cargo_Garage_Operation_Program/CustomUserControl/WaitingList.cs index f2f83ab..9fe5642 100644 --- a/HSUCO_Cargo_Garage_Operation_Program/CustomUserControl/WaitingList.cs +++ b/HSUCO_Cargo_Garage_Operation_Program/CustomUserControl/WaitingList.cs @@ -116,19 +116,6 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl { CargoVehicleNumber.Add(dataGridView_List.SelectedRows[i].Cells[0].Value.ToString()); } - - var message = "선태하신 " + allCount + "건을 삭제 하시겠습니까?"; - - if (MetroMessageBox.Show(this, message, "삭제", MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK) - { - var deleteReason = new DeleteReason(); - - if (deleteReason.ShowDialog() == DialogResult.OK) - { - Database.DeleteInspection(CargoVehicleNumber, deleteReason.ResultName, deleteReason.ResultReason); - DataChange(); - } - } } void metroButton_UpdateUser_Click(object sender, EventArgs e) diff --git a/HSUCO_Cargo_Garage_Operation_Program/HSUCO_Cargo_Garage_Operation_Program.csproj b/HSUCO_Cargo_Garage_Operation_Program/HSUCO_Cargo_Garage_Operation_Program.csproj index 90ebaaa..f3465cf 100644 --- a/HSUCO_Cargo_Garage_Operation_Program/HSUCO_Cargo_Garage_Operation_Program.csproj +++ b/HSUCO_Cargo_Garage_Operation_Program/HSUCO_Cargo_Garage_Operation_Program.csproj @@ -92,12 +92,6 @@ Promotion.cs - - Form - - - DeleteReason.cs - Form @@ -164,9 +158,6 @@ Promotion.cs - - DeleteReason.cs - WaitingCount.cs