Some changes

This commit is contained in:
Максим Сергунов 2023-05-17 17:40:36 +04:00
parent fa66a3def9
commit 6a9f1d014c
6 changed files with 683 additions and 774 deletions

View File

@ -28,81 +28,80 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.dataGridView = new System.Windows.Forms.DataGridView(); dataGridView = new DataGridView();
this.ButtonDelete = new System.Windows.Forms.Button(); ButtonDelete = new Button();
this.ButtonUpdate = new System.Windows.Forms.Button(); ButtonUpdate = new Button();
this.buttonAdd = new System.Windows.Forms.Button(); buttonAdd = new Button();
this.buttonUpd = new System.Windows.Forms.Button(); buttonUpd = new Button();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
this.SuspendLayout(); SuspendLayout();
// //
// dataGridView // dataGridView
// //
this.dataGridView.BackgroundColor = System.Drawing.SystemColors.Control; dataGridView.BackgroundColor = SystemColors.Control;
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView.Location = new System.Drawing.Point(12, 12); dataGridView.Location = new Point(12, 12);
this.dataGridView.Name = "dataGridView"; dataGridView.Name = "dataGridView";
this.dataGridView.RowHeadersWidth = 51; dataGridView.RowHeadersWidth = 51;
this.dataGridView.RowTemplate.Height = 29; dataGridView.RowTemplate.Height = 29;
this.dataGridView.Size = new System.Drawing.Size(461, 345); dataGridView.Size = new Size(461, 402);
this.dataGridView.TabIndex = 0; dataGridView.TabIndex = 0;
// //
// ButtonDelete // ButtonDelete
// //
this.ButtonDelete.Location = new System.Drawing.Point(493, 183); ButtonDelete.Location = new Point(493, 183);
this.ButtonDelete.Name = "ButtonDelete"; ButtonDelete.Name = "ButtonDelete";
this.ButtonDelete.Size = new System.Drawing.Size(115, 54); ButtonDelete.Size = new Size(115, 54);
this.ButtonDelete.TabIndex = 1; ButtonDelete.TabIndex = 1;
this.ButtonDelete.Text = "Удалить"; ButtonDelete.Text = "Удалить";
this.ButtonDelete.UseVisualStyleBackColor = true; ButtonDelete.UseVisualStyleBackColor = true;
this.ButtonDelete.Click += new System.EventHandler(this.ButtonDel_Click); ButtonDelete.Click += ButtonDel_Click;
// //
// ButtonUpdate // ButtonUpdate
// //
this.ButtonUpdate.Location = new System.Drawing.Point(493, 266); ButtonUpdate.Location = new Point(493, 266);
this.ButtonUpdate.Name = "ButtonUpdate"; ButtonUpdate.Name = "ButtonUpdate";
this.ButtonUpdate.Size = new System.Drawing.Size(115, 58); ButtonUpdate.Size = new Size(115, 58);
this.ButtonUpdate.TabIndex = 2; ButtonUpdate.TabIndex = 2;
this.ButtonUpdate.Text = "Обновить"; ButtonUpdate.Text = "Обновить";
this.ButtonUpdate.UseVisualStyleBackColor = true; ButtonUpdate.UseVisualStyleBackColor = true;
this.ButtonUpdate.Click += new System.EventHandler(this.ButtonRef_Click); ButtonUpdate.Click += ButtonRef_Click;
// //
// buttonAdd // buttonAdd
// //
this.buttonAdd.Location = new System.Drawing.Point(493, 33); buttonAdd.Location = new Point(493, 33);
this.buttonAdd.Name = "buttonAdd"; buttonAdd.Name = "buttonAdd";
this.buttonAdd.Size = new System.Drawing.Size(115, 52); buttonAdd.Size = new Size(115, 52);
this.buttonAdd.TabIndex = 3; buttonAdd.TabIndex = 3;
this.buttonAdd.Text = "Добавить"; buttonAdd.Text = "Добавить";
this.buttonAdd.UseVisualStyleBackColor = true; buttonAdd.UseVisualStyleBackColor = true;
this.buttonAdd.Click += new System.EventHandler(this.buttonAdd_Click); buttonAdd.Click += buttonAdd_Click;
// //
// buttonUpd // buttonUpd
// //
this.buttonUpd.Location = new System.Drawing.Point(493, 105); buttonUpd.Location = new Point(493, 105);
this.buttonUpd.Name = "buttonUpd"; buttonUpd.Name = "buttonUpd";
this.buttonUpd.Size = new System.Drawing.Size(115, 52); buttonUpd.Size = new Size(115, 52);
this.buttonUpd.TabIndex = 4; buttonUpd.TabIndex = 4;
this.buttonUpd.Text = "Изменить"; buttonUpd.Text = "Изменить";
this.buttonUpd.UseVisualStyleBackColor = true; buttonUpd.UseVisualStyleBackColor = true;
this.buttonUpd.Click += new System.EventHandler(this.ButtonUpd_Click); buttonUpd.Click += ButtonUpd_Click;
// //
// FormBooks // FormBooks
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); AutoScaleDimensions = new SizeF(8F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(620, 372); ClientSize = new Size(620, 426);
this.Controls.Add(this.buttonUpd); Controls.Add(buttonUpd);
this.Controls.Add(this.buttonAdd); Controls.Add(buttonAdd);
this.Controls.Add(this.ButtonUpdate); Controls.Add(ButtonUpdate);
this.Controls.Add(this.ButtonDelete); Controls.Add(ButtonDelete);
this.Controls.Add(this.dataGridView); Controls.Add(dataGridView);
this.Name = "FormBooks"; Name = "FormBooks";
this.Text = "Книги"; Text = "Книги";
this.Load += new System.EventHandler(this.FormBooks_Load); Load += FormBooks_Load;
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
this.ResumeLayout(false); ResumeLayout(false);
} }
#endregion #endregion

