当containsno列具有相同的值时,我想给datagridview invoiceno列赋予相同的值。
for (int i = 0; i < dgvDetails.Rows.Count; i++)
{
if (i == 0)
{
dgvDetails.Rows[i].Cells[12].Value = invNo;
dgvDetails.Rows[i].Cells[15].Value = DAL.ShippingInvoicesSold_dal.ShippingInvoiceName(invNo);
}
else
{
invNo = invNo + 1;
dgvDetails.Rows[i].Cells[12].Value = invNo;
dgvDetails.Rows[i].Cells[15].Value = DAL.ShippingInvoicesSold_dal.ShippingInvoiceName(invNo);
}
}