不会发送重复的消息 [英] will not send duplicate message
问题描述
大家好,
我的任务是根据c#中的datarow值发送消息。
i有这样的表格,
IHNo Warrant Folio
1 112 222
2 113 222
3 114 333
4 115 444
5 116 444
在这个表中我必须根据Folio值发送消息,但是在这个重复的作品集中,我想根据作品集编号进行循环,使用datarow dr&dttable检查整个表是否存在相同的作品集编号,第二个作品集是相同的,然后A消息发送给222个成员,然后folioNO:333只有一个然后其他B消息发送给333成员,然后C消息发送给444成员。
我的问题是A,C消息只发送一次但不发送两次。或者不会发送重复的消息
任何人发给我代码,我试过代码但不工作
谢谢...
Hi Everyone,
My task sending a message based on datarow value in c#.
i have table like this,
IHNo Warrant Folio
1 112 222
2 113 222
3 114 333
4 115 444
5 116 444
in this table i have to send message based on Folio value ,but in this duplicate folios are there ,i want to do looping based on folio number ,using datarow dr & dttable check the entire table if there exists same folio number ,second folio is same ,then "A" message send to 222 member ,then folioNO:333 is only one then other "B" message to 333 member ,then "C" message send to 444 member.
My question is "A","C" message send only one time but not two times.or will not send duplicate message
any one send me code ,i tried code but not working
Thanks...
推荐答案
S从集合中选择不同的行,然后循环遍历它。下面的代码可以帮助你获得不同的行
Select distinct rows from the collection and then loop through it.the below code helps u to get the distinct rows
DataView view = new DataView(datatable);
DataTable distinctValues = view.ToTable(true, "Folio");
希望这有帮助
Hope this helps
这篇关于不会发送重复的消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!