View File

@ -28,148 +28,141 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.menuStrip1 = new System.Windows.Forms.MenuStrip(); menuStrip1 = new MenuStrip();
this.справочникиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); справочникиToolStripMenuItem = new ToolStripMenuItem();
this.AuthorsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); AuthorsToolStripMenuItem = new ToolStripMenuItem();
this.BooksToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); BooksToolStripMenuItem = new ToolStripMenuItem();
this.ClientsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); ClientsToolStripMenuItem = new ToolStripMenuItem();
this.GenresToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); GenresToolStripMenuItem = new ToolStripMenuItem();
this.ComponentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); ComponentsToolStripMenuItem = new ToolStripMenuItem();
this.ComponentGiftsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); ComponentGiftsToolStripMenuItem = new ToolStripMenuItem();
this.OrdersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); OrdersToolStripMenuItem = new ToolStripMenuItem();
this.dataGridView = new System.Windows.Forms.DataGridView(); dataGridView = new DataGridView();
this.buttonCreateOrder = new System.Windows.Forms.Button(); buttonCreateOrder = new Button();
this.buttonRef = new System.Windows.Forms.Button(); buttonRef = new Button();
this.testsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); тестыToolStripMenuItem = new ToolStripMenuItem();
this.menuStrip1.SuspendLayout(); menuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
this.SuspendLayout(); SuspendLayout();
// //
// menuStrip1 // menuStrip1
// //
this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); menuStrip1.ImageScalingSize = new Size(20, 20);
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { menuStrip1.Items.AddRange(new ToolStripItem[] { справочникиToolStripMenuItem, тестыToolStripMenuItem });
this.справочникиToolStripMenuItem}); menuStrip1.Location = new Point(0, 0);
this.menuStrip1.Location = new System.Drawing.Point(0, 0); menuStrip1.Name = "menuStrip1";
this.menuStrip1.Name = "menuStrip1"; menuStrip1.Size = new Size(1367, 28);
this.menuStrip1.Size = new System.Drawing.Size(1367, 28); menuStrip1.TabIndex = 0;
this.menuStrip1.TabIndex = 0; menuStrip1.Text = "menuStrip1";
this.menuStrip1.Text = "menuStrip1";
// //
// справочникиToolStripMenuItem // справочникиToolStripMenuItem
// //
this.справочникиToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { справочникиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { AuthorsToolStripMenuItem, BooksToolStripMenuItem, ClientsToolStripMenuItem, GenresToolStripMenuItem });
this.AuthorsToolStripMenuItem, справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
this.BooksToolStripMenuItem, справочникиToolStripMenuItem.Size = new Size(117, 24);
this.ClientsToolStripMenuItem, справочникиToolStripMenuItem.Text = "Справочники";
this.GenresToolStripMenuItem,
this.testsToolStripMenuItem});
this.справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
this.справочникиToolStripMenuItem.Size = new System.Drawing.Size(117, 24);
this.справочникиToolStripMenuItem.Text = "Справочники";
// //
// AuthorsToolStripMenuItem // AuthorsToolStripMenuItem
// //
this.AuthorsToolStripMenuItem.Name = "AuthorsToolStripMenuItem"; AuthorsToolStripMenuItem.Name = "AuthorsToolStripMenuItem";
this.AuthorsToolStripMenuItem.Size = new System.Drawing.Size(224, 26); AuthorsToolStripMenuItem.Size = new Size(224, 26);
this.AuthorsToolStripMenuItem.Text = "Авторы"; AuthorsToolStripMenuItem.Text = "Авторы";
this.AuthorsToolStripMenuItem.Click += new System.EventHandler(this.AuthorsToolStripMenuItem_Click); AuthorsToolStripMenuItem.Click += AuthorsToolStripMenuItem_Click;
// //
// BooksToolStripMenuItem // BooksToolStripMenuItem
// //
this.BooksToolStripMenuItem.Name = "BooksToolStripMenuItem"; BooksToolStripMenuItem.Name = "BooksToolStripMenuItem";
this.BooksToolStripMenuItem.Size = new System.Drawing.Size(224, 26); BooksToolStripMenuItem.Size = new Size(224, 26);
this.BooksToolStripMenuItem.Text = "Книги"; BooksToolStripMenuItem.Text = "Книги";
this.BooksToolStripMenuItem.Click += new System.EventHandler(this.BooksToolStripMenuItem_Click); BooksToolStripMenuItem.Click += BooksToolStripMenuItem_Click;
// //
// ClientsToolStripMenuItem // ClientsToolStripMenuItem
// //
this.ClientsToolStripMenuItem.Name = "ClientsToolStripMenuItem"; ClientsToolStripMenuItem.Name = "ClientsToolStripMenuItem";
this.ClientsToolStripMenuItem.Size = new System.Drawing.Size(224, 26); ClientsToolStripMenuItem.Size = new Size(224, 26);
this.ClientsToolStripMenuItem.Text = "Клиенты"; ClientsToolStripMenuItem.Text = "Клиенты";
this.ClientsToolStripMenuItem.Click += new System.EventHandler(this.ClientsToolStripMenuItem_Click); ClientsToolStripMenuItem.Click += ClientsToolStripMenuItem_Click;
// //
// GenresToolStripMenuItem // GenresToolStripMenuItem
// //
this.GenresToolStripMenuItem.Name = "GenresToolStripMenuItem"; GenresToolStripMenuItem.Name = "GenresToolStripMenuItem";
this.GenresToolStripMenuItem.Size = new System.Drawing.Size(224, 26); GenresToolStripMenuItem.Size = new Size(224, 26);
this.GenresToolStripMenuItem.Text = "Жанры"; GenresToolStripMenuItem.Text = "Жанры";
this.GenresToolStripMenuItem.Click += new System.EventHandler(this.GenresToolStripMenuItem_Click); GenresToolStripMenuItem.Click += GenresToolStripMenuItem_Click;
// //
// ComponentsToolStripMenuItem // ComponentsToolStripMenuItem
// //
this.ComponentsToolStripMenuItem.Name = "ComponentsToolStripMenuItem"; ComponentsToolStripMenuItem.Name = "ComponentsToolStripMenuItem";
this.ComponentsToolStripMenuItem.Size = new System.Drawing.Size(276, 26); ComponentsToolStripMenuItem.Size = new Size(276, 26);
this.ComponentsToolStripMenuItem.Text = "Список компонентов"; ComponentsToolStripMenuItem.Text = "Список компонентов";
// //
// ComponentGiftsToolStripMenuItem // ComponentGiftsToolStripMenuItem
// //
this.ComponentGiftsToolStripMenuItem.Name = "ComponentGiftsToolStripMenuItem"; ComponentGiftsToolStripMenuItem.Name = "ComponentGiftsToolStripMenuItem";
this.ComponentGiftsToolStripMenuItem.Size = new System.Drawing.Size(276, 26); ComponentGiftsToolStripMenuItem.Size = new Size(276, 26);
this.ComponentGiftsToolStripMenuItem.Text = "Компоненты по изделиям"; ComponentGiftsToolStripMenuItem.Text = "Компоненты по изделиям";
// //
// OrdersToolStripMenuItem // OrdersToolStripMenuItem
// //
this.OrdersToolStripMenuItem.Name = "OrdersToolStripMenuItem"; OrdersToolStripMenuItem.Name = "OrdersToolStripMenuItem";
this.OrdersToolStripMenuItem.Size = new System.Drawing.Size(276, 26); OrdersToolStripMenuItem.Size = new Size(276, 26);
this.OrdersToolStripMenuItem.Text = "Список заказов"; OrdersToolStripMenuItem.Text = "Список заказов";
// //
// dataGridView // dataGridView
// //
this.dataGridView.BackgroundColor = System.Drawing.SystemColors.Control; dataGridView.BackgroundColor = SystemColors.Control;
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView.Location = new System.Drawing.Point(12, 41); dataGridView.Location = new Point(12, 41);
this.dataGridView.Name = "dataGridView"; dataGridView.Name = "dataGridView";
this.dataGridView.RowHeadersWidth = 51; dataGridView.RowHeadersWidth = 51;
this.dataGridView.RowTemplate.Height = 29; dataGridView.RowTemplate.Height = 29;
this.dataGridView.Size = new System.Drawing.Size(1123, 423); dataGridView.Size = new Size(1123, 423);
this.dataGridView.TabIndex = 1; dataGridView.TabIndex = 1;
// //
// buttonCreateOrder // buttonCreateOrder
// //
this.buttonCreateOrder.Location = new System.Drawing.Point(1155, 167); buttonCreateOrder.Location = new Point(1155, 167);
this.buttonCreateOrder.Name = "buttonCreateOrder"; buttonCreateOrder.Name = "buttonCreateOrder";
this.buttonCreateOrder.Size = new System.Drawing.Size(189, 78); buttonCreateOrder.Size = new Size(189, 78);
this.buttonCreateOrder.TabIndex = 2; buttonCreateOrder.TabIndex = 2;
this.buttonCreateOrder.Text = "Создать заказ"; buttonCreateOrder.Text = "Создать заказ";
this.buttonCreateOrder.UseVisualStyleBackColor = true; buttonCreateOrder.UseVisualStyleBackColor = true;
this.buttonCreateOrder.Click += new System.EventHandler(this.buttonCreateOrder_Click); buttonCreateOrder.Click += buttonCreateOrder_Click;
// //
// buttonRef // buttonRef
// //
this.buttonRef.Location = new System.Drawing.Point(1155, 304); buttonRef.Location = new Point(1155, 304);
this.buttonRef.Name = "buttonRef"; buttonRef.Name = "buttonRef";
this.buttonRef.Size = new System.Drawing.Size(189, 78); buttonRef.Size = new Size(189, 78);
this.buttonRef.TabIndex = 6; buttonRef.TabIndex = 6;
this.buttonRef.Text = "Обновить список"; buttonRef.Text = "Обновить список";
this.buttonRef.UseVisualStyleBackColor = true; buttonRef.UseVisualStyleBackColor = true;
// //
// testsToolStripMenuItem // тестыToolStripMenuItem
// //
this.testsToolStripMenuItem.Name = "testsToolStripMenuItem"; тестыToolStripMenuItem.Name = "тестыToolStripMenuItem";
this.testsToolStripMenuItem.Size = new System.Drawing.Size(224, 26); тестыToolStripMenuItem.Size = new Size(63, 24);
this.testsToolStripMenuItem.Text = "Тесты"; тестыToolStripMenuItem.Text = "Тесты";
this.testsToolStripMenuItem.Click += new System.EventHandler(this.testsToolStripMenuItem_Click); тестыToolStripMenuItem.Click += testsToolStripMenuItem_Click;
// //
// FormMain // FormMain
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); AutoScaleDimensions = new SizeF(8F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1367, 471); ClientSize = new Size(1367, 471);
this.Controls.Add(this.buttonRef); Controls.Add(buttonRef);
this.Controls.Add(this.buttonCreateOrder); Controls.Add(buttonCreateOrder);
this.Controls.Add(this.dataGridView); Controls.Add(dataGridView);
this.Controls.Add(this.menuStrip1); Controls.Add(menuStrip1);
this.MainMenuStrip = this.menuStrip1; MainMenuStrip = menuStrip1;
this.Name = "FormMain"; Name = "FormMain";
this.Text = "Книжный магазин"; Text = "Книжный магазин";
this.Load += new System.EventHandler(this.FormMain_Load); Load += FormMain_Load;
this.menuStrip1.ResumeLayout(false); menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout(); menuStrip1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
this.ResumeLayout(false); ResumeLayout(false);
this.PerformLayout(); PerformLayout();
} }
#endregion #endregion
@ -186,6 +179,6 @@
private ToolStripMenuItem OrdersToolStripMenuItem; private ToolStripMenuItem OrdersToolStripMenuItem;
private ToolStripMenuItem ClientsToolStripMenuItem; private ToolStripMenuItem ClientsToolStripMenuItem;
private ToolStripMenuItem GenresToolStripMenuItem; private ToolStripMenuItem GenresToolStripMenuItem;
private ToolStripMenuItem testsToolStripMenuItem; private ToolStripMenuItem тестыToolStripMenuItem;
} }
} }

