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