Fixes
This commit is contained in:
parent
0fd7b8dc85
commit
a1de87096f
@ -193,7 +193,7 @@ orderStorage)
|
|||||||
|
|
||||||
model.Status = newStatus;
|
model.Status = newStatus;
|
||||||
|
|
||||||
if (model.Status == OrderStatus.Выдан)
|
if (model.Status == OrderStatus.Готов)
|
||||||
{
|
{
|
||||||
model.DateImplement = DateTime.Now;
|
model.DateImplement = DateTime.Now;
|
||||||
}
|
}
|
||||||
@ -201,6 +201,7 @@ orderStorage)
|
|||||||
{
|
{
|
||||||
model.DateImplement = element.DateImplement;
|
model.DateImplement = element.DateImplement;
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckModel(model, false);
|
CheckModel(model, false);
|
||||||
if (_orderStorage.Update(model) == null)
|
if (_orderStorage.Update(model) == null)
|
||||||
{
|
{
|
||||||
|
@ -95,7 +95,7 @@ namespace AircraftPlantBusinessLogic.BusinessLogics
|
|||||||
_logger.LogDebug("DoWork. Worker {Id} try get order {Order}", implementer.Id, order.Id);
|
_logger.LogDebug("DoWork. Worker {Id} try get order {Order}", implementer.Id, order.Id);
|
||||||
// пытаемся назначить заказ на исполнителя
|
// пытаемся назначить заказ на исполнителя
|
||||||
lock (orderLock)
|
lock (orderLock)
|
||||||
{
|
{
|
||||||
_orderLogic.TakeOrderInWork(new OrderBindingModel
|
_orderLogic.TakeOrderInWork(new OrderBindingModel
|
||||||
{
|
{
|
||||||
Id = order.Id,
|
Id = order.Id,
|
||||||
@ -106,7 +106,7 @@ namespace AircraftPlantBusinessLogic.BusinessLogics
|
|||||||
// делаем работу
|
// делаем работу
|
||||||
Thread.Sleep(implementer.WorkExperience * _rnd.Next(100, 1000) * order.Count);
|
Thread.Sleep(implementer.WorkExperience * _rnd.Next(100, 1000) * order.Count);
|
||||||
_logger.LogDebug("DoWork. Worker {Id} finish order {Order}", implementer.Id, order.Id);
|
_logger.LogDebug("DoWork. Worker {Id} finish order {Order}", implementer.Id, order.Id);
|
||||||
_orderLogic.FinishOrder(new OrderBindingModel
|
_orderLogic.DeliveryOrder(new OrderBindingModel
|
||||||
{
|
{
|
||||||
Id = order.Id
|
Id = order.Id
|
||||||
});
|
});
|
||||||
@ -156,7 +156,7 @@ namespace AircraftPlantBusinessLogic.BusinessLogics
|
|||||||
// доделываем работу
|
// доделываем работу
|
||||||
Thread.Sleep(implementer.WorkExperience * _rnd.Next(100, 300) * runOrder.Count);
|
Thread.Sleep(implementer.WorkExperience * _rnd.Next(100, 300) * runOrder.Count);
|
||||||
_logger.LogDebug("DoWork. Worker {Id} finish order {Order}", implementer.Id, runOrder.Id);
|
_logger.LogDebug("DoWork. Worker {Id} finish order {Order}", implementer.Id, runOrder.Id);
|
||||||
_orderLogic.FinishOrder(new OrderBindingModel
|
_orderLogic.DeliveryOrder(new OrderBindingModel
|
||||||
{
|
{
|
||||||
Id = runOrder.Id
|
Id = runOrder.Id
|
||||||
});
|
});
|
||||||
|
@ -20,139 +20,139 @@
|
|||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required method for Designer support - do not modify
|
/// Required method for Designer support - do not modify
|
||||||
/// the contents of this method with the code editor.
|
/// the contents of this method with the code editor.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
textBoxImplementerFIO = new TextBox();
|
textBoxImplementerFIO = new TextBox();
|
||||||
textBoxPassword = new TextBox();
|
textBoxPassword = new TextBox();
|
||||||
numericUpDownWorkExperience = new NumericUpDown();
|
numericUpDownWorkExperience = new NumericUpDown();
|
||||||
numericUpDownQualification = new NumericUpDown();
|
numericUpDownQualification = new NumericUpDown();
|
||||||
buttonCancel = new Button();
|
buttonCancel = new Button();
|
||||||
labelImplementerFIO = new Label();
|
labelImplementerFIO = new Label();
|
||||||
labelPassword = new Label();
|
labelPassword = new Label();
|
||||||
labelWorkExperience = new Label();
|
labelWorkExperience = new Label();
|
||||||
labelQualification = new Label();
|
labelQualification = new Label();
|
||||||
buttonSave = new Button();
|
buttonSave = new Button();
|
||||||
((System.ComponentModel.ISupportInitialize)numericUpDownWorkExperience).BeginInit();
|
((System.ComponentModel.ISupportInitialize)numericUpDownWorkExperience).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)numericUpDownQualification).BeginInit();
|
((System.ComponentModel.ISupportInitialize)numericUpDownQualification).BeginInit();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// textBoxImplementerFIO
|
// textBoxImplementerFIO
|
||||||
//
|
//
|
||||||
textBoxImplementerFIO.Location = new Point(108, 12);
|
textBoxImplementerFIO.Location = new Point(108, 12);
|
||||||
textBoxImplementerFIO.Name = "textBoxImplementerFIO";
|
textBoxImplementerFIO.Name = "textBoxImplementerFIO";
|
||||||
textBoxImplementerFIO.Size = new Size(264, 23);
|
textBoxImplementerFIO.Size = new Size(264, 23);
|
||||||
textBoxImplementerFIO.TabIndex = 0;
|
textBoxImplementerFIO.TabIndex = 0;
|
||||||
//
|
//
|
||||||
// textBoxPassword
|
// textBoxPassword
|
||||||
//
|
//
|
||||||
textBoxPassword.Location = new Point(108, 41);
|
textBoxPassword.Location = new Point(108, 41);
|
||||||
textBoxPassword.Name = "textBoxPassword";
|
textBoxPassword.Name = "textBoxPassword";
|
||||||
textBoxPassword.Size = new Size(264, 23);
|
textBoxPassword.Size = new Size(264, 23);
|
||||||
textBoxPassword.TabIndex = 1;
|
textBoxPassword.TabIndex = 1;
|
||||||
//
|
//
|
||||||
// numericUpDownWorkExperience
|
// numericUpDownWorkExperience
|
||||||
//
|
//
|
||||||
numericUpDownWorkExperience.Location = new Point(108, 70);
|
numericUpDownWorkExperience.Location = new Point(108, 70);
|
||||||
numericUpDownWorkExperience.Name = "numericUpDownWorkExperience";
|
numericUpDownWorkExperience.Name = "numericUpDownWorkExperience";
|
||||||
numericUpDownWorkExperience.Size = new Size(264, 23);
|
numericUpDownWorkExperience.Size = new Size(264, 23);
|
||||||
numericUpDownWorkExperience.TabIndex = 2;
|
numericUpDownWorkExperience.TabIndex = 2;
|
||||||
//
|
//
|
||||||
// numericUpDownQualification
|
// numericUpDownQualification
|
||||||
//
|
//
|
||||||
numericUpDownQualification.Location = new Point(108, 99);
|
numericUpDownQualification.Location = new Point(108, 99);
|
||||||
numericUpDownQualification.Name = "numericUpDownQualification";
|
numericUpDownQualification.Name = "numericUpDownQualification";
|
||||||
numericUpDownQualification.Size = new Size(264, 23);
|
numericUpDownQualification.Size = new Size(264, 23);
|
||||||
numericUpDownQualification.TabIndex = 3;
|
numericUpDownQualification.TabIndex = 3;
|
||||||
//
|
//
|
||||||
// buttonCancel
|
// buttonCancel
|
||||||
//
|
//
|
||||||
buttonCancel.Location = new Point(297, 134);
|
buttonCancel.Location = new Point(297, 134);
|
||||||
buttonCancel.Name = "buttonCancel";
|
buttonCancel.Name = "buttonCancel";
|
||||||
buttonCancel.Size = new Size(75, 23);
|
buttonCancel.Size = new Size(75, 23);
|
||||||
buttonCancel.TabIndex = 4;
|
buttonCancel.TabIndex = 4;
|
||||||
buttonCancel.Text = "Отмена";
|
buttonCancel.Text = "Отмена";
|
||||||
buttonCancel.UseVisualStyleBackColor = true;
|
buttonCancel.UseVisualStyleBackColor = true;
|
||||||
buttonCancel.Click += buttonCancel_Click;
|
buttonCancel.Click += buttonCancel_Click;
|
||||||
//
|
//
|
||||||
// labelImplementerFIO
|
// labelImplementerFIO
|
||||||
//
|
//
|
||||||
labelImplementerFIO.AutoSize = true;
|
labelImplementerFIO.AutoSize = true;
|
||||||
labelImplementerFIO.Location = new Point(12, 15);
|
labelImplementerFIO.Location = new Point(12, 15);
|
||||||
labelImplementerFIO.Name = "labelImplementerFIO";
|
labelImplementerFIO.Name = "labelImplementerFIO";
|
||||||
labelImplementerFIO.Size = new Size(37, 15);
|
labelImplementerFIO.Size = new Size(37, 15);
|
||||||
labelImplementerFIO.TabIndex = 5;
|
labelImplementerFIO.TabIndex = 5;
|
||||||
labelImplementerFIO.Text = "ФИО:";
|
labelImplementerFIO.Text = "ФИО:";
|
||||||
//
|
//
|
||||||
// labelPassword
|
// labelPassword
|
||||||
//
|
//
|
||||||
labelPassword.AutoSize = true;
|
labelPassword.AutoSize = true;
|
||||||
labelPassword.Location = new Point(11, 44);
|
labelPassword.Location = new Point(11, 44);
|
||||||
labelPassword.Name = "labelPassword";
|
labelPassword.Name = "labelPassword";
|
||||||
labelPassword.Size = new Size(52, 15);
|
labelPassword.Size = new Size(52, 15);
|
||||||
labelPassword.TabIndex = 6;
|
labelPassword.TabIndex = 6;
|
||||||
labelPassword.Text = "Пароль:";
|
labelPassword.Text = "Пароль:";
|
||||||
//
|
//
|
||||||
// labelWorkExperience
|
// labelWorkExperience
|
||||||
//
|
//
|
||||||
labelWorkExperience.AutoSize = true;
|
labelWorkExperience.AutoSize = true;
|
||||||
labelWorkExperience.Location = new Point(12, 72);
|
labelWorkExperience.Location = new Point(12, 72);
|
||||||
labelWorkExperience.Name = "labelWorkExperience";
|
labelWorkExperience.Name = "labelWorkExperience";
|
||||||
labelWorkExperience.Size = new Size(38, 15);
|
labelWorkExperience.Size = new Size(84, 15);
|
||||||
labelWorkExperience.TabIndex = 7;
|
labelWorkExperience.TabIndex = 7;
|
||||||
labelWorkExperience.Text = "label1";
|
labelWorkExperience.Text = "Опыт работы:";
|
||||||
//
|
//
|
||||||
// labelQualification
|
// labelQualification
|
||||||
//
|
//
|
||||||
labelQualification.AutoSize = true;
|
labelQualification.AutoSize = true;
|
||||||
labelQualification.Location = new Point(11, 101);
|
labelQualification.Location = new Point(11, 101);
|
||||||
labelQualification.Name = "labelQualification";
|
labelQualification.Name = "labelQualification";
|
||||||
labelQualification.Size = new Size(91, 15);
|
labelQualification.Size = new Size(91, 15);
|
||||||
labelQualification.TabIndex = 8;
|
labelQualification.TabIndex = 8;
|
||||||
labelQualification.Text = "Квалификация:";
|
labelQualification.Text = "Квалификация:";
|
||||||
//
|
//
|
||||||
// buttonSave
|
// buttonSave
|
||||||
//
|
//
|
||||||
buttonSave.Location = new Point(216, 134);
|
buttonSave.Location = new Point(216, 134);
|
||||||
buttonSave.Name = "buttonSave";
|
buttonSave.Name = "buttonSave";
|
||||||
buttonSave.Size = new Size(75, 23);
|
buttonSave.Size = new Size(75, 23);
|
||||||
buttonSave.TabIndex = 9;
|
buttonSave.TabIndex = 9;
|
||||||
buttonSave.Text = "Сохранить";
|
buttonSave.Text = "Сохранить";
|
||||||
buttonSave.UseVisualStyleBackColor = true;
|
buttonSave.UseVisualStyleBackColor = true;
|
||||||
buttonSave.Click += buttonSave_Click;
|
buttonSave.Click += buttonSave_Click;
|
||||||
//
|
//
|
||||||
// FormImplementer
|
// FormImplementer
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
AutoScaleMode = AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
ClientSize = new Size(384, 169);
|
ClientSize = new Size(384, 169);
|
||||||
Controls.Add(buttonSave);
|
Controls.Add(buttonSave);
|
||||||
Controls.Add(labelQualification);
|
Controls.Add(labelQualification);
|
||||||
Controls.Add(labelWorkExperience);
|
Controls.Add(labelWorkExperience);
|
||||||
Controls.Add(labelPassword);
|
Controls.Add(labelPassword);
|
||||||
Controls.Add(labelImplementerFIO);
|
Controls.Add(labelImplementerFIO);
|
||||||
Controls.Add(buttonCancel);
|
Controls.Add(buttonCancel);
|
||||||
Controls.Add(numericUpDownQualification);
|
Controls.Add(numericUpDownQualification);
|
||||||
Controls.Add(numericUpDownWorkExperience);
|
Controls.Add(numericUpDownWorkExperience);
|
||||||
Controls.Add(textBoxPassword);
|
Controls.Add(textBoxPassword);
|
||||||
Controls.Add(textBoxImplementerFIO);
|
Controls.Add(textBoxImplementerFIO);
|
||||||
Name = "FormImplementer";
|
Name = "FormImplementer";
|
||||||
Text = "Исполнитель";
|
Text = "Исполнитель";
|
||||||
Load += FormImplementer_Load;
|
Load += FormImplementer_Load;
|
||||||
((System.ComponentModel.ISupportInitialize)numericUpDownWorkExperience).EndInit();
|
((System.ComponentModel.ISupportInitialize)numericUpDownWorkExperience).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)numericUpDownQualification).EndInit();
|
((System.ComponentModel.ISupportInitialize)numericUpDownQualification).EndInit();
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
PerformLayout();
|
PerformLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private TextBox textBoxImplementerFIO;
|
private TextBox textBoxImplementerFIO;
|
||||||
private TextBox textBoxPassword;
|
private TextBox textBoxPassword;
|
||||||
private NumericUpDown numericUpDownWorkExperience;
|
private NumericUpDown numericUpDownWorkExperience;
|
||||||
private NumericUpDown numericUpDownQualification;
|
private NumericUpDown numericUpDownQualification;
|
||||||
|
Loading…
Reference in New Issue
Block a user