public void AddJYC() { Keys?pk = GetKeyFromStr(PKTextValue); if (pk != null) { JYCommand jyc = new JYCommand(); jyc.KeyValue = new Key_Values(); jyc.KeyValue.PK = (Keys)pk; JYComandList.Add(jyc); SelectJYComand = jyc; } }
public void RemoveJYC() { if (SelectJYComand != null && SelectJYComand.KeyValue != null) { if (JYComandList.Count(t => t.KeyValue.PK == SelectJYComand.KeyValue.PK) > 0) { var jyc = JYComandList.First(t => t.KeyValue.PK == SelectJYComand.KeyValue.PK); if (jyc != null) { JYComandList.Remove(jyc); if (SelectJYComand == jyc) { SelectJYComand = JYComandList.Last(); } } } } }
public void Reverse() { SelectJYComand = null; JYComandList.Clear(); }