//双击记录数据
 private void dgvConditionTreatRecordList_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex >= 0)
     {
         SYS_USERS     userobj  = dgvConditionTreatRecordList.Rows[0].Tag as SYS_USERS;
         sys_user_edit useredit = new sys_user_edit(-1, userobj, this);
         useredit.ShowDialog();
     }
 }
 //修改数据
 private void button1_Click(object sender, EventArgs e)
 {
     if (dgvConditionTreatRecordList.SelectedRows.Count >= 1)
     {
         SYS_USERS     userobj  = dgvConditionTreatRecordList.SelectedRows[0].Tag as SYS_USERS;
         sys_user_edit useredit = new sys_user_edit(-1, userobj, this);
         useredit.ShowDialog();
     }
     else
     {
         MessageBox.Show("请选择要修改的行!", "系统提示");
     }
 }
 private void dgvConditionTreatRecordList_CellDoubleClick_1(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex >= 0)
     {
         if (dgvConditionTreatRecordList.Rows[e.RowIndex].Tag != null)
         {
             sys_user_edit useredit = new sys_user_edit(e.RowIndex, null, this);
             useredit.ShowDialog();
         }
         else
         {
             MessageBox.Show("选择纪录为空,不允许修改");
             return;
         }
     }
 }
        private void btnInput_Click(object sender, EventArgs e)
        {
            sys_user_edit useredit = new sys_user_edit(-1, null, this);

            useredit.ShowDialog();
        }