; ; @str=txtNo.CValue; @str=Replace(@str,"%","_"); @str=Replace(@str,"*","%"); Search("SearchTotal",@str,cbType.Text); if(RowCount("#Total")>0) { btnClear.Enabled=true; btnReplace.Enabled=true; btnOK.Enabled=false; } Close(); Empty(); txtNo.CValue = ""; txtNewNo.CValue=""; btnClear.Enabled=false; btnReplace.Enabled=false; btnOK.Enabled=false; if(txtNewNo.CValue=="") { MessageBox("请输入新编码号码!",@Title); return; } if(!IsMatch(txtNo.CValue,txtNewNo.CValue)) { MessageBox("新编码格式与原编码格式不匹配!",@Title); return; } SuspendLayout(); for(@i=0;@i < RowCount("#Total");@i++) { SetPosition("#Total",@i); #Total.NoNew=ReplaceEx(txtNo.CValue,txtNewNo.CValue,#Total.No); } ResumeLayout(); btnOK.Enabled=true; Update(); btnReplace.Enabled=false; btnOK.Enabled=false;
cbType.Text="供应商"; btnClear.Enabled=false; btnReplace.Enabled=false; btnOK.Enabled=false;