Исправления в формах
This commit is contained in:
parent
7bb2c56097
commit
f2a6fb7627
@ -71,6 +71,7 @@
|
|||||||
this.textBoxCount.Name = "textBoxCount";
|
this.textBoxCount.Name = "textBoxCount";
|
||||||
this.textBoxCount.Size = new System.Drawing.Size(297, 23);
|
this.textBoxCount.Size = new System.Drawing.Size(297, 23);
|
||||||
this.textBoxCount.TabIndex = 3;
|
this.textBoxCount.TabIndex = 3;
|
||||||
|
this.textBoxCount.TextChanged += new System.EventHandler(this.TextBoxCount_TextChanged);
|
||||||
//
|
//
|
||||||
// comboBoxProduct
|
// comboBoxProduct
|
||||||
//
|
//
|
||||||
@ -79,6 +80,7 @@
|
|||||||
this.comboBoxProduct.Name = "comboBoxProduct";
|
this.comboBoxProduct.Name = "comboBoxProduct";
|
||||||
this.comboBoxProduct.Size = new System.Drawing.Size(297, 23);
|
this.comboBoxProduct.Size = new System.Drawing.Size(297, 23);
|
||||||
this.comboBoxProduct.TabIndex = 4;
|
this.comboBoxProduct.TabIndex = 4;
|
||||||
|
this.comboBoxProduct.SelectedIndexChanged += new System.EventHandler(this.ComboBoxProduct_SelectedIndexChanged);
|
||||||
//
|
//
|
||||||
// textBoxSum
|
// textBoxSum
|
||||||
//
|
//
|
||||||
|
@ -130,6 +130,7 @@
|
|||||||
this.ButtonRef.TabIndex = 8;
|
this.ButtonRef.TabIndex = 8;
|
||||||
this.ButtonRef.Text = "Обновить";
|
this.ButtonRef.Text = "Обновить";
|
||||||
this.ButtonRef.UseVisualStyleBackColor = true;
|
this.ButtonRef.UseVisualStyleBackColor = true;
|
||||||
|
this.ButtonRef.Click += new System.EventHandler(this.ButtonRef_Click);
|
||||||
//
|
//
|
||||||
// ButtonDel
|
// ButtonDel
|
||||||
//
|
//
|
||||||
@ -139,6 +140,7 @@
|
|||||||
this.ButtonDel.TabIndex = 7;
|
this.ButtonDel.TabIndex = 7;
|
||||||
this.ButtonDel.Text = "Удалить";
|
this.ButtonDel.Text = "Удалить";
|
||||||
this.ButtonDel.UseVisualStyleBackColor = true;
|
this.ButtonDel.UseVisualStyleBackColor = true;
|
||||||
|
this.ButtonDel.Click += new System.EventHandler(this.ButtonDel_Click);
|
||||||
//
|
//
|
||||||
// ButtonUpd
|
// ButtonUpd
|
||||||
//
|
//
|
||||||
@ -148,6 +150,7 @@
|
|||||||
this.ButtonUpd.TabIndex = 6;
|
this.ButtonUpd.TabIndex = 6;
|
||||||
this.ButtonUpd.Text = "Изменить";
|
this.ButtonUpd.Text = "Изменить";
|
||||||
this.ButtonUpd.UseVisualStyleBackColor = true;
|
this.ButtonUpd.UseVisualStyleBackColor = true;
|
||||||
|
this.ButtonUpd.Click += new System.EventHandler(this.ButtonUpd_Click);
|
||||||
//
|
//
|
||||||
// ButtonAdd
|
// ButtonAdd
|
||||||
//
|
//
|
||||||
@ -157,6 +160,7 @@
|
|||||||
this.ButtonAdd.TabIndex = 5;
|
this.ButtonAdd.TabIndex = 5;
|
||||||
this.ButtonAdd.Text = "Добавить";
|
this.ButtonAdd.Text = "Добавить";
|
||||||
this.ButtonAdd.UseVisualStyleBackColor = true;
|
this.ButtonAdd.UseVisualStyleBackColor = true;
|
||||||
|
this.ButtonAdd.Click += new System.EventHandler(this.ButtonAdd_Click);
|
||||||
//
|
//
|
||||||
// ButtonCancel
|
// ButtonCancel
|
||||||
//
|
//
|
||||||
@ -166,6 +170,7 @@
|
|||||||
this.ButtonCancel.TabIndex = 9;
|
this.ButtonCancel.TabIndex = 9;
|
||||||
this.ButtonCancel.Text = "Отмена";
|
this.ButtonCancel.Text = "Отмена";
|
||||||
this.ButtonCancel.UseVisualStyleBackColor = true;
|
this.ButtonCancel.UseVisualStyleBackColor = true;
|
||||||
|
this.ButtonCancel.Click += new System.EventHandler(this.ButtonCancel_Click);
|
||||||
//
|
//
|
||||||
// ButtonSave
|
// ButtonSave
|
||||||
//
|
//
|
||||||
@ -175,6 +180,7 @@
|
|||||||
this.ButtonSave.TabIndex = 8;
|
this.ButtonSave.TabIndex = 8;
|
||||||
this.ButtonSave.Text = "Сохранить";
|
this.ButtonSave.Text = "Сохранить";
|
||||||
this.ButtonSave.UseVisualStyleBackColor = true;
|
this.ButtonSave.UseVisualStyleBackColor = true;
|
||||||
|
this.ButtonSave.Click += new System.EventHandler(this.ButtonSave_Click);
|
||||||
//
|
//
|
||||||
// FormFurniture
|
// FormFurniture
|
||||||
//
|
//
|
||||||
|
@ -29,32 +29,21 @@
|
|||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.dataGridView = new System.Windows.Forms.DataGridView();
|
this.dataGridView = new System.Windows.Forms.DataGridView();
|
||||||
this.dataGridView1 = new System.Windows.Forms.DataGridView();
|
|
||||||
this.ButtonAdd = new System.Windows.Forms.Button();
|
this.ButtonAdd = new System.Windows.Forms.Button();
|
||||||
this.ButtonDel = new System.Windows.Forms.Button();
|
this.ButtonDel = new System.Windows.Forms.Button();
|
||||||
this.ButtonUpd = new System.Windows.Forms.Button();
|
this.ButtonUpd = new System.Windows.Forms.Button();
|
||||||
this.ButtonRef = new System.Windows.Forms.Button();
|
this.ButtonRef = new System.Windows.Forms.Button();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// dataGridView
|
// dataGridView
|
||||||
//
|
//
|
||||||
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
this.dataGridView.Location = new System.Drawing.Point(-2, 0);
|
this.dataGridView.Location = new System.Drawing.Point(-1, 1);
|
||||||
this.dataGridView.Name = "dataGridView";
|
this.dataGridView.Name = "dataGridView";
|
||||||
this.dataGridView.RowTemplate.Height = 25;
|
this.dataGridView.RowTemplate.Height = 25;
|
||||||
this.dataGridView.Size = new System.Drawing.Size(559, 453);
|
this.dataGridView.Size = new System.Drawing.Size(559, 453);
|
||||||
this.dataGridView.TabIndex = 0;
|
this.dataGridView.TabIndex = 5;
|
||||||
//
|
|
||||||
// dataGridView1
|
|
||||||
//
|
|
||||||
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
|
||||||
this.dataGridView1.Location = new System.Drawing.Point(-1, 1);
|
|
||||||
this.dataGridView1.Name = "dataGridView1";
|
|
||||||
this.dataGridView1.RowTemplate.Height = 25;
|
|
||||||
this.dataGridView1.Size = new System.Drawing.Size(559, 453);
|
|
||||||
this.dataGridView1.TabIndex = 5;
|
|
||||||
//
|
//
|
||||||
// ButtonAdd
|
// ButtonAdd
|
||||||
//
|
//
|
||||||
@ -102,23 +91,22 @@
|
|||||||
this.Controls.Add(this.ButtonUpd);
|
this.Controls.Add(this.ButtonUpd);
|
||||||
this.Controls.Add(this.ButtonDel);
|
this.Controls.Add(this.ButtonDel);
|
||||||
this.Controls.Add(this.ButtonAdd);
|
this.Controls.Add(this.ButtonAdd);
|
||||||
this.Controls.Add(this.dataGridView1);
|
this.Controls.Add(this.dataGridView);
|
||||||
this.Name = "FormFurnitures";
|
this.Name = "FormFurnitures";
|
||||||
this.Text = "FormFurnitures";
|
this.Text = "FormFurnitures";
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
|
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private DataGridView dataGridView;
|
|
||||||
|
|
||||||
private DataGridView dataGridView1;
|
private DataGridView dataGridView1;
|
||||||
private Button ButtonAdd;
|
private Button ButtonAdd;
|
||||||
private Button ButtonDel;
|
private Button ButtonDel;
|
||||||
private Button ButtonUpd;
|
private Button ButtonUpd;
|
||||||
private Button ButtonRef;
|
private Button ButtonRef;
|
||||||
|
private DataGridView dataGridView;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -40,8 +40,6 @@ namespace FurnitureAssembly
|
|||||||
dataGridView.Columns["Id"].Visible = false;
|
dataGridView.Columns["Id"].Visible = false;
|
||||||
dataGridView.Columns["FurnitureName"].AutoSizeMode =
|
dataGridView.Columns["FurnitureName"].AutoSizeMode =
|
||||||
DataGridViewAutoSizeColumnMode.Fill;
|
DataGridViewAutoSizeColumnMode.Fill;
|
||||||
dataGridView.Columns["FurnitureCount"].AutoSizeMode =
|
|
||||||
DataGridViewAutoSizeColumnMode.Fill;
|
|
||||||
}
|
}
|
||||||
_logger.LogInformation("Загрузка изделий");
|
_logger.LogInformation("Загрузка изделий");
|
||||||
}
|
}
|
||||||
|
@ -29,8 +29,22 @@ namespace FurnitureAssembly
|
|||||||
}
|
}
|
||||||
private void LoadData()
|
private void LoadData()
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var list = _orderLogic.ReadList(null);
|
||||||
|
if (list != null)
|
||||||
|
{
|
||||||
|
dataGridView.DataSource = list;
|
||||||
|
dataGridView.Columns["FurnitureId"].Visible = false;
|
||||||
|
}
|
||||||
_logger.LogInformation("Загрузка заказов");
|
_logger.LogInformation("Загрузка заказов");
|
||||||
// прописать логику
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Ошибка загрузки заказов");
|
||||||
|
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK,
|
||||||
|
MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private void КомпонентыToolStripMenuItem_Click(object sender, EventArgs e)
|
private void КомпонентыToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@ -44,7 +58,12 @@ namespace FurnitureAssembly
|
|||||||
|
|
||||||
private void ИзделияToolStripMenuItem_Click(object sender, EventArgs e)
|
private void ИзделияToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
// прописать логику
|
var service =
|
||||||
|
Program.ServiceProvider?.GetService(typeof(FormFurnitures));
|
||||||
|
if (service is FormFurnitures form)
|
||||||
|
{
|
||||||
|
form.ShowDialog();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonCreateOrder_Click(object sender, EventArgs e)
|
private void ButtonCreateOrder_Click(object sender, EventArgs e)
|
||||||
|
Loading…
Reference in New Issue
Block a user