Example #1
0
        private void Button_Click_3(object sender, RoutedEventArgs e)
        {
            try
            {
                if (_ListView.SelectedValue == null)
                {
                    return;
                }

                DataRowView _row    = _ListView.SelectedValue as DataRowView;
                int         contrID = Convert.ToInt32(_row["CONTRACT_ID"]);

                Contracts_jbi_edit Contr_jbi_Edit = new Contracts_jbi_edit();
                Contr_jbi_Edit.ShowDialog();

                NewUpdatePril(contrID);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #2
0
        private void Button_Click_4(object sender, RoutedEventArgs e)
        {
            try
            {
                if (_ListView1.SelectedItem != null)
                {
                    DataRowView        _row           = _ListView.SelectedValue as DataRowView;
                    int                contrID        = Convert.ToInt32(_row["CONTRACT_ID"]);
                    Contracts_jbi_edit Contr_jbi_Edit = new Contracts_jbi_edit(_ListView1.SelectedItem as DataRowView);
                    Contr_jbi_Edit.ShowDialog();

                    NewUpdatePril(contrID);
                }
                else
                {
                    MessageBox.Show("Строка не выбрана!");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }