예제 #1
0
 public void UpdateUnit(T_Unit unit)
 {
     UnitList.Remove(UnitList.Find(o => o.Code == unit.Code));
     UnitList.Add(unit);
 }
예제 #2
0
        private void InitUnitList()
        {
            UnitList = new List<T_Unit>();

            T_Unit unitA = new T_Unit() { Code = "m", Desc = "米" };
            T_Unit unitB = new T_Unit() { Code = "t", Desc = "吨" };
            T_Unit unitC = new T_Unit() { Code = "g", Desc = "克" };
            T_Unit unitD = new T_Unit() { Code = "kg", Desc = "千克" };
            T_Unit unitE = new T_Unit() { Code = "¥", Desc = "元" };
            T_Unit unitF = new T_Unit() { Code = "$", Desc = "美元" };

            UnitList.Add(unitA);
            UnitList.Add(unitB);
            UnitList.Add(unitC);
            UnitList.Add(unitD);
            UnitList.Add(unitE);
            UnitList.Add(unitF);
        }
예제 #3
0
 public void AddUnit(T_Unit unit)
 {
     UnitList.Add(unit);
 }