ApplicantList DB 수정 버그 수정 및 신청자 삭제 부분 제거

This commit is contained in:
2023-09-22 09:27:57 +09:00
parent c8b824bf00
commit 1d57affc14
7 changed files with 3 additions and 364 deletions

View File

@@ -1,168 +0,0 @@
namespace HSUCO_Cargo_Garage_Operation_Program.CustomForm
{
partial class DeleteReason
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
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;
}
}

View File

@@ -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;
}
}
}

View File

@@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -108,13 +108,12 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
var resultInsert = Database.SetApplicant(applicant); var resultInsert = Database.SetApplicant(applicant);
if (resultInsert.Result) if (resultInsert != string.Empty)
{ {
ResetInput(); ResetInput();
MetroMessageBox.Show(this, "정상적으로 등록되었습니다.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); MetroMessageBox.Show(this, "정상적으로 등록되었습니다.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
PrintFilingReceiptInformation printFilingReceiptInformation = new PrintFilingReceiptInformation(); PrintFilingReceiptInformation printFilingReceiptInformation = new PrintFilingReceiptInformation();
printFilingReceiptInformation.No = resultInsert.No; printFilingReceiptInformation.No = resultInsert;
printFilingReceiptInformation.WaitingOrder = resultInsert.WaitingOrder;
printFilingReceiptInformation.Name = applicant.Name; printFilingReceiptInformation.Name = applicant.Name;
printFilingReceiptInformation.PersonalNumber = applicant.PersonalNumber; printFilingReceiptInformation.PersonalNumber = applicant.PersonalNumber;

View File

@@ -210,6 +210,7 @@
this.dataGridView_List.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; this.dataGridView_List.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dataGridView_List.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView_List.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView_List.Location = new System.Drawing.Point(20, 120); this.dataGridView_List.Location = new System.Drawing.Point(20, 120);
this.dataGridView_List.MultiSelect = false;
this.dataGridView_List.Name = "dataGridView_List"; this.dataGridView_List.Name = "dataGridView_List";
this.dataGridView_List.ReadOnly = true; this.dataGridView_List.ReadOnly = true;
this.dataGridView_List.RowTemplate.Height = 23; this.dataGridView_List.RowTemplate.Height = 23;

View File

@@ -116,19 +116,6 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
{ {
CargoVehicleNumber.Add(dataGridView_List.SelectedRows[i].Cells[0].Value.ToString()); 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) void metroButton_UpdateUser_Click(object sender, EventArgs e)

View File

@@ -92,12 +92,6 @@
<Compile Include="CustomForm\Promotion.Designer.cs"> <Compile Include="CustomForm\Promotion.Designer.cs">
<DependentUpon>Promotion.cs</DependentUpon> <DependentUpon>Promotion.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="CustomForm\DeleteReason.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="CustomForm\DeleteReason.Designer.cs">
<DependentUpon>DeleteReason.cs</DependentUpon>
</Compile>
<Compile Include="CustomForm\WaitingCount.cs"> <Compile Include="CustomForm\WaitingCount.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -164,9 +158,6 @@
<EmbeddedResource Include="CustomForm\Promotion.resx"> <EmbeddedResource Include="CustomForm\Promotion.resx">
<DependentUpon>Promotion.cs</DependentUpon> <DependentUpon>Promotion.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="CustomForm\DeleteReason.resx">
<DependentUpon>DeleteReason.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="CustomForm\WaitingCount.resx"> <EmbeddedResource Include="CustomForm\WaitingCount.resx">
<DependentUpon>WaitingCount.cs</DependentUpon> <DependentUpon>WaitingCount.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>