@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"); dtStart.Enabled = ckDTStart.Checked; dtEnd.Enabled = ckDTEnd.Checked; ChangeMode("Search"); PrintReport(dgProduct.CurrentView); ; ;
Empty(); tbProduct1.CValue=""; tbProduct2.CValue=""; cbType1.Text=""; cbType2.Text=""; tbPName1.CValue=""; tbPName2.CValue=""; ckDTStart.Checked=false; ckDTEnd.Checked=false; dtStart.Enabled=false; dtEnd.Enabled=false; 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; @StartDate=ckDTStart.Checked?dtStart.Value:DBNull(); @EndDate=ckDTEnd.Checked?dtEnd.Value:DBNull(); Search("SearchPurch",@StartNo_Product,@EndNo_Product,@StartType_Product,@EndType_Product,@StartName_Product,@EndName_Product,@StartDate,@EndDate);