/// <summary>
/// 从 datagridview 列表中移除不需要的行
/// </summary>
/// <param name="req_no">申请单号</param>
/// <param name="dtRedraw">DataTable</param>
/// <returns>DataTable 数据集</returns>
private DataTable RemoveBu(string req_no, DataTable dtRedraw)
{
if (null != dtRedraw)
{
for (int i = 0; i < dtRedraw.Rows.Count; i++)
{
string bloodno = dtRedraw.Rows[i]["储血号"].ToString();
string bloodsub = dtRedraw.Rows[i]["分号"].ToString();
string bloodname = dtRedraw.Rows[i]["血液名称"].ToString();
bool isexists = bs.IsSamlogBlood(req_no, bloodno, bloodsub, bloodname);
if (isexists == true) //移除行的条件
{
dtRedraw.Rows.RemoveAt(i); //移除行的操作
i--; //移除一行之后所有行的索引都比原来小1
}
}
return dtRedraw;
}
else
return null;
}
/// 从 datagridview 列表中移除不需要的行
/// </summary>
/// <param name="req_no">申请单号</param>
/// <param name="dtRedraw">DataTable</param>
/// <returns>DataTable 数据集</returns>
private DataTable RemoveBu(string req_no, DataTable dtRedraw)
{
if (null != dtRedraw)
{
for (int i = 0; i < dtRedraw.Rows.Count; i++)
{
string bloodno = dtRedraw.Rows[i]["储血号"].ToString();
string bloodsub = dtRedraw.Rows[i]["分号"].ToString();
string bloodname = dtRedraw.Rows[i]["血液名称"].ToString();
bool isexists = bs.IsSamlogBlood(req_no, bloodno, bloodsub, bloodname);
if (isexists == true) //移除行的条件
{
dtRedraw.Rows.RemoveAt(i); //移除行的操作
i--; //移除一行之后所有行的索引都比原来小1
}
}
return dtRedraw;
}
else
return null;
}