调试时出现“索引超出了数组界限”如何解决
一:调试到这里时catch,出现"索引超出了数组界限"
public C01_C_Cust_Info GetC01_C_Cust_Info(string[] ParaArray)
{
C01_C_Cust_Info ReturnValue;
try
{
IC01_C_Cust_InfoDR dal = C01_C_Cust_InfoDal.Create("BIR.DAL", "2014-01-25");
ReturnValue = dal.GetC01_C_Cust_Info(ParaArray);
}
catch (Exception ex)
{
ReturnValue = null;
}
return ReturnValue;
}
二:DAL部分(部分省略):
public C01_C_Cust_Info GetC01_C_Cust_Info(string[] ParaArray)
{
C01_C_Cust_Info result = new C01_C_Cust_Info();
string sql = string.Format("select * from JGB.J20_C_CUST_INFO where STATIS_DT=TO_DATE('{0}','YYYY-MM-DD') AND Cust_Id ='{1}' AND ORG_ID='{2}'", ParaArray[0], ParaArray[1], ParaArray[2]);
。。。。。。
}
三:点击时触发的事件(部分省略):
if (command.Equals("Check"))
{
this.hidEditId.Value = e.ExtraParams["keyId"].ToString();
SetEditDataInit();
}
protected void SetEditDataInit()
{
string[] ParaArray = FormatPara(this.hidEditId.Value.ToString());
C01_C_Cust_Info ent = bizHelper.GetC01_C_Cust_Info(ParaArray);
}
四:页面中的keyId:
<ext:Parameter Mode="Raw" Name="keyId" Value="record.data.REPORT_DATE" />