一个不知道怎么问的,问题??
有如下代码:如果OrderList.count中的长度有n长,也就是说OrderList里面有n个数,而哪个循环把每个数都会过一遍那subtotal.Text
和Total.Text 里面应该显示哪个数据的价格。
void updateshopchart()
{
ArrayList OrderList;
ArrayList qtyList;
int productId;
DataRow product;
double subt;
double tal;
double de = 0.9;
OrderList = (ArrayList)Session["orderList"];
qtyList = (ArrayList)Session["qtyList"];
subt = 0;
for (int i = 0; i <= OrderList.Count - 1; i++)
{
productId = (int)OrderList[i];
product = GetProduct(productId);
subt += double.Parse(product["price"].ToString()) * double.Parse(qtyList[i].ToString());
}
tal = subt * de;
subtotal.Text = string.Format("{0:C}", subt);
dec.Text = de.ToString();
Total.Text = string.Format("{0:C}", tal);
}
和Total.Text 里面应该显示哪个数据的价格。
void updateshopchart()
{
ArrayList OrderList;
ArrayList qtyList;
int productId;
DataRow product;
double subt;
double tal;
double de = 0.9;
OrderList = (ArrayList)Session["orderList"];
qtyList = (ArrayList)Session["qtyList"];
subt = 0;
for (int i = 0; i <= OrderList.Count - 1; i++)
{
productId = (int)OrderList[i];
product = GetProduct(productId);
subt += double.Parse(product["price"].ToString()) * double.Parse(qtyList[i].ToString());
}
tal = subt * de;
subtotal.Text = string.Format("{0:C}", subt);
dec.Text = de.ToString();
Total.Text = string.Format("{0:C}", tal);
}
...全文
相关推荐
快问知道系统 Kask2008 正式版
快问知道系统 Kask2008 正式版 是一个仿百度知道,新浪爱问的问答系统,代码写的相当规范。
快问仿百度知道、新浪爱问 v2008
快问仿百度知道、新浪爱问 v2008.rar,希望对大家有帮助!
要敢说不知道作文.doc
要敢说不知道作文.doc
我不知道风是在哪一个方向吹.doc
我不知道风是在哪一个方向吹.doc
dontasktoask.com:一个有关为什么您应该直接问问题而不是问问题的信息性网站
一个有关为什么您应该直接问问题而不是问问题的信息性网站。 随时提出新翻译或对现有翻译进行修正的请求请求。 进行新翻译时,您可以在翻译页面的页脚和下面的列表中为自己添加功劳。 学分 基于 网站 和阿拉伯语翻译 法语翻译 韩文翻译( 土耳其语翻译,( ,( 西班牙语翻译 Yosef Salmalian和@mohsenasm的波斯语翻译 @Cyanoxygen的简体中文翻译 @LasseNiermann的德语翻译 @GameRaccoon的俄语翻译 @mtatko的波兰语翻译 @flarely的繁体中文翻译(基于@Cyanoxygen的简体中文翻译) 塞尔维亚语翻译, @ kikorp78 @ Mastory_Md5的意大利语翻译 希伯来语翻译, @ Jonatan1609 瑞典翻译@Adilius和改善@swedneck


