查找给定日期的价格 [英] find price from given date

查看:129
本文介绍了查找给定日期的价格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题.我有一张表(价格,商品名称,类别名称,日期)
日期在(5月1日至5月31日)之内.日期有一个文本框,项目有1个下拉列表,类别有第二个下拉列表.选择两个下拉菜单,然后在文本框中输入日期.
如果下拉菜单匹配日期和价格为(5 april,500)和(5may,600)的两个项目,则当文本框中的日期为bwtn(4月1日至4月28日)时,返回价格= 500和日期btwn(1可能为30may )返回值600.

我怎么能得到这个...
我不明白如何使用日期...来实现这个目标..
请帮忙.

提前谢谢...!

i have one problem.i have one table(Price,Item name,categoryname,Date)
and date is within(1 april to 31 may). there is one textbox for date,1 dropdown for item,second dropdown for category. select that two dropdown and enter date in textbox.
if dropdown match for two item with date and price(5 april,500) and (5may,600).so when date in textbox is bwtn(1 april to 28 april) than return price=500 and date btwn(1 may to 30may)return value 600.

how i can get this one...
i doesn''t understand how to use date...to acoomplish this goal..
please help.

thanx in advance...!

推荐答案

If(dropdownlist1.SelectedValue=="item" && dropdownlist2.SelectedValue=="category"
&& Convert.ToDateTime(TextBox1.text)>"your min date" && Convert.ToDateTime(TextBox1.text)<"your max date")
return 500;
else if dropdownlist1.SelectedValue=="item" && dropdownlist2.SelectedValue=="category"
&& Convert.ToDateTime(TextBox1.text)>"your min date" && Convert.ToDateTime(TextBox1.text)<"your max date")
return 600;


这篇关于查找给定日期的价格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