Home > Net >  How to make their choice "date", click "query" button, and then according to dat
How to make their choice "date", click "query" button, and then according to dat

Time:11-20

How to make their choice "date", click "query" button, then the data is displayed in the GridView

"Query" button should be how to write a

As shown in figure 1:





As shown in figure 2:

CodePudding user response:

GridVeiw data source query and the where condition to go ah, but look at your data binding, and no date related fields, why do you want to have a date query?

CodePudding user response:

reference 1st floor EdsionWang response:
GridVeiw data source query and the where condition to go ah, but look at your data binding, and no date related fields, why do you want to have a date query?
I am ready to add the date, the date field MOCTA. TA003

CodePudding user response:

refer to the second floor shy_cai response:
Quote: refer to 1st floor EdsionWang response:

GridVeiw data source query and the where condition to go ah, but look at your data binding, and no date related fields, why do you want to have a date query?
I am ready to add the date, the date field MOCTA. TA003



CodePudding user response:

SQL query add a where clause, check out the results to bind to the GridView,
 
String SQL="select * from table where the repair order date='control of value".

You look storage time is a string, you have to control the value of the date processing,

CodePudding user response:

Come in and see the reply

CodePudding user response:

Get date value, interact with the database using SQL query statements or using orm can,

CodePudding user response:

String SQL="select * from table where the repair order date='" + ID control. The Text +"' ";

CodePudding user response:

Save in the database if the date is the date of the format
 DateTime dtTime=this. WUCtlDatePickerTo. SelectDateTime; 
String strSQL="is the SELECT * FROM" + TB2_ACC. TABLE_NAME + "WHERE 1=1";
StrSQL +="AND" + TB2_ACC __FLD_HANDLE_DATE + "=TO_DATE ('" + dtTime + "', '- DD YYYY - MM HH24: MI: SS')";


Of date if it is kept in a database format string
 string strSQL="is the SELECT * FROM" + TB2_ACC. TABLE_NAME + "WHERE 1=1"; 
StrSQL +="AND" + TB2_ACC __FLD_HANDLE_DATE + "='" + this. WUCtlDatePickerTo. SelectDateTime. ToString (" yyyyMMdd") + "' ";



WUCtlDatePickerTo name for date controls, TB2_ACC. TABLE_NAME as the table name, TB2_ACC. __FLD_HANDLE_DATE for query field name
  • Related