[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)]
public virtual int FillByDateTime(db_cantingDataSetAttM.tb_attendanceDataTable dataTable, string ReferTime, string StartTime)
{
this.Adapter.SelectCommand = this.CommandCollection[0];
if ((ReferTime == null))
{
throw new global::System.ArgumentNullException("ReferTime");
}
else
{
this.Adapter.SelectCommand.Parameters[0].Value = ((string)(ReferTime));
}
if ((StartTime == null))
{
throw new global::System.ArgumentNullException("StartTime");
}
else
{
this.Adapter.SelectCommand.Parameters[1].Value = ((string)(StartTime));
}
if ((this.ClearBeforeFill == true))
{
dataTable.Clear();
}
int returnValue = this.Adapter.Fill(dataTable);
return returnValue;
}
}这是我在Designer.cs中添加的方法当在.cs*中调用时 this.tb_attendanceTableAdapter.FillByDateTime(this.db_cantingDataSetAttM.tb_attendance, startDate, endDate);会报sqlparameterCollection的Count=0的索引无效请大家帮忙看下是哪里出了问题
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)]
public virtual int FillByDateTime(db_cantingDataSetAttM.tb_attendanceDataTable dataTable, string ReferTime, string StartTime)
{
this.Adapter.SelectCommand = this.CommandCollection[0];
if ((ReferTime == null))
{
throw new global::System.ArgumentNullException("ReferTime");
}
else
{
this.Adapter.SelectCommand.Parameters[0].Value = ((string)(ReferTime));
}
if ((StartTime == null))
{
throw new global::System.ArgumentNullException("StartTime");
}
else
{
this.Adapter.SelectCommand.Parameters[1].Value = ((string)(StartTime));
}
if ((this.ClearBeforeFill == true))
{
dataTable.Clear();
}
int returnValue = this.Adapter.Fill(dataTable);
return returnValue;
}
}这是我在Designer.cs中添加的方法当在.cs*中调用时 this.tb_attendanceTableAdapter.FillByDateTime(this.db_cantingDataSetAttM.tb_attendance, startDate, endDate);会报sqlparameterCollection的Count=0的索引无效请大家帮忙看下是哪里出了问题
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货