网格视图计算 [英] Grid View Calculations

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

问题描述

您好,

我在网格视图计算中遇到一个问题,即
我创建了一个购物车,其中有4列网格 - 产品价格,产品打折价格,免运费和运费。

我想设置一个计算方式,如果产品折扣价格等于或大于免运费,那么运费应为0.

但我想要设置这3个条件也就是 -



*如果默认情况下产品放在购物车和用户查看购物车中,那么如果产品折扣价格已经大于或等于免费送货然后运费将为0



*如果用户增加产品数量,如果等于或大于免运费,那么运费将为0



*如果用户从同一商店购买多件商品,那么如果打折商品价格等于或大于免运费,那么运费将为0




注意 -

网格视图数据在会话级别维护,而不是在数据库级别维护,即如果用户会话超时或低级用户需要再次将产品放入购物车。

只有那些与每个商店价格相关的产品才会更新到购物车中的所有商品,因为用户可以从多个商店购买多个商品,这些商品有自己设定的免运费和产品折扣价格和运费成本。因此在这种情况下不需要总计gridview。



在c#和asp.net中寻找一个好的响应和一个好的代码编写,让我知道同样的事情。





谢谢

Viraat Kothare

解决方案

< blockquote>请阅读我对这个问题的评论。



从这里开始: ASP.NET 2.0的GridView示例:在页脚中显示摘要数据 [ ^ ]



参见类似问题 [ ^ ]。


Hello,
I am facing an issue in grid view calculations ie-
I,have created a shopping cart in which there are 4 columns in grid- Product Price,Product discounted Price, Free shipping and Shipping Cost.
I,want to set calculations in such a way that if product discounted price is equal or greater than free-shipping price then shipping cost should be 0.
But i want to set these 3 conditions also ie-

*If by default product is put in cart and user view cart then if product discounted price is already greater or equal to free shipping then shipping cost will be 0

*if user increase quantity of product and if its equal or greater to free shipping price then shipping cost will be 0

*if user purchases multiple products from same Store then if discounted product price is equal or greater to free shipping price then shipping cost will be 0


Notes-
Grid view data is being maintained at session level and not at database level,ie if user session timeout or lo-gout then user need to again put products in cart.
Only those products related to each individual store prices should get updated and to all products in the cart,because user can purchase multiple products from multiple stores having their own set free shipping price and product discounted price and shipping cost. so wouldnt require sum total of gridview in this scenario.

Looking for a good response and a good code writeup in c# and asp.net and let me know the same.


Thanks
Viraat Kothare

解决方案

Please, read my comment to the question.

Start here: GridView Examples for ASP.NET 2.0: Displaying Summary Data in the Footer[^]

See similar questions[^] too.


这篇关于网格视图计算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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