Exemple #1
0
        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);
        }
Exemple #2
0
 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);
     }
 }
Exemple #3
0
 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);
 }
Exemple #4
0
 public int Find(Depot depot)
 {
     return(depots.FindIndex(s => s.DepotID.Equals(depot.DepotID)));
 }
Exemple #5
0
 public bool Remov(Depot depot)
 {
     return(depots.Remove(depot));
 }
Exemple #6
0
 //
 //方法
 public void Add(Depot depot)
 {
     depots.Add(depot);
 }
Exemple #7
0
 public static void clear()
 {
     depot = new Depot();
     index = -1;
 }