Processing of DateTime in LINQ and setting display for the selectitem,text of the ASP. NET drop-down list control

Source: Internet
Author: User

DHL: Error: LINQ to Entities does not support the specified type member "Date" LINQ such as: var v = from L in _dal. Share where l.pingcoid = = Pingcoid && (l.createtime.date = = DateTime.Now.Date) select L; return V.tolist (); Error: LINQ to Entities does not support the specified type member "Date". Change to such ok:datetime SDT = DateTime.Now.Date; DateTime dt = DateTime.Now.Date.AddDays (1); var v = from L in _dal. Share where l.pingcoid = = Pingcoid && (l.createtime >= SDT && l.createtime < DT) Select L; return V.tolist (); /* Date Unrecognized var cx_dd = from AA in sjklj.sc_dd where aa.lbid = = lbid && AA.DDMC = DDMC && (nullable<da Tetime>. Equals (AA.JDRQ, null) = = False && ((DateTime) AA.JDRQ). Date = = Jdrq. Date) select AA; */var cx_dd = from AA in sjklj.sc_dd where aa.lbid = = lbid && AA.DDMC = DDMC && (nullable<datetime> ;. Equals (AA.JDRQ, null) = = False && (DateTime) Aa.jdrq = = JDRQ) select AA; Determine whether to repeat the addition (Order name and category, and the date of receipt), while automatically loading the add schedule under the order//judging input validity

string lb = this.ddp_sz_cplb. Text.trim ();//The SelectedValue string lb = this.ddp_sz_cplb is still displayed. selecteditem.text;//gets the text this.ddp_sz_cplb of the item. selecteditem.text= "AA", then the list of the original location of the data is deleted, to use text and: The text data in the database is NULL, can not use ToString (), or error.

The Text property of the textbox can accept a null text database, for example: XM (nvarchar (40), Value NULL,THIS.TBX_XM.TEXT=.....XM (with LINQ statements, and if ... xm.tostring () error )

Processing of DateTime in LINQ and setting display for the selectitem,text of the ASP. NET drop-down list control

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.