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

            //if (this.phoneInfoListDataGridView.SelectedRows.Count > 0)
            //{
            //    AddRowPhoneForm CreatePhoneInfo = new AddRowPhoneForm(PhoneInfoList, phoneInfoListDataGridView.SelectedRows[0].Index);

            //    DialogResult dr = CreatePhoneInfo.ShowDialog();
            //    if (dr == DialogResult.Cancel)
            //    {
            //        //CopyListToGrid();
            //    }
            //}
            if (phoneInfoListDataGridView.CurrentCell != null)
            {
                AddRowPhoneForm CreatePhoneInfo = new AddRowPhoneForm(PhoneInfoList, phoneInfoListDataGridView.CurrentCell.RowIndex);
                CreatePhoneInfo.ShowDialog();
            }
        }
Ejemplo n.º 2
0
        private void Add_toolStripButton1_Click(object sender, EventArgs e)
        {
            AddRowPhoneForm CreatePhoneInfo = new AddRowPhoneForm(PhoneInfoList);

            CreatePhoneInfo.ShowDialog();
        }