View File

@ -28,193 +28,135 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.buttonInsertTest = new System.Windows.Forms.Button(); buttonInsertTest = new Button();
this.label1 = new System.Windows.Forms.Label(); label1 = new Label();
this.label2 = new System.Windows.Forms.Label(); label2 = new Label();
this.textBoxInsertTime = new System.Windows.Forms.TextBox(); textBoxInsertTime = new TextBox();
this.buttonReadTest = new System.Windows.Forms.Button(); buttonReadTest = new Button();
this.textBoxReadTime = new System.Windows.Forms.TextBox(); textBoxReadTime = new TextBox();
this.label3 = new System.Windows.Forms.Label(); label3 = new Label();
this.label4 = new System.Windows.Forms.Label(); label4 = new Label();
this.numericUpDownInsert = new System.Windows.Forms.NumericUpDown(); numericUpDownInsert = new NumericUpDown();
this.numericUpDownRead = new System.Windows.Forms.NumericUpDown(); numericUpDownRead = new NumericUpDown();
this.buttonJoinQuery = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)numericUpDownInsert).BeginInit();
this.numericUpDownJoin = new System.Windows.Forms.NumericUpDown(); ((System.ComponentModel.ISupportInitialize)numericUpDownRead).BeginInit();
this.textBoxJoin = new System.Windows.Forms.TextBox(); SuspendLayout();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownInsert)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownRead)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownJoin)).BeginInit();
this.SuspendLayout();
// //
// buttonInsertTest // buttonInsertTest
// //
this.buttonInsertTest.Location = new System.Drawing.Point(14, 16); buttonInsertTest.Location = new Point(6, 31);
this.buttonInsertTest.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); buttonInsertTest.Margin = new Padding(3, 4, 3, 4);
this.buttonInsertTest.Name = "buttonInsertTest"; buttonInsertTest.Name = "buttonInsertTest";
this.buttonInsertTest.Size = new System.Drawing.Size(98, 81); buttonInsertTest.Size = new Size(170, 45);
this.buttonInsertTest.TabIndex = 0; buttonInsertTest.TabIndex = 0;
this.buttonInsertTest.Text = "Тест вставки сообщений"; buttonInsertTest.Text = "Вставка данных";
this.buttonInsertTest.UseVisualStyleBackColor = true; buttonInsertTest.UseVisualStyleBackColor = true;
this.buttonInsertTest.Click += new System.EventHandler(this.buttonInsertTest_Click); buttonInsertTest.Click += buttonInsertTest_Click;
// //
// label1 // label1
// //
this.label1.AutoSize = true; label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(119, 16); label1.Location = new Point(190, 18);
this.label1.Name = "label1"; label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(197, 20); label1.Size = new Size(171, 20);
this.label1.TabIndex = 1; label1.TabIndex = 1;
this.label1.Text = "Введите кол-во элементов:"; label1.Text = "Количество элементов:";
// //
// label2 // label2
// //
this.label2.AutoSize = true; label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(119, 71); label2.Location = new Point(190, 68);
this.label2.Name = "label2"; label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(187, 20); label2.Size = new Size(57, 20);
this.label2.TabIndex = 3; label2.TabIndex = 3;
this.label2.Text = "Итоговое время запроса:"; label2.Text = "Время:";
// //
// textBoxInsertTime // textBoxInsertTime
// //
this.textBoxInsertTime.Location = new System.Drawing.Point(334, 68); textBoxInsertTime.Location = new Point(427, 68);
this.textBoxInsertTime.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); textBoxInsertTime.Margin = new Padding(3, 4, 3, 4);
this.textBoxInsertTime.Name = "textBoxInsertTime"; textBoxInsertTime.Name = "textBoxInsertTime";
this.textBoxInsertTime.ReadOnly = true; textBoxInsertTime.ReadOnly = true;
this.textBoxInsertTime.Size = new System.Drawing.Size(114, 27); textBoxInsertTime.Size = new Size(114, 27);
this.textBoxInsertTime.TabIndex = 4; textBoxInsertTime.TabIndex = 4;
// //
// buttonReadTest // buttonReadTest
// //
this.buttonReadTest.Location = new System.Drawing.Point(14, 141); buttonReadTest.Location = new Point(6, 152);
this.buttonReadTest.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); buttonReadTest.Margin = new Padding(3, 4, 3, 4);
this.buttonReadTest.Name = "buttonReadTest"; buttonReadTest.Name = "buttonReadTest";
this.buttonReadTest.Size = new System.Drawing.Size(98, 75); buttonReadTest.Size = new Size(170, 49);
this.buttonReadTest.TabIndex = 5; buttonReadTest.TabIndex = 5;
this.buttonReadTest.Text = "Тест чтения сообщений"; buttonReadTest.Text = "Чтение данных";
this.buttonReadTest.UseVisualStyleBackColor = true; buttonReadTest.UseVisualStyleBackColor = true;
this.buttonReadTest.Click += new System.EventHandler(this.buttonReadTest_Click); buttonReadTest.Click += buttonReadTest_Click;
// //
// textBoxReadTime // textBoxReadTime
// //
this.textBoxReadTime.Location = new System.Drawing.Point(334, 193); textBoxReadTime.Location = new Point(427, 189);
this.textBoxReadTime.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); textBoxReadTime.Margin = new Padding(3, 4, 3, 4);
this.textBoxReadTime.Name = "textBoxReadTime"; textBoxReadTime.Name = "textBoxReadTime";
this.textBoxReadTime.ReadOnly = true; textBoxReadTime.ReadOnly = true;
this.textBoxReadTime.Size = new System.Drawing.Size(114, 27); textBoxReadTime.Size = new Size(114, 27);
this.textBoxReadTime.TabIndex = 9; textBoxReadTime.TabIndex = 9;
// //
// label3 // label3
// //
this.label3.AutoSize = true; label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(119, 196); label3.Location = new Point(190, 192);
this.label3.Name = "label3"; label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(187, 20); label3.Size = new Size(57, 20);
this.label3.TabIndex = 8; label3.TabIndex = 8;
this.label3.Text = "Итоговое время запроса:"; label3.Text = "Время:";
// //
// label4 // label4
// //
this.label4.AutoSize = true; label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(119, 141); label4.Location = new Point(190, 136);
this.label4.Name = "label4"; label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(197, 20); label4.Size = new Size(171, 20);
this.label4.TabIndex = 6; label4.TabIndex = 6;
this.label4.Text = "Введите кол-во элементов:"; label4.Text = "Количество элементов:";
// //
// numericUpDownInsert // numericUpDownInsert
// //
this.numericUpDownInsert.Location = new System.Drawing.Point(334, 16); numericUpDownInsert.Location = new Point(427, 16);
this.numericUpDownInsert.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); numericUpDownInsert.Margin = new Padding(3, 4, 3, 4);
this.numericUpDownInsert.Name = "numericUpDownInsert"; numericUpDownInsert.Name = "numericUpDownInsert";
this.numericUpDownInsert.Size = new System.Drawing.Size(114, 27); numericUpDownInsert.Size = new Size(114, 27);
this.numericUpDownInsert.TabIndex = 10; numericUpDownInsert.TabIndex = 10;
// //
// numericUpDownRead // numericUpDownRead
// //
this.numericUpDownRead.Location = new System.Drawing.Point(334, 139); numericUpDownRead.Location = new Point(427, 134);
this.numericUpDownRead.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); numericUpDownRead.Margin = new Padding(3, 4, 3, 4);
this.numericUpDownRead.Name = "numericUpDownRead"; numericUpDownRead.Name = "numericUpDownRead";
this.numericUpDownRead.Size = new System.Drawing.Size(114, 27); numericUpDownRead.Size = new Size(114, 27);
this.numericUpDownRead.TabIndex = 11; numericUpDownRead.TabIndex = 11;
//
// buttonJoinQuery
//
this.buttonJoinQuery.Location = new System.Drawing.Point(14, 263);
this.buttonJoinQuery.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.buttonJoinQuery.Name = "buttonJoinQuery";
this.buttonJoinQuery.Size = new System.Drawing.Size(98, 99);
this.buttonJoinQuery.TabIndex = 12;
this.buttonJoinQuery.Text = "Тест сложного чтения (Join)";
this.buttonJoinQuery.UseVisualStyleBackColor = true;
this.buttonJoinQuery.Click += new System.EventHandler(this.buttonJoinQuery_Click);
//
// numericUpDownJoin
//
this.numericUpDownJoin.Location = new System.Drawing.Point(334, 256);
this.numericUpDownJoin.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.numericUpDownJoin.Name = "numericUpDownJoin";
this.numericUpDownJoin.Size = new System.Drawing.Size(114, 27);
this.numericUpDownJoin.TabIndex = 16;
//
// textBoxJoin
//
this.textBoxJoin.Location = new System.Drawing.Point(334, 314);
this.textBoxJoin.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.textBoxJoin.Name = "textBoxJoin";
this.textBoxJoin.ReadOnly = true;
this.textBoxJoin.Size = new System.Drawing.Size(114, 27);
this.textBoxJoin.TabIndex = 15;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(119, 317);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(187, 20);
this.label5.TabIndex = 14;
this.label5.Text = "Итоговое время запроса:";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(119, 263);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(197, 20);
this.label6.TabIndex = 13;
this.label6.Text = "Введите кол-во элементов:";
// //
// FormTests // FormTests
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); AutoScaleDimensions = new SizeF(8F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(553, 381); ClientSize = new Size(553, 246);
this.Controls.Add(this.numericUpDownJoin); Controls.Add(numericUpDownRead);
this.Controls.Add(this.textBoxJoin); Controls.Add(numericUpDownInsert);
this.Controls.Add(this.label5); Controls.Add(textBoxReadTime);
this.Controls.Add(this.label6); Controls.Add(label3);
this.Controls.Add(this.buttonJoinQuery); Controls.Add(label4);
this.Controls.Add(this.numericUpDownRead); Controls.Add(buttonReadTest);
this.Controls.Add(this.numericUpDownInsert); Controls.Add(textBoxInsertTime);
this.Controls.Add(this.textBoxReadTime); Controls.Add(label2);
this.Controls.Add(this.label3); Controls.Add(label1);
this.Controls.Add(this.label4); Controls.Add(buttonInsertTest);
this.Controls.Add(this.buttonReadTest); Margin = new Padding(3, 4, 3, 4);
this.Controls.Add(this.textBoxInsertTime); Name = "FormTests";
this.Controls.Add(this.label2); Text = "Тесты запросов к бд";
this.Controls.Add(this.label1); Load += FormTests_Load;
this.Controls.Add(this.buttonInsertTest); ((System.ComponentModel.ISupportInitialize)numericUpDownInsert).EndInit();
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); ((System.ComponentModel.ISupportInitialize)numericUpDownRead).EndInit();
this.Name = "FormTests"; ResumeLayout(false);
this.Text = "Тесты запросов к бд"; PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownInsert)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownRead)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownJoin)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
} }
#endregion #endregion

