Compare commits

...

2 Commits

27 changed files with 683 additions and 52 deletions

View File

@ -9,11 +9,11 @@ namespace ProjectFamilyBudget.Entities;
public class Expense public class Expense
{ {
public int Id { get; private set; } public int Id { get; private set; }
public decimal Sum { get; private set; } public double Sum { get; private set; }
public DateTime Date { get; private set; } public DateTime Date { get; private set; }
public int ExpenseCategoryId { get; private set; } public int ExpenseCategoryId { get; private set; }
public static Expense CreateEntity(int id, decimal sum, int expenseCategoryId) public static Expense CreateExpense(int id, double sum, int expenseCategoryId)
{ {
return new Expense return new Expense
{ {

View File

@ -11,7 +11,7 @@ public class ExpenseCategory
public int Id { get; private set; } public int Id { get; private set; }
public ExpenseCategoryType Category { get; private set; } public ExpenseCategoryType Category { get; private set; }
public static ExpenseCategory CreateEntity(int id, ExpenseCategoryType category) public static ExpenseCategory CreateExpnseCategory(int id, ExpenseCategoryType category)
{ {
return new ExpenseCategory return new ExpenseCategory
{ {
@ -19,5 +19,4 @@ public class ExpenseCategory
Category = category Category = category
}; };
} }
} }

View File

@ -12,7 +12,7 @@ public class Family
public string Name { get; private set; } = string.Empty; public string Name { get; private set; } = string.Empty;
public static Family CreateEntity(int id, string name) public static Family CreateFamily(int id, string name)
{ {
return new Family return new Family
{ {

View File

@ -9,11 +9,11 @@ namespace ProjectFamilyBudget.Entities;
public class Income public class Income
{ {
public int Id { get; private set; } public int Id { get; private set; }
public decimal Sum { get; private set; } public double Sum { get; private set; }
public DateTime Date { get; private set; } public DateTime Date { get; private set; }
public int IncomeCategoryId { get; private set; } public int IncomeCategoryId { get; private set; }
public static Income CreateEntity(int id, decimal sum, int incomeCategoryId) public static Income CreateIncome(int id, double sum, int incomeCategoryId)
{ {
return new Income return new Income
{ {

View File

@ -12,7 +12,7 @@ public class IncomeCategory
public int Id { get; private set; } public int Id { get; private set; }
public IncomeCategoryType Category { get; private set; } public IncomeCategoryType Category { get; private set; }
public static IncomeCategory CreateEntity(int id, IncomeCategoryType category) public static IncomeCategory CreateIncomeCategory(int id, IncomeCategoryType category)
{ {
return new IncomeCategory return new IncomeCategory
{ {

View File

@ -11,9 +11,8 @@ public class People
{ {
public int Id { get; private set; } public int Id { get; private set; }
public string FullName { get; private set; } = string.Empty; public string FullName { get; private set; } = string.Empty;
public string Name { get; private set; } = string.Empty;
public int FamilyId { get; private set; } public int FamilyId { get; private set; }
public static People CreateEntity(int id, string fullName, int familyId) public static People CreatePeople(int id, string fullName, int familyId)
{ {
return new People return new People
{ {

View File

@ -1,39 +0,0 @@
namespace ProjectFamilyBudget
{
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
}
}

View File

@ -0,0 +1,139 @@
namespace ProjectFamilyBudget
{
partial class FormFamilyBudget
{
/// <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()
{
menuStrip1 = new MenuStrip();
справочники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();
SuspendLayout();
//
// menuStrip1
//
menuStrip1.Items.AddRange(new ToolStripItem[] { справочникиToolStripMenuItem, операцииToolStripMenuItem, отчетыToolStripMenuItem });
menuStrip1.Location = new Point(0, 0);
menuStrip1.Name = "menuStrip1";
menuStrip1.Size = new Size(800, 24);
menuStrip1.TabIndex = 0;
menuStrip1.Text = "menuStrip";
//
// справочникиToolStripMenuItem
//
справочникиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { семьяToolStripMenuItem, людиToolStripMenuItem, доходToolStripMenuItem, расходToolStripMenuItem, категорияДоходаToolStripMenuItem, категорияРасходаToolStripMenuItem });
справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
справочникиToolStripMenuItem.Size = new Size(94, 20);
справочникиToolStripMenuItem.Text = "Справочники";
//
// операции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(177, 22);
семьяToolStripMenuItem.Text = "Семья";
//
// людиToolStripMenuItem
//
людиToolStripMenuItem.Name = "людиToolStripMenuItem";
людиToolStripMenuItem.Size = new Size(177, 22);
людиToolStripMenuItem.Text = "Люди";
//
// доходToolStripMenuItem
//
доходToolStripMenuItem.Name = оходToolStripMenuItem";
доходToolStripMenuItem.Size = new Size(177, 22);
доходToolStripMenuItem.Text = "Доход";
//
// расходToolStripMenuItem
//
расходToolStripMenuItem.Name = "расходToolStripMenuItem";
расходToolStripMenuItem.Size = new Size(177, 22);
расходToolStripMenuItem.Text = "Расход";
//
// категорияДоходаToolStripMenuItem
//
категорияДоходаToolStripMenuItem.Name = атегорияДоходаToolStripMenuItem";
категорияДоходаToolStripMenuItem.Size = new Size(177, 22);
категорияДоходаToolStripMenuItem.Text = "Категория дохода";
//
// категорияРасходаToolStripMenuItem
//
категорияРасходаToolStripMenuItem.Name = атегорияРасходаToolStripMenuItem";
категорияРасходаToolStripMenuItem.Size = new Size(177, 22);
категорияРасходаToolStripMenuItem.Text = "Категория расхода";
//
// FormFamilyBudget
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
BackgroundImage = Properties.Resources.свинка;
BackgroundImageLayout = ImageLayout.Zoom;
ClientSize = new Size(800, 450);
Controls.Add(menuStrip1);
MainMenuStrip = menuStrip1;
Name = "FormFamilyBudget";
StartPosition = FormStartPosition.CenterScreen;
Text = "Семейный бюджет";
menuStrip1.ResumeLayout(false);
menuStrip1.PerformLayout();
ResumeLayout(false);
PerformLayout();
}
#endregion
private MenuStrip menuStrip1;
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;
}
}

View File

@ -1,8 +1,8 @@
namespace ProjectFamilyBudget namespace ProjectFamilyBudget
{ {
public partial class Form1 : Form public partial class FormFamilyBudget : Form
{ {
public Form1() public FormFamilyBudget()
{ {
InitializeComponent(); InitializeComponent();
} }

View 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="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -1,3 +1,8 @@
using ProjectFamilyBudget.Repositories;
using ProjectFamilyBudget.Repositories.Implementations;
using Unity;
using Unity.Lifetime;
namespace ProjectFamilyBudget namespace ProjectFamilyBudget
{ {
internal static class Program internal static class Program
@ -11,8 +16,21 @@ namespace ProjectFamilyBudget
// To customize application configuration such as set high DPI settings or default font, // To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration. // see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize(); ApplicationConfiguration.Initialize();
Application.Run(new Form1()); Application.Run(CreateContainer().Resolve<FormFamilyBudget>());
} }
private static IUnityContainer CreateContainer()
{
var container = new UnityContainer();
container.RegisterType<IExpense, ExpenseRepository>(new TransientLifetimeManager());
container.RegisterType<IExpenseCategory, ExpenseCategoryRepository>(new TransientLifetimeManager());
container.RegisterType<IFamily, FamilyRepository>(new TransientLifetimeManager());
container.RegisterType<IIncome, IncomeRepository>(new TransientLifetimeManager());
container.RegisterType<IIncomeCategory, IncomeCategoryRepository>(new TransientLifetimeManager());
container.RegisterType<IPeople, PeopleRepository>(new TransientLifetimeManager());
return container;
}
} }
} }

View File

@ -8,4 +8,27 @@
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup> </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>
<ItemGroup>
<Folder Include="Forms\" />
</ItemGroup>
</Project> </Project>

View File

@ -0,0 +1,73 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Этот код создан программой.
// Исполняемая версия:4.0.30319.42000
//
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
// повторной генерации кода.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ProjectFamilyBudget.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("ProjectFamilyBudget.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 свинка {
get {
object obj = ResourceManager.GetObject("свинка", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@ -117,4 +117,8 @@
<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>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="свинка" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\свинка.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root> </root>

View File

@ -0,0 +1,17 @@
using ProjectFamilyBudget.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectFamilyBudget.Repositories;
public interface IExpense
{
IEnumerable<Expense> ReadExpense();
Expense ReadExpenseById(int id);
void CreateExpense(Expense expense);
void UpdateExpense(Expense expense);
void DeleteExpense(int id);
}

View File

@ -0,0 +1,15 @@
using ProjectFamilyBudget.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectFamilyBudget.Repositories;
public interface IExpenseCategory
{
IEnumerable<ExpenseCategory> ReadExpenseCategory();
void CreateExpenseCategory(ExpenseCategory expenseCategory);
void DeleteExpenseCategory(int id);
}

View File

@ -0,0 +1,17 @@
using ProjectFamilyBudget.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectFamilyBudget.Repositories;
public interface IFamily
{
IEnumerable<Family> ReadFamily();
Family ReadFamilyById(int id);
void CreateFamily(Family family);
void UpdateFamily(Family family);
void DeleteFamily(int id);
}

View File

@ -0,0 +1,17 @@
using ProjectFamilyBudget.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectFamilyBudget.Repositories;
public interface IIncome
{
IEnumerable<Income> ReadIncome();
Income ReadIncomeById(int id);
void CreateIncome(Income income);
void UpdateIncome(Income income);
void DeleteIncome(int id);
}

View File

@ -0,0 +1,15 @@
using ProjectFamilyBudget.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectFamilyBudget.Repositories;
public interface IIncomeCategory
{
IEnumerable<IncomeCategory> ReadIncomeCategory();
void CreateIncomeCategory(IncomeCategory IncomeCategory);
void DeleteIncomeCategory(int id);
}

View File

@ -0,0 +1,17 @@
using ProjectFamilyBudget.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectFamilyBudget.Repositories;
public interface IPeople
{
IEnumerable<People> ReadPeople();
People ReadPeopleById(int id);
void CreatePeople(People people);
void UpdatePeople(People people);
void DeletePeople(int id);
}

View File

@ -0,0 +1,24 @@
using ProjectFamilyBudget.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectFamilyBudget.Repositories.Implementations;
public class ExpenseCategoryRepository : IExpenseCategory
{
public void CreateExpenseCategory(ExpenseCategory expenseCategory)
{
}
public void DeleteExpenseCategory(int id)
{
}
public IEnumerable<ExpenseCategory> ReadExpenseCategory()
{
return [];
}
}

View File

@ -0,0 +1,36 @@
using ProjectFamilyBudget.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectFamilyBudget.Repositories.Implementations;
public class ExpenseRepository : IExpense
{
public void CreateExpense(Expense expense)
{
}
public void DeleteExpense(int id)
{
}
public IEnumerable<Expense> ReadExpense()
{
return [];
}
public Expense ReadExpenseById(int id)
{
return Expense.CreateExpense(0,0,0);
}
public void UpdateExpense(Expense expense)
{
}
}

View File

@ -0,0 +1,36 @@
using ProjectFamilyBudget.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectFamilyBudget.Repositories.Implementations;
public class FamilyRepository : IFamily
{
public void CreateFamily(Family family)
{
}
public void DeleteFamily(int id)
{
}
public IEnumerable<Family> ReadFamily()
{
return [];
}
public Family ReadFamilyById(int id)
{
return Family.CreateFamily(0, string.Empty);
}
public void UpdateFamily(Family family)
{
}
}

View File

@ -0,0 +1,26 @@
using ProjectFamilyBudget.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectFamilyBudget.Repositories.Implementations;
public class IncomeCategoryRepository : IIncomeCategory
{
public void CreateIncomeCategory(IncomeCategory IncomeCategory)
{
}
public void DeleteIncomeCategory(int id)
{
}
public IEnumerable<IncomeCategory> ReadIncomeCategory()
{
return [];
}
}

View File

@ -0,0 +1,36 @@
using ProjectFamilyBudget.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectFamilyBudget.Repositories.Implementations;
public class IncomeRepository : IIncome
{
public void CreateIncome(Income income)
{
}
public void DeleteIncome(int id)
{
}
public IEnumerable<Income> ReadIncome()
{
return [];
}
public Income ReadIncomeById(int id)
{
return Income.CreateIncome(0, 0.0, 0);
}
public void UpdateIncome(Income income)
{
}
}

View File

@ -0,0 +1,36 @@
using ProjectFamilyBudget.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectFamilyBudget.Repositories.Implementations;
public class PeopleRepository : IPeople
{
public void CreatePeople(People people)
{
}
public void DeletePeople(int id)
{
}
public People ReadPeopleById(int id)
{
return People.CreatePeople(0, string.Empty, 0);
}
public IEnumerable<People> ReadPeople()
{
return [];
}
public void UpdatePeople(People people)
{
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB