Exemplo n.º 1
0
 private void Hinzufuegen(Regal tmp)
 {
     //_nameDict.Add(tmp.Name, tmp.RegalID);
     _dict.Add(tmp.RegalID, tmp);
     RegalHinzugefuegt?.Invoke(this, EventArgs.Empty);
     Views.Dashboard.Verwaltung.UpdateForm();
 }
Exemplo n.º 2
0
 public static bool Entfernen(ref Regal tmp)
 {
     if (_dict.Remove(tmp.RegalID))
     {
         RegalEntfernt?.Invoke(tmp, EventArgs.Empty);
         tmp = null;
         return(true);
     }
     return(false);
 }
Exemplo n.º 3
0
        public Regalfach(ushort regalfach_id, ushort regal_id, string name, DateTime erstellt_am, DateTime geaendert_am, float hoehe, float breite, float laenge, string bemerkung = "")
        {
            Contract.Requires(regalfach_id >= 1);
            Contract.Requires(regal_id >= 1);
            Contract.Requires(name.Length <= 15);   // plus minimal Länge laut Data Dictionary später
            Contract.Requires(hoehe >= 0);
            Contract.Requires(breite >= 0);
            Contract.Requires(laenge >= 0);

            RegalfachID  = regalfach_id;
            RegalID      = regal_id;
            Name         = name;
            Erstellt_Am  = erstellt_am;
            Geaendert_Am = geaendert_am;
            Hoehe        = hoehe;
            Breite       = breite;
            Laenge       = laenge;
            Bemerkung    = bemerkung;
            Paketliste   = new List <Paket>();
            Regal.RegalfachHinzufuegen(regal_id, this);

            Hinzufuegen(this);
        }
Exemplo n.º 4
0
 public static void RegalHinzufuegen(ushort lagerID, Regal tmp)
 {
     _dict[lagerID].Regalliste.Add(tmp);
 }