View File

@ -1,49 +1,32 @@
using BookShopContracts.BusinessLogicsContracts; using BookShopContracts.BusinessLogicsContracts;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BookShopView namespace BookShopView
{ {
public partial class FormTests : Form public partial class FormTests : Form
{ {
private readonly IBookLogic _bookLogic; private readonly IBookLogic _bookLogic;
//private readonly IUserLogic _userLogic; public FormTests(IBookLogic routeLogic)
//private readonly ITopicLogic _topicLogic;
public FormTests(IBookLogic routeLogic)//IUserLogic userLogic, ITopicLogic topicLogic, IMessageLogic messageLogic)
{ {
InitializeComponent(); InitializeComponent();
//_userLogic = userLogic;
//_topicLogic = topicLogic;
_bookLogic = routeLogic; _bookLogic = routeLogic;
numericUpDownInsert.Minimum = 0; numericUpDownInsert.Minimum = 0;
numericUpDownInsert.Maximum = 1000000; numericUpDownInsert.Maximum = 1000000;
numericUpDownRead.Minimum = 0; numericUpDownRead.Minimum = 0;
numericUpDownRead.Maximum = 1000000; numericUpDownRead.Maximum = 1000000;
numericUpDownJoin.Minimum = 0;
numericUpDownJoin.Maximum = 1000000;
} }
private void buttonInsertTest_Click(object sender, EventArgs e) private void buttonInsertTest_Click(object sender, EventArgs e)
{ {
//try try
//{ {
// var result = _messageLogic.TestInsertList(Convert.ToInt32(numericUpDownInsert.Value), var result = _bookLogic.TestInsertList(Convert.ToInt32(numericUpDownInsert.Value));
// _userLogic.ReadList(null) ?? new(),
// _topicLogic.ReadList(null) ?? new());
// textBoxInsertTime.Text = result; textBoxInsertTime.Text = result;
//} }
//catch (Exception ex) catch (Exception ex)
//{ {
// MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
//} }
} }
private void buttonReadTest_Click(object sender, EventArgs e) private void buttonReadTest_Click(object sender, EventArgs e)
@ -59,17 +42,9 @@ namespace BookShopView
} }
} }
private void buttonJoinQuery_Click(object sender, EventArgs e) private void FormTests_Load(object sender, EventArgs e)
{ {
//try
//{
// var result = _messageLogic.TestJoinReadList(Convert.ToInt32(numericUpDownJoin.Value));
// textBoxJoin.Text = result;
//}
//catch (Exception ex)
//{
// MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
//}
} }
} }
} }