private static Depot ReadDepot(string line) { string[] split = line.Split(new char[] { '#' }, 2); string[] _split = split[1].Split(new char[] { '|' }); //读取当前仓库 Depot _depot = new Depot(int.Parse(_split[0]), _split[1]); return(_depot); }
public bool Modif(int id, Depot newdepot) { id = depots.FindIndex(s => s.DepotID.Equals(id)); if (id > 0) { return(false); } else { depots[id].DepotID = newdepot.DepotID; depots[id].Location = newdepot.Location; return(true); } }
private bool SubmitEnterDepot(string str) { for (int i = 0; i < cmarket.depots.Count; i++) { Depot _depot = cmarket.depots[i]; if (int.Parse(str) >= -1 && _depot.DepotID == int.Parse(str)) { idepot.depot = _depot; idepot.index = i; ShowDepots(); return(true); } } return(false); }
public int Find(Depot depot) { return(depots.FindIndex(s => s.DepotID.Equals(depot.DepotID))); }
public bool Remov(Depot depot) { return(depots.Remove(depot)); }
// //方法 public void Add(Depot depot) { depots.Add(depot); }
public static void clear() { depot = new Depot(); index = -1; }