New field in stockmembers
This commit is contained in:
@ -21,6 +21,7 @@ namespace DataDomain
|
||||
// public string PostId { get; set; }
|
||||
public string Comment { get; set; }
|
||||
public long PostAmount { get; set; }
|
||||
public decimal SoldStockPrice { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,12 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.3" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.3">
|
||||
<PackageReference Include="EntityFramework" Version="6.4.4" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.6">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
||||
177
DatamodelLibrary/Migrations/20210512210945_NewStockFields.Designer.cs
generated
Normal file
177
DatamodelLibrary/Migrations/20210512210945_NewStockFields.Designer.cs
generated
Normal file
@ -0,0 +1,177 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using DatamodelLibrary;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace DatamodelLibrary.Migrations
|
||||
{
|
||||
[DbContext(typeof(StockContext))]
|
||||
[Migration("20210512210945_NewStockFields")]
|
||||
partial class NewStockFields
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "5.0.6");
|
||||
|
||||
modelBuilder.Entity("DataDomain.Address", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Destination")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Nation")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Street")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Street2")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("Zipcode")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Addresses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DataDomain.BackupRegister", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("BackedUp")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("BackupDbName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("BackupPath")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("DbName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("BackupRegings");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DataDomain.Person", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("AccountNo")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Born")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("ClearingNo")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Comments")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("FirstName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("HomeAddress")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("InvoiceAddress")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("NickName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Persons");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DataDomain.PersonStock", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("PersonId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("StockId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("PersonStocks");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DataDomain.StockMember", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("ActAmount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime?>("ActDate")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<decimal>("ActValue")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("BuyDate")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<decimal>("BuyValue")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<long>("PostAmount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime?>("SoldDate")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<decimal>("SoldStockPrice")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<decimal?>("SoldValue")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("StockExtId")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("StockId")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Stocks");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
24
DatamodelLibrary/Migrations/20210512210945_NewStockFields.cs
Normal file
24
DatamodelLibrary/Migrations/20210512210945_NewStockFields.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace DatamodelLibrary.Migrations
|
||||
{
|
||||
public partial class NewStockFields : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "SoldStockPrice",
|
||||
table: "Stocks",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: 0m);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SoldStockPrice",
|
||||
table: "Stocks");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -14,7 +14,7 @@ namespace DatamodelLibrary.Migrations
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "5.0.3");
|
||||
.HasAnnotation("ProductVersion", "5.0.6");
|
||||
|
||||
modelBuilder.Entity("DataDomain.Address", b =>
|
||||
{
|
||||
@ -153,6 +153,9 @@ namespace DatamodelLibrary.Migrations
|
||||
b.Property<DateTime?>("SoldDate")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<decimal>("SoldStockPrice")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<decimal?>("SoldValue")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
|
||||
@ -7,6 +7,10 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.6">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
@ -26,9 +30,5 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<!--<ItemGroup>
|
||||
--><!--<ProjectReference Include="..\DIDemoLib\DIDemoLib.csproj" />--><!--
|
||||
</ItemGroup>-->
|
||||
|
||||
</Project>
|
||||
Binary file not shown.
@ -90,6 +90,7 @@ namespace StockInfoCore
|
||||
txtTotalPlus.Text = TotalPlus.ToString();
|
||||
txtTotalPlus.Refresh();
|
||||
|
||||
lbUpdateTimes.Items.Add($"{DateTime.Now.ToLongTimeString()} - {txtTotDiff.Text.Substring(0, txtTotDiff.Text.Length - 2)}");
|
||||
|
||||
}
|
||||
|
||||
@ -98,7 +99,7 @@ namespace StockInfoCore
|
||||
_stockMarketRepository.LoadStockMarketList();
|
||||
Stocks = _stockMarketRepository.StockMarketList;
|
||||
ReloadData();
|
||||
lbUpdateTimes.Items.Add($"{DateTime.Now.ToLongTimeString()} - {txtTotDiff.Text.Substring(0, txtTotDiff.Text.Length-2)}");
|
||||
// lbUpdateTimes.Items.Add($"{DateTime.Now.ToLongTimeString()} - {txtTotDiff.Text.Substring(0, txtTotDiff.Text.Length-2)}");
|
||||
}
|
||||
|
||||
private void lvMyStocks_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user