【发布时间】:2017-05-17 12:18:32
【问题描述】:
这是我打印“m_USTByDoctor_OPDC.ml_trn_bill_item”的代码,值来自数据库。
for (int i = 0; i < m_USTByDoctor_OPDC.ml_trn_bill_item.Count;i++ )
{
int count = 0;
for (int j = 0; j m_USTByDoctor_OPDC.ml_trn_bill_item.Count; j++)
{
if(m_USTByDoctor_OPDC.ml_trn_bill_item[j].ItemName==m_USTByDoctor_OPDC.ml_trn_bill_item[i].ItemName)
{
count++;
}
}
Add_Cell(m_USTByDoctor_OPDC.ml_trn_bill_item[i].ItemName, ref tbl_summaryContent3, HELVETICA_BOLD_8_BLACK, false, Rectangle.ALIGN_LEFT, Rectangle.ALIGN_MIDDLE);
Add_Cell(count.ToString(), ref tbl_summaryContent3, HELVETICA_NORMAL_8_BLACK, false, Rectangle.ALIGN_LEFT, Rectangle.ALIGN_MIDDLE);
}
这是我在你那里得到的输出重复值我也需要消除它我该怎么做
Abdomen & Pelvic Scan IP 3
Abdomen & Pelvic Scan IP 3
Abdomine Pelvic Scan - OP 5
Abdomine Pelvic Scan - OP 5
Anamoly Scan (Single) - OP 1
Abdomine Pelvic Scan - OP 5
Abdomine Pelvic Scan - OP 5
Abdomine Pelvic Scan - OP 5
ANC/Obstetrics Scan(OP) 1
Abdomen & Pelvic Scan IP 3
【问题讨论】:
-
如果您使用 C# 编码,为什么选择 Java 和 asp.net?
-
.Distinct()也许?
标签: c#