materials fix + order rework
This commit is contained in:
parent
acdf703e9b
commit
0c8b33903b
@ -11,11 +11,13 @@ namespace ProjectPublishing.Entities
|
|||||||
{
|
{
|
||||||
public int Id { get; private set; }
|
public int Id { get; private set; }
|
||||||
|
|
||||||
|
public string Name { get; private set; }
|
||||||
|
|
||||||
public MaterialType MaterialType { get; private set; }
|
public MaterialType MaterialType { get; private set; }
|
||||||
|
|
||||||
public static Material CreateMaterial(int id, MaterialType materialType)
|
public static Material CreateMaterial(int id, string name, MaterialType materialType)
|
||||||
{
|
{
|
||||||
return new Material { Id = id, MaterialType = materialType };
|
return new Material { Id = id, Name = name, MaterialType = materialType };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,11 +24,11 @@ namespace ProjectPublishing.Entities
|
|||||||
|
|
||||||
public int PrintingId { get; private set; }
|
public int PrintingId { get; private set; }
|
||||||
|
|
||||||
public int MaterialsId { get; private set; }
|
public List<Material> Materials { get; private set; }
|
||||||
|
|
||||||
public static Order CreateOrder(int id, string description, ProductType productType, int amount, OrderStatus status, int customerId, int printingId, int materialsId)
|
public static Order CreateOrder(int id, string description, ProductType productType, int amount, OrderStatus status, int customerId, int printingId, List<Material> materials)
|
||||||
{
|
{
|
||||||
return new Order { ProductType = productType, Id = id, Amount = amount, Status = status, CustomerId = customerId, PrintingId = printingId, MaterialsId = materialsId, OrderDate = DateTime.Now, Description = description ?? string.Empty };
|
return new Order { ProductType = productType, Id = id, Amount = amount, Status = status, CustomerId = customerId, PrintingId = printingId, Materials = materials, OrderDate = DateTime.Now, Description = description ?? string.Empty };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,12 +32,12 @@
|
|||||||
справочникиToolStripMenuItem = new ToolStripMenuItem();
|
справочникиToolStripMenuItem = new ToolStripMenuItem();
|
||||||
покупательToolStripMenuItem = new ToolStripMenuItem();
|
покупательToolStripMenuItem = new ToolStripMenuItem();
|
||||||
контактнаяПерсонаToolStripMenuItem = new ToolStripMenuItem();
|
контактнаяПерсонаToolStripMenuItem = new ToolStripMenuItem();
|
||||||
заказToolStripMenuItem = new ToolStripMenuItem();
|
|
||||||
материалыToolStripMenuItem = new ToolStripMenuItem();
|
материалыToolStripMenuItem = new ToolStripMenuItem();
|
||||||
типографияToolStripMenuItem = new ToolStripMenuItem();
|
типографияToolStripMenuItem = new ToolStripMenuItem();
|
||||||
операцииToolStripMenuItem = new ToolStripMenuItem();
|
операцииToolStripMenuItem = new ToolStripMenuItem();
|
||||||
получениеМатериаловToolStripMenuItem = new ToolStripMenuItem();
|
получениеМатериаловToolStripMenuItem = new ToolStripMenuItem();
|
||||||
отчетыToolStripMenuItem = new ToolStripMenuItem();
|
отчетыToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
заказToolStripMenuItem = new ToolStripMenuItem();
|
||||||
menuStrip1.SuspendLayout();
|
menuStrip1.SuspendLayout();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
@ -53,7 +53,7 @@
|
|||||||
//
|
//
|
||||||
// справочникиToolStripMenuItem
|
// справочникиToolStripMenuItem
|
||||||
//
|
//
|
||||||
справочникиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { покупательToolStripMenuItem, контактнаяПерсонаToolStripMenuItem, заказToolStripMenuItem, материалыToolStripMenuItem, типографияToolStripMenuItem });
|
справочникиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { покупательToolStripMenuItem, контактнаяПерсонаToolStripMenuItem, материалыToolStripMenuItem, типографияToolStripMenuItem });
|
||||||
справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
|
справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
|
||||||
справочникиToolStripMenuItem.Size = new Size(117, 24);
|
справочникиToolStripMenuItem.Size = new Size(117, 24);
|
||||||
справочникиToolStripMenuItem.Text = "Справочники";
|
справочникиToolStripMenuItem.Text = "Справочники";
|
||||||
@ -72,13 +72,6 @@
|
|||||||
контактнаяПерсонаToolStripMenuItem.Text = "Контактная персона";
|
контактнаяПерсонаToolStripMenuItem.Text = "Контактная персона";
|
||||||
контактнаяПерсонаToolStripMenuItem.Click += контактнаяПерсонаToolStripMenuItem_Click;
|
контактнаяПерсонаToolStripMenuItem.Click += контактнаяПерсонаToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// заказToolStripMenuItem
|
|
||||||
//
|
|
||||||
заказToolStripMenuItem.Name = "заказToolStripMenuItem";
|
|
||||||
заказToolStripMenuItem.Size = new Size(234, 26);
|
|
||||||
заказToolStripMenuItem.Text = "Заказ";
|
|
||||||
заказToolStripMenuItem.Click += заказToolStripMenuItem_Click;
|
|
||||||
//
|
|
||||||
// материалыToolStripMenuItem
|
// материалыToolStripMenuItem
|
||||||
//
|
//
|
||||||
материалыToolStripMenuItem.Name = "материалыToolStripMenuItem";
|
материалыToolStripMenuItem.Name = "материалыToolStripMenuItem";
|
||||||
@ -95,7 +88,7 @@
|
|||||||
//
|
//
|
||||||
// операцииToolStripMenuItem
|
// операцииToolStripMenuItem
|
||||||
//
|
//
|
||||||
операцииToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { получениеМатериаловToolStripMenuItem });
|
операцииToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { получениеМатериаловToolStripMenuItem, заказToolStripMenuItem });
|
||||||
операцииToolStripMenuItem.Name = "операцииToolStripMenuItem";
|
операцииToolStripMenuItem.Name = "операцииToolStripMenuItem";
|
||||||
операцииToolStripMenuItem.Size = new Size(95, 24);
|
операцииToolStripMenuItem.Size = new Size(95, 24);
|
||||||
операцииToolStripMenuItem.Text = "Операции";
|
операцииToolStripMenuItem.Text = "Операции";
|
||||||
@ -113,6 +106,13 @@
|
|||||||
отчетыToolStripMenuItem.Size = new Size(73, 24);
|
отчетыToolStripMenuItem.Size = new Size(73, 24);
|
||||||
отчетыToolStripMenuItem.Text = "Отчеты";
|
отчетыToolStripMenuItem.Text = "Отчеты";
|
||||||
//
|
//
|
||||||
|
// заказToolStripMenuItem
|
||||||
|
//
|
||||||
|
заказToolStripMenuItem.Name = "заказToolStripMenuItem";
|
||||||
|
заказToolStripMenuItem.Size = new Size(257, 26);
|
||||||
|
заказToolStripMenuItem.Text = "Заказ";
|
||||||
|
заказToolStripMenuItem.Click += заказToolStripMenuItem_Click;
|
||||||
|
//
|
||||||
// FormPublishing
|
// FormPublishing
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||||
@ -134,11 +134,11 @@
|
|||||||
private ToolStripMenuItem справочникиToolStripMenuItem;
|
private ToolStripMenuItem справочникиToolStripMenuItem;
|
||||||
private ToolStripMenuItem покупательToolStripMenuItem;
|
private ToolStripMenuItem покупательToolStripMenuItem;
|
||||||
private ToolStripMenuItem контактнаяПерсонаToolStripMenuItem;
|
private ToolStripMenuItem контактнаяПерсонаToolStripMenuItem;
|
||||||
private ToolStripMenuItem заказToolStripMenuItem;
|
|
||||||
private ToolStripMenuItem материалыToolStripMenuItem;
|
private ToolStripMenuItem материалыToolStripMenuItem;
|
||||||
private ToolStripMenuItem типографияToolStripMenuItem;
|
private ToolStripMenuItem типографияToolStripMenuItem;
|
||||||
private ToolStripMenuItem операцииToolStripMenuItem;
|
private ToolStripMenuItem операцииToolStripMenuItem;
|
||||||
private ToolStripMenuItem получениеМатериаловToolStripMenuItem;
|
private ToolStripMenuItem получениеМатериаловToolStripMenuItem;
|
||||||
private ToolStripMenuItem отчетыToolStripMenuItem;
|
private ToolStripMenuItem отчетыToolStripMenuItem;
|
||||||
|
private ToolStripMenuItem заказToolStripMenuItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,6 +75,7 @@
|
|||||||
buttonRemove.Size = new Size(115, 115);
|
buttonRemove.Size = new Size(115, 115);
|
||||||
buttonRemove.TabIndex = 2;
|
buttonRemove.TabIndex = 2;
|
||||||
buttonRemove.UseVisualStyleBackColor = true;
|
buttonRemove.UseVisualStyleBackColor = true;
|
||||||
|
buttonRemove.Click += buttonRemove_Click;
|
||||||
//
|
//
|
||||||
// buttonEdit
|
// buttonEdit
|
||||||
//
|
//
|
||||||
@ -85,6 +86,7 @@
|
|||||||
buttonEdit.Size = new Size(115, 115);
|
buttonEdit.Size = new Size(115, 115);
|
||||||
buttonEdit.TabIndex = 1;
|
buttonEdit.TabIndex = 1;
|
||||||
buttonEdit.UseVisualStyleBackColor = true;
|
buttonEdit.UseVisualStyleBackColor = true;
|
||||||
|
buttonEdit.Click += buttonEdit_Click;
|
||||||
//
|
//
|
||||||
// buttonAdd
|
// buttonAdd
|
||||||
//
|
//
|
||||||
@ -95,6 +97,7 @@
|
|||||||
buttonAdd.Size = new Size(115, 115);
|
buttonAdd.Size = new Size(115, 115);
|
||||||
buttonAdd.TabIndex = 0;
|
buttonAdd.TabIndex = 0;
|
||||||
buttonAdd.UseVisualStyleBackColor = true;
|
buttonAdd.UseVisualStyleBackColor = true;
|
||||||
|
buttonAdd.Click += buttonAdd_Click;
|
||||||
//
|
//
|
||||||
// FormContactPeople
|
// FormContactPeople
|
||||||
//
|
//
|
||||||
|
@ -170,7 +170,7 @@
|
|||||||
<data name="buttonEdit.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="buttonEdit.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||||
vQAADr0BR/uQrQAAA9dJREFUeF7tnS2QE0EQRuOQSCQSiUSeRCKRSCTy5LmTSOTJk0gkEolEIpHIs9Af
|
vAAADrwBlbxySQAAA9dJREFUeF7tnS2QE0EQRuOQSCQSiUSeRCKRSCTy5LmTSOTJk0gkEolEIpHIs9Af
|
||||||
VV0V0eSS7fnpSd6regJzlZrvY7IzO5vdAQAAAAAAAAAAAAAAAABAkivzxvxq/jL/mN/Ne/PafGrCGfLE
|
VV0V0eSS7fnpSd6regJzlZrvY7IzO5vdAQAAAAAAAAAAAAAAAABAkivzxvxq/jL/mN/Ne/PafGrCGfLE
|
||||||
vDUV+CFVitcmnBGvzB9mFPj/vDNVGlgc/W9+MKOQH/OLSQkWJhO+SwkWpUX4LiVYjJbhu5RgEXqE71KC
|
vDUV+CFVitcmnBGvzB9mFPj/vDNVGlgc/W9+MKOQH/OLSQkWJhO+SwkWpUX4LiVYjJbhu5RgEXqE71KC
|
||||||
4vQM36UERRkRvksJijEyfJcSFGFG+C4lmIz29WeF71KCiejGjW7kRMGM9JMJk6hSAs1GMIkKJfhp8lUw
|
4vQM36UERRkRvksJijEyfJcSFGFG+C4lmIz29WeF71KCiejGjW7kRMGM9JMJk6hSAs1GMIkKJfhp8lUw
|
||||||
|
@ -32,11 +32,13 @@
|
|||||||
buttonSave = new Button();
|
buttonSave = new Button();
|
||||||
label2 = new Label();
|
label2 = new Label();
|
||||||
comboBoxMaterialType = new ComboBox();
|
comboBoxMaterialType = new ComboBox();
|
||||||
|
label1 = new Label();
|
||||||
|
textBoxName = new TextBox();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// buttonCancel
|
// buttonCancel
|
||||||
//
|
//
|
||||||
buttonCancel.Location = new Point(195, 74);
|
buttonCancel.Location = new Point(202, 122);
|
||||||
buttonCancel.Name = "buttonCancel";
|
buttonCancel.Name = "buttonCancel";
|
||||||
buttonCancel.Size = new Size(94, 29);
|
buttonCancel.Size = new Size(94, 29);
|
||||||
buttonCancel.TabIndex = 13;
|
buttonCancel.TabIndex = 13;
|
||||||
@ -46,7 +48,7 @@
|
|||||||
//
|
//
|
||||||
// buttonSave
|
// buttonSave
|
||||||
//
|
//
|
||||||
buttonSave.Location = new Point(12, 74);
|
buttonSave.Location = new Point(19, 122);
|
||||||
buttonSave.Name = "buttonSave";
|
buttonSave.Name = "buttonSave";
|
||||||
buttonSave.Size = new Size(94, 29);
|
buttonSave.Size = new Size(94, 29);
|
||||||
buttonSave.TabIndex = 12;
|
buttonSave.TabIndex = 12;
|
||||||
@ -57,7 +59,7 @@
|
|||||||
// label2
|
// label2
|
||||||
//
|
//
|
||||||
label2.AutoSize = true;
|
label2.AutoSize = true;
|
||||||
label2.Location = new Point(12, 15);
|
label2.Location = new Point(19, 63);
|
||||||
label2.Name = "label2";
|
label2.Name = "label2";
|
||||||
label2.Size = new Size(114, 20);
|
label2.Size = new Size(114, 20);
|
||||||
label2.TabIndex = 9;
|
label2.TabIndex = 9;
|
||||||
@ -67,16 +69,34 @@
|
|||||||
//
|
//
|
||||||
comboBoxMaterialType.DropDownStyle = ComboBoxStyle.DropDownList;
|
comboBoxMaterialType.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||||
comboBoxMaterialType.FormattingEnabled = true;
|
comboBoxMaterialType.FormattingEnabled = true;
|
||||||
comboBoxMaterialType.Location = new Point(138, 12);
|
comboBoxMaterialType.Location = new Point(145, 60);
|
||||||
comboBoxMaterialType.Name = "comboBoxMaterialType";
|
comboBoxMaterialType.Name = "comboBoxMaterialType";
|
||||||
comboBoxMaterialType.Size = new Size(151, 28);
|
comboBoxMaterialType.Size = new Size(151, 28);
|
||||||
comboBoxMaterialType.TabIndex = 14;
|
comboBoxMaterialType.TabIndex = 14;
|
||||||
//
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
label1.AutoSize = true;
|
||||||
|
label1.Location = new Point(19, 18);
|
||||||
|
label1.Name = "label1";
|
||||||
|
label1.Size = new Size(114, 20);
|
||||||
|
label1.TabIndex = 15;
|
||||||
|
label1.Text = "Тип материала";
|
||||||
|
//
|
||||||
|
// textBoxName
|
||||||
|
//
|
||||||
|
textBoxName.Location = new Point(145, 15);
|
||||||
|
textBoxName.Name = "textBoxName";
|
||||||
|
textBoxName.Size = new Size(151, 27);
|
||||||
|
textBoxName.TabIndex = 16;
|
||||||
|
//
|
||||||
// FormMaterial
|
// FormMaterial
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||||
AutoScaleMode = AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
ClientSize = new Size(301, 124);
|
ClientSize = new Size(308, 161);
|
||||||
|
Controls.Add(textBoxName);
|
||||||
|
Controls.Add(label1);
|
||||||
Controls.Add(comboBoxMaterialType);
|
Controls.Add(comboBoxMaterialType);
|
||||||
Controls.Add(buttonCancel);
|
Controls.Add(buttonCancel);
|
||||||
Controls.Add(buttonSave);
|
Controls.Add(buttonSave);
|
||||||
@ -93,5 +113,7 @@
|
|||||||
private Button buttonSave;
|
private Button buttonSave;
|
||||||
private Label label2;
|
private Label label2;
|
||||||
private ComboBox comboBoxMaterialType;
|
private ComboBox comboBoxMaterialType;
|
||||||
|
private Label label1;
|
||||||
|
private TextBox textBoxName;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -30,6 +30,7 @@ namespace ProjectPublishing.Forms
|
|||||||
{
|
{
|
||||||
throw new InvalidDataException(nameof(material));
|
throw new InvalidDataException(nameof(material));
|
||||||
}
|
}
|
||||||
|
textBoxName.Text = material.Name;
|
||||||
comboBoxMaterialType.SelectedItem = material.MaterialType;
|
comboBoxMaterialType.SelectedItem = material.MaterialType;
|
||||||
_materialId = value;
|
_materialId = value;
|
||||||
}
|
}
|
||||||
@ -52,7 +53,10 @@ namespace ProjectPublishing.Forms
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(textBoxName.Text))
|
||||||
|
{
|
||||||
|
throw new Exception("Имеются незаполненные поля!");
|
||||||
|
}
|
||||||
if (_materialId.HasValue)
|
if (_materialId.HasValue)
|
||||||
{
|
{
|
||||||
_materialRepository.UpdateMaterial(CreateMaterial(_materialId.Value));
|
_materialRepository.UpdateMaterial(CreateMaterial(_materialId.Value));
|
||||||
@ -71,6 +75,6 @@ namespace ProjectPublishing.Forms
|
|||||||
|
|
||||||
private void buttonCancel_Click(object sender, EventArgs e) => Close();
|
private void buttonCancel_Click(object sender, EventArgs e) => Close();
|
||||||
|
|
||||||
private Material CreateMaterial(int id) => Material.CreateMaterial(id, (MaterialType)comboBoxMaterialType.SelectedItem!);
|
private Material CreateMaterial(int id) => Material.CreateMaterial(id, textBoxName.Text, (MaterialType)comboBoxMaterialType.SelectedItem!);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,6 +109,7 @@
|
|||||||
Name = "FormMaterials";
|
Name = "FormMaterials";
|
||||||
StartPosition = FormStartPosition.CenterParent;
|
StartPosition = FormStartPosition.CenterParent;
|
||||||
Text = "FormMaterials";
|
Text = "FormMaterials";
|
||||||
|
Load += FormMaterials_Load;
|
||||||
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
|
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
|
||||||
panelButtons.ResumeLayout(false);
|
panelButtons.ResumeLayout(false);
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
|
@ -170,7 +170,7 @@
|
|||||||
<data name="buttonEdit.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="buttonEdit.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||||
vQAADr0BR/uQrQAAA9dJREFUeF7tnS2QE0EQRuOQSCQSiUSeRCKRSCTy5LmTSOTJk0gkEolEIpHIs9Af
|
vAAADrwBlbxySQAAA9dJREFUeF7tnS2QE0EQRuOQSCQSiUSeRCKRSCTy5LmTSOTJk0gkEolEIpHIs9Af
|
||||||
VV0V0eSS7fnpSd6regJzlZrvY7IzO5vdAQAAAAAAAAAAAAAAAABAkivzxvxq/jL/mN/Ne/PafGrCGfLE
|
VV0V0eSS7fnpSd6regJzlZrvY7IzO5vdAQAAAAAAAAAAAAAAAABAkivzxvxq/jL/mN/Ne/PafGrCGfLE
|
||||||
vDUV+CFVitcmnBGvzB9mFPj/vDNVGlgc/W9+MKOQH/OLSQkWJhO+SwkWpUX4LiVYjJbhu5RgEXqE71KC
|
vDUV+CFVitcmnBGvzB9mFPj/vDNVGlgc/W9+MKOQH/OLSQkWJhO+SwkWpUX4LiVYjJbhu5RgEXqE71KC
|
||||||
4vQM36UERRkRvksJijEyfJcSFGFG+C4lmIz29WeF71KCiejGjW7kRMGM9JMJk6hSAs1GMIkKJfhp8lUw
|
4vQM36UERRkRvksJijEyfJcSFGFG+C4lmIz29WeF71KCiejGjW7kRMGM9JMJk6hSAs1GMIkKJfhp8lUw
|
||||||
|
@ -40,11 +40,15 @@
|
|||||||
label4 = new Label();
|
label4 = new Label();
|
||||||
label5 = new Label();
|
label5 = new Label();
|
||||||
label6 = new Label();
|
label6 = new Label();
|
||||||
label7 = new Label();
|
|
||||||
comboBoxCustomerID = new ComboBox();
|
comboBoxCustomerID = new ComboBox();
|
||||||
comboBoxPrintingUD = new ComboBox();
|
comboBoxPrintingUD = new ComboBox();
|
||||||
comboBoxMaterialsID = new ComboBox();
|
groupBox1 = new GroupBox();
|
||||||
|
dataGridViewMaterials = new DataGridView();
|
||||||
|
columnMaterial = new DataGridViewTextBoxColumn();
|
||||||
|
columnMaterialType = new DataGridViewComboBoxColumn();
|
||||||
((System.ComponentModel.ISupportInitialize)numericUpDownAmount).BeginInit();
|
((System.ComponentModel.ISupportInitialize)numericUpDownAmount).BeginInit();
|
||||||
|
groupBox1.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)dataGridViewMaterials).BeginInit();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// buttonCancel
|
// buttonCancel
|
||||||
@ -157,15 +161,6 @@
|
|||||||
label6.TabIndex = 23;
|
label6.TabIndex = 23;
|
||||||
label6.Text = "ID типографии";
|
label6.Text = "ID типографии";
|
||||||
//
|
//
|
||||||
// label7
|
|
||||||
//
|
|
||||||
label7.AutoSize = true;
|
|
||||||
label7.Location = new Point(12, 343);
|
|
||||||
label7.Name = "label7";
|
|
||||||
label7.Size = new Size(112, 20);
|
|
||||||
label7.TabIndex = 25;
|
|
||||||
label7.Text = "ID материалов";
|
|
||||||
//
|
|
||||||
// comboBoxCustomerID
|
// comboBoxCustomerID
|
||||||
//
|
//
|
||||||
comboBoxCustomerID.DropDownStyle = ComboBoxStyle.DropDownList;
|
comboBoxCustomerID.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||||
@ -184,24 +179,49 @@
|
|||||||
comboBoxPrintingUD.Size = new Size(161, 28);
|
comboBoxPrintingUD.Size = new Size(161, 28);
|
||||||
comboBoxPrintingUD.TabIndex = 27;
|
comboBoxPrintingUD.TabIndex = 27;
|
||||||
//
|
//
|
||||||
// comboBoxMaterialsID
|
// groupBox1
|
||||||
//
|
//
|
||||||
comboBoxMaterialsID.DropDownStyle = ComboBoxStyle.DropDownList;
|
groupBox1.Controls.Add(dataGridViewMaterials);
|
||||||
comboBoxMaterialsID.FormattingEnabled = true;
|
groupBox1.Location = new Point(311, 238);
|
||||||
comboBoxMaterialsID.Location = new Point(144, 340);
|
groupBox1.Name = "groupBox1";
|
||||||
comboBoxMaterialsID.Name = "comboBoxMaterialsID";
|
groupBox1.Size = new Size(358, 192);
|
||||||
comboBoxMaterialsID.Size = new Size(161, 28);
|
groupBox1.TabIndex = 29;
|
||||||
comboBoxMaterialsID.TabIndex = 28;
|
groupBox1.TabStop = false;
|
||||||
|
groupBox1.Text = "groupBox1";
|
||||||
|
//
|
||||||
|
// dataGridViewMaterials
|
||||||
|
//
|
||||||
|
dataGridViewMaterials.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
dataGridViewMaterials.Columns.AddRange(new DataGridViewColumn[] { columnMaterial, columnMaterialType });
|
||||||
|
dataGridViewMaterials.Dock = DockStyle.Fill;
|
||||||
|
dataGridViewMaterials.Location = new Point(3, 23);
|
||||||
|
dataGridViewMaterials.Name = "dataGridViewMaterials";
|
||||||
|
dataGridViewMaterials.RowHeadersWidth = 51;
|
||||||
|
dataGridViewMaterials.Size = new Size(352, 166);
|
||||||
|
dataGridViewMaterials.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// columnMaterial
|
||||||
|
//
|
||||||
|
columnMaterial.HeaderText = "Материал";
|
||||||
|
columnMaterial.MinimumWidth = 6;
|
||||||
|
columnMaterial.Name = "columnMaterial";
|
||||||
|
columnMaterial.Width = 125;
|
||||||
|
//
|
||||||
|
// columnMaterialType
|
||||||
|
//
|
||||||
|
columnMaterialType.HeaderText = "Тип";
|
||||||
|
columnMaterialType.MinimumWidth = 6;
|
||||||
|
columnMaterialType.Name = "columnMaterialType";
|
||||||
|
columnMaterialType.Width = 125;
|
||||||
//
|
//
|
||||||
// FormOrder
|
// FormOrder
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||||
AutoScaleMode = AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
ClientSize = new Size(317, 450);
|
ClientSize = new Size(674, 451);
|
||||||
Controls.Add(comboBoxMaterialsID);
|
Controls.Add(groupBox1);
|
||||||
Controls.Add(comboBoxPrintingUD);
|
Controls.Add(comboBoxPrintingUD);
|
||||||
Controls.Add(comboBoxCustomerID);
|
Controls.Add(comboBoxCustomerID);
|
||||||
Controls.Add(label7);
|
|
||||||
Controls.Add(label6);
|
Controls.Add(label6);
|
||||||
Controls.Add(label5);
|
Controls.Add(label5);
|
||||||
Controls.Add(comboBoxStatus);
|
Controls.Add(comboBoxStatus);
|
||||||
@ -218,6 +238,8 @@
|
|||||||
StartPosition = FormStartPosition.CenterParent;
|
StartPosition = FormStartPosition.CenterParent;
|
||||||
Text = "FormOrder";
|
Text = "FormOrder";
|
||||||
((System.ComponentModel.ISupportInitialize)numericUpDownAmount).EndInit();
|
((System.ComponentModel.ISupportInitialize)numericUpDownAmount).EndInit();
|
||||||
|
groupBox1.ResumeLayout(false);
|
||||||
|
((System.ComponentModel.ISupportInitialize)dataGridViewMaterials).EndInit();
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
PerformLayout();
|
PerformLayout();
|
||||||
}
|
}
|
||||||
@ -236,9 +258,11 @@
|
|||||||
private Label label4;
|
private Label label4;
|
||||||
private Label label5;
|
private Label label5;
|
||||||
private Label label6;
|
private Label label6;
|
||||||
private Label label7;
|
|
||||||
private ComboBox comboBoxCustomerID;
|
private ComboBox comboBoxCustomerID;
|
||||||
private ComboBox comboBoxPrintingUD;
|
private ComboBox comboBoxPrintingUD;
|
||||||
private ComboBox comboBoxMaterialsID;
|
private GroupBox groupBox1;
|
||||||
|
private DataGridView dataGridViewMaterials;
|
||||||
|
private DataGridViewTextBoxColumn columnMaterial;
|
||||||
|
private DataGridViewComboBoxColumn columnMaterialType;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -16,35 +16,34 @@ namespace ProjectPublishing.Forms
|
|||||||
public partial class FormOrder : Form
|
public partial class FormOrder : Form
|
||||||
{
|
{
|
||||||
private readonly IOrderRepository _orderRepository;
|
private readonly IOrderRepository _orderRepository;
|
||||||
private int? _orderId;
|
//private int? _orderId;
|
||||||
|
|
||||||
public int Id
|
//public int Id
|
||||||
{
|
//{
|
||||||
set
|
// set
|
||||||
{
|
// {
|
||||||
try
|
// try
|
||||||
{
|
// {
|
||||||
var material = _orderRepository.ReadOrderById(value);
|
// var material = _orderRepository.ReadOrderById(value);
|
||||||
if (material == null)
|
// if (material == null)
|
||||||
{
|
// {
|
||||||
throw new InvalidDataException(nameof(material));
|
// throw new InvalidDataException(nameof(material));
|
||||||
}
|
// }
|
||||||
textBoxDesc.Text = material.Description;
|
// textBoxDesc.Text = material.Description;
|
||||||
numericUpDownAmount.Value = material.Amount;
|
// numericUpDownAmount.Value = material.Amount;
|
||||||
comboBoxOrderType.SelectedItem = material.ProductType;
|
// comboBoxOrderType.SelectedItem = material.ProductType;
|
||||||
comboBoxStatus.SelectedItem = material.Status;
|
// comboBoxStatus.SelectedItem = material.Status;
|
||||||
comboBoxCustomerID.SelectedItem = material.CustomerId;
|
// comboBoxCustomerID.SelectedItem = material.CustomerId;
|
||||||
comboBoxPrintingUD.SelectedItem = material.PrintingId;
|
// comboBoxPrintingUD.SelectedItem = material.PrintingId;
|
||||||
comboBoxMaterialsID.SelectedItem = material.MaterialsId;
|
// _orderId = value;
|
||||||
_orderId = value;
|
// }
|
||||||
}
|
// catch (Exception ex)
|
||||||
catch (Exception ex)
|
// {
|
||||||
{
|
// MessageBox.Show(ex.Message, "Ошибка при получении данных", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
MessageBox.Show(ex.Message, "Ошибка при получении данных", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
// return;
|
||||||
return;
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
}
|
|
||||||
|
|
||||||
public FormOrder(IOrderRepository orderRepository, ICustomerRepository customerRepository, IPrintingHouseRepository printingHouseRepository, IMaterialRepository materialRepository)
|
public FormOrder(IOrderRepository orderRepository, ICustomerRepository customerRepository, IPrintingHouseRepository printingHouseRepository, IMaterialRepository materialRepository)
|
||||||
{
|
{
|
||||||
@ -54,7 +53,6 @@ namespace ProjectPublishing.Forms
|
|||||||
comboBoxStatus.DataSource = Enum.GetValues(typeof(OrderStatus));
|
comboBoxStatus.DataSource = Enum.GetValues(typeof(OrderStatus));
|
||||||
comboBoxCustomerID.DataSource = customerRepository.ReadCustomers();
|
comboBoxCustomerID.DataSource = customerRepository.ReadCustomers();
|
||||||
comboBoxPrintingUD.DataSource = printingHouseRepository.ReadPrintingHouses();
|
comboBoxPrintingUD.DataSource = printingHouseRepository.ReadPrintingHouses();
|
||||||
comboBoxMaterialsID.DataSource = materialRepository.ReadMaterials();
|
|
||||||
|
|
||||||
comboBoxCustomerID.DisplayMember = "Name";
|
comboBoxCustomerID.DisplayMember = "Name";
|
||||||
comboBoxCustomerID.ValueMember = "Id";
|
comboBoxCustomerID.ValueMember = "Id";
|
||||||
@ -62,23 +60,28 @@ namespace ProjectPublishing.Forms
|
|||||||
comboBoxPrintingUD.DisplayMember = "Name";
|
comboBoxPrintingUD.DisplayMember = "Name";
|
||||||
comboBoxPrintingUD.ValueMember = "Id";
|
comboBoxPrintingUD.ValueMember = "Id";
|
||||||
|
|
||||||
comboBoxMaterialsID.DisplayMember = "MaterialType";
|
|
||||||
comboBoxMaterialsID.ValueMember= "Id";
|
columnMaterialType.DataSource = materialRepository.ReadMaterials();
|
||||||
|
columnMaterialType.DisplayMember = "Name";
|
||||||
|
columnMaterialType.ValueMember= "Id";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonSave_Click(object sender, EventArgs e)
|
private void buttonSave_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (dataGridViewMaterials.RowCount < 1)
|
||||||
if (_orderId.HasValue)
|
|
||||||
{
|
{
|
||||||
_orderRepository.UpdateOrder(CreateOrder(_orderId.Value));
|
throw new Exception("Имеются незаполненные поля!");
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_orderRepository.UpdateOrder(CreateOrder(0));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_orderRepository.CreateOrder(Order.CreateOrder(0, textBoxDesc.Text,
|
||||||
|
(ProductType)comboBoxOrderType.SelectedItem!,
|
||||||
|
(int)numericUpDownAmount.Value,
|
||||||
|
(OrderStatus)comboBoxStatus.SelectedItem!,
|
||||||
|
(int)comboBoxCustomerID.SelectedValue!,
|
||||||
|
(int)comboBoxPrintingUD.SelectedValue!,
|
||||||
|
CreateListFromDataGrid()));
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@ -89,16 +92,30 @@ namespace ProjectPublishing.Forms
|
|||||||
|
|
||||||
private void buttonCancel_Click(object sender, EventArgs e) => Close();
|
private void buttonCancel_Click(object sender, EventArgs e) => Close();
|
||||||
|
|
||||||
private Order CreateOrder(int id) => Order.CreateOrder
|
//private Order CreateOrder(int id) => Order.CreateOrder
|
||||||
(
|
// (
|
||||||
id,
|
// id,
|
||||||
textBoxDesc.Text,
|
// textBoxDesc.Text,
|
||||||
(ProductType)comboBoxOrderType.SelectedItem!,
|
// (ProductType)comboBoxOrderType.SelectedItem!,
|
||||||
(int)numericUpDownAmount.Value,
|
// (int)numericUpDownAmount.Value,
|
||||||
(OrderStatus)comboBoxStatus.SelectedItem!,
|
// (OrderStatus)comboBoxStatus.SelectedItem!,
|
||||||
(int)comboBoxCustomerID.SelectedValue!,
|
// (int)comboBoxCustomerID.SelectedValue!,
|
||||||
(int)comboBoxPrintingUD.SelectedValue!,
|
// (int)comboBoxPrintingUD.SelectedValue!,
|
||||||
(int)comboBoxMaterialsID.SelectedValue!
|
// (int)comboBoxMaterialsID.SelectedValue!
|
||||||
);
|
// );
|
||||||
|
|
||||||
|
private List<Material> CreateListFromDataGrid()
|
||||||
|
{
|
||||||
|
var list = new List<Material>();
|
||||||
|
foreach (DataGridViewRow row in dataGridViewMaterials.Rows)
|
||||||
|
{
|
||||||
|
if (row.Cells["columnMaterial"].Value == null || row.Cells["columnMaterialType"].Value == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
list.Add(Material.CreateMaterial(0, (string)row.Cells["columnMaterial"].Value, (MaterialType)row.Cells["columnMaterialType"].Value));
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -117,4 +117,16 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<metadata name="columnMaterial.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="columnMaterialType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="columnMaterial.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="columnMaterialType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
</root>
|
</root>
|
@ -32,7 +32,6 @@
|
|||||||
dataGridView = new DataGridView();
|
dataGridView = new DataGridView();
|
||||||
panelButtons = new Panel();
|
panelButtons = new Panel();
|
||||||
buttonRemove = new Button();
|
buttonRemove = new Button();
|
||||||
buttonEdit = new Button();
|
|
||||||
buttonAdd = new Button();
|
buttonAdd = new Button();
|
||||||
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||||
panelButtons.SuspendLayout();
|
panelButtons.SuspendLayout();
|
||||||
@ -59,7 +58,6 @@
|
|||||||
// panelButtons
|
// panelButtons
|
||||||
//
|
//
|
||||||
panelButtons.Controls.Add(buttonRemove);
|
panelButtons.Controls.Add(buttonRemove);
|
||||||
panelButtons.Controls.Add(buttonEdit);
|
|
||||||
panelButtons.Controls.Add(buttonAdd);
|
panelButtons.Controls.Add(buttonAdd);
|
||||||
panelButtons.Dock = DockStyle.Right;
|
panelButtons.Dock = DockStyle.Right;
|
||||||
panelButtons.Location = new Point(648, 0);
|
panelButtons.Location = new Point(648, 0);
|
||||||
@ -77,17 +75,6 @@
|
|||||||
buttonRemove.UseVisualStyleBackColor = true;
|
buttonRemove.UseVisualStyleBackColor = true;
|
||||||
buttonRemove.Click += buttonRemove_Click;
|
buttonRemove.Click += buttonRemove_Click;
|
||||||
//
|
//
|
||||||
// buttonEdit
|
|
||||||
//
|
|
||||||
buttonEdit.BackgroundImageLayout = ImageLayout.Stretch;
|
|
||||||
buttonEdit.Image = (Image)resources.GetObject("buttonEdit.Image");
|
|
||||||
buttonEdit.Location = new Point(23, 133);
|
|
||||||
buttonEdit.Name = "buttonEdit";
|
|
||||||
buttonEdit.Size = new Size(115, 115);
|
|
||||||
buttonEdit.TabIndex = 1;
|
|
||||||
buttonEdit.UseVisualStyleBackColor = true;
|
|
||||||
buttonEdit.Click += buttonEdit_Click;
|
|
||||||
//
|
|
||||||
// buttonAdd
|
// buttonAdd
|
||||||
//
|
//
|
||||||
buttonAdd.BackgroundImageLayout = ImageLayout.Center;
|
buttonAdd.BackgroundImageLayout = ImageLayout.Center;
|
||||||
@ -120,7 +107,6 @@
|
|||||||
private DataGridView dataGridView;
|
private DataGridView dataGridView;
|
||||||
private Panel panelButtons;
|
private Panel panelButtons;
|
||||||
private Button buttonRemove;
|
private Button buttonRemove;
|
||||||
private Button buttonEdit;
|
|
||||||
private Button buttonAdd;
|
private Button buttonAdd;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -36,25 +36,6 @@ namespace ProjectPublishing.Forms
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonEdit_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (!tryGetIDFromRow(out var findId))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var form = _container.Resolve<FormOrder>();
|
|
||||||
form.Id = findId;
|
|
||||||
form.ShowDialog();
|
|
||||||
loadList();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
MessageBox.Show(ex.Message, "Ошибка при изменении", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void buttonRemove_Click(object sender, EventArgs e)
|
private void buttonRemove_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!tryGetIDFromRow(out var findId))
|
if (!tryGetIDFromRow(out var findId))
|
||||||
|
@ -165,28 +165,6 @@
|
|||||||
QBnLZQtBF+NoSXfDm/2npGT+I+EJOTH6TpsQTAxpg9jWnL0TGfLzpl3MkdkhnlJ21yYPFZtjBEOCPibz
|
QBnLZQtBF+NoSXfDm/2npGT+I+EJOTH6TpsQTAxpg9jWnL0TGfLzpl3MkdkhnlJ21yYPFZtjBEOCPibz
|
||||||
seTNZBdOltfcL7lBRDIyqM+sD/PUyJ/5O/6Nn+Fn2dyRlLxMdVJWJ/utQRAEQRAEwaSMjf0DMjsRo5UV
|
seTNZBdOltfcL7lBRDIyqM+sD/PUyJ/5O/6Nn+Fn2dyRlLxMdVJWJ/utQRAEQRAEwaSMjf0DMjsRo5UV
|
||||||
a8gAAAAASUVORK5CYII=
|
a8gAAAAASUVORK5CYII=
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
<data name="buttonEdit.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>
|
|
||||||
iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
|
||||||
vAAADrwBlbxySQAAA9dJREFUeF7tnS2QE0EQRuOQSCQSiUSeRCKRSCTy5LmTSOTJk0gkEolEIpHIs9Af
|
|
||||||
VV0V0eSS7fnpSd6regJzlZrvY7IzO5vdAQAAAAAAAAAAAAAAAABAkivzxvxq/jL/mN/Ne/PafGrCGfLE
|
|
||||||
vDUV+CFVitcmnBGvzB9mFPj/vDNVGlgc/W9+MKOQH/OLSQkWJhO+SwkWpUX4LiVYjJbhu5RgEXqE71KC
|
|
||||||
4vQM36UERRkRvksJijEyfJcSFGFG+C4lmIz29WeF71KCiejGjW7kRMGM9JMJk6hSAs1GMIkKJfhp8lUw
|
|
||||||
kQoleGvCRGaX4KMJHdBST/fzn//712FmlkArAmjM/jpf37OVS6DPBw2JNnkql0DnDKERh3b4qpaAa4BG
|
|
||||||
HLO9W7EE70xowEvztxkN8r6VSqDTxM9MaMRqJWAPoAOrlEAPlUAnqpdAf0t/EzpStQSEn0RX+5/NY26i
|
|
||||||
VCsB4SfZX+ode6iiSgkIP0m0zl+lBISf5NAmT/USEH6SY3b4qpaA8JMcE75brQSEn+SU8N0qJSD8JFvC
|
|
||||||
d2eXgPCTZMJ3Z5aA8BO0CN+dVQLYSMvwXUqwCD3CdylBcXqG71KCoowI321dAt2QggQjw3dblYClXpIZ
|
|
||||||
4bvZEhB+kpnhu1tLQPhJKoTvnloCwk9SKXz3lBIQfoKK4bvHlgA2Ujl8lxJ0YoXwXUrQmJXCdylBI1YM
|
|
||||||
3+Vp3SQrh89SL8nK4esGD0/qJlg9fO7uJVg5fO3yEX6C1cPXLh9shPAvGMK/YFYOX59bL4WEjawevj4/
|
|
||||||
bITwL5iVw5eEn0DfmSuHz48xJtD2qL8zf0UJP4nOv0cDu4LvTUigtXI0sCt4Y0ISvdkqGtzqEn4DdDJG
|
|
||||||
O2bRAFeWAx2N0A8ZRwNc2TsTGqHzcdEgV5XwG6Kl30rrfpUVGqLlUzTQFeUkbwf0IqNosKtJ+B3Q9B8N
|
|
||||||
djU5wduJD2Y04JUk/I58M6NBryLhd0SnY6NBryLHtztzbUYDX0HCH4Cm12jwZ0v4A3hhRoM/Wx7cGITu
|
|
||||||
oEUBzJTj2wPRu/ajEGZJ+AOpdvCD8Adza0ZBzFA3oXhwYzBVDn1ydn8CV2YUxmgJfxIVzv3pO59pfwIV
|
|
||||||
zv3pJA8/zTIJTblRKL3VdK/gudKfjEKIAuql7jTqSR3u5hVA0/+Ic39aYWiZqa1mKETPY98+xXNVX5h7
|
|
||||||
Mwovo6Z4HShlii9Oy+lfU7yexmGKX4g3ZhTmKWoG0dcILMjWzR8dGGGKPwNOWf4xxZ8hjx391vWBpniu
|
|
||||||
4s8UXQRGv/zBFH9hKGjdDZRM8QAAAAAAAAAAAAAAAAA12O3+AseEEu6imt+zAAAAAElFTkSuQmCC
|
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="buttonAdd.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="buttonAdd.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
@ -11,12 +11,8 @@ namespace ProjectPublishing.Repositories
|
|||||||
{
|
{
|
||||||
IEnumerable<Order> ReadOrders();
|
IEnumerable<Order> ReadOrders();
|
||||||
|
|
||||||
Order ReadOrderById(int id);
|
|
||||||
|
|
||||||
void CreateOrder(Order order);
|
void CreateOrder(Order order);
|
||||||
|
|
||||||
void UpdateOrder(Order order);
|
|
||||||
|
|
||||||
void DeleteOrder(int id);
|
void DeleteOrder(int id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ namespace ProjectPublishing.Repositories.Implementations
|
|||||||
|
|
||||||
public Material ReadMaterialById(int id)
|
public Material ReadMaterialById(int id)
|
||||||
{
|
{
|
||||||
return Material.CreateMaterial(0, Entities.Enums.MaterialType.Cardboard);
|
return Material.CreateMaterial(0, "", Entities.Enums.MaterialType.Cardboard);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<Material> ReadMaterials()
|
public IEnumerable<Material> ReadMaterials()
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using ProjectPublishing.Entities;
|
using ProjectPublishing.Entities;
|
||||||
using System;
|
using System;
|
||||||
|
using System.CodeDom;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -19,7 +20,7 @@ namespace ProjectPublishing.Repositories.Implementations
|
|||||||
|
|
||||||
public Order ReadOrderById(int id)
|
public Order ReadOrderById(int id)
|
||||||
{
|
{
|
||||||
return Order.CreateOrder(0, string.Empty, Entities.Enums.ProductType.Advertisement, 0, Entities.Enums.OrderStatus.Done, 0, 0, 0);
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<Order> ReadOrders()
|
public IEnumerable<Order> ReadOrders()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user