#region 设置单选框选择的值
private void setCheckBoxValue(DataTable dt)
{
//选题内容评价
switch (dt.Rows[0]["xtnr"].ToString())
{
case "1":
xtnr1.Checked = true;
break;
case "2":
xtnr2.Checked = true;
break;
case "3":
xtnr3.Checked = true;
break;
case "4":
xtnr4.Checked = true;
break;
case "5":
xtnr5.Checked = true;
break;
default:
break;
}
//开题报告书面材料准备情况评价
switch (dt.Rows[0]["ktbg"].ToString())
{
case "1":
ktbg1.Checked = true;
break;
case "2":
ktbg2.Checked = true;
break;
case "3":
ktbg3.Checked = true;
break;
case "4":
ktbg4.Checked = true;
break;
case "5":
ktbg5.Checked = true;
break;
default:
break;
}
//文献查阅与资料总结评价
switch (dt.Rows[0]["wxcy"].ToString())
{
case "1":
wxcy1.Checked = true;
break;
case "2":
wxcy2.Checked = true;
break;
case "3":
wxcy3.Checked = true;
break;
case "4":
wxcy4.Checked = true;
break;
case "5":
wxcy5.Checked = true;
break;
default:
break;
}
//外文文献翻译情况评价
switch (dt.Rows[0]["wwwxfy"].ToString())
{
case "1":
wwwxfy1.Checked = true;
break;
case "2":
wwwxfy2.Checked = true;
break;
case "3":
wwwxfy3.Checked = true;
break;
case "4":
wwwxfy4.Checked = true;
break;
case "5":
wwwxfy5.Checked = true;
break;
default:
break;
}
//撰写计划执行情况评价
switch (dt.Rows[0]["planExec"].ToString())
{
case "1":
planExec1.Checked = true;
break;
case "2":
planExec2.Checked = true;
break;
case "3":
planExec3.Checked = true;
break;
case "4":
planExec4.Checked = true;
break;
case "5":
planExec5.Checked = true;
break;
default:
break;
}
//毕业实习(调查)报告完成情况评价
switch (dt.Rows[0]["sxFinish"].ToString())
{
case "1":
sxFinish1.Checked = true;
break;
case "2":
sxFinish2.Checked = true;
break;
case "3":
sxFinish3.Checked = true;
break;
case "4":
sxFinish4.Checked = true;
break;
case "5":
sxFinish5.Checked = true;
break;
default:
break;
}
//指导教师对阶段性工作质量评语评价
switch (dt.Rows[0]["workPY"].ToString())
{
case "1":
workPY1.Checked = true;
break;
case "2":
workPY2.Checked = true;
break;
case "3":
workPY3.Checked = true;
break;
case "4":
workPY4.Checked = true;
break;
case "5":
workPY5.Checked = true;
break;
default:
break;
}
//总体评价
switch (dt.Rows[0]["ztpj"].ToString())
{
case "1":
ztpj1.Checked = true;
break;
case "2":
ztpj2.Checked = true;
break;
case "3":
ztpj3.Checked = true;
break;
case "4":
ztpj4.Checked = true;
break;
case "5":
ztpj5.Checked = true;
break;
default:
break;
}
}
#endregion
原文地址:https://www.cnblogs.com/oralig/p/9876335.html