最后10分求解.
我的代码如下:
try
{
DataSet dsl = new DataSet();
string gzyear = (String)Session[ "GZYear "];
string gzmonth = (String)Session[ "GZMonth "];
string bdepart = (String)Session[ "ChineseName "];
string strSQL = "select top 1 TiJiao,ShenHe from ejjj where GZYear= ' " + gzyear.Trim() + " ' and GZMonth= ' " + gzmonth.Trim() + " ' and Bdepart= ' " + bdepart.Trim() + " ' ";
dsl = getAdvice(strSQL);
string tijiao = dsl.Tables[0].Rows[0].ItemArray[0].ToString();
string shenhe = dsl.Tables[0].Rows[0].ItemArray[1].ToString();
if (dsl.Tables[0].Rows.Count > 0)
{
if (!string.IsNullOrEmpty(tijiao))
{
if ((tijiao.Trim() == "t "))
{
GridView1.Columns[0].Visible = false;
ButtonTJ.Visible = false;
}
else
{