всё, всё работает, можно приступать к замерам времени
This commit is contained in:
parent
942fa52827
commit
9d73746078
@ -55,8 +55,8 @@ namespace BeautySalon
|
||||
dataGridView.Columns.Add("ClientFIO", "ФИО клиента");
|
||||
dataGridView.Columns.Add("ServiceName", "Название услуги");
|
||||
dataGridView.Columns.Add("MasterFIO", "ФИО мастера");
|
||||
dataGridView.Columns.Add("DateReception", "Дата оказания услуги");
|
||||
dataGridView.Columns.Add("Price", "Цена");
|
||||
dataGridView.Columns.Add("DateReception", "Дата оказания услуги");
|
||||
}
|
||||
|
||||
foreach (Cheque cheque in cheques)
|
||||
@ -67,7 +67,7 @@ namespace BeautySalon
|
||||
|
||||
if(clientFIO != null && serviceName != null && masterFIO != null)
|
||||
{
|
||||
dataGridView.Rows.Add(cheque.ChequeId, clientFIO, serviceName, masterFIO, cheque.DateReception, cheque.Price);
|
||||
dataGridView.Rows.Add(cheque.ChequeId, clientFIO, serviceName, masterFIO, cheque.Price, cheque.DateReception);
|
||||
}
|
||||
}
|
||||
dataGridView.Columns["ChequeId"].Visible = false;
|
||||
|
11
BeautySalon/BeautySalon/FormMain.Designer.cs
generated
11
BeautySalon/BeautySalon/FormMain.Designer.cs
generated
@ -76,11 +76,16 @@
|
||||
добавитьToolStripMenuItem1.Text = "Клиенты";
|
||||
добавитьToolStripMenuItem1.Click += добавитьToolStripMenuItem1_Click;
|
||||
//
|
||||
// создатьПриемToolStripMenuItem
|
||||
//
|
||||
создатьПриемToolStripMenuItem.Name = "создатьПриемToolStripMenuItem";
|
||||
создатьПриемToolStripMenuItem.Size = new Size(14, 24);
|
||||
//
|
||||
// посмотретьЧекиToolStripMenuItem
|
||||
//
|
||||
посмотретьЧекиToolStripMenuItem.Name = "посмотретьЧекиToolStripMenuItem";
|
||||
посмотретьЧекиToolStripMenuItem.Size = new Size(143, 24);
|
||||
посмотретьЧекиToolStripMenuItem.Text = "Посмотреть чеки";
|
||||
посмотретьЧекиToolStripMenuItem.Size = new Size(57, 24);
|
||||
посмотретьЧекиToolStripMenuItem.Text = "Чеки";
|
||||
посмотретьЧекиToolStripMenuItem.Click += посмотретьЧекиToolStripMenuItem_Click;
|
||||
//
|
||||
// FormMain
|
||||
@ -91,7 +96,7 @@
|
||||
Controls.Add(menuStrip1);
|
||||
MainMenuStrip = menuStrip1;
|
||||
Name = "FormMain";
|
||||
Text = "FormMain";
|
||||
Text = "Здрасьте до свидания";
|
||||
menuStrip1.ResumeLayout(false);
|
||||
menuStrip1.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
|
2
BeautySalon/BeautySalon/FormService.Designer.cs
generated
2
BeautySalon/BeautySalon/FormService.Designer.cs
generated
@ -123,7 +123,7 @@
|
||||
Controls.Add(FIO);
|
||||
Controls.Add(textBoxName);
|
||||
Name = "FormService";
|
||||
Text = "FormService";
|
||||
Text = "Услуга";
|
||||
Load += FormService_Load;
|
||||
((System.ComponentModel.ISupportInitialize)numericUpDownPrice).EndInit();
|
||||
ResumeLayout(false);
|
||||
|
@ -2,6 +2,7 @@
|
||||
using Npgsql;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@ -14,8 +15,8 @@ namespace BeautySalonDBModels.Implements
|
||||
{
|
||||
using var conn = GetConnection();
|
||||
conn.Open();
|
||||
using var cmd = new NpgsqlCommand("INSERT INTO cheques (cheque_id, client_id, master_id, service_id, price, date_reception)" +
|
||||
" VALUES (nextval('seq_cheque'), @ClientId, @master_id, @service_id, @Price, @DateReception)", conn);
|
||||
using var cmd = new NpgsqlCommand("INSERT INTO cheques (cheque_id, client_id, service_id, master_id, date_reception, price)" +
|
||||
" VALUES (nextval('seq_cheque'), @ClientId, @service_id, @master_id, @DateReception, @Price)", conn);
|
||||
cmd.Parameters.AddWithValue("@ClientId", cheque.ClientId);
|
||||
cmd.Parameters.AddWithValue("@master_id", cheque.MasterId);
|
||||
cmd.Parameters.AddWithValue("@service_id", cheque.ServiceId);
|
||||
@ -37,10 +38,10 @@ namespace BeautySalonDBModels.Implements
|
||||
{
|
||||
ChequeId = reader.GetInt32(0),
|
||||
ClientId = reader.GetInt32(1),
|
||||
MasterId = reader.GetInt32(2),
|
||||
ServiceId = reader.GetInt32(3),
|
||||
Price = reader.GetDouble(4),
|
||||
DateReception = reader.GetDateTime(5)
|
||||
ServiceId = reader.GetInt32(4),
|
||||
MasterId = reader.GetInt32(3),
|
||||
DateReception = reader.GetFieldValue<DateTime>(5),
|
||||
Price = reader.GetDouble(2),
|
||||
};
|
||||
}
|
||||
return null;
|
||||
@ -59,10 +60,10 @@ namespace BeautySalonDBModels.Implements
|
||||
{
|
||||
ChequeId = reader.GetInt32(0),
|
||||
ClientId = reader.GetInt32(1),
|
||||
MasterId = reader.GetInt32(2),
|
||||
ServiceId = reader.GetInt32(3),
|
||||
Price = reader.GetDouble(4),
|
||||
DateReception = reader.GetDateTime(5)
|
||||
ServiceId = reader.GetInt32(4),
|
||||
MasterId = reader.GetInt32(3),
|
||||
DateReception = reader.GetFieldValue<DateTime>(5),
|
||||
Price = reader.GetDouble(2),
|
||||
});
|
||||
}
|
||||
return cheques;
|
||||
|
Loading…
x
Reference in New Issue
Block a user