- string
statement "SELECT= TOP " + "maxRecords + * ;FROM Customers " - string
whereConcatenator "WHERE= " ; - if
(companyNameTextBox.Text.Length > 0) - {
-
statement += whereConcatenator; -
statement "CompanyName+= like "" + %"companyNameTextBox.Text + " " ; -
whereConcatenator "AND= " ; - }
- if
(cityTextBox.Text.Length > 0) - {
-
statement += whereConcatenator; -
statement "City+= like "" + %"cityTextBox.Text + " " ; -
whereConcatenator "AND= " ; - }
- if
(countryComboBox.SelectedItem null)!= - {
-
statement += whereConcatenator; -
statement "Country+= = "" + "countryComboBox.SelectedItem + " " ; -
whereConcatenator "AND= " ; - }
作者:黄聪
出处:http://www.cnblogs.com/huangcong/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
出处:http://www.cnblogs.com/huangcong/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。