private void BindGrid2() { DataTable dt = new DataTable(); string teacherName = Session["admin_name"].ToString(); if (teacherName.Equals("不指定老师")) { dt = messageBLL.GetAllMessageNotReplied(); } else { dt = messageBLL.GetAllMessageNotRepliedByTeacher(teacherName); DataTable dt1 = messageBLL.GetAllMessageNotRepliedByTeacher("不指定老师"); dt.Merge(dt1); } Grid1.DataSource = dt; Grid1.DataBind(); }