如何在C#中将数据网格值放入临时表 [英] How to Put the data grid values to a temp table in c#

查看:77
本文介绍了如何在C#中将数据网格值放入临时表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我有一个网格,我将在其中为每列输入一些值,并且需要使用一个临时表进行操作,以便将这些网格值分配给临时表.

Hi i have grid in which i will enter some values to each column and i need to take a temp table for the manuplation how to assign those grid values to temp table.

推荐答案

您遍历表并在其中复制值.我看不到它还有什么用.
You iterate over the table and copy the values across. I don''t see how else it could work.


为什么要这样做,除非将网格内容传递给已经定义的方法?如果是这种情况,那么您需要查看该方法的要求,而不仅仅是尝试盲目地转换数据.
您需要对数据做什么?
Why would you need to do that, unless you are passing the grid content to a already defined method? If that is the case, then you need to look at what the method requires, rather than just trying to convert data blindly.
What do you need to do with the data?



看到我在网格中有两个colum va数量(amt)和毛重(gwt).我的总折扣gwt为5.我需要在该网格中使用最少的vamt,并且我必须将该行的gwt从折扣的总wt中减去,例如

每克Gwt Va
3 450 2046
4 380 2046
3 400 2046

总折扣克= 5


折扣金额=应检查VA较低并计算折扣重量.)
最小行1的总重量*(每克行1 + va amt)+最小行2的总重量*(每克行2 + va amtrow2)

= 4 *(2046 + 380)+ 1 *(2046 + 400)= 12150.00</pre>
Hi,
see i have two colum va amount(amt) and gross weight(gwt) in the grid. i have a total discount gwt of 5. i need to take a min amt of va amt in that grid and i have to take the gwt of that row reduce it from the dicount gross wt for eg

Gwt Va per gram
3 450 2046
4 380 2046
3 400 2046

total discount gram = 5


discount amount = should check for low VA and calculate for discount wt.)
gross wt of minmum row1 *(per gram row1 + va amt) + gross wt of minmum row2 *(per gramrow2 + va amtrow2)

= 4 * (2046+380) + 1 * (2046+400) = 12150.00</pre>


这篇关于如何在C#中将数据网格值放入临时表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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