Agliullov D. A. Lab Work 1 Hard #3

Closed
d.agliullov wants to merge 22 commits from Lab1_Hard into Lab1_Base
3 changed files with 42 additions and 18 deletions
Showing only changes of commit 873df1007e - Show all commits

View File

@ -1,12 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ConfectioneryDataModels;
using ConfectioneryDataModels.Models;
namespace ConfectioneryContracts.BindingModels
{
internal interface ShopBindingModel
public class ShopBindingModel : IShopModel
{
public string Name { get; set; } = string.Empty;
public string Address { get; set; } = string.Empty;
public DateTime DateOpening { get; set; } = DateTime.Now;
public Dictionary<int, (IShopModel, int)> Pastries
{
get;
set;
} = new();
public int Id { get; set; }
}
}

View File

@ -1,12 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ConfectioneryDataModels;
using ConfectioneryDataModels.Models;
using System.ComponentModel;
namespace ConfectioneryContracts.ViewModels
{
internal class ShopViewModel
public class ShopViewModel : IShopModel
{
[DisplayName("Название магазина")]
public string Name { get; set; } = string.Empty;
[DisplayName("Адрес магазина")]
public string Address { get; set; } = string.Empty;
[DisplayName("Время открытия")]
public DateTime DateOpening { get; set; } = DateTime.Now;
public Dictionary<int, (IShopModel, int)> Pastries
{
get;
set;
} = new();
public int Id { get; set; }
}
}

View File

@ -1,12 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ConfectioneryDataModels.Models;
namespace ConfectioneryDataModels
{
internal interface IShopModel
public interface IShopModel : IId
{
string Name { get; }
string Address { get; }
DateTime DateOpening { get; }
Dictionary<int, (IShopModel, int)> Pastries { get; }
}
}