påbörjat hantering olika portföljer

This commit is contained in:
2021-03-13 00:08:11 +01:00
parent b4a9237290
commit b25c6fd538
18 changed files with 454 additions and 71 deletions

View File

@ -0,0 +1,8 @@
using System;
namespace StockBL.Interface
{
public class IPersonStockFacade
{
}
}

View File

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,10 @@
using StockBL.Interface;
using System;
namespace StockBL
{
public class PersonStockFacade : IPersonStockFacade
{
}
}

11
StockBL/StockBL.csproj Normal file
View File

@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\StockBL.Interface\StockBL.Interface.csproj" />
</ItemGroup>
</Project>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,50 @@
using DataDomain;
using DatamodelLibrary;
using StockDAL.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StockDAL
{
public class StockPersonConnect : IStockPersonConnect
{
public IEnumerable<PersonStock> GetAllConnectionsByPersId(int personId)
{
using var context = new StockContext();
var connections = (from spc in context.PersonStocks
where spc.PersonId == personId
select spc).ToList();
return connections;
}
public PersonStock SavePersonStockConnection(PersonStock personStock)
{
using var context = new StockContext();
var entity = (from ps in context.PersonStocks
where ps.Id == personStock.Id
select ps).FirstOrDefault();
if (entity == null)
{
entity = new PersonStock
{
PersonId = personStock.PersonId,
StockId = personStock.StockId,
Comment = personStock.Comment
};
context.PersonStocks.Add(entity);
}
else
{
entity.PersonId = personStock.PersonId;
entity.StockId = personStock.StockId;
entity.Comment = personStock.Comment;
}
context.SaveChanges();
return entity;
}
}
}

View File

@ -13,7 +13,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StockDAL.Interface", "Stock
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StockInfo", "StockInfo\StockInfo.csproj", "{EC122B56-FCE0-4BBD-956D-7BF46D617CF8}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StockInfo", "StockInfo\StockInfo.csproj", "{EC122B56-FCE0-4BBD-956D-7BF46D617CF8}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Helpers", "Helpers\Helpers.csproj", "{5FEE920E-07B8-4185-A41F-1587643ECC26}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Helpers", "Helpers\Helpers.csproj", "{5FEE920E-07B8-4185-A41F-1587643ECC26}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StockBL", "StockBL\StockBL.csproj", "{C8801F5F-1C4F-4067-ADA2-A2DA299A54A8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StockBL.Interface", "StockBL.Interface\StockBL.Interface.csproj", "{BFF16A7B-9962-430B-A665-03F4174A289D}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -45,6 +49,14 @@ Global
{5FEE920E-07B8-4185-A41F-1587643ECC26}.Debug|Any CPU.Build.0 = Debug|Any CPU {5FEE920E-07B8-4185-A41F-1587643ECC26}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5FEE920E-07B8-4185-A41F-1587643ECC26}.Release|Any CPU.ActiveCfg = Release|Any CPU {5FEE920E-07B8-4185-A41F-1587643ECC26}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5FEE920E-07B8-4185-A41F-1587643ECC26}.Release|Any CPU.Build.0 = Release|Any CPU {5FEE920E-07B8-4185-A41F-1587643ECC26}.Release|Any CPU.Build.0 = Release|Any CPU
{C8801F5F-1C4F-4067-ADA2-A2DA299A54A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C8801F5F-1C4F-4067-ADA2-A2DA299A54A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C8801F5F-1C4F-4067-ADA2-A2DA299A54A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C8801F5F-1C4F-4067-ADA2-A2DA299A54A8}.Release|Any CPU.Build.0 = Release|Any CPU
{BFF16A7B-9962-430B-A665-03F4174A289D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BFF16A7B-9962-430B-A665-03F4174A289D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BFF16A7B-9962-430B-A665-03F4174A289D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BFF16A7B-9962-430B-A665-03F4174A289D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@ -0,0 +1,15 @@
using DataDomain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StockDAL.Interface
{
public interface IStockPersonConnect
{
IEnumerable<PersonStock> GetAllConnectionsByPersId(int personId);
PersonStock SavePersonStockConnection(PersonStock personStock);
}
}

View File

@ -24,7 +24,7 @@ namespace StockInfo
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
Container = Configure(); Container = Configure();
Application.Run(new frmInitial( Container.Resolve<IStockRepository>(), Container.Resolve<IStockMarketRepository>(), Container.Resolve<IPersonRepository>(), Container.Resolve<IAddressRepository>())); Application.Run(new frmInitial( Container.Resolve<IStockRepository>(), Container.Resolve<IStockMarketRepository>(), Container.Resolve<IPersonRepository>(), Container.Resolve<IAddressRepository>(), Container.Resolve<IStockPersonConnect>()));
} }
static IContainer Configure() static IContainer Configure()
@ -34,6 +34,7 @@ namespace StockInfo
builder.RegisterType<StockMarketRepository>().As<IStockMarketRepository>(); builder.RegisterType<StockMarketRepository>().As<IStockMarketRepository>();
builder.RegisterType<PersonRepository>().As<IPersonRepository>(); builder.RegisterType<PersonRepository>().As<IPersonRepository>();
builder.RegisterType<AddressRepository>().As<IAddressRepository>(); builder.RegisterType<AddressRepository>().As<IAddressRepository>();
builder.RegisterType<StockPersonConnect>().As<IStockPersonConnect>();
builder.RegisterType<frmInitial>(); builder.RegisterType<frmInitial>();
return builder.Build(); return builder.Build();
} }

