inwork
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
namespace ProjectCarpentryWorkshop.Entities.Enums;
|
||||
|
||||
public enum MaterialSupplySupplier
|
||||
{
|
||||
None = 0,
|
||||
|
||||
Sarai = 1,
|
||||
|
||||
Megastroi = 2,
|
||||
|
||||
SuperStroika = 3
|
||||
}
|
||||
21
ProjectCarpentryWorkshop/Entities/Enums/OrderCustomerName.cs
Normal file
21
ProjectCarpentryWorkshop/Entities/Enums/OrderCustomerName.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProjectCarpentryWorkshop.Entities.Enums;
|
||||
|
||||
public enum OrderCustomerName
|
||||
{
|
||||
None = 0,
|
||||
|
||||
Lenta = 1,
|
||||
|
||||
Ashan = 2,
|
||||
|
||||
Matro = 3
|
||||
|
||||
|
||||
|
||||
}
|
||||
19
ProjectCarpentryWorkshop/Entities/Enums/OrderOrderStatus.cs
Normal file
19
ProjectCarpentryWorkshop/Entities/Enums/OrderOrderStatus.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProjectCarpentryWorkshop.Entities.Enums;
|
||||
|
||||
public enum OrderOrderStatus
|
||||
{
|
||||
None = 0,
|
||||
|
||||
Ready = 1,
|
||||
|
||||
InTheProccess = 2,
|
||||
|
||||
Shipped = 3
|
||||
|
||||
}
|
||||
27
ProjectCarpentryWorkshop/Entities/Material.cs
Normal file
27
ProjectCarpentryWorkshop/Entities/Material.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProjectCarpentryWorkshop.Entities;
|
||||
|
||||
public class Material
|
||||
{
|
||||
public int Id { get; private set; }
|
||||
public string Name { get; private set; } = string.Empty;
|
||||
public int Price { get; private set; }
|
||||
public int QuantityInStock { get; private set; }
|
||||
public static Material CreateEntity(int id, string name, int
|
||||
price, int quantityInStock)
|
||||
{
|
||||
return new Material
|
||||
{
|
||||
Id = id,
|
||||
Name = name ?? string.Empty,
|
||||
Price = price,
|
||||
QuantityInStock = quantityInStock
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
36
ProjectCarpentryWorkshop/Entities/MaterialSupply.cs
Normal file
36
ProjectCarpentryWorkshop/Entities/MaterialSupply.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using Microsoft.VisualBasic.FileIO;
|
||||
using ProjectCarpentryWorkshop.Entities.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProjectCarpentryWorkshop.Entities;
|
||||
|
||||
public class MaterialSupply
|
||||
{
|
||||
public int Id { get; private set; }
|
||||
public int MaterialId { get; private set; }
|
||||
|
||||
public MaterialSupplySupplier MaterialSupplySupplier { get; private set; }
|
||||
public string Name { get; private set; } = string.Empty;
|
||||
public DateTime Date { get; private set; }
|
||||
public int Price { get; private set; }
|
||||
public int QuantityInStock { get; private set; }
|
||||
|
||||
|
||||
public static MaterialSupply CreateOperation(int id, int materialId,MaterialSupplySupplier materialSupplySupplier, string name, int price, int quantityInStock)
|
||||
{
|
||||
return new MaterialSupply
|
||||
{
|
||||
Id = id,
|
||||
MaterialId = materialId,
|
||||
MaterialSupplySupplier = materialSupplySupplier,
|
||||
Name = name ?? string.Empty,
|
||||
Date = DateTime.Now,
|
||||
Price = price,
|
||||
QuantityInStock = quantityInStock
|
||||
};
|
||||
}
|
||||
}
|
||||
35
ProjectCarpentryWorkshop/Entities/Order.cs
Normal file
35
ProjectCarpentryWorkshop/Entities/Order.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using ProjectCarpentryWorkshop.Entities.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProjectCarpentryWorkshop.Entities;
|
||||
|
||||
public class Order
|
||||
{
|
||||
public int Id { get; private set; }
|
||||
public string CustomerName { get; private set; } = string.Empty;
|
||||
public DateTime Date { get; private set; }
|
||||
public int QuantityInStock { get; private set; }
|
||||
public int OrderPrice { get; private set; }
|
||||
public OrderCustomerName OrderCustomerName { get; private set; }
|
||||
public OrderOrderStatus OrderOrderStatus { get; private set; }
|
||||
|
||||
|
||||
|
||||
public static Order CreateOperation(int id, string customerName, int quantityInStock, int orderPrice, OrderCustomerName orderCustomerName, OrderOrderStatus orderOrderStatus)
|
||||
{
|
||||
return new Order
|
||||
{
|
||||
Id = id,
|
||||
CustomerName = customerName ?? string.Empty,
|
||||
Date = DateTime.Now,
|
||||
QuantityInStock = quantityInStock,
|
||||
OrderPrice = orderPrice,
|
||||
OrderCustomerName = orderCustomerName,
|
||||
OrderOrderStatus = orderOrderStatus
|
||||
};
|
||||
}
|
||||
}
|
||||
26
ProjectCarpentryWorkshop/Entities/OrderOfProduction.cs
Normal file
26
ProjectCarpentryWorkshop/Entities/OrderOfProduction.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using ProjectCarpentryWorkshop.Entities.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProjectCarpentryWorkshop.Entities;
|
||||
|
||||
public class OrderOfProduction
|
||||
{
|
||||
public int OrderId { get; private set; }
|
||||
public int ProductionId { get; private set; }
|
||||
public int QuantityProduction{ get; private set; }
|
||||
public static OrderOfProduction CreateElement(int orderId, int productionId, int
|
||||
quantityProduction)
|
||||
{
|
||||
return new OrderOfProduction
|
||||
{
|
||||
OrderId = orderId,
|
||||
ProductionId = productionId,
|
||||
QuantityProduction= quantityProduction,
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
32
ProjectCarpentryWorkshop/Entities/Production.cs
Normal file
32
ProjectCarpentryWorkshop/Entities/Production.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using ProjectCarpentryWorkshop.Entities.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProjectCarpentryWorkshop.Entities;
|
||||
|
||||
public class Production
|
||||
{
|
||||
|
||||
public int Id { get; private set; }
|
||||
public string Name { get; private set; } = string.Empty;
|
||||
public string Description { get; private set; } = string.Empty;
|
||||
public int Price { get; private set; }
|
||||
|
||||
public int QuantityInStock { get; private set; }
|
||||
public static Production CreateEntity(int id, string name, int
|
||||
price, int quantityInStock, string description)
|
||||
{
|
||||
return new Production
|
||||
{
|
||||
Id = id,
|
||||
Name = name ?? string.Empty,
|
||||
Price = price,
|
||||
QuantityInStock = quantityInStock,
|
||||
Description = description ?? string.Empty
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
25
ProjectCarpentryWorkshop/Entities/ProductionMaterial.cs
Normal file
25
ProjectCarpentryWorkshop/Entities/ProductionMaterial.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProjectCarpentryWorkshop.Entities;
|
||||
|
||||
public class ProductionMaterial
|
||||
{
|
||||
public int MaterialId { get; private set; }
|
||||
public int ProductionId { get; private set; }
|
||||
public int QuantityMaterials { get; private set; }
|
||||
public static ProductionMaterial CreateElement(int materialId, int productionId, int
|
||||
quantityMaterials)
|
||||
{
|
||||
return new ProductionMaterial
|
||||
{
|
||||
MaterialId = materialId,
|
||||
ProductionId = productionId,
|
||||
QuantityMaterials = quantityMaterials,
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
39
ProjectCarpentryWorkshop/Form1.Designer.cs
generated
39
ProjectCarpentryWorkshop/Form1.Designer.cs
generated
@@ -1,39 +0,0 @@
|
||||
namespace ProjectCarpentryWorkshop
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||
this.Text = "Form1";
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
namespace ProjectCarpentryWorkshop
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
126
ProjectCarpentryWorkshop/FormWorkshop.Designer.cs
generated
Normal file
126
ProjectCarpentryWorkshop/FormWorkshop.Designer.cs
generated
Normal file
@@ -0,0 +1,126 @@
|
||||
namespace ProjectCarpentryWorkshop
|
||||
{
|
||||
partial class FormWorkshop
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
menuStrip = new MenuStrip();
|
||||
справочникиToolStripMenuItem = new ToolStripMenuItem();
|
||||
операцииToolStripMenuItem = new ToolStripMenuItem();
|
||||
отчетыToolStripMenuItem = new ToolStripMenuItem();
|
||||
материалыToolStripMenuItem = new ToolStripMenuItem();
|
||||
продукцияToolStripMenuItem = new ToolStripMenuItem();
|
||||
заказToolStripMenuItem = new ToolStripMenuItem();
|
||||
поступлениеМатериаловToolStripMenuItem = new ToolStripMenuItem();
|
||||
menuStrip.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// menuStrip
|
||||
//
|
||||
menuStrip.Items.AddRange(new ToolStripItem[] { справочникиToolStripMenuItem, операцииToolStripMenuItem, отчетыToolStripMenuItem });
|
||||
menuStrip.Location = new Point(0, 0);
|
||||
menuStrip.Name = "menuStrip";
|
||||
menuStrip.Size = new Size(784, 24);
|
||||
menuStrip.TabIndex = 0;
|
||||
menuStrip.Text = "menuStrip1";
|
||||
//
|
||||
// справочникиToolStripMenuItem
|
||||
//
|
||||
справочникиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { материалыToolStripMenuItem, продукцияToolStripMenuItem });
|
||||
справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
|
||||
справочникиToolStripMenuItem.Size = new Size(94, 20);
|
||||
справочникиToolStripMenuItem.Text = "Справочники";
|
||||
//
|
||||
// операцииToolStripMenuItem
|
||||
//
|
||||
операцииToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { заказToolStripMenuItem, поступлениеМатериаловToolStripMenuItem });
|
||||
операцииToolStripMenuItem.Name = "операцииToolStripMenuItem";
|
||||
операцииToolStripMenuItem.Size = new Size(75, 20);
|
||||
операцииToolStripMenuItem.Text = "Операции";
|
||||
//
|
||||
// отчетыToolStripMenuItem
|
||||
//
|
||||
отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem";
|
||||
отчетыToolStripMenuItem.Size = new Size(60, 20);
|
||||
отчетыToolStripMenuItem.Text = "Отчеты";
|
||||
//
|
||||
// материалыToolStripMenuItem
|
||||
//
|
||||
материалыToolStripMenuItem.Name = "материалыToolStripMenuItem";
|
||||
материалыToolStripMenuItem.Size = new Size(180, 22);
|
||||
материалыToolStripMenuItem.Text = "Материалы";
|
||||
//
|
||||
// продукцияToolStripMenuItem
|
||||
//
|
||||
продукцияToolStripMenuItem.Name = "продукцияToolStripMenuItem";
|
||||
продукцияToolStripMenuItem.Size = new Size(180, 22);
|
||||
продукцияToolStripMenuItem.Text = "Изделия";
|
||||
продукцияToolStripMenuItem.Click += продукцияToolStripMenuItem_Click;
|
||||
//
|
||||
// заказToolStripMenuItem
|
||||
//
|
||||
заказToolStripMenuItem.Name = "заказToolStripMenuItem";
|
||||
заказToolStripMenuItem.Size = new Size(216, 22);
|
||||
заказToolStripMenuItem.Text = "Заказ";
|
||||
//
|
||||
// поступлениеМатериаловToolStripMenuItem
|
||||
//
|
||||
поступлениеМатериаловToolStripMenuItem.Name = "поступлениеМатериаловToolStripMenuItem";
|
||||
поступлениеМатериаловToolStripMenuItem.Size = new Size(216, 22);
|
||||
поступлениеМатериаловToolStripMenuItem.Text = "Поступление материалов";
|
||||
//
|
||||
// FormWorkshop
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
BackColor = SystemColors.ActiveCaption;
|
||||
BackgroundImage = Properties.Resources.workshopjpg;
|
||||
BackgroundImageLayout = ImageLayout.Stretch;
|
||||
ClientSize = new Size(784, 411);
|
||||
Controls.Add(menuStrip);
|
||||
MainMenuStrip = menuStrip;
|
||||
Name = "FormWorkshop";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "Столярная мастерская";
|
||||
menuStrip.ResumeLayout(false);
|
||||
menuStrip.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private MenuStrip menuStrip;
|
||||
private ToolStripMenuItem справочникиToolStripMenuItem;
|
||||
private ToolStripMenuItem операцииToolStripMenuItem;
|
||||
private ToolStripMenuItem отчетыToolStripMenuItem;
|
||||
private ToolStripMenuItem материалыToolStripMenuItem;
|
||||
private ToolStripMenuItem продукцияToolStripMenuItem;
|
||||
private ToolStripMenuItem заказToolStripMenuItem;
|
||||
private ToolStripMenuItem поступлениеМатериаловToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
15
ProjectCarpentryWorkshop/FormWorkshop.cs
Normal file
15
ProjectCarpentryWorkshop/FormWorkshop.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace ProjectCarpentryWorkshop
|
||||
{
|
||||
public partial class FormWorkshop : Form
|
||||
{
|
||||
public FormWorkshop()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
123
ProjectCarpentryWorkshop/FormWorkshop.resx
Normal file
123
ProjectCarpentryWorkshop/FormWorkshop.resx
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
113
ProjectCarpentryWorkshop/Forms/FormMaterial.Designer.cs
generated
Normal file
113
ProjectCarpentryWorkshop/Forms/FormMaterial.Designer.cs
generated
Normal file
@@ -0,0 +1,113 @@
|
||||
namespace ProjectCarpentryWorkshop.Forms
|
||||
{
|
||||
partial class FormMaterial
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
label1 = new Label();
|
||||
textBox1 = new TextBox();
|
||||
label2 = new Label();
|
||||
textBox2 = new TextBox();
|
||||
label3 = new Label();
|
||||
textBox3 = new TextBox();
|
||||
SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
label1.AutoSize = true;
|
||||
label1.Location = new Point(12, 29);
|
||||
label1.Name = "label1";
|
||||
label1.Size = new Size(38, 15);
|
||||
label1.TabIndex = 0;
|
||||
label1.Text = "label1";
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
textBox1.Location = new Point(71, 26);
|
||||
textBox1.Name = "textBox1";
|
||||
textBox1.Size = new Size(100, 23);
|
||||
textBox1.TabIndex = 1;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
label2.AutoSize = true;
|
||||
label2.Location = new Point(17, 91);
|
||||
label2.Name = "label2";
|
||||
label2.Size = new Size(38, 15);
|
||||
label2.TabIndex = 2;
|
||||
label2.Text = "label2";
|
||||
//
|
||||
// textBox2
|
||||
//
|
||||
textBox2.Location = new Point(70, 91);
|
||||
textBox2.Name = "textBox2";
|
||||
textBox2.Size = new Size(100, 23);
|
||||
textBox2.TabIndex = 3;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
label3.AutoSize = true;
|
||||
label3.Location = new Point(14, 151);
|
||||
label3.Name = "label3";
|
||||
label3.Size = new Size(38, 15);
|
||||
label3.TabIndex = 4;
|
||||
label3.Text = "label3";
|
||||
//
|
||||
// textBox3
|
||||
//
|
||||
textBox3.Location = new Point(66, 153);
|
||||
textBox3.Name = "textBox3";
|
||||
textBox3.Size = new Size(100, 23);
|
||||
textBox3.TabIndex = 5;
|
||||
//
|
||||
// FormMaterial
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(800, 450);
|
||||
Controls.Add(textBox3);
|
||||
Controls.Add(label3);
|
||||
Controls.Add(textBox2);
|
||||
Controls.Add(label2);
|
||||
Controls.Add(textBox1);
|
||||
Controls.Add(label1);
|
||||
Name = "FormMaterial";
|
||||
Text = "Материалы";
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Label label1;
|
||||
private TextBox textBox1;
|
||||
private Label label2;
|
||||
private TextBox textBox2;
|
||||
private Label label3;
|
||||
private TextBox textBox3;
|
||||
}
|
||||
}
|
||||
20
ProjectCarpentryWorkshop/Forms/FormMaterial.cs
Normal file
20
ProjectCarpentryWorkshop/Forms/FormMaterial.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
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 ProjectCarpentryWorkshop.Forms
|
||||
{
|
||||
public partial class FormMaterial : Form
|
||||
{
|
||||
public FormMaterial()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
@@ -26,36 +26,36 @@
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
@@ -1,3 +1,7 @@
|
||||
using ProjectCarpentryWorkshop.Repositories.Implementations;
|
||||
using ProjectCarpentryWorkshop.Repositories;
|
||||
using Unity;
|
||||
|
||||
namespace ProjectCarpentryWorkshop
|
||||
{
|
||||
internal static class Program
|
||||
@@ -11,7 +15,18 @@ namespace ProjectCarpentryWorkshop
|
||||
// To customize application configuration such as set high DPI settings or default font,
|
||||
// see https://aka.ms/applicationconfiguration.
|
||||
ApplicationConfiguration.Initialize();
|
||||
Application.Run(new Form1());
|
||||
Application.Run(CreateContainer().Resolve<FormWorkshop>());
|
||||
}
|
||||
private static IUnityContainer CreateContainer()
|
||||
{
|
||||
var container = new UnityContainer();
|
||||
|
||||
container.RegisterType<IMaterialRepository, MaterialRepository>();
|
||||
container.RegisterType<IMaterialSupplyRepository, MaterialSupplyRepository>();
|
||||
container.RegisterType<IOrderRepository, OrderRepository>();
|
||||
container.RegisterType<IProductionRepository, ProductionRepository>();
|
||||
|
||||
return container;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,4 +8,23 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Unity" Version="5.11.10" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
73
ProjectCarpentryWorkshop/Properties/Resources.Designer.cs
generated
Normal file
73
ProjectCarpentryWorkshop/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,73 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Этот код создан программой.
|
||||
// Исполняемая версия:4.0.30319.42000
|
||||
//
|
||||
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
|
||||
// повторной генерации кода.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ProjectCarpentryWorkshop.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д.
|
||||
/// </summary>
|
||||
// Этот класс создан автоматически классом StronglyTypedResourceBuilder
|
||||
// с помощью такого средства, как ResGen или Visual Studio.
|
||||
// Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen
|
||||
// с параметром /str или перестройте свой проект VS.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ProjectCarpentryWorkshop.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Перезаписывает свойство CurrentUICulture текущего потока для всех
|
||||
/// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap workshopjpg {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("workshopjpg", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
124
ProjectCarpentryWorkshop/Properties/Resources.resx
Normal file
124
ProjectCarpentryWorkshop/Properties/Resources.resx
Normal file
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="workshopjpg" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Entities\Res\workshopjpg.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
19
ProjectCarpentryWorkshop/Repositories/IMaterialRepository.cs
Normal file
19
ProjectCarpentryWorkshop/Repositories/IMaterialRepository.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using ProjectCarpentryWorkshop.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProjectCarpentryWorkshop.Repositories;
|
||||
|
||||
public interface IMaterialRepository
|
||||
{
|
||||
IEnumerable<Material> ReadMaterial(DateTime? dateForm = null,
|
||||
DateTime? dateTo = null);
|
||||
Material ReadMaterialById(int id);
|
||||
void CreateMaterial(Material material);
|
||||
void UpdateMaterial(Material material);
|
||||
void DeleteMaterial(int id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using ProjectCarpentryWorkshop.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProjectCarpentryWorkshop.Repositories;
|
||||
|
||||
public interface IMaterialSupplyRepository
|
||||
{
|
||||
|
||||
IEnumerable<MaterialSupply> ReadMaterialSupply(DateTime? dateForm = null,
|
||||
DateTime? dateTo = null, int? materialId = null);
|
||||
MaterialSupply MaterialSupplyById(int id);
|
||||
void CreateMaterialSupply(MaterialSupply materialSupply);
|
||||
void UpdateMaterialSupply(MaterialSupply materialSupply);
|
||||
void DeleteMaterialSupply(int id);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using ProjectCarpentryWorkshop.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProjectCarpentryWorkshop.Repositories;
|
||||
|
||||
public interface IOrderOfProductionRepository
|
||||
{
|
||||
IEnumerable<OrderOfProduction> ReadOrderOfProduction();
|
||||
OrderOfProduction OrderOfProductionById(int id);
|
||||
void CreateOrderOfProduction(OrderOfProduction orderOfProduction);
|
||||
void UpdateOrderOfProduction(OrderOfProduction orderOfProduction);
|
||||
void DeleteOrderOfProduction(int id);
|
||||
|
||||
}
|
||||
20
ProjectCarpentryWorkshop/Repositories/IOrderRepository.cs
Normal file
20
ProjectCarpentryWorkshop/Repositories/IOrderRepository.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using ProjectCarpentryWorkshop.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProjectCarpentryWorkshop.Repositories;
|
||||
|
||||
public interface IOrderRepository
|
||||
{
|
||||
IEnumerable<Order> ReadOrder(DateTime? dateForm = null,
|
||||
DateTime? dateTo = null);
|
||||
Order ReadOrderById(int id);
|
||||
void CreateOrder(Order order);
|
||||
void UpdateOrder(Order order);
|
||||
void DeleteOrder(int id);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProjectCarpentryWorkshop.Repositories
|
||||
{
|
||||
internal class IProductionMaterialRepository
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using ProjectCarpentryWorkshop.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProjectCarpentryWorkshop.Repositories;
|
||||
|
||||
public interface IProductionRepository
|
||||
{
|
||||
IEnumerable<Production> ReadProduction();
|
||||
Production ReadProductionById(int id);
|
||||
void CreateProduction(Production production);
|
||||
void UpdateProduction(Production production);
|
||||
void DeleteProduction(int id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using ProjectCarpentryWorkshop.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProjectCarpentryWorkshop.Repositories.Implementations;
|
||||
|
||||
public class MaterialRepository : IMaterialRepository
|
||||
{
|
||||
public void CreateMaterial(Material material)
|
||||
{
|
||||
}
|
||||
public void DeleteMaterial(int id)
|
||||
{
|
||||
}
|
||||
|
||||
public Material ReadMaterialById(int id)
|
||||
{
|
||||
return Material.CreateEntity(0, string.Empty, 0, 0);
|
||||
}
|
||||
public IEnumerable<Material> ReadMaterial(DateTime? dateForm = null, DateTime? dateTo = null)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
public void UpdateMaterial(Material material)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using ProjectCarpentryWorkshop.Entities;
|
||||
using ProjectCarpentryWorkshop.Entities.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProjectCarpentryWorkshop.Repositories.Implementations;
|
||||
|
||||
public class MaterialSupplyRepository : IMaterialSupplyRepository
|
||||
{
|
||||
public void CreateMaterialSupply(MaterialSupply materialSupply)
|
||||
{
|
||||
}
|
||||
public void DeleteMaterialSupply(int id)
|
||||
{
|
||||
}
|
||||
public MaterialSupply MaterialSupplyById(int id)
|
||||
{
|
||||
return MaterialSupply.CreateOperation(0,0, MaterialSupplySupplier.None, string.Empty, 0, 0);
|
||||
}
|
||||
public IEnumerable<MaterialSupply> ReadMaterialSupply(DateTime? dateForm = null, DateTime? dateTo = null, int? materialId = null)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
public void UpdateMaterialSupply(MaterialSupply materialSupply)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using ProjectCarpentryWorkshop.Entities;
|
||||
using ProjectCarpentryWorkshop.Entities.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProjectCarpentryWorkshop.Repositories.Implementations;
|
||||
|
||||
public class OrderRepository : IOrderRepository
|
||||
{
|
||||
public void CreateOrder(Order order)
|
||||
{
|
||||
}
|
||||
public void DeleteOrder(int id)
|
||||
{
|
||||
}
|
||||
public Order ReadOrderById(int id)
|
||||
{
|
||||
return Order.CreateOperation(0, string.Empty,0,0,OrderCustomerName.None, OrderOrderStatus.None );
|
||||
}
|
||||
public IEnumerable<Order> ReadOrder(DateTime? dateForm = null, DateTime? dateTo = null)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
public void UpdateOrder(Order order)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using ProjectCarpentryWorkshop.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ProjectCarpentryWorkshop.Repositories.Implementations;
|
||||
|
||||
public class ProductionRepository : IProductionRepository
|
||||
{
|
||||
public void CreateProduction(Production production)
|
||||
{
|
||||
}
|
||||
public void DeleteProduction(int id)
|
||||
{
|
||||
}
|
||||
public Production ReadProductionById(int id)
|
||||
{
|
||||
return Production.CreateEntity(0, string.Empty,0,0, string.Empty);
|
||||
}
|
||||
public IEnumerable<Production> ReadProduction()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
public void UpdateProduction(Production production)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
BIN
ProjectCarpentryWorkshop/Res/workshopjpg.jpg
Normal file
BIN
ProjectCarpentryWorkshop/Res/workshopjpg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 218 KiB |
Reference in New Issue
Block a user