Exemplo n.º 1
0
        private void buttonUpd_Click(object sender, EventArgs e)
        {
            int    CurrentRow    = dataGridViewJournal.SelectedCells[0].RowIndex;
            string CodeOperation = dataGridViewJournal[2, CurrentRow].Value.ToString();
            string OperationName = dataGridViewJournal[3, CurrentRow].Value.ToString();

            if (OperationName == "Поступление серии авто")
            {
                FormEntrance entrance = new FormEntrance();
                entrance.Show();
                entrance.findStroka(CodeOperation);
            }
            else if (OperationName == "Продажа авто")
            {
                FormSale sale = new FormSale();
                sale.Show();
                sale.findStroka(CodeOperation);
            }
        }
Exemplo n.º 2
0
 //Добавление записи в жур. операций
 private void toolStripButtonAdd_Click(object sender, EventArgs e)
 {
     if (toolStripComboOperation.Text == "")
     {
         MessageBox.Show("Выберите операцию", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return;
     }
     else if (toolStripComboOperation.Text == "Поступление серии авто")
     {
         FormEntrance entr = new FormEntrance();
         entr.ShowDialog();
     }
     else if (toolStripComboOperation.Text == "Продажа авто")
     {
         FormSale sale = new FormSale();
         sale.ShowDialog();
     }
     selectCommand = "Select * from JournalOper";
     refreshForm(ConnectionString, selectCommand);
 }