View File

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace StockInfo.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.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>
/// Returns the cached ResourceManager instance used by this class.
/// </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("StockInfo.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,120 @@
<?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>
</root>

View File

@ -31,6 +31,23 @@
</ItemGroup> </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> <ItemGroup>
<None Update="Stocks.db"> <None Update="Stocks.db">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

View File

@ -228,6 +228,7 @@ namespace StockInfo
// //
// gpOwners // gpOwners
// //
this.gpOwners.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.gpOwners.Controls.Add(this.btnConnShares); this.gpOwners.Controls.Add(this.btnConnShares);
this.gpOwners.Controls.Add(this.btnEditPerson); this.gpOwners.Controls.Add(this.btnEditPerson);
this.gpOwners.Controls.Add(this.cmbOwners); this.gpOwners.Controls.Add(this.cmbOwners);

View File

@ -22,23 +22,27 @@ namespace StockInfo
private readonly IStockMarketRepository _stockMarketRepository; private readonly IStockMarketRepository _stockMarketRepository;
private readonly IPersonRepository _personRepository; private readonly IPersonRepository _personRepository;
private readonly IAddressRepository _addressRepository; private readonly IAddressRepository _addressRepository;
private readonly IStockPersonConnect _stockPersonConnect;
private frmRegisterStock regWindow; private frmRegisterStock regWindow;
private frmMyStocks stockWindow; private frmMyStocks stockWindow;
private frmSelling sellWindow; private frmSelling sellWindow;
private frmPerson personWindow; private frmPerson personWindow;
private frmPersonShareConnect personShareConnect;
public int SelectedPersonId { get; set; } = 0; public int SelectedPersonId { get; set; } = 0;
public frmInitial( public frmInitial(
IStockRepository stockMemberRepository, IStockRepository stockMemberRepository,
IStockMarketRepository stockMarketRepository, IStockMarketRepository stockMarketRepository,
IPersonRepository personRepository, IPersonRepository personRepository,
IAddressRepository addressRepository) IAddressRepository addressRepository,
IStockPersonConnect stockPersonConnect)
{ {
InitializeComponent(); InitializeComponent();
_stockRepository = stockMemberRepository; _stockRepository = stockMemberRepository;
_stockMarketRepository = stockMarketRepository; _stockMarketRepository = stockMarketRepository;
_personRepository = personRepository; _personRepository = personRepository;
_addressRepository = addressRepository; _addressRepository = addressRepository;
_stockPersonConnect = stockPersonConnect;
} }
private void Form1_Load(object sender, EventArgs e) private void Form1_Load(object sender, EventArgs e)
@ -110,7 +114,7 @@ namespace StockInfo
stockWindow.ShowDialog(); stockWindow.ShowDialog();
} }
private void chkEnableBackRes_CheckedChanged(object sender, EventArgs e) private void chkEnableBackRes_CheckedChanged(object sender, EventArgs e)
{ {
@ -180,7 +184,19 @@ namespace StockInfo
private void btnConnShares_Click(object sender, EventArgs e) private void btnConnShares_Click(object sender, EventArgs e)
{ {
if (SelectedPersonId == 0)
{
MessageBox.Show($"Ingen person vald ({SelectedPersonId})");
}
else
{
var person = _personRepository.GetPersonById(SelectedPersonId);
personShareConnect = new frmPersonShareConnect();
Cursor.Current = Cursors.WaitCursor;
personShareConnect.ConnectPerson = person;
Cursor.Current = DefaultCursor;
personShareConnect.ShowDialog();
}
} }
private void frmInitial_Shown(object sender, EventArgs e) private void frmInitial_Shown(object sender, EventArgs e)
@ -196,7 +212,7 @@ namespace StockInfo
{ {
foreach (var person in owners) foreach (var person in owners)
{ {
var itemIndex = cmbOwners.Items.Add(new ComboboxItem ($"{person.FirstName} {person.LastName} ({person.NickName})",person.Id)); var itemIndex = cmbOwners.Items.Add(new ComboboxItem($"{person.FirstName} {person.LastName} ({person.NickName})", person.Id));
} }
} }
cmbOwners.Items.Add(new ComboboxItem($"< ny person> ", 0)); cmbOwners.Items.Add(new ComboboxItem($"< ny person> ", 0));

View File

@ -319,6 +319,7 @@ namespace StockInfo
this.Controls.Add(this.txtFirstName); this.Controls.Add(this.txtFirstName);
this.Controls.Add(this.label1); this.Controls.Add(this.label1);
this.Name = "frmPerson"; this.Name = "frmPerson";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "frmPerson"; this.Text = "frmPerson";
this.Load += new System.EventHandler(this.frmPerson_Load); this.Load += new System.EventHandler(this.frmPerson_Load);
this.gbAddress.ResumeLayout(false); this.gbAddress.ResumeLayout(false);

View File

@ -29,12 +29,95 @@ namespace StockInfo
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmPersonShareConnect));
this.lstShares = new System.Windows.Forms.ListBox();
this.listBox1 = new System.Windows.Forms.ListBox();
this.btnToPerson = new System.Windows.Forms.Button();
this.lblShareHolder = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// lstShares
//
this.lstShares.FormattingEnabled = true;
this.lstShares.ItemHeight = 15;
this.lstShares.Location = new System.Drawing.Point(35, 35);
this.lstShares.Name = "lstShares";
this.lstShares.Size = new System.Drawing.Size(173, 349);
this.lstShares.TabIndex = 0;
//
// listBox1
//
this.listBox1.FormattingEnabled = true;
this.listBox1.ItemHeight = 15;
this.listBox1.Location = new System.Drawing.Point(270, 35);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(173, 349);
this.listBox1.TabIndex = 1;
//
// btnToPerson
//
this.btnToPerson.Image = ((System.Drawing.Image)(resources.GetObject("btnToPerson.Image")));
this.btnToPerson.Location = new System.Drawing.Point(214, 202);
this.btnToPerson.Name = "btnToPerson";
this.btnToPerson.Size = new System.Drawing.Size(49, 23);
this.btnToPerson.TabIndex = 2;
this.btnToPerson.UseVisualStyleBackColor = true;
//
// lblShareHolder
//
this.lblShareHolder.AutoSize = true;
this.lblShareHolder.Location = new System.Drawing.Point(270, 12);
this.lblShareHolder.Name = "lblShareHolder";
this.lblShareHolder.Size = new System.Drawing.Size(80, 15);
this.lblShareHolder.TabIndex = 3;
this.lblShareHolder.Text = "[share holder]";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(35, 12);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(102, 15);
this.label1.TabIndex = 4;
this.label1.Text = "Uncoupled Shares";
//
// button1
//
this.button1.Image = ((System.Drawing.Image)(resources.GetObject("button1.Image")));
this.button1.Location = new System.Drawing.Point(215, 173);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(49, 23);
this.button1.TabIndex = 5;
this.button1.UseVisualStyleBackColor = true;
//
// frmPersonShareConnect
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450); this.ClientSize = new System.Drawing.Size(509, 450);
this.Controls.Add(this.button1);
this.Controls.Add(this.label1);
this.Controls.Add(this.lblShareHolder);
this.Controls.Add(this.btnToPerson);
this.Controls.Add(this.listBox1);
this.Controls.Add(this.lstShares);
this.Name = "frmPersonShareConnect";
this.Text = "frmPersonShareConnect"; this.Text = "frmPersonShareConnect";
this.Shown += new System.EventHandler(this.frmPersonShareConnect_Shown);
this.ResumeLayout(false);
this.PerformLayout();
} }
#endregion #endregion
private System.Windows.Forms.ListBox lstShares;
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.Button btnToPerson;
private System.Windows.Forms.Label lblShareHolder;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button1;
} }
} }

