for(@i=0;@i < CLB_Location.GetItemsCount();@i++) CLB_Location.SetItemChecked(@i,true); ; ; if(CLB_Location.SelectedIndex == 0) CLB_Location.SelectAllItems(); @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; cbTypeTo.Text = cbTypeFrom.Text; dtEnd.Checked = dtStart.Checked; dtEnd.CValue = dtStart.CValue; PrintReport(dgProduct.CurrentView,"FrmInventoryCheck","FrmInventoryCheck"); ; ; Empty(); Empty(); tbProduct1.CValue=""; tbProduct2.CValue=""; cbTypeFrom.Text=""; cbTypeTo.Text=""; dtStart.Checked=False; dtEnd.Checked=False;
Empty(); NewInstance(); @sqlLocation="("; @empty=true; @first=true; for(@i=1;@i < CLB_Location.GetItemsCount();@i++){ if(CLB_Location.GetItemChecked(@i)){ @empty=false; if(@first==true){ @sqlLocation=@sqlLocation+"'"+CLB_Location.GetSelectedName(@i)+"'"; @first=false; }else{ @sqlLocation=@sqlLocation+","+"'"+CLB_Location.GetSelectedName(@i)+"'"; } } } @sqlLocation=@sqlLocation+") "; if(@empty==true) { MessageBox("请选择仓库!",@Title); return; } @StartNo_Product=DBNull(); @EndNo_Product=DBNull(); @StartType_Product=DBNull(); @EndType_Product=DBNull(); @StartDate_StocktakingBill=DBNull(); @EndDate_StocktakingBill=DBNull(); if(tbProduct1.CValue!="") @StartNo_Product=tbProduct1.CValue; if(tbProduct2.CValue!="") @EndNo_Product=tbProduct2.CValue; if(cbTypeFrom.Text!="") @StartType_Product=cbTypeFrom.Text; if(cbTypeTo.Text!="") @EndType_Product=cbTypeTo.Text; if(dtStart.Checked) @StartDate_StocktakingBill=dtStart.Value; if(dtEnd.Checked) @EndDate_StocktakingBill=dtEnd.Value; Search("SearchInventoryCheck",@StartNo_Product,@EndNo_Product,@StartType_Product,@EndType_Product,@StartDate_StocktakingBill,@EndDate_StocktakingBill,@sqlLocation);