Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
NBear使用中在查寻日期相关的问题
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
小鱼儿  
View profile   Translate to Translated (View Original)
 More options Dec 5 2006, 1:40 am
From: "小鱼儿" <zhblue...@gmail.com>
Date: Mon, 04 Dec 2006 22:40:05 -0800
Local: Tues, Dec 5 2006 1:40 am
Subject: NBear使用中在查寻日期相关的问题

public interface News
    {
        [PrimaryKey]
        int Id
        {
            get;
        }
  string title
       {
            get;
            set;
       }
        string content
        {
            get;
            set;
        }
string content
        {
            get;
            set;
        }
 System.DateTime? AddTime
        {
            get;
            set;
        }
    }
如果我想查寻确的某日新闻.或是当天的新闻怎么办
储存过程SQL语句"select * from News where
datediff(day,AddTime,getdate())=0"
这样就没有参数可传
GateWay是否有相关方法可以解决这样的问题


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
小鱼儿  
View profile   Translate to Translated (View Original)
 More options Dec 5 2006, 1:44 am
From: "小鱼儿" <zhblue...@gmail.com>
Date: Mon, 04 Dec 2006 22:44:56 -0800
Local: Tues, Dec 5 2006 1:44 am
Subject: Re: NBear使用中在查寻日期相关的问题
如果不用储存过程可不可以实现

On 12月5日, 下午2时40分, "小鱼儿" <zhblue...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Teddy  
View profile   Translate to Translated (View Original)
 More options Dec 5 2006, 1:45 am
From: Teddy <shijie...@gmail.com>
Date: Tue, 5 Dec 2006 14:45:44 +0800
Local: Tues, Dec 5 2006 1:45 am
Subject: Re: NBear使用中在查寻日期相关的问题

查询和事件相关的条件也可以直接用Gateway处理的,例如,当天,比如今天是2006-12-5,其实也就是说,所有的新闻中AddTime大于等于200 6-12-5
0分0秒并且小于2006-12-6 0分0秒的News。那么可以这样查询:Gateway.FindArray<News>(News.AddTime >=
DateTime.Parse("2006-12-5") & News.AddTime < DateTime.Parse("2006-12-6") );

On 12/5/06, 小鱼儿 <zhblue...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Teddy  
View profile   Translate to Translated (View Original)
 More options Dec 5 2006, 1:46 am
From: Teddy <shijie...@gmail.com>
Date: Tue, 5 Dec 2006 14:46:42 +0800
Local: Tues, Dec 5 2006 1:46 am
Subject: Re: NBear使用中在查寻日期相关的问题

查询条件中要用News._.AddTime 而不是News.AddTime,我上面有笔误。

On 12/5/06, Teddy <shijie...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google