Exemplo n.º 1
0
        private void gvList_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            string id = gvList.SelectedRows[0].Cells[0].Value.ToString();

            if (id != "")
            {
                frmEditCategory frmEdit = new frmEditCategory();
                frmEdit.Owner = this;
                frmEdit.Tag   = id.ToString();
                frmEdit.ShowDialog();
            }
        }
Exemplo n.º 2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            string id = gvList.SelectedRows[0].Cells[0].Value.ToString();

            if (id != "")
            {
                frmEditCategory frmEdit = new frmEditCategory();
                frmEdit.Owner = this;
                frmEdit.Tag   = id.ToString();
                frmEdit.ShowDialog();
            }
            else
            {
                MessageBoxEx.Show("请选择要修改的行!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }