Zhelovanov D.Y. LabWork08 #10

Closed
Zhelovanov_Dmitrii wants to merge 2 commits from LabWork08 into LabWork07
12 changed files with 13 additions and 4 deletions
Showing only changes of commit 1cd8aab404 - Show all commits

1
.gitignore vendored
View File

@ -13,6 +13,7 @@
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
*.dll
# Mono auto generated files
mono_crash.*

View File

@ -24,6 +24,7 @@ logic)
InitializeComponent();
_logger = logger;
_logic = logic;
LoadData();
}
private void LoadData()

View File

@ -25,6 +25,7 @@ logic)
InitializeComponent();
_logger = logger;
_logic = logic;
LoadData();
}
private void FormComponents_Load(object sender, EventArgs e)

View File

@ -65,6 +65,10 @@ namespace BlacksmithWorkshopBusinessLogic.BusinessLogics
if (type.IsInterface && type.GetInterface(typeIId.Name) !=
null)
{
if(!type.IsInterface)
{
throw new Exception("fgdfd");
}
var modelType =
_backUpInfo.GetTypeByModelInterface(type.Name);
if (modelType == null)

View File

@ -15,7 +15,7 @@ namespace BlacksmithWorkshopContracts.ViewModels
public int Id { get; set; }
[Column(title: "Название компонента", width: 150)]
public string ComponentName { get; set; } = string.Empty;
[Column(title: "цена")]
[Column(title: "цена", width: 150)]
public double Cost { get; set; }
}
}

View File

@ -11,6 +11,7 @@ using System.Threading.Tasks;
namespace BlacksmithWorkshopDatabaseImplement.Models
{
[DataContract]
public class MessageInfo : IMessageInfoModel
{
[Key]

View File

@ -13,6 +13,7 @@ using System.Xml.Linq;
namespace BlacksmithWorkshopDatabaseImplement.Models
{
[DataContract]
public class Order : IOrderModel
{
[DataMember]
@ -23,8 +24,8 @@ namespace BlacksmithWorkshopDatabaseImplement.Models
[DataMember]
[Required]
public int Count { get; private set; }
[Required]
[DataMember]
[Required]
public double Sum { get; private set; }
[DataMember]
public string ManufactureName { get; private set; } = string.Empty;
@ -96,7 +97,7 @@ namespace BlacksmithWorkshopDatabaseImplement.Models
Status = model.Status;
DateImplement = model.DateImplement;
ImplementerId = model.ImplementerId; ;
ImplementerId = model.ImplementerId;

View File

@ -72,7 +72,7 @@ namespace BlacksmithWorkshopFileImplement.Models
Status = (OrderStatus)Enum.Parse(typeof(OrderStatus), element.Element("Status")!.Value),
DateCreate = Convert.ToDateTime(element.Element("DateCreate")!.Value),
DateImplement = string.IsNullOrEmpty(element.Element("DateImplement")!.Value) ? null : Convert.ToDateTime(element.Element("DateImplement")!.Value),
ClientId = Convert.ToInt32(element.Element("ClientId")!.Value)
//ClientId = Convert.ToInt32(element.Element("ClientId")!.Value)
};
}
public void Update(OrderBindingModel model)