- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
private void Form1_Load(object sender, EventArgs e)
{
List<defaultItem> EqQty = new List<defaultItem>();
EqQty.Add(new defaultItem(1, 1.ToString()));
EqQty.Add(new defaultItem(2, 2.ToString()));
EqQty.Add(new defaultItem(3, 3.ToString()));
EqQty.Add(new defaultItem(4, 4.ToString()));
EqQty.Add(new defaultItem(5, 5.ToString()));
cbEqQty.DataSource = EqQty;
cbEqQty.ValueMember = "Key";
cbEqQty.DisplayMember = "Value";
List<defaultItem> PlusQty = new List<defaultItem>();
PlusQty.Add(new defaultItem(1, 1.ToString()));
PlusQty.Add(new defaultItem(2, 2.ToString()));
PlusQty.Add(new defaultItem(3, 3.ToString()));
PlusQty.Add(new defaultItem(4, 4.ToString()));
PlusQty.Add(new defaultItem(5, 5.ToString()));
cbPlusQty.DataSource = PlusQty;
cbPlusQty.ValueMember = "Key";
cbPlusQty.DisplayMember = "Value";
}
public class defaultItem
{
public int Key { get; set; }
public String Value { get; set; }
/// <summary>
/// Коснтруктор
/// </summary>
/// <param name="Key"></param>
/// <param name="Value"></param>
public defaultItem
(
int Key,
String Value
)
{
this.Key = Key;
this.Value = Value;
}
}