Изменения БД
parent
1ea1be87bd
commit
e3c82b3beb
|
|
@ -16,10 +16,11 @@ public class RecordRep:BaseRep
|
|||
{
|
||||
List<Record> recordsList = new();
|
||||
|
||||
string sql = @"select r.id,r.client_name, r.client_surname,r.doctor_id,user_id,r.total_amount,r.record_date,d.title,u.name
|
||||
from records r
|
||||
string sql = @"select r.id,r.client_name, r.client_surname,r.doctor_id,r.user_id,r.total_amount,r.record_date,r.service_id,d.title,u.name,s.service_name
|
||||
from records r
|
||||
join doctors d on r.doctor_id = d.id
|
||||
join users u on r.user_id = u.id ";
|
||||
join users u on r.user_id = u.id
|
||||
join services s on r.service_id = s.id";
|
||||
try
|
||||
{
|
||||
using (var mc = new MySqlCommand(sql, connection))
|
||||
|
|
@ -35,10 +36,12 @@ public class RecordRep:BaseRep
|
|||
ClientSurname = reader.GetString("client_surname"),
|
||||
DoctorId = reader.GetInt32("doctor_id"),
|
||||
UserId = reader.GetInt32("user_id"),
|
||||
ServiceId = reader.GetInt32("service_id"),
|
||||
TotalAmount = reader.GetInt32("total_amount"),
|
||||
RecordDate = reader.GetDateTime("record_date"),
|
||||
Name = reader.GetString("name"),
|
||||
Title = reader.GetString("title")
|
||||
Title = reader.GetString("title"),
|
||||
ServiceName = reader.GetString("service_name")
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,10 +14,13 @@ public class Record
|
|||
|
||||
public int UserId { get; set; }
|
||||
|
||||
public int ServiceId { get; set; }
|
||||
|
||||
public decimal TotalAmount { get; set; }
|
||||
|
||||
public DateTime RecordDate { get; set; }
|
||||
|
||||
public string Title { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string ServiceName { get; set; }
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
<DataGridTextColumn Binding="{Binding Title}" Header="Врач"/>
|
||||
<DataGridTextColumn Binding="{Binding Name}" Header="Логин"/>
|
||||
<DataGridTextColumn Binding="{Binding TotalAmount}" Header="Цена"/>
|
||||
<DataGridTextColumn Binding="{Binding Title}" Header="Услуга"/>
|
||||
<DataGridTextColumn Binding="{Binding ServiceName}" Header="Услуга"/>
|
||||
<DataGridTextColumn Binding="{Binding RecordDate}" Header="Дата"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"DataBaseConnection":
|
||||
{
|
||||
"ConnectionString" : "server=217.150.77.216;port=24831;userid=student;password=student;database=Polyclinic"
|
||||
"ConnectionString" : "server=217.150.77.216;port=24831;userid=student;password=student;database=Policlinic"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"DataBaseConnection":
|
||||
{
|
||||
"ConnectionString" : "server=217.150.77.216;port=24831;userid=student;password=student;database=Polyclinic"
|
||||
"ConnectionString" : "server=217.150.77.216;port=24831;userid=student;password=student;database=Policlinic"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -13,7 +13,7 @@ using System.Reflection;
|
|||
[assembly: System.Reflection.AssemblyCompanyAttribute("Policlinica")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+4407015adc26f82850c90f3ec73288b176f64b4a")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+1ea1be87bdcc1be1edf581939fe3fad5c4543b87")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Policlinica")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Policlinica")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
fcbda8bf225be28d2b4a90514670a80f7dbf22270efc525991c0f3694f1c291f
|
||||
a4ba19822fdbb15ed15f95983a1e8d700bab0f1304423af8f4b191027a0bf6ee
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
{"documents":{"C:\\Users\\artem\\RiderProjects\\Policlinica1\\*":"https://raw.githubusercontent.com/Dezkriminant/Policlinica/4407015adc26f82850c90f3ec73288b176f64b4a/*"}}
|
||||
{"documents":{"C:\\Users\\artem\\RiderProjects\\Policlinica1\\*":"https://raw.githubusercontent.com/Dezkriminant/Policlinica/1ea1be87bdcc1be1edf581939fe3fad5c4543b87/*"}}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue