Ejemplo n.º 1
0
 public static void AddTov(string name, int code, DateTime dateTime, int term, string path, ref List <Entity.Entity> ent)
 {
     Entity.Entity tov = new Entity.Entity(name, code, dateTime, term);
     ent.Add(tov);
     EntityDB.MyFileEditor fw = new EntityDB.MyFileEditor();
     fw.BinaryWrite(path, ent);
     Console.WriteLine("Tovar added");
 }
Ejemplo n.º 2
0
 public static void RemoveTov(int index, string path, ref List <Entity.Entity> ent)
 {
     if (index < ent.Count)
     {
         ent.RemoveAt(index);
         EntityDB.MyFileEditor fw = new EntityDB.MyFileEditor();
         fw.BinaryWrite(path, ent);
     }
     else
     {
         Console.WriteLine("Wrong index!");
     }
 }