private void Modify()
        {
            var id = (int)this.dgvContactList.CurrentRow.Cells[0].Value;

            if (id < 0)
            {
                return;
            }

            var form = new FormContactDetail(id);

            form.ShowDialog();
            this.Fill();
        }
예제 #2
0
        private void btnModify_Click(object sender, EventArgs e)
        {
            int id = 0;

            try
            {
                id = (int)dgvContactList.CurrentRow.Cells[0].Value;
            }
            catch (System.Exception ex)
            {
                MessageBox.Show("请选择有效数据行!");
                return;
            }
            FormContactDetail f = new FormContactDetail(id);

            f.ShowDialog();
            Fill();
        }