惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Schneier on Security
Know Your Adversary
Know Your Adversary
Security Latest
Security Latest
Spread Privacy
Spread Privacy
Project Zero
Project Zero
T
The Exploit Database - CXSecurity.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
AI
AI
N
News | PayPal Newsroom
A
Arctic Wolf
NISL@THU
NISL@THU
W
WeLiveSecurity
Security Archives - TechRepublic
Security Archives - TechRepublic
Hacker News: Ask HN
Hacker News: Ask HN
P
Palo Alto Networks Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
大猫的无限游戏
大猫的无限游戏
L
Lohrmann on Cybersecurity
Last Week in AI
Last Week in AI
T
Threatpost
The Last Watchdog
The Last Watchdog
博客园_首页
C
Cybersecurity and Infrastructure Security Agency CISA
酷 壳 – CoolShell
酷 壳 – CoolShell
量子位
Engineering at Meta
Engineering at Meta
爱范儿
爱范儿
aimingoo的专栏
aimingoo的专栏
S
Security Affairs
P
Privacy & Cybersecurity Law Blog
B
Blog RSS Feed
AWS News Blog
AWS News Blog
P
Proofpoint News Feed
雷峰网
雷峰网
T
Tenable Blog
Schneier on Security
Schneier on Security
H
Heimdal Security Blog
V2EX - 技术
V2EX - 技术
V
V2EX
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Secure Thoughts
Latest news
Latest news
Help Net Security
Help Net Security
Jina AI
Jina AI
Stack Overflow Blog
Stack Overflow Blog
The Cloudflare Blog
V
Vulnerabilities – Threatpost
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org

博客园 - StephenJu

EntLib--Unity Application Block 1.x DevExpress杂项 .Net异步机制 简单的异步调用 枚举 分割dataset:待改进... 序列化 DataGridViewComboBoxColumn的使用 datagridview数据验证 通过关键字查找到dgv相关记录后定位 禁止一个程序启动多个实例 将文本文件的内容写进某个表中 获取Assembly的运行路径 获取ArrayList中的数据(foreach) 关于DataTable里大批量查找的更快速的方法 抽象类 IO DynamicCreateMenu DataTable的简单方法
按s1_Name+uuid为一组拆分DS
StephenJu · 2009-01-04 · via 博客园 - StephenJu

private int iSendCount = 0;
        
private void Test(DSSendCollection dsRequest)
        {
            
//取基准数据做比较
            string strS1Name = Convert.ToString(dsSend.Sub1.Rows[0]["s1_name"]).Trim();
            
string strS1UUID = Convert.ToString(dsSend.Sub1.Rows[0]["uuid"]).Trim();
            

            DSSendCollection dsSendEdi 

= new DSSendCollection();
            
//对主表排序
            DSSendCollection.Sub1Row[] drs = dsRequest.Sub1.Select("""s1_Name,uuid"as DSSendCollection.Sub1Row[];
            
for (int i = 0; i < drs.Length; i++)
            {
                
if (drs[i].s1_Name.Trim() != strS1Name || drs[i].uuid.Trim() != strS1UUID)
                {
                    DataRow[] filterRows 
= dsRequest.Sub1.Select("s1_Name='" + strS1Name + "' and uuid='" + strS1UUID + "'");
                    
for (int j = 0; j < filterRows.Length; j++)
                    {
                        DataRow drShipment 
= filterRows[j];//主表的行
                        ImportRow(drShipment, dsSendEdi);
                    }
                    
//发送Edi
                    iSendCount++;
                    MessageBox.Show(
"发送EDI    "+""+iSendCount+"");
                    strS1Name 
= drs[i].s1_Name.Trim();
                    strS1UUID 
= drs[i].uuid.Trim();
                    dsSendEdi.Clear();
                    dsSendEdi.AcceptChanges();
                }
               
                
if (i == drs.Length - 1)
                {
                    
if (iSendCount == 0)
                    {
                        
//发送Edi:直接传dsRequest
                        
                    }
                    
else
                    {
                        DataRow[] filterRows 
= dsRequest.Sub1.Select("s1_Name='" + strS1Name + "' and uuid='" + strS1UUID + "'");
                        
for (int j = 0; j < filterRows.Length; j++)
                        {
                            DataRow drShipment 
= filterRows[j];
                            ImportRow(drShipment, dsSendEdi);
                        }
                        
//发送Edi
                        iSendCount++;
                        MessageBox.Show(
"发送EDI    " + "" + iSendCount + "");
                        dsSendEdi.Clear();
                        dsSendEdi.AcceptChanges();
                    }
                }
            }