コード例 #1
0
 /// <summary>
 /// 双击修改用户信息
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dataGridView3_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         int     index      = dataGridView3.CurrentCell.RowIndex;
         string  userId     = dataGridView3.Rows[index].Cells["id1"].Value.ToString();
         AddUser frmadduser = new AddUser(Convert.ToInt32(userId));
         frmadduser.ShowDialog();
     }
     catch (Exception)
     {
     }
 }
コード例 #2
0
        /// <summary>
        /// 用户新增
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button11_Click(object sender, EventArgs e)
        {
            AddUser frmadduser = new AddUser(0);

            frmadduser.ShowDialog();
        }