Stock chosingcombo implemented in also created registerwindow
This commit is contained in:
46
RepositoryPattern/frmRegisterStock.cs
Normal file
46
RepositoryPattern/frmRegisterStock.cs
Normal file
@ -0,0 +1,46 @@
|
||||
using StockDomain;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace RepositoryPattern
|
||||
{
|
||||
public partial class frmRegisterStock : Form
|
||||
{
|
||||
|
||||
public Dictionary<string, DiTraderStockRow> Stocks { get; set; }
|
||||
|
||||
public frmRegisterStock()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void LoadStockCombo()
|
||||
{
|
||||
if (Stocks.Count() > 0)
|
||||
{
|
||||
foreach(var key in Stocks.Keys)
|
||||
{
|
||||
cmbStockChoser.Items.Add(key);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void frmRegisterStock_Shown(object sender, EventArgs e)
|
||||
{
|
||||
LoadStockCombo();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user