View File

@ -1,4 +1,5 @@
using System; using DataDomain;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@ -12,9 +13,16 @@ namespace StockInfo
{ {
public partial class frmPersonShareConnect : Form public partial class frmPersonShareConnect : Form
{ {
public Person ConnectPerson { get; set; }
public frmPersonShareConnect() public frmPersonShareConnect()
{ {
InitializeComponent(); InitializeComponent();
} }
private void frmPersonShareConnect_Shown(object sender, EventArgs e)
{
this.Text = $"{ConnectPerson.Id} - {ConnectPerson.FirstName} {ConnectPerson.LastName}'s Shares";
this.lblShareHolder.Text = $"{ConnectPerson.FirstName} {ConnectPerson.LastName}'s Shares";
}
} }
} }

View File

@ -1,64 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <root>
<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: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:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">
@ -117,4 +57,23 @@
<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.Drawing.Common" name="System.Drawing.Common, Version=5.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" />
<data name="btnToPerson.Image" type="System.Drawing.Bitmap, System.Drawing.Common" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACiSURBVDhPY0AH37594wPie0D8H4ihoiQAoKYlq1evBmkm
3QCghqgbN2789/DwIN0AoGKFj0CQlJT038nJCWYAQQzTzAzERydOnAjWjI5BCnGxYQbUHzlyBC6BjvEa
ACSsnj9//ic4OBgugY4JGXCvoqICLogN09wAyrxAcSBCDaAsGkEAyCE/IcEAUAAjKRPCGAAoiJKZCGEM
ABQkITszMAAAZBgNueqz2kUAAAAASUVORK5CYII=
</value>
</data>
<data name="button1.Image" type="System.Drawing.Bitmap, System.Drawing.Common" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACmSURBVDhPYyAGfPv27T8Q3wNiPqgQaQBkwNq1a0GGLIEK
kQZABnh4ePy/efMmyJAoqDAEgCSJwU5OTv9TUlL+fwQCIF8Bqh1iAEgShHGxkfHkyZNBckeBmJksA0D4
6NGjIPl6sg0ICQn5/+LFiz9ANVZkGQDClZWVIDX3BsYAir1AUSBijUZiMEgz1oT0//9/kCGEMO6kDAJo
irFhyjMTEGPJzgwMAF29/539maLfAAAAAElFTkSuQmCC
</value>
</data>
</root> </root>