@temp = ShowSearchBox("CustomerSearch","INFOMATION",tbCustomerNo1.CValue); if( @temp == "" ) return; tbCustomerNo1.CValue = @temp; tbCustomerNo2.CValue = tbCustomerNo1.CValue; @temp = ShowSearchBox("CustomerSearch","INFOMATION",tbCustomerNo2.CValue); if( @temp == "" ) return; tbCustomerNo2.CValue = @temp; @temp = ShowSearchBox("ProductSearch","INFOMATION",tbProductNo1.CValue); if( @temp == "" ) return; tbProductNo1.CValue = @temp; tbProductNo2.CValue = tbProductNo1.CValue; @temp = ShowSearchBox("ProductSearch","INFOMATION",tbProductNo2.CValue); if( @temp == "" ) return; tbProductNo2.CValue = @temp; PrintReport(dgProduct.CurrentView); Empty(); NewInstance(); @StartCustomerNo =DBNull(); @EndCustomerNo =DBNull(); @StartCustomerName =DBNull(); @EndCustomerName =DBNull(); @StartProductNo =DBNull(); @EndProductNo =DBNull(); @StartProductName =DBNull(); @EndProductName =DBNull(); @StartDate =DBNull(); @EndDate =DBNull(); @Discount =DBNull(); if(!Equals(tbCustomerNo1.CValue,"")) @StartCustomerNo = tbCustomerNo1.CValue; if(!Equals(tbCustomerNo2.CValue,"")) @EndCustomerNo = tbCustomerNo2.CValue; if(!Equals(txtCustomerName1.CValue,"")) @StartCustomerName = txtCustomerName1.CValue; if(!Equals(txtCustomerName2.CValue,"")) @EndCustomerName = txtCustomerName2.CValue; if(!Equals(tbProductNo1.CValue,"")) @StartProductNo= tbProductNo1.CValue; if(!Equals(tbProductNo2.CValue,"")) @EndProductNo= tbProductNo2.CValue; if(!Equals(txtProductName1.CValue,"")) @StartProductName = txtProductName1.CValue; if(!Equals(txtProductName2.CValue,"")) @EndProductName = txtProductName2.CValue; if(dtStart.Checked) @StartDate= dtStart.CValue; if(dtEnd.Checked) @EndDate= dtEnd.CValue; if(!Equals(txtDiscount.CValue,"")) @Discount = txtDiscount.CValue; Search("SearchReceivales",@StartCustomerNo,@EndCustomerNo,@StartCustomerName,@EndCustomerName,@StartProductNo,@EndProductNo,@StartProductName,@EndProductName,@StartDate,@EndDate,@Discount,GetFieldRight("销货单","特价单","查看")); if(Equals(@StartCustomerNo,DBNull())) @StartCustomerNo = ""; if(Equals(@EndCustomerNo,DBNull())) @EndCustomerNo = ""; if(Equals(@StartCustomerName,DBNull())) @StartCustomerName = ""; if(Equals(@EndCustomerName,DBNull())) @EndCustomerName = ""; if(Equals(@StartProductNo,DBNull())) @StartProductNo = ""; if(Equals(@EndProductNo,DBNull())) @EndProductNo = ""; if(Equals(@StartProductName,DBNull())) @StartProductName = ""; if(Equals(@EndProductName,DBNull())) @EndProductName = ""; if(Equals(@StartDate,DBNull())) @StartDate = ""; if(Equals(@EndDate,DBNull())) @EndDate = ""; if(Equals(@Discount,DBNull())) @Discount = ""; #UI.StartNo_Customer = @StartCustomerNo; #UI.EndNo_Customer = @EndCustomerNo; #UI.StartName_Customer = @StartCustomerName; #UI.EndName_Customer = @EndCustomerName; #UI.StartNo_Product = @StartProductNo; #UI.EndNo_Product = @EndProductNo; #UI.StartName_Product = @StartProductName; #UI.EndName_Product =@EndProductName; #UI.StartDate = @StartDate; #UI.EndDate =@EndDate; #UI.Discount = @Discount; ; ; Empty(); NewInstance(); @StartCustomerNo =DBNull(); @EndCustomerNo =DBNull(); @StartCustomerName =DBNull(); @EndCustomerName =DBNull(); @StartProductNo =DBNull(); @EndProductNo =DBNull(); @StartProductName =DBNull(); @EndProductName =DBNull(); @StartDate =DBNull(); @EndDate =DBNull(); @Discount =DBNull(); if(!Equals(tbCustomerNo1.CValue,"")) @StartCustomerNo = tbCustomerNo1.CValue; if(!Equals(tbCustomerNo2.CValue,"")) @EndCustomerNo = tbCustomerNo2.CValue; if(!Equals(txtCustomerName1.CValue,"")) @StartCustomerName = txtCustomerName1.CValue; if(!Equals(txtCustomerName2.CValue,"")) @EndCustomerName = txtCustomerName2.CValue; if(!Equals(tbProductNo1.CValue,"")) @StartProductNo= tbProductNo1.CValue; if(!Equals(tbProductNo2.CValue,"")) @EndProductNo= tbProductNo2.CValue; if(!Equals(txtProductName1.CValue,"")) @StartProductName = txtProductName1.CValue; if(!Equals(txtProductName2.CValue,"")) @EndProductName = txtProductName2.CValue; if(dtStart.Checked) @StartDate= dtStart.CValue; if(dtEnd.Checked) @EndDate= dtEnd.CValue; if(!Equals(txtDiscount.CValue,"")) @Discount = txtDiscount.CValue; Search("SearchReceivales",@StartCustomerNo,@EndCustomerNo,@StartCustomerName,@EndCustomerName,@StartProductNo,@EndProductNo,@StartProductName,@EndProductName,@StartDate,@EndDate,@Discount,GetFieldRight("销货单","特价单","查看")); if(Equals(@StartCustomerNo,DBNull())) @StartCustomerNo = ""; if(Equals(@EndCustomerNo,DBNull())) @EndCustomerNo = ""; if(Equals(@StartCustomerName,DBNull())) @StartCustomerName = ""; if(Equals(@EndCustomerName,DBNull())) @EndCustomerName = ""; if(Equals(@StartProductNo,DBNull())) @StartProductNo = ""; if(Equals(@EndProductNo,DBNull())) @EndProductNo = ""; if(Equals(@StartProductName,DBNull())) @StartProductName = ""; if(Equals(@EndProductName,DBNull())) @EndProductName = ""; if(Equals(@StartDate,DBNull())) @StartDate = ""; if(Equals(@EndDate,DBNull())) @EndDate = ""; if(Equals(@Discount,DBNull())) @Discount = ""; #UI.StartNo_Customer = @StartCustomerNo; #UI.EndNo_Customer = @EndCustomerNo; #UI.StartName_Customer = @StartCustomerName; #UI.EndName_Customer = @EndCustomerName; #UI.StartNo_Product = @StartProductNo; #UI.EndNo_Product = @EndProductNo; #UI.StartName_Product = @StartProductName; #UI.EndName_Product =@EndProductName; #UI.StartDate = @StartDate; #UI.EndDate =@EndDate; #UI.Discount = @Discount; ChangeMode("Search");
Empty(); tbCustomerNo1.CValue = ""; tbCustomerNo2.CValue = ""; txtCustomerName1.CValue = ""; txtCustomerName2.CValue = ""; tbProductNo1.CValue = ""; tbProductNo2.CValue = ""; txtProductName1.CValue = ""; txtProductName2.CValue = ""; dtStart.CValue = GetCurrentTime(); dtEnd.CValue = GetCurrentTime(); dtStart.Checked = false; dtEnd.Checked = false; txtDiscount.CValue = "";