RecordHistoryWrite("FrmProductInventory","dtStart","dtEnd","ckNearly","tbNearly" ,"ckPriceQuery","ckIndent","ckSaleBill","ckSaleRtn","ckPQuery","ckpurchase","ckInventory","ckSaleOut","ckPurchIn"); ; @temp = ShowSearchBox("ProductSearch","INFOMATION",tbProduct1.CValue); if( @temp == "" ) return; tbProduct1.CValue = @temp; tbProduct2.CValue = tbProduct1.CValue; @temp = ShowSearchBox("ProductSearch","INFOMATION",tbProduct2.CValue); if( @temp == "" ) return; tbProduct2.CValue = @temp; @temp = ShowSearchBox("ProductSearch","INFOMATION",tbPName1.CValue); if( @temp == "" ) return; tbPName1.CValue = @temp; @temp = ShowSearchBox("ProductSearch","INFOMATION",tbPName2.CValue); if( @temp == "" ) return; tbPName2.CValue = @temp; UpdateForm(false, "cbType1"); Search("SearchType"); UpdateForm(true, "cbType1"); cbType2.Text = cbType1.Text; UpdateForm(false, "cbType2"); Search("SearchType"); UpdateForm(true, "cbType2"); Empty(); @StartNo_Product=DBNull(); @EndNo_Product=DBNull(); @StartType_Product=DBNull(); @EndType_Product=DBNull(); if(tbProduct1.CValue!="") @StartNo_Product=tbProduct1.CValue; if(tbProduct2.CValue!="") @EndNo_Product=tbProduct2.CValue; if(cbType1.Text!="") @StartType_Product=cbType1.Text; if(cbType2.Text!="") @EndType_Product=cbType2.Text; @StartName_Product=tbPName1.CValue==""?DBNull():tbPName1.CValue; @EndName_Product=tbPName2.CValue==""?DBNull():tbPName2.CValue; Search("SearchProductInventory",@StartNo_Product,@EndNo_Product,@StartType_Product,@EndType_Product,@StartName_Product,@EndName_Product); if(RowCount("#FrmProductInventory") == 0) MessageBox("不存在符合查询条件的记录!"); ChangeMode("Search"); tbProduct1.CValue=""; tbProduct2.CValue=""; cbType1.Text=""; cbType2.Text=""; tbPName1.CValue=""; tbPName2.CValue=""; DgDoubleClick(#ExchangeHistory.Name_Bill,#ExchangeHistory.No_Bill); PrintReport(dgProduct.CurrentView, "UIFrmProductInventory","FrmProductInventory"); ; ; Empty(); @StartNo_Product=DBNull(); @EndNo_Product=DBNull(); @StartType_Product=DBNull(); @EndType_Product=DBNull(); if(tbProduct1.CValue!="") @StartNo_Product=tbProduct1.CValue; if(tbProduct2.CValue!="") @EndNo_Product=tbProduct2.CValue; if(cbType1.Text!="") @StartType_Product=cbType1.Text; if(cbType2.Text!="") @EndType_Product=cbType2.Text; @StartName_Product=tbPName1.CValue==""?DBNull():tbPName1.CValue; @EndName_Product=tbPName2.CValue==""?DBNull():tbPName2.CValue; Search("SearchProductInventory",@StartNo_Product,@EndNo_Product,@StartType_Product,@EndType_Product,@StartName_Product,@EndName_Product);
Empty(); Empty("#ExchangeHistory"); NewInstance();