none
大家帮忙看看这段代码 RRS feed

  • 问题

  •         public int SelectRow()
            {
                int RowNumber = dgvRoomInformationView.CurrentCell.RowIndex;
               
                txtRoomId.Text = dgvRoomInformationView.SelectedCells[1].Value.ToString();
                cboRoomType.Text = dgvRoomInformationView.SelectedCells[2].Value.ToString();
                txtPrice.Text = dgvRoomInformationView.SelectedCells[4].Value.ToString();
                txtRoomMemo.Text = dgvRoomInformationView.SelectedCells[5].Value.ToString();
                string getText= dgvRoomInformationView.SelectedCells[3].Value.ToString();
                switch (getText)//为什么程序运行到这就直接跳出Switch了

                {
                    case "空房": rbtnNull.Checked = true; break;
                    case "停用": rbtnStop.Checked = true; break;
                    case "维护": rbtnService.Checked = true; break;
                }
                return RowNumber;

            }

    2010年5月14日 15:40

答案

全部回复