수익금대장, 증명서발급 대장 기능 완성
- 두개의 대장 기능 완성 - 재발급 기능은 발급 기능과 연계 해서 완성
This commit is contained in:
@@ -28,10 +28,156 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
components = new System.ComponentModel.Container();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.dataGridView_List = new System.Windows.Forms.DataGridView();
|
||||
this.metroButton_ReCertificate = new MetroFramework.Controls.MetroButton();
|
||||
this.metroButton_ExportExcel = new MetroFramework.Controls.MetroButton();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.metroDateTime_EndDate = new MetroFramework.Controls.MetroDateTime();
|
||||
this.metroDateTime_StartDate = new MetroFramework.Controls.MetroDateTime();
|
||||
this.metroButton_Search = new MetroFramework.Controls.MetroButton();
|
||||
this.metroLabel2 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView_List)).BeginInit();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// dataGridView_List
|
||||
//
|
||||
this.dataGridView_List.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.dataGridView_List.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
|
||||
this.dataGridView_List.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("굴림", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dataGridView_List.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.dataGridView_List.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dataGridView_List.Location = new System.Drawing.Point(20, 120);
|
||||
this.dataGridView_List.Name = "dataGridView_List";
|
||||
this.dataGridView_List.ReadOnly = true;
|
||||
this.dataGridView_List.RowTemplate.Height = 23;
|
||||
this.dataGridView_List.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.dataGridView_List.Size = new System.Drawing.Size(600, 330);
|
||||
this.dataGridView_List.TabIndex = 11;
|
||||
//
|
||||
// metroButton_ReCertificate
|
||||
//
|
||||
this.metroButton_ReCertificate.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.metroButton_ReCertificate.FontSize = MetroFramework.MetroButtonSize.Tall;
|
||||
this.metroButton_ReCertificate.Location = new System.Drawing.Point(626, 138);
|
||||
this.metroButton_ReCertificate.Name = "metroButton_ReCertificate";
|
||||
this.metroButton_ReCertificate.Size = new System.Drawing.Size(121, 40);
|
||||
this.metroButton_ReCertificate.TabIndex = 12;
|
||||
this.metroButton_ReCertificate.Text = "재 발급";
|
||||
this.metroButton_ReCertificate.UseSelectable = true;
|
||||
this.metroButton_ReCertificate.Click += new System.EventHandler(this.metroButton_ReCertificate_Click);
|
||||
//
|
||||
// metroButton_ExportExcel
|
||||
//
|
||||
this.metroButton_ExportExcel.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.metroButton_ExportExcel.BackgroundImage = global::HSUCO_Cargo_Garage_Operation_Program.Properties.Resources.file_type_excel_icon_130611;
|
||||
this.metroButton_ExportExcel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||
this.metroButton_ExportExcel.FontSize = MetroFramework.MetroButtonSize.Tall;
|
||||
this.metroButton_ExportExcel.Location = new System.Drawing.Point(626, 184);
|
||||
this.metroButton_ExportExcel.Name = "metroButton_ExportExcel";
|
||||
this.metroButton_ExportExcel.Size = new System.Drawing.Size(121, 115);
|
||||
this.metroButton_ExportExcel.TabIndex = 13;
|
||||
this.metroButton_ExportExcel.UseSelectable = true;
|
||||
this.metroButton_ExportExcel.Click += new System.EventHandler(this.metroButton_ExportExcel_Click);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.groupBox1.Controls.Add(this.metroDateTime_EndDate);
|
||||
this.groupBox1.Controls.Add(this.metroDateTime_StartDate);
|
||||
this.groupBox1.Controls.Add(this.metroButton_Search);
|
||||
this.groupBox1.Controls.Add(this.metroLabel2);
|
||||
this.groupBox1.Controls.Add(this.metroLabel1);
|
||||
this.groupBox1.Location = new System.Drawing.Point(20, 20);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(480, 90);
|
||||
this.groupBox1.TabIndex = 14;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "검색";
|
||||
//
|
||||
// metroDateTime_EndDate
|
||||
//
|
||||
this.metroDateTime_EndDate.Location = new System.Drawing.Point(110, 50);
|
||||
this.metroDateTime_EndDate.MinimumSize = new System.Drawing.Size(0, 29);
|
||||
this.metroDateTime_EndDate.Name = "metroDateTime_EndDate";
|
||||
this.metroDateTime_EndDate.Size = new System.Drawing.Size(200, 29);
|
||||
this.metroDateTime_EndDate.TabIndex = 8;
|
||||
//
|
||||
// metroDateTime_StartDate
|
||||
//
|
||||
this.metroDateTime_StartDate.Location = new System.Drawing.Point(110, 15);
|
||||
this.metroDateTime_StartDate.MinimumSize = new System.Drawing.Size(0, 29);
|
||||
this.metroDateTime_StartDate.Name = "metroDateTime_StartDate";
|
||||
this.metroDateTime_StartDate.Size = new System.Drawing.Size(200, 29);
|
||||
this.metroDateTime_StartDate.TabIndex = 7;
|
||||
//
|
||||
// metroButton_Search
|
||||
//
|
||||
this.metroButton_Search.FontSize = MetroFramework.MetroButtonSize.Tall;
|
||||
this.metroButton_Search.Location = new System.Drawing.Point(316, 15);
|
||||
this.metroButton_Search.Name = "metroButton_Search";
|
||||
this.metroButton_Search.Size = new System.Drawing.Size(131, 64);
|
||||
this.metroButton_Search.TabIndex = 6;
|
||||
this.metroButton_Search.Text = "조회";
|
||||
this.metroButton_Search.UseSelectable = true;
|
||||
this.metroButton_Search.Click += new System.EventHandler(this.metroButton_Search_Click);
|
||||
//
|
||||
// metroLabel2
|
||||
//
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Location = new System.Drawing.Point(20, 50);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new System.Drawing.Size(83, 19);
|
||||
this.metroLabel2.TabIndex = 1;
|
||||
this.metroLabel2.Text = "검색 종료일";
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new System.Drawing.Point(20, 20);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new System.Drawing.Size(83, 19);
|
||||
this.metroLabel1.TabIndex = 0;
|
||||
this.metroLabel1.Text = "검색 시작일";
|
||||
//
|
||||
// ListCertificate
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.metroButton_ExportExcel);
|
||||
this.Controls.Add(this.metroButton_ReCertificate);
|
||||
this.Controls.Add(this.dataGridView_List);
|
||||
this.Name = "ListCertificate";
|
||||
this.Size = new System.Drawing.Size(750, 470);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView_List)).EndInit();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.DataGridView dataGridView_List;
|
||||
private MetroFramework.Controls.MetroButton metroButton_ReCertificate;
|
||||
private MetroFramework.Controls.MetroButton metroButton_ExportExcel;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private MetroFramework.Controls.MetroDateTime metroDateTime_EndDate;
|
||||
private MetroFramework.Controls.MetroDateTime metroDateTime_StartDate;
|
||||
private MetroFramework.Controls.MetroButton metroButton_Search;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel2;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel1;
|
||||
}
|
||||
}
|
||||
|
@@ -16,5 +16,66 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void metroButton_ExportExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
var excelWrapper = new ExcelWrapper();
|
||||
|
||||
var saveFileDialog = new SaveFileDialog();
|
||||
saveFileDialog.Filter = "XLSX files (*.xlsx)|*.xlsx";
|
||||
|
||||
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
var result = excelWrapper.WriteDataTableToExcel((DataTable)dataGridView_List.DataSource, "Certificate", saveFileDialog.FileName, "정기권 발급 대장", Environment.MachineName, DateTime.Now);
|
||||
}
|
||||
}
|
||||
|
||||
private void metroButton_ReCertificate_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(dataGridView_List.SelectedRows.Count == 0) return;
|
||||
var x = dataGridView_List.SelectedRows[0];
|
||||
//if(dataGridView_List.select)
|
||||
// 재발급 인쇠
|
||||
// 금액 산정
|
||||
}
|
||||
|
||||
private void metroButton_Search_Click(object sender, EventArgs e)
|
||||
{
|
||||
List<CertificateData> certificateDatas = Database.GetLedgerCertificate(metroDateTime_StartDate.Value, metroDateTime_EndDate.Value);
|
||||
|
||||
var dataTable = new DataTable();
|
||||
|
||||
dataTable.Columns.Add("차량번호(화물)");
|
||||
dataTable.Columns.Add("차량번호(승용)");
|
||||
dataTable.Columns.Add("이름");
|
||||
dataTable.Columns.Add("발급번호");
|
||||
dataTable.Columns.Add("발급일자");
|
||||
|
||||
for (int i = 0; i < certificateDatas.Count; i++)
|
||||
{
|
||||
dataTable.Rows
|
||||
.Add(
|
||||
|
||||
certificateDatas[i].RegistrationNumberTruck,
|
||||
certificateDatas[i].RegistrationNumberPassenger,
|
||||
certificateDatas[i].Name,
|
||||
certificateDatas[i].IssueNumber,
|
||||
certificateDatas[i].Date
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
dataGridView_List.DataSource = dataTable;
|
||||
dataGridView_List.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dataGridView_List.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridView_List.Columns[0].MinimumWidth = 100;
|
||||
dataGridView_List.Columns[0].FillWeight = 100;
|
||||
|
||||
|
||||
dataGridView_List.Columns[1].MinimumWidth = 100;
|
||||
dataGridView_List.Columns[1].FillWeight = 100;
|
||||
dataGridView_List.Columns[2].MinimumWidth = 60;
|
||||
dataGridView_List.Columns[2].FillWeight = 60;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,120 @@
|
||||
<?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>
|
@@ -28,10 +28,141 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
components = new System.ComponentModel.Container();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.dataGridView_List = new System.Windows.Forms.DataGridView();
|
||||
this.metroButton_ExportExcel = new MetroFramework.Controls.MetroButton();
|
||||
this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroLabel2 = new MetroFramework.Controls.MetroLabel();
|
||||
this.metroButton_Search = new MetroFramework.Controls.MetroButton();
|
||||
this.metroDateTime_StartDate = new MetroFramework.Controls.MetroDateTime();
|
||||
this.metroDateTime_EndDate = new MetroFramework.Controls.MetroDateTime();
|
||||
this.groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView_List)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.groupBox1.Controls.Add(this.metroDateTime_EndDate);
|
||||
this.groupBox1.Controls.Add(this.metroDateTime_StartDate);
|
||||
this.groupBox1.Controls.Add(this.metroButton_Search);
|
||||
this.groupBox1.Controls.Add(this.metroLabel2);
|
||||
this.groupBox1.Controls.Add(this.metroLabel1);
|
||||
this.groupBox1.Location = new System.Drawing.Point(20, 20);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(480, 90);
|
||||
this.groupBox1.TabIndex = 9;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "검색";
|
||||
//
|
||||
// dataGridView_List
|
||||
//
|
||||
this.dataGridView_List.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.dataGridView_List.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
|
||||
this.dataGridView_List.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("굴림", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dataGridView_List.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.dataGridView_List.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dataGridView_List.Location = new System.Drawing.Point(20, 120);
|
||||
this.dataGridView_List.Name = "dataGridView_List";
|
||||
this.dataGridView_List.ReadOnly = true;
|
||||
this.dataGridView_List.RowTemplate.Height = 23;
|
||||
this.dataGridView_List.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.dataGridView_List.Size = new System.Drawing.Size(600, 330);
|
||||
this.dataGridView_List.TabIndex = 11;
|
||||
//
|
||||
// metroButton_ExportExcel
|
||||
//
|
||||
this.metroButton_ExportExcel.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.metroButton_ExportExcel.BackgroundImage = global::HSUCO_Cargo_Garage_Operation_Program.Properties.Resources.file_type_excel_icon_130611;
|
||||
this.metroButton_ExportExcel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||
this.metroButton_ExportExcel.FontSize = MetroFramework.MetroButtonSize.Tall;
|
||||
this.metroButton_ExportExcel.Location = new System.Drawing.Point(626, 120);
|
||||
this.metroButton_ExportExcel.Name = "metroButton_ExportExcel";
|
||||
this.metroButton_ExportExcel.Size = new System.Drawing.Size(121, 115);
|
||||
this.metroButton_ExportExcel.TabIndex = 14;
|
||||
this.metroButton_ExportExcel.UseSelectable = true;
|
||||
this.metroButton_ExportExcel.Click += new System.EventHandler(this.metroButton_ExportExcel_Click);
|
||||
//
|
||||
// metroLabel1
|
||||
//
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new System.Drawing.Point(20, 20);
|
||||
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(20, 50);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new System.Drawing.Size(83, 19);
|
||||
this.metroLabel2.TabIndex = 1;
|
||||
this.metroLabel2.Text = "검색 종료일";
|
||||
//
|
||||
// metroButton_Search
|
||||
//
|
||||
this.metroButton_Search.FontSize = MetroFramework.MetroButtonSize.Tall;
|
||||
this.metroButton_Search.Location = new System.Drawing.Point(316, 15);
|
||||
this.metroButton_Search.Name = "metroButton_Search";
|
||||
this.metroButton_Search.Size = new System.Drawing.Size(131, 64);
|
||||
this.metroButton_Search.TabIndex = 6;
|
||||
this.metroButton_Search.Text = "조회";
|
||||
this.metroButton_Search.UseSelectable = true;
|
||||
this.metroButton_Search.Click += new System.EventHandler(this.metroButton_Search_Click);
|
||||
//
|
||||
// metroDateTime_StartDate
|
||||
//
|
||||
this.metroDateTime_StartDate.Location = new System.Drawing.Point(110, 15);
|
||||
this.metroDateTime_StartDate.MinimumSize = new System.Drawing.Size(0, 29);
|
||||
this.metroDateTime_StartDate.Name = "metroDateTime_StartDate";
|
||||
this.metroDateTime_StartDate.Size = new System.Drawing.Size(200, 29);
|
||||
this.metroDateTime_StartDate.TabIndex = 7;
|
||||
//
|
||||
// metroDateTime_EndDate
|
||||
//
|
||||
this.metroDateTime_EndDate.Location = new System.Drawing.Point(110, 50);
|
||||
this.metroDateTime_EndDate.MinimumSize = new System.Drawing.Size(0, 29);
|
||||
this.metroDateTime_EndDate.Name = "metroDateTime_EndDate";
|
||||
this.metroDateTime_EndDate.Size = new System.Drawing.Size(200, 29);
|
||||
this.metroDateTime_EndDate.TabIndex = 8;
|
||||
//
|
||||
// ListProceeds
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.Controls.Add(this.metroButton_ExportExcel);
|
||||
this.Controls.Add(this.dataGridView_List);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Name = "ListProceeds";
|
||||
this.Size = new System.Drawing.Size(750, 470);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView_List)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.DataGridView dataGridView_List;
|
||||
private MetroFramework.Controls.MetroButton metroButton_ExportExcel;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel2;
|
||||
private MetroFramework.Controls.MetroLabel metroLabel1;
|
||||
private MetroFramework.Controls.MetroDateTime metroDateTime_EndDate;
|
||||
private MetroFramework.Controls.MetroDateTime metroDateTime_StartDate;
|
||||
private MetroFramework.Controls.MetroButton metroButton_Search;
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,7 @@ using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
||||
@@ -16,5 +17,83 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void metroButton_ExportExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
var excelWrapper = new ExcelWrapper();
|
||||
|
||||
var saveFileDialog = new SaveFileDialog();
|
||||
saveFileDialog.Filter = "XLSX files (*.xlsx)|*.xlsx";
|
||||
|
||||
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
var result = excelWrapper.WriteDataTableToExcel((DataTable)dataGridView_List.DataSource, "Proceeds", saveFileDialog.FileName, "수익금 대장", Environment.MachineName, DateTime.Now);
|
||||
}
|
||||
}
|
||||
|
||||
private void metroButton_Search_Click(object sender, EventArgs e)
|
||||
{
|
||||
List<ProceedsData> proceedsDatas = Database.GetLedgerProceeds(metroDateTime_StartDate.Value, metroDateTime_EndDate.Value);
|
||||
|
||||
var dataTable = new DataTable();
|
||||
|
||||
dataTable.Columns.Add("차량번호(화물)");
|
||||
dataTable.Columns.Add("차량번호(승용)");
|
||||
dataTable.Columns.Add("이름");
|
||||
dataTable.Columns.Add("수익금 종류");
|
||||
dataTable.Columns.Add("금액");
|
||||
dataTable.Columns.Add("일자");
|
||||
|
||||
for (int i = 0; i < proceedsDatas.Count; i++)
|
||||
{
|
||||
string typeString = string.Empty;
|
||||
switch (proceedsDatas[i].Type)
|
||||
{
|
||||
case ProceedsType.Fees:
|
||||
typeString = "이용요금";
|
||||
break;
|
||||
case ProceedsType.ExtensionFees:
|
||||
typeString = "연장이용요금";
|
||||
break;
|
||||
case ProceedsType.Certificate:
|
||||
typeString = "인증서 발급비용";
|
||||
break;
|
||||
case ProceedsType.ReCertificate:
|
||||
typeString = "인증서 재발급비용";
|
||||
break;
|
||||
case ProceedsType.Refunds:
|
||||
typeString = "환불";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
dataTable.Rows
|
||||
.Add(
|
||||
|
||||
proceedsDatas[i].RegistrationNumberTruck,
|
||||
proceedsDatas[i].RegistrationNumberPassenger,
|
||||
proceedsDatas[i].Name,
|
||||
typeString,
|
||||
String.Format("{0:n0}", proceedsDatas[i].Amount),
|
||||
proceedsDatas[i].Date
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
dataGridView_List.DataSource = dataTable;
|
||||
dataGridView_List.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dataGridView_List.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridView_List.Columns[4].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
|
||||
dataGridView_List.Columns[0].MinimumWidth = 100;
|
||||
dataGridView_List.Columns[0].FillWeight = 100;
|
||||
|
||||
|
||||
dataGridView_List.Columns[1].MinimumWidth = 100;
|
||||
dataGridView_List.Columns[1].FillWeight = 100;
|
||||
dataGridView_List.Columns[2].MinimumWidth = 60;
|
||||
dataGridView_List.Columns[2].FillWeight = 60;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,120 @@
|
||||
<?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>
|
@@ -28,7 +28,7 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.metroRadioButton_EndUser = new MetroFramework.Controls.MetroRadioButton();
|
||||
this.metroRadioButton_UseUser = new MetroFramework.Controls.MetroRadioButton();
|
||||
@@ -265,16 +265,17 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.dataGridView_List.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
|
||||
this.dataGridView_List.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("굴림", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dataGridView_List.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
|
||||
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
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;
|
||||
|
@@ -125,6 +125,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
||||
|
||||
void metroButton_Extended_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dataGridView_List.SelectedRows.Count == 0) return;
|
||||
var allCount = dataGridView_List.SelectedRows.Count;
|
||||
if (allCount == 0) return;
|
||||
|
||||
|
@@ -217,14 +217,12 @@ namespace HSUCO_Cargo_Garage_Operation_Program.CustomUserControl
|
||||
|
||||
var waitingCount = new WaitingCount(allCount, RegistrationNumberTruck.Count);
|
||||
|
||||
if (waitingCount.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
if (waitingCount.ShowDialog() != DialogResult.OK) return;
|
||||
var list = RegistrationNumberTruck.GetRange(0, waitingCount.ResultCount);
|
||||
TODO: //업데이트 필요함
|
||||
//TODO: 업데이트 필요함
|
||||
Database.AddUserList(list, waitingCount.StartDate, waitingCount.EndDate, waitingCount.TotalCost);
|
||||
DataChange();
|
||||
}
|
||||
}
|
||||
|
||||
private void metroButton_ExportExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
@@ -5,15 +5,15 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
||||
public struct Applicant
|
||||
{
|
||||
public bool ApplicantType { get; set; }
|
||||
public string RegistrationNumberTruck{ get; set; }
|
||||
public string RegistrationNumberPassenger{ get; set; }
|
||||
public string Name{ get; set; }
|
||||
public string Phone{ get; set; }
|
||||
public string Address{ get; set; }
|
||||
public DateTime DateOfApplication{ get; set; }
|
||||
public bool Inspection{ get; set; }
|
||||
|
||||
public string RegistrationNumberTruck { get; set; }
|
||||
public string RegistrationNumberPassenger { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Phone { get; set; }
|
||||
public string Address { get; set; }
|
||||
public DateTime DateOfApplication { get; set; }
|
||||
public bool Inspection { get; set; }
|
||||
}
|
||||
|
||||
public struct User
|
||||
{
|
||||
public string RegistrationNumberTruck { get; set; }
|
||||
@@ -34,9 +34,28 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
||||
public DateTime DateEnd { get; set; }
|
||||
}
|
||||
|
||||
public struct ProceedsData
|
||||
{
|
||||
public string RegistrationNumberTruck { get; set; }
|
||||
public string RegistrationNumberPassenger { get; set; }
|
||||
public string Name { get; set; }
|
||||
public ProceedsType Type { get; set; }
|
||||
public int Amount { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
}
|
||||
|
||||
public struct CertificateData
|
||||
{
|
||||
public string RegistrationNumberTruck { get; set; }
|
||||
public string RegistrationNumberPassenger { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string IssueNumber { get; set; }
|
||||
public int Amount { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
}
|
||||
public struct Settings
|
||||
{
|
||||
public long UsageFee {get; set;}
|
||||
public long UsageFee { get; set; }
|
||||
public long ExtendedFee { get; set; }
|
||||
public long CertificateFee { get; set; }
|
||||
public long ReCertificateFee { get; set; }
|
||||
@@ -46,16 +65,14 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
||||
// 연장금액 Extended Fee
|
||||
// 증명서발급 비용 Certificate Fee
|
||||
// 재발급 비용 ReCertificate Fee
|
||||
|
||||
}
|
||||
|
||||
public enum ProceedsType
|
||||
{
|
||||
Fees,
|
||||
ExtensionFees,
|
||||
Certificate,
|
||||
ReCertificate,
|
||||
Refunds
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -292,7 +292,6 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static List<Applicant> GetApplicantList(List<string> RegistrationNumberTruck)
|
||||
{
|
||||
var applicants = new List<Applicant>();
|
||||
@@ -342,7 +341,6 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
||||
insertCommand.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
|
||||
var no = _sqLiteConnection.LastInsertRowId;
|
||||
query =
|
||||
$"INSERT INTO LedgerProceeds(No, Type, Amount, Date) VALUES({no},{(int)ProceedsType.Fees},{totalCost},'{DateTime.Now}')";
|
||||
@@ -389,6 +387,62 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
||||
}
|
||||
}
|
||||
|
||||
public static List<ProceedsData> GetLedgerProceeds(DateTime startDateTime, DateTime endDateTime)
|
||||
{
|
||||
List<ProceedsData> proceedsDatas = new List<ProceedsData>();
|
||||
|
||||
string query = $"SELECT UserList.RegistrationNumberTruck, UserList.RegistrationNumberPassenger, UserList.Name, LedgerProceeds.Type, LedgerProceeds.Amount, LedgerProceeds.Date From LedgerProceeds INNER JOIN UserList ON LedgerProceeds.No = UserList.No Where LedgerProceeds.Date >='{startDateTime}' And LedgerProceeds.Date <='{endDateTime}'";
|
||||
|
||||
using (var command = _sqLiteConnection.CreateCommand())
|
||||
{
|
||||
command.CommandText = query;
|
||||
|
||||
using (var reader = command.ExecuteReader())
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
ProceedsData proceedsData = new ProceedsData();
|
||||
proceedsData.RegistrationNumberTruck = reader["RegistrationNumberTruck"].ToString();
|
||||
proceedsData.RegistrationNumberPassenger = reader["RegistrationNumberPassenger"].ToString();
|
||||
proceedsData.Name = reader["Name"].ToString();
|
||||
proceedsData.Amount = int.Parse(reader["Amount"].ToString());
|
||||
proceedsData.Date = DateTime.Parse(reader["Date"].ToString());
|
||||
proceedsData.Type = (ProceedsType)int.Parse(reader["Type"].ToString());
|
||||
proceedsDatas.Add(proceedsData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return proceedsDatas;
|
||||
}
|
||||
|
||||
public static List<CertificateData> GetLedgerCertificate(DateTime startDateTime, DateTime endDateTime)
|
||||
{
|
||||
List<CertificateData> certificateDatas = new List<CertificateData>();
|
||||
string query = $"SELECT UserList.RegistrationNumberTruck, UserList.RegistrationNumberPassenger, UserList.Name, LedgerCertificate.Date From LedgerCertificate INNER JOIN UserList ON LedgerCertificate.No = UserList.No Where LedgerCertificate.Date >='{startDateTime}' And LedgerCertificate.Date <='{endDateTime}'";
|
||||
|
||||
using (var command = _sqLiteConnection.CreateCommand())
|
||||
{
|
||||
command.CommandText = query;
|
||||
|
||||
using (var reader = command.ExecuteReader())
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
CertificateData certificateData = new CertificateData();
|
||||
certificateData.RegistrationNumberTruck = reader["RegistrationNumberTruck"].ToString();
|
||||
certificateData.RegistrationNumberPassenger = reader["RegistrationNumberPassenger"].ToString();
|
||||
certificateData.Name = reader["Name"].ToString();
|
||||
certificateData.IssueNumber = reader["IssueNumber"].ToString();
|
||||
certificateData.Date = DateTime.Parse(reader["Date"].ToString());
|
||||
certificateDatas.Add(certificateData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return certificateDatas;
|
||||
}
|
||||
|
||||
public static Settings LoadSettings()
|
||||
{
|
||||
var settings = new Settings();
|
||||
@@ -413,15 +467,18 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
||||
long.TryParse(value, out longValue);
|
||||
settings.UsageFee = longValue;
|
||||
break;
|
||||
|
||||
case "ExtendedFee":
|
||||
|
||||
long.TryParse(value, out longValue);
|
||||
settings.ExtendedFee = longValue;
|
||||
break;
|
||||
|
||||
case "CertificateFee":
|
||||
long.TryParse(value, out longValue);
|
||||
settings.CertificateFee = longValue;
|
||||
break;
|
||||
|
||||
case "ReCertificateFee":
|
||||
long.TryParse(value, out longValue);
|
||||
settings.ReCertificateFee = longValue;
|
||||
|
@@ -180,6 +180,12 @@
|
||||
<EmbeddedResource Include="CustomUserControl\ApplicantControl.resx">
|
||||
<DependentUpon>ApplicantControl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="CustomUserControl\ListCertificate.resx">
|
||||
<DependentUpon>ListCertificate.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="CustomUserControl\ListProceeds.resx">
|
||||
<DependentUpon>ListProceeds.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="CustomUserControl\SettingControl.resx">
|
||||
<DependentUpon>SettingControl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
@@ -44,6 +44,8 @@
|
||||
this.tabPage10 = new System.Windows.Forms.TabPage();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.settings1 = new HSUCO_Cargo_Garage_Operation_Program.CustomUserControl.SettingControl();
|
||||
this.listProceeds = new HSUCO_Cargo_Garage_Operation_Program.CustomUserControl.ListProceeds();
|
||||
this.listCertificate1 = new HSUCO_Cargo_Garage_Operation_Program.CustomUserControl.ListCertificate();
|
||||
this.metroTabControl_Main.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.metroTabControl_Applicant.SuspendLayout();
|
||||
@@ -51,6 +53,8 @@
|
||||
this.tabPage6.SuspendLayout();
|
||||
this.tabPage7.SuspendLayout();
|
||||
this.tabPage8.SuspendLayout();
|
||||
this.tabPage9.SuspendLayout();
|
||||
this.tabPage10.SuspendLayout();
|
||||
this.tabPage2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@@ -164,6 +168,7 @@
|
||||
//
|
||||
// tabPage9
|
||||
//
|
||||
this.tabPage9.Controls.Add(this.listProceeds);
|
||||
this.tabPage9.Location = new System.Drawing.Point(4, 38);
|
||||
this.tabPage9.Name = "tabPage9";
|
||||
this.tabPage9.Size = new System.Drawing.Size(968, 604);
|
||||
@@ -172,6 +177,7 @@
|
||||
//
|
||||
// tabPage10
|
||||
//
|
||||
this.tabPage10.Controls.Add(this.listCertificate1);
|
||||
this.tabPage10.Location = new System.Drawing.Point(4, 38);
|
||||
this.tabPage10.Name = "tabPage10";
|
||||
this.tabPage10.Size = new System.Drawing.Size(968, 604);
|
||||
@@ -189,12 +195,29 @@
|
||||
//
|
||||
// settings1
|
||||
//
|
||||
this.settings1.BackColor = System.Drawing.Color.White;
|
||||
this.settings1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.settings1.Location = new System.Drawing.Point(0, 0);
|
||||
this.settings1.Name = "settings1";
|
||||
this.settings1.Size = new System.Drawing.Size(976, 646);
|
||||
this.settings1.TabIndex = 0;
|
||||
//
|
||||
// listProceeds
|
||||
//
|
||||
this.listProceeds.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listProceeds.Location = new System.Drawing.Point(0, 0);
|
||||
this.listProceeds.Name = "listProceeds";
|
||||
this.listProceeds.Size = new System.Drawing.Size(968, 604);
|
||||
this.listProceeds.TabIndex = 0;
|
||||
//
|
||||
// listCertificate1
|
||||
//
|
||||
this.listCertificate1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listCertificate1.Location = new System.Drawing.Point(0, 0);
|
||||
this.listCertificate1.Name = "listCertificate1";
|
||||
this.listCertificate1.Size = new System.Drawing.Size(968, 604);
|
||||
this.listCertificate1.TabIndex = 0;
|
||||
//
|
||||
// Master
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
@@ -212,6 +235,8 @@
|
||||
this.tabPage6.ResumeLayout(false);
|
||||
this.tabPage7.ResumeLayout(false);
|
||||
this.tabPage8.ResumeLayout(false);
|
||||
this.tabPage9.ResumeLayout(false);
|
||||
this.tabPage10.ResumeLayout(false);
|
||||
this.tabPage2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
@@ -231,10 +256,11 @@
|
||||
private CustomUserControl.ApplicantList applicantList1;
|
||||
private CustomUserControl.WaitingList waitingList1;
|
||||
private CustomUserControl.UserList userList1;
|
||||
private MetroFramework.Controls.MetroButton metroButton1;
|
||||
private System.Windows.Forms.TabPage tabPage9;
|
||||
private System.Windows.Forms.TabPage tabPage10;
|
||||
private CustomUserControl.SettingControl settings1;
|
||||
private CustomUserControl.ListProceeds listProceeds;
|
||||
private CustomUserControl.ListCertificate listCertificate1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user