📄 shoppingcartui.cs
字号:
info2.GetItemInfo();
subTotal = info2.SubTotal;
this.total += subTotal;
this.totalExp += dataItem.ProductInfomation.PresentExp * productNum;
this.totalMoney += dataItem.ProductInfomation.PresentMoney * productNum;
this.totalPoint += dataItem.ProductInfomation.PresentPoint * productNum;
this.weight += info2.TotalWeight;
if (!string.IsNullOrEmpty(dataItem.Property))
{
((Literal) e.Item.FindControl("LitProperty")).Text = "(" + info2.Property + ")";
}
((Literal) e.Item.FindControl("LitProductName")).Text = info2.ProductName;
((Literal) e.Item.FindControl("LitProductUnit")).Text = info2.Unit;
((Literal) e.Item.FindControl("LitPriceMarket")).Text = info2.PriceMarket.ToString("0.00");
((Literal) e.Item.FindControl("LitProductType")).Text = str;
((Literal) e.Item.FindControl("LitSaleType")).Text = str2;
((Literal) e.Item.FindControl("LitTruePrice")).Text = info2.Price.ToString("0.00");
((Literal) e.Item.FindControl("LitSubTotal")).Text = subTotal.ToString("0.00");
if ((dataItem.ProductInfomation.SalePromotionType <= 0) || (productNum < dataItem.ProductInfomation.MinNumber))
{
return;
}
e.Item.FindControl("PresentInfomation").Visible = true;
string str3 = "";
string str4 = "";
string str5 = "";
AbstractItemInfo info3 = new ConcreteSalePromotionType(productNum, dataItem.ProductInfomation, false, null);
info3.GetItemInfo();
switch (dataItem.ProductInfomation.SalePromotionType)
{
case 1:
case 3:
str4 = "<font color=red>(赠品)</font>";
str3 = "赠送礼品";
str5 = "赠送";
goto Label_0359;
case 2:
case 4:
if (info3.Price <= 0M)
{
str4 = "<font color=red>(赠送赠品)</font>";
str5 = "赠送";
break;
}
str4 = "<font color=red>(换购赠品)</font>";
str5 = "换购";
break;
default:
goto Label_0359;
}
str3 = "促销礼品";
Label_0359:
if (this.PresentExist(this.m_CartId, info3.Id))
{
((HiddenField) e.Item.FindControl("HdnPresentId")).Value = info3.Id.ToString();
((Literal) e.Item.FindControl("LitPresentName")).Text = info3.ProductName + str4;
((Literal) e.Item.FindControl("LitPresentUnit")).Text = info3.Unit;
((Literal) e.Item.FindControl("LitPresentNum")).Text = info3.Amount.ToString();
((Literal) e.Item.FindControl("LitPresentType")).Text = str3;
((Literal) e.Item.FindControl("LitPresentSaleType")).Text = str5;
((Literal) e.Item.FindControl("LitPresentPriceOriginal")).Text = info3.PriceMarket.ToString("0.00");
((Literal) e.Item.FindControl("LitPresentTruePrice")).Text = info3.Price.ToString("0.00");
((Literal) e.Item.FindControl("LitPresentSubtotal")).Text = info3.SubTotal.ToString("0.00");
this.total += info3.SubTotal;
this.weight += info3.TotalWeight;
}
}
private StringBuilder ShowPresentExp(PresentProjectInfo presentProInfo)
{
StringBuilder builder = new StringBuilder();
if (!presentProInfo.IsNull && (((presentProInfo.PresentContent.Contains("2") || presentProInfo.PresentContent.Contains("3")) || (presentProInfo.PresentContent.Contains("4") || (this.totalExp > 0))) || ((this.totalMoney > 0M) || ((this.totalPoint > 0) && !string.IsNullOrEmpty(PEContext.Current.User.UserName)))))
{
builder.Append("<tr><td colspan='8' align='left'><b>另外,你还可以得到 ");
if (presentProInfo.PresentContent.Contains("2") || (this.totalMoney > 0M))
{
builder.Append("<font color='red'>");
builder.Append((presentProInfo.Cash + this.totalMoney).ToString("0.00"));
builder.Append("</font> 元现金券");
}
if (presentProInfo.PresentContent.Contains("3") || (this.totalExp > 0))
{
if (presentProInfo.PresentContent.Contains("2") || (this.totalMoney > 0M))
{
builder.Append("和");
}
builder.Append("<font color='red'>");
builder.Append((int) (presentProInfo.PresentPoint + this.totalExp));
builder.Append("</font> 点积分");
}
if (presentProInfo.PresentContent.Contains("4") || (this.totalPoint > 0))
{
if ((presentProInfo.PresentContent.Contains("2") || presentProInfo.PresentContent.Contains("3")) || ((this.totalExp > 0) || (this.totalMoney > 0M)))
{
builder.Append("和");
}
builder.Append("<font color='red'>");
builder.Append((int) (presentProInfo.PresentExp + this.totalPoint));
builder.Append("</font> " + SiteConfig.UserConfig.PointUnit + SiteConfig.UserConfig.PointName);
}
builder.Append("</b></td></tr>");
}
return builder;
}
public string CartId
{
get
{
return this.m_CartId;
}
set
{
this.m_CartId = value;
}
}
public decimal CouponMoney
{
get
{
return this.m_CouponMoney;
}
set
{
this.m_CouponMoney = value;
}
}
public int DeliverType
{
get
{
return this.m_DeliverType;
}
set
{
this.m_DeliverType = value;
}
}
public int IsPreview
{
get
{
return this.m_IsPreview;
}
set
{
this.m_IsPreview = value;
}
}
public bool NeedInvoice
{
get
{
return this.m_NeedInvoice;
}
set
{
this.m_NeedInvoice = value;
}
}
public int PaymentType
{
get
{
return this.m_PaymentType;
}
set
{
this.m_PaymentType = value;
}
}
public string PresentId
{
get
{
if (this.ViewState["PresentId"] != null)
{
return Convert.ToString(this.ViewState["PresentId"]);
}
return "";
}
set
{
this.ViewState["PresentId"] = value;
}
}
public decimal TrueTotalMoney
{
get
{
return DataConverter.CDecimal(this.ViewState["TrueTotalMoney"]);
}
}
public bool UseCoupon
{
get
{
return this.m_UseCoupon;
}
set
{
this.m_UseCoupon = value;
}
}
public string ZipCode
{
get
{
return this.m_ZipCode;
}
set
{
this.m_ZipCode = value;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -