Ssample_invo=new TSsample_invo(this);
Ssample_invo->Cypqty->Close();
Ssample_invo->Cypqty->CommandText=" select top 100
a.chdh,a.awb,a.attn,a.telno,a.adders,b.ypdh,b.style_no,b.kfxtmc,b.ypsize,b.kfpono, /
b.season,b.shoetype,b.solematrl,b.ypytall_eng,b.wlmc,b.wlys ,a.kfbh,a.buyer from ypch a inner
join ypchs b on a.chdh=b.chdh where a.chdh='"+CdebitSAMPLE_INVO->Value+"' order by chdh,ypdh ";
Ssample_invo->Cypqty->Open();
// Ssample_invo->CheckBox1->Checked=true;
if (Ssample_invo->ShowModal() == mrOk)
{
if (Ssample_invo->DBGridEh2->SelectedRows->Count > 0)
{
AnsiString s = "";
TDataSet *pDS = Ssample_invo->Dypqty->DataSet;
for (int i=0; i < Ssample_invo->DBGridEh2->SelectedRows->Count; i&