клиент показывается, с кайфом
This commit is contained in:
parent
48641a33aa
commit
3042a732ac
@ -37,10 +37,8 @@ namespace JewelryStore
|
|||||||
{
|
{
|
||||||
dataGridView.DataSource = list;
|
dataGridView.DataSource = list;
|
||||||
dataGridView.Columns["Id"].Visible = false;
|
dataGridView.Columns["Id"].Visible = false;
|
||||||
dataGridView.Columns["ClientFIO"].AutoSizeMode =
|
dataGridView.Columns["ClientFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
DataGridViewAutoSizeColumnMode.Fill;
|
dataGridView.Columns["Email"].AutoSizeMode =DataGridViewAutoSizeColumnMode.Fill;
|
||||||
dataGridView.Columns["Email"].AutoSizeMode =
|
|
||||||
DataGridViewAutoSizeColumnMode.Fill;
|
|
||||||
dataGridView.Columns["Password"].Visible = false;
|
dataGridView.Columns["Password"].Visible = false;
|
||||||
}
|
}
|
||||||
_logger.LogInformation("Загрузка клиентов");
|
_logger.LogInformation("Загрузка клиентов");
|
||||||
|
16
JewelryStore/FormMain.Designer.cs
generated
16
JewelryStore/FormMain.Designer.cs
generated
@ -42,6 +42,7 @@
|
|||||||
this.списокКомпонентовToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.списокКомпонентовToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.компонентыПоИзделиямToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.компонентыПоИзделиямToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.списокЗаказзовToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.списокЗаказзовToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.клиентыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
|
||||||
this.menuStrip.SuspendLayout();
|
this.menuStrip.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
@ -122,7 +123,8 @@
|
|||||||
//
|
//
|
||||||
this.справочникиToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.справочникиToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.компонентыToolStripMenuItem,
|
this.компонентыToolStripMenuItem,
|
||||||
this.изделияToolStripMenuItem});
|
this.изделияToolStripMenuItem,
|
||||||
|
this.клиентыToolStripMenuItem});
|
||||||
this.справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
|
this.справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
|
||||||
this.справочникиToolStripMenuItem.Size = new System.Drawing.Size(139, 29);
|
this.справочникиToolStripMenuItem.Size = new System.Drawing.Size(139, 29);
|
||||||
this.справочникиToolStripMenuItem.Text = "Справочники";
|
this.справочникиToolStripMenuItem.Text = "Справочники";
|
||||||
@ -130,14 +132,14 @@
|
|||||||
// компонентыToolStripMenuItem
|
// компонентыToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.компонентыToolStripMenuItem.Name = "компонентыToolStripMenuItem";
|
this.компонентыToolStripMenuItem.Name = "компонентыToolStripMenuItem";
|
||||||
this.компонентыToolStripMenuItem.Size = new System.Drawing.Size(240, 34);
|
this.компонентыToolStripMenuItem.Size = new System.Drawing.Size(270, 34);
|
||||||
this.компонентыToolStripMenuItem.Text = "Компоненты";
|
this.компонентыToolStripMenuItem.Text = "Компоненты";
|
||||||
this.компонентыToolStripMenuItem.Click += new System.EventHandler(this.компонентыToolStripMenuItem_Click);
|
this.компонентыToolStripMenuItem.Click += new System.EventHandler(this.компонентыToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// изделияToolStripMenuItem
|
// изделияToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.изделияToolStripMenuItem.Name = "изделияToolStripMenuItem";
|
this.изделияToolStripMenuItem.Name = "изделияToolStripMenuItem";
|
||||||
this.изделияToolStripMenuItem.Size = new System.Drawing.Size(240, 34);
|
this.изделияToolStripMenuItem.Size = new System.Drawing.Size(270, 34);
|
||||||
this.изделияToolStripMenuItem.Text = "Драгоценности";
|
this.изделияToolStripMenuItem.Text = "Драгоценности";
|
||||||
this.изделияToolStripMenuItem.Click += new System.EventHandler(this.драгоценностиToolStripMenuItem_Click);
|
this.изделияToolStripMenuItem.Click += new System.EventHandler(this.драгоценностиToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
@ -172,6 +174,13 @@
|
|||||||
this.списокЗаказзовToolStripMenuItem.Text = "Список заказов";
|
this.списокЗаказзовToolStripMenuItem.Text = "Список заказов";
|
||||||
this.списокЗаказзовToolStripMenuItem.Click += new System.EventHandler(this.списокЗаказзовToolStripMenuItem_Click);
|
this.списокЗаказзовToolStripMenuItem.Click += new System.EventHandler(this.списокЗаказзовToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
// клиентыToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.клиентыToolStripMenuItem.Name = "клиентыToolStripMenuItem";
|
||||||
|
this.клиентыToolStripMenuItem.Size = new System.Drawing.Size(270, 34);
|
||||||
|
this.клиентыToolStripMenuItem.Text = "Клиенты";
|
||||||
|
this.клиентыToolStripMenuItem.Click += new System.EventHandler(this.клиентыToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
// FormMain
|
// FormMain
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 25F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 25F);
|
||||||
@ -212,5 +221,6 @@
|
|||||||
private ToolStripMenuItem списокКомпонентовToolStripMenuItem;
|
private ToolStripMenuItem списокКомпонентовToolStripMenuItem;
|
||||||
private ToolStripMenuItem компонентыПоИзделиямToolStripMenuItem;
|
private ToolStripMenuItem компонентыПоИзделиямToolStripMenuItem;
|
||||||
private ToolStripMenuItem списокЗаказзовToolStripMenuItem;
|
private ToolStripMenuItem списокЗаказзовToolStripMenuItem;
|
||||||
|
private ToolStripMenuItem клиентыToolStripMenuItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -47,6 +47,7 @@ namespace JewelryStore
|
|||||||
dataGridView.DataSource = list;
|
dataGridView.DataSource = list;
|
||||||
dataGridView.Columns["JewelId"].Visible = false;
|
dataGridView.Columns["JewelId"].Visible = false;
|
||||||
dataGridView.Columns["ClientId"].Visible = false;
|
dataGridView.Columns["ClientId"].Visible = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.LogInformation("Загрузка заказов");
|
_logger.LogInformation("Загрузка заказов");
|
||||||
@ -100,6 +101,7 @@ namespace JewelryStore
|
|||||||
Id = id,
|
Id = id,
|
||||||
JewelId = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["JewelId"].Value),
|
JewelId = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["JewelId"].Value),
|
||||||
ClientId = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["ClientId"].Value),
|
ClientId = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["ClientId"].Value),
|
||||||
|
|
||||||
JewelName = dataGridView.SelectedRows[0].Cells["JewelName"].Value.ToString(),
|
JewelName = dataGridView.SelectedRows[0].Cells["JewelName"].Value.ToString(),
|
||||||
Status = Enum.Parse<OrderStatus>(dataGridView.SelectedRows[0].Cells["Status"].Value.ToString()),
|
Status = Enum.Parse<OrderStatus>(dataGridView.SelectedRows[0].Cells["Status"].Value.ToString()),
|
||||||
Count = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Count"].Value),
|
Count = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Count"].Value),
|
||||||
@ -229,6 +231,13 @@ namespace JewelryStore
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void клиентыToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var service = Program.ServiceProvider?.GetService(typeof(FormClients));
|
||||||
|
if (service is FormClients form)
|
||||||
|
{
|
||||||
|
form.ShowDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
12
JewelryStore/Properties/launchSettings.json
Normal file
12
JewelryStore/Properties/launchSettings.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"profiles": {
|
||||||
|
"JewelryStore": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
},
|
||||||
|
"applicationUrl": "https://localhost:53750;http://localhost:53753"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
12
JewelryStoreBusinessLogic/Properties/launchSettings.json
Normal file
12
JewelryStoreBusinessLogic/Properties/launchSettings.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"profiles": {
|
||||||
|
"JewelryStoreBusinessLogic": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
},
|
||||||
|
"applicationUrl": "https://localhost:53746;http://localhost:53754"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -32,8 +32,7 @@ namespace JewelryStoreClientApp
|
|||||||
public static void PostRequest<T>(string requestUrl, T model)
|
public static void PostRequest<T>(string requestUrl, T model)
|
||||||
{
|
{
|
||||||
var json = JsonConvert.SerializeObject(model);
|
var json = JsonConvert.SerializeObject(model);
|
||||||
var data = new StringContent(json, Encoding.UTF8,
|
var data = new StringContent(json, Encoding.UTF8, "application/json");
|
||||||
"application/json");
|
|
||||||
var response = _client.PostAsync(requestUrl, data);
|
var response = _client.PostAsync(requestUrl, data);
|
||||||
var result = response.Result.Content.ReadAsStringAsync().Result;
|
var result = response.Result.Content.ReadAsStringAsync().Result;
|
||||||
if (!response.Result.IsSuccessStatusCode)
|
if (!response.Result.IsSuccessStatusCode)
|
||||||
|
@ -47,8 +47,7 @@ namespace JewelryStoreClientApp.Controllers
|
|||||||
{
|
{
|
||||||
throw new Exception("Введите логин, пароль и ФИО");
|
throw new Exception("Введите логин, пароль и ФИО");
|
||||||
}
|
}
|
||||||
APIClient.PostRequest("api/client/updatedata", new
|
APIClient.PostRequest("api/client/updatedata", new ClientBindingModel
|
||||||
ClientBindingModel
|
|
||||||
{
|
{
|
||||||
Id = APIClient.Client.Id,
|
Id = APIClient.Client.Id,
|
||||||
ClientFIO = fio,
|
ClientFIO = fio,
|
||||||
@ -104,8 +103,7 @@ namespace JewelryStoreClientApp.Controllers
|
|||||||
{
|
{
|
||||||
throw new Exception("Введите логин, пароль и ФИО");
|
throw new Exception("Введите логин, пароль и ФИО");
|
||||||
}
|
}
|
||||||
APIClient.PostRequest("api/client/register", new
|
APIClient.PostRequest("api/client/register", new ClientBindingModel
|
||||||
ClientBindingModel
|
|
||||||
{
|
{
|
||||||
ClientFIO = fio,
|
ClientFIO = fio,
|
||||||
Email = login,
|
Email = login,
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>@ViewData["Title"] - AbstractShowClientApp</title>
|
<title>@ViewData["Title"] - JewelryStoreClientApp</title>
|
||||||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
|
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
|
||||||
<link rel="stylesheet" href="~/css/site.css" />
|
<link rel="stylesheet" href="~/css/site.css" />
|
||||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||||
|
12
JewelryStoreContracts/Properties/launchSettings.json
Normal file
12
JewelryStoreContracts/Properties/launchSettings.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"profiles": {
|
||||||
|
"JewelryStoreContracts": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
},
|
||||||
|
"applicationUrl": "https://localhost:53749;http://localhost:53751"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -16,7 +16,6 @@ namespace JewelryStoreContracts.ViewModels
|
|||||||
public int JewelId { get; set; }
|
public int JewelId { get; set; }
|
||||||
public int ClientId { get; set; }
|
public int ClientId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[DisplayName("Драгоценность")]
|
[DisplayName("Драгоценность")]
|
||||||
public string JewelName { get; set; } = string.Empty;
|
public string JewelName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ namespace JewelryStoreDataModels.Models
|
|||||||
int JewelId { get; }
|
int JewelId { get; }
|
||||||
string JewelName { get; }
|
string JewelName { get; }
|
||||||
|
|
||||||
|
int ClientId { get; }
|
||||||
int Count { get; }
|
int Count { get; }
|
||||||
double Sum { get; }
|
double Sum { get; }
|
||||||
OrderStatus Status { get; }
|
OrderStatus Status { get; }
|
||||||
|
12
JewelryStoreDataModels/Properties/launchSettings.json
Normal file
12
JewelryStoreDataModels/Properties/launchSettings.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"profiles": {
|
||||||
|
"JewelryStoreDataModels": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
},
|
||||||
|
"applicationUrl": "https://localhost:53757;http://localhost:53759"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -38,7 +38,7 @@ namespace JewelryStoreDatabaseImplement.Models
|
|||||||
public DateTime? DateImplement { get; private set; }
|
public DateTime? DateImplement { get; private set; }
|
||||||
|
|
||||||
public virtual Jewel Jewel { get; set; }
|
public virtual Jewel Jewel { get; set; }
|
||||||
public Client Client { get; set; }
|
public virtual Client Client { get; set; }
|
||||||
|
|
||||||
public static Order? Create(OrderBindingModel? model)
|
public static Order? Create(OrderBindingModel? model)
|
||||||
{
|
{
|
||||||
@ -87,7 +87,8 @@ namespace JewelryStoreDatabaseImplement.Models
|
|||||||
Sum = Sum,
|
Sum = Sum,
|
||||||
Status = Status,
|
Status = Status,
|
||||||
DateCreate = DateCreate,
|
DateCreate = DateCreate,
|
||||||
DateImplement = DateImplement
|
DateImplement = DateImplement,
|
||||||
|
ClientFIO = Client.ClientFIO
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
12
JewelryStoreDatabaseImplement/Properties/launchSettings.json
Normal file
12
JewelryStoreDatabaseImplement/Properties/launchSettings.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"profiles": {
|
||||||
|
"JewelryStoreDatabaseImplement": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
},
|
||||||
|
"applicationUrl": "https://localhost:53756;http://localhost:53758"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
12
JewelryStoreFileImplement/Properties/launchSettings.json
Normal file
12
JewelryStoreFileImplement/Properties/launchSettings.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"profiles": {
|
||||||
|
"JewelryStoreFileImplement": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
},
|
||||||
|
"applicationUrl": "https://localhost:53747;http://localhost:53752"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
12
JewelryStoreListImplement/Properties/launchSettings.json
Normal file
12
JewelryStoreListImplement/Properties/launchSettings.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"profiles": {
|
||||||
|
"JewelryStoreListImplement": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
},
|
||||||
|
"applicationUrl": "https://localhost:53748;http://localhost:53755"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user