Esempio n. 1
0
        private void DataGridControls_BeginningEdit(object sender, DataGridBeginningEditEventArgs e)
        {
            //--помечает измененные экземпляры
            IntermediateControl editControl = DataGridControls.SelectedItem as IntermediateControl;

            editControl.isEdit = true;
        }
Esempio n. 2
0
        //обновление строки в промежуточном контроле +
        internal static void UpdateControl(IntermediateControl control)
        {
            try
            {
                NpgsqlConnection bd = new NpgsqlConnection(connectionString);
                bd.Open();

                NpgsqlCommand npgSqlCommand = new NpgsqlCommand(
                    $"SELECT update_intermediate_control('{control.Id}','{control.Type.Name}','{control.MaxBall}');", bd);
                npgSqlCommand.ExecuteNonQuery();
                bd.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show("ex:" + ex.Message);
            }
        }