这个错误怎么解决,求程序猿大神指导!
public partial class MyOrder_MyOrder : System.Web.UI.Page
{
public static int flag = 0;
public int pageCount, pageCount1, pageCount2, show, startpoint;
string pagenum;
DataTable dtOrder;
DataRow[] drOrder;
protected void Page_Load(object sender, EventArgs e)
{
AjaxPro.Utility.RegisterTypeForAjax(typeof(MyOrder_MyOrder));
dtOrder = DBOperate.SqlMemberOrders(int.Parse(Session["MemberID"].ToString()), 0, -1, 10);
drOrder = dtOrder.Select("");
if (drOrder.Length == 0)
{
pageCount = 1;
Button1.Enabled = false;
Button2.Enabled = false;
Button3.Enabled = false;
}
else
{
pageCount = (drOrder.Length % 10 == 0) ? (drOrder.Length / 10) : (drOrder.Length / 10 + 1);
Button1.Enabled = false;
if (pageCount == 1)
{
Button2.Enabled = false;
Button3.Enabled = false;
}
this.DataList1.DataSource = DBOperate.SqlMemberOrders(int.Parse(Session["MemberID"].ToString()), 0, 0, 10);
this.DataList1.DataBind();
}
dtOrder = DBOperate.SqlMemberOrders(int.Parse(Session["MemberID"].ToString()), 2, -1, 10);
drOrder = dtOrder.Select("");
if (drOrder.Length == 0)
{
pageCount1 = 1;
Button4.Enabled = false;
Button5.Enabled = false;
Button6.Enabled = false;
}
else
{
pageCount1 = (drOrder.Length % 10 == 0) ? (drOrder.Length / 10) : (drOrder.Length / 10 + 1);
Button4.Enabled = false;
if (pageCount1 == 1)
{
Button5.Enabled = false;
Button6.Enabled = false;
}
this.DataList2.DataSource = DBOperate.SqlMemberOrders(int.Parse(Session["MemberID"].ToString()), 2, 0, 10);
this.DataList2.DataBind();
}
dtOrder = DBOperate.SqlMemberOrders(int.Parse(Session["MemberID"].ToString()), 4, -1, 10);
drOrder = dtOrder.Select("");
if (drOrder.Length == 0)
{
pageCount2 = 1;
Button7.Enabled = false;
Button8.Enabled = false;
Button9.Enabled = false;
}
else
{
pageCount2 = (drOrder.Length % 10 == 0) ? (drOrder.Length / 10) : (drOrder.Length / 10 + 1);
Button7.Enabled = false;
if (pageCount2 == 1)
{
Button8.Enabled = false;
Button9.Enabled = false;
}
this.DataList3.DataSource = DBOperate.SqlMemberOrders(int.Parse(Session["MemberID"].ToString()), 4, 0, 10);
this.DataList3.DataBind();
}
}
[AjaxPro.AjaxMethod(AjaxPro.HttpSessionStateRequirement.ReadWrite)]
public int changFlag(int i)
{
flag = i;
return flag;
}
[AjaxPro.AjaxMethod(AjaxPro.HttpSessionStateRequirement.ReadWrite)]
public int confirmOrder(int OrderID)
{
DBOperate.SqlStatusChange(OrderID, 2, 1, "");
//UpdatePanel4.Update();
return 1;
}
protected void Button1_Click(object sender, EventArgs e)
{//上一页
switch (flag)
{
case 0:
show = int.Parse(current.InnerText);
current.InnerText = (show - 1).ToString();
if ((show - 1) == 1) Button1.Enabled = false; else Button1.Enabled = true;
if ((show - 1) != pageCount)Button2.Enabled = true;
startpoint = (show - 2) * 2;
this.DataList1.DataSource = DBOperate.SqlMemberOrders(int.Parse(Session["MemberID"].ToString()), 0, startpoint, 10);
this.DataList1.DataBind();
UpdatePanel1.Update();
break;
case 2:
show = int.Parse(current1.InnerText);
current1.InnerText = (show - 1).ToString();
if ((show - 1) == 1) Button4.Enabled = false; else Button4.Enabled = true;
if ((show - 1) != pageCount1)
Button5.Enabled = true;
startpoint = (show - 2) * 2;
this.DataList2.DataSource = DBOperate.SqlMemberOrders(int.Parse(Session["MemberID"].ToString()), 2, startpoint, 10);
this.DataBind();
UpdatePanel2.Update();
break;
case 4:
show = int.Parse(current2.InnerText);
current2.InnerText = (show - 1).ToString();
if ((show - 1) == 1) Button7.Enabled = false; else Button7.Enabled = true;
if ((show - 1) != pageCount2)
Button8.Enabled = true;
startpoint = (show - 2) * 2;
this.DataList3.DataSource = DBOperate.SqlMemberOrders(int.Parse(Session["MemberID"].ToString()), 4, startpoint, 10);
this.DataBind();
UpdatePanel3.Update();
break;
default: break;
}
}
protected void Button2_Click(object sender, EventArgs e)