Exemplo n.º 1
0
        private void Edit_toolStripButton2_Click(object sender, EventArgs e)
        {
            //редактировать
            //MessageBox.Show("Выбрано строк:" + addressListDataGridView.SelectedRows.Count);

            if (this.addressListDataGridView.CurrentCell != null)
            {
                AddRowAddressForm EditAddress = new AddRowAddressForm(AddressList, addressListDataGridView.CurrentCell.RowIndex);
                DialogResult      dr          = EditAddress.ShowDialog();
                if (dr == DialogResult.Cancel)
                {
                }
            }
            //else
            //{
            //    MessageBox.Show("Выберите строку для редактирования.");
            //    //AddRowAddressForm CreateAddress = new AddRowAddressForm(AddressList, addressListDataGridView.CurrentCell.RowIndex);
            //    //DialogResult dr = CreateAddress.ShowDialog();
            //    //if (dr == DialogResult.Cancel)
            //    //{
            //    //    //CopyListToGrid();
            //    //}
            //}
        }
Exemplo n.º 2
0
        private void Add_toolStripButton1_Click(object sender, EventArgs e)
        {
            AddRowAddressForm CreateAddress = new AddRowAddressForm(AddressList);

            CreateAddress.ShowDialog();
        }