コード例 #1
0
        private void buttonDepartureAdd_Click(object sender, EventArgs e)
        {
            DbDeparture form = new DbDeparture();

            form.Text = "Добавление поступления";
            form.buttonDepartureAddDb.Visible = true;
            form.Show();
        }
コード例 #2
0
 private void buttonDepartureEdit_Click(object sender, EventArgs e)
 {
     try
     {
         DbDeparture form = new DbDeparture();
         form.Text = "Редактирование поступления";
         form.buttonDepartureEdit.Visible = true;
         int did = Convert.ToInt32(dataGridViewDeparture.SelectedCells[0].Value);
         var d   = db.Departures.Find(did);
         form.textBoxDeparureQuantityDb.Text = d.DepartureQuantity.ToString();
         form.labelId.Text = d.DepartureId.ToString();
         form.Show();
     }
     catch (Exception gg)
     {
         MessageBox.Show(gg.Message);
     }
 }