public Завоз_товара(DB db, Towar tower)
 {
     InitializeComponent();
     this.db = db;
     towar   = tower;
     comboBox1.DataSource    = db.postavshiks;
     comboBox1.DisplayMember = "Name";
     comboBox1.SelectedIndex = 0;
 }
Beispiel #2
0
        private void отправитьТоварToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (listView1.SelectedItems.Count == 0)
            {
                return;
            }
            Towar towar = (Towar)listView1.SelectedItems[0].Tag;

            new Вывоз_товара(db, towar).Show();
        }
Beispiel #3
0
        public void b(Zakashik postavshik, Towar towar, int kolishestvo)
        {
            History history = new History();

            history.kto   = postavshik.Name;
            history.skoka = kolishestvo.ToString();
            string s = $"Вывезен {towar.Name}";

            history.chto = s;
            historys.Add(history);
            Save();
        }
Beispiel #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (comboBox1.SelectedItem == null)
            {
                return;
            }
            Towar towar = new Towar();

            towar.Name = textBox7.Text;
            towar.Type = (Type)comboBox1.SelectedItem;
            db.towars.Add(towar);
            db.Save();
            Close();
        }