当前位置: 首页>>代码示例>>C#>>正文


C# OrderInfo.GetTotal方法代码示例

本文整理汇总了C#中OrderInfo.GetTotal方法的典型用法代码示例。如果您正苦于以下问题:C# OrderInfo.GetTotal方法的具体用法?C# OrderInfo.GetTotal怎么用?C# OrderInfo.GetTotal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OrderInfo的用法示例。


在下文中一共展示了OrderInfo.GetTotal方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OrderCreated

 public static void OrderCreated(OrderInfo order, MemberInfo user)
 {
     if ((order != null) && (user != null))
     {
         MessageTemplate template = MessageTemplateHelper.GetTemplate("OrderCreated");
         if (template != null)
         {
             MailMessage email = null;
             string innerSubject = null;
             string innerMessage = null;
             string smsMessage = null;
             SiteSettings masterSettings = SettingsManager.GetMasterSettings(false);
             GenericOrderMessages(masterSettings, user.UserName, user.Email, order.OrderId, order.GetTotal(), order.Remark, order.ModeName, order.ShipTo, order.Address, order.ZipCode, order.TelPhone, order.CellPhone, order.EmailAddress, order.ShipOrderNumber, order.RefundAmount, order.CloseReason, template, out email, out smsMessage, out innerSubject, out innerMessage);
             TemplateMessage templateMessage = GenerateWeixinMessageWhenOrderCreate(template.WeixinTemplateId, masterSettings, order, user);
             Send(template, masterSettings, user, false, email, innerSubject, innerMessage, smsMessage, templateMessage);
         }
     }
 }
开发者ID:ZhangVic,项目名称:asp1110git,代码行数:18,代码来源:Messenger.cs

示例2: GenerateWeixinMessageWhenOrderCreate

 private static TemplateMessage GenerateWeixinMessageWhenOrderCreate(string templateId, SiteSettings settings, OrderInfo order, MemberInfo user)
 {
     TemplateMessage message = null;
     if (!string.IsNullOrWhiteSpace(user.OpenId))
     {
         string weixinToken = settings.WeixinToken;
         TemplateMessage message2 = new TemplateMessage {
             Url = "",
             TemplateId = templateId,
             Touser = user.OpenId
         };
         TemplateMessage.MessagePart[] partArray = new TemplateMessage.MessagePart[3];
         TemplateMessage.MessagePart part = new TemplateMessage.MessagePart {
             Name = "first",
             Value = "您的订单已提交成功!"
         };
         partArray[0] = part;
         TemplateMessage.MessagePart part2 = new TemplateMessage.MessagePart {
             Name = "orderID",
             Value = order.OrderId
         };
         partArray[1] = part2;
         TemplateMessage.MessagePart part3 = new TemplateMessage.MessagePart {
             Name = "orderMoneySum",
             Color = "#ff3300",
             Value = "¥" + order.GetTotal().ToString("F2")
         };
         partArray[2] = part3;
         message2.Data = partArray;
         message = message2;
     }
     return message;
 }
开发者ID:ZhangVic,项目名称:asp1110git,代码行数:33,代码来源:Messenger.cs

示例3: CreatOrder

 public bool CreatOrder(OrderInfo orderInfo, DbTransaction dbTran)
 {
     DbCommand storedProcCommand = this.database.GetStoredProcCommand("ss_CreateOrder");
     this.database.AddInParameter(storedProcCommand, "OrderId", DbType.String, orderInfo.OrderId);
     this.database.AddInParameter(storedProcCommand, "OrderDate", DbType.DateTime, orderInfo.OrderDate);
     this.database.AddInParameter(storedProcCommand, "UserId", DbType.Int32, orderInfo.UserId);
     this.database.AddInParameter(storedProcCommand, "UserName", DbType.String, orderInfo.Username);
     this.database.AddInParameter(storedProcCommand, "Wangwang", DbType.String, orderInfo.Wangwang);
     this.database.AddInParameter(storedProcCommand, "RealName", DbType.String, orderInfo.RealName);
     this.database.AddInParameter(storedProcCommand, "EmailAddress", DbType.String, orderInfo.EmailAddress);
     this.database.AddInParameter(storedProcCommand, "Remark", DbType.String, orderInfo.Remark);
     this.database.AddInParameter(storedProcCommand, "AdjustedDiscount", DbType.Currency, orderInfo.AdjustedDiscount);
     this.database.AddInParameter(storedProcCommand, "OrderStatus", DbType.Int32, (int) orderInfo.OrderStatus);
     this.database.AddInParameter(storedProcCommand, "ShippingRegion", DbType.String, orderInfo.ShippingRegion);
     this.database.AddInParameter(storedProcCommand, "Address", DbType.String, orderInfo.Address);
     this.database.AddInParameter(storedProcCommand, "ZipCode", DbType.String, orderInfo.ZipCode);
     this.database.AddInParameter(storedProcCommand, "ShipTo", DbType.String, orderInfo.ShipTo);
     this.database.AddInParameter(storedProcCommand, "TelPhone", DbType.String, orderInfo.TelPhone);
     this.database.AddInParameter(storedProcCommand, "CellPhone", DbType.String, orderInfo.CellPhone);
     this.database.AddInParameter(storedProcCommand, "ShipToDate", DbType.String, orderInfo.ShipToDate);
     this.database.AddInParameter(storedProcCommand, "ShippingModeId", DbType.Int32, orderInfo.ShippingModeId);
     this.database.AddInParameter(storedProcCommand, "ModeName", DbType.String, orderInfo.ModeName);
     this.database.AddInParameter(storedProcCommand, "RegionId", DbType.Int32, orderInfo.RegionId);
     this.database.AddInParameter(storedProcCommand, "Freight", DbType.Currency, orderInfo.Freight);
     this.database.AddInParameter(storedProcCommand, "AdjustedFreight", DbType.Currency, orderInfo.AdjustedFreight);
     this.database.AddInParameter(storedProcCommand, "ShipOrderNumber", DbType.String, orderInfo.ShipOrderNumber);
     this.database.AddInParameter(storedProcCommand, "Weight", DbType.Int32, orderInfo.Weight);
     this.database.AddInParameter(storedProcCommand, "ExpressCompanyName", DbType.String, orderInfo.ExpressCompanyName);
     this.database.AddInParameter(storedProcCommand, "ExpressCompanyAbb", DbType.String, orderInfo.ExpressCompanyAbb);
     this.database.AddInParameter(storedProcCommand, "PaymentTypeId", DbType.Int32, orderInfo.PaymentTypeId);
     this.database.AddInParameter(storedProcCommand, "PaymentType", DbType.String, orderInfo.PaymentType);
     this.database.AddInParameter(storedProcCommand, "PayCharge", DbType.Currency, orderInfo.PayCharge);
     this.database.AddInParameter(storedProcCommand, "RefundStatus", DbType.Int32, (int) orderInfo.RefundStatus);
     this.database.AddInParameter(storedProcCommand, "Gateway", DbType.String, orderInfo.Gateway);
     this.database.AddInParameter(storedProcCommand, "OrderTotal", DbType.Currency, orderInfo.GetTotal());
     this.database.AddInParameter(storedProcCommand, "OrderPoint", DbType.Int32, orderInfo.Points);
     this.database.AddInParameter(storedProcCommand, "OrderCostPrice", DbType.Currency, orderInfo.GetCostPrice());
     this.database.AddInParameter(storedProcCommand, "OrderProfit", DbType.Currency, orderInfo.GetProfit());
     this.database.AddInParameter(storedProcCommand, "Amount", DbType.Currency, orderInfo.GetAmount());
     this.database.AddInParameter(storedProcCommand, "ReducedPromotionId", DbType.Int32, orderInfo.ReducedPromotionId);
     this.database.AddInParameter(storedProcCommand, "ReducedPromotionName", DbType.String, orderInfo.ReducedPromotionName);
     this.database.AddInParameter(storedProcCommand, "ReducedPromotionAmount", DbType.Currency, orderInfo.ReducedPromotionAmount);
     this.database.AddInParameter(storedProcCommand, "IsReduced", DbType.Boolean, orderInfo.IsReduced);
     this.database.AddInParameter(storedProcCommand, "SentTimesPointPromotionId", DbType.Int32, orderInfo.SentTimesPointPromotionId);
     this.database.AddInParameter(storedProcCommand, "SentTimesPointPromotionName", DbType.String, orderInfo.SentTimesPointPromotionName);
     this.database.AddInParameter(storedProcCommand, "TimesPoint", DbType.Currency, orderInfo.TimesPoint);
     this.database.AddInParameter(storedProcCommand, "IsSendTimesPoint", DbType.Boolean, orderInfo.IsSendTimesPoint);
     this.database.AddInParameter(storedProcCommand, "FreightFreePromotionId", DbType.Int32, orderInfo.FreightFreePromotionId);
     this.database.AddInParameter(storedProcCommand, "FreightFreePromotionName", DbType.String, orderInfo.FreightFreePromotionName);
     this.database.AddInParameter(storedProcCommand, "IsFreightFree", DbType.Boolean, orderInfo.IsFreightFree);
     this.database.AddInParameter(storedProcCommand, "CouponName", DbType.String, orderInfo.CouponName);
     this.database.AddInParameter(storedProcCommand, "CouponCode", DbType.String, orderInfo.CouponCode);
     this.database.AddInParameter(storedProcCommand, "CouponAmount", DbType.Currency, orderInfo.CouponAmount);
     this.database.AddInParameter(storedProcCommand, "CouponValue", DbType.Currency, orderInfo.CouponValue);
     if (orderInfo.GroupBuyId > 0)
     {
         this.database.AddInParameter(storedProcCommand, "GroupBuyId", DbType.Int32, orderInfo.GroupBuyId);
         this.database.AddInParameter(storedProcCommand, "NeedPrice", DbType.Currency, orderInfo.NeedPrice);
         this.database.AddInParameter(storedProcCommand, "GroupBuyStatus", DbType.Int32, 1);
     }
     else
     {
         this.database.AddInParameter(storedProcCommand, "GroupBuyId", DbType.Int32, DBNull.Value);
         this.database.AddInParameter(storedProcCommand, "NeedPrice", DbType.Currency, DBNull.Value);
         this.database.AddInParameter(storedProcCommand, "GroupBuyStatus", DbType.Int32, DBNull.Value);
     }
     if (orderInfo.CountDownBuyId > 0)
     {
         this.database.AddInParameter(storedProcCommand, "CountDownBuyId ", DbType.Int32, orderInfo.CountDownBuyId);
     }
     else
     {
         this.database.AddInParameter(storedProcCommand, "CountDownBuyId ", DbType.Int32, DBNull.Value);
     }
     if (orderInfo.BundlingID > 0)
     {
         this.database.AddInParameter(storedProcCommand, "BundlingID ", DbType.Int32, orderInfo.BundlingID);
         this.database.AddInParameter(storedProcCommand, "BundlingPrice", DbType.Currency, orderInfo.BundlingPrice);
     }
     else
     {
         this.database.AddInParameter(storedProcCommand, "BundlingID ", DbType.Int32, DBNull.Value);
         this.database.AddInParameter(storedProcCommand, "BundlingPrice", DbType.Currency, DBNull.Value);
     }
     this.database.AddInParameter(storedProcCommand, "Tax", DbType.Currency, orderInfo.Tax);
     this.database.AddInParameter(storedProcCommand, "InvoiceTitle", DbType.String, orderInfo.InvoiceTitle);
     this.database.AddInParameter(storedProcCommand, "ReferralUserId", DbType.Int32, orderInfo.ReferralUserId);
     return (this.database.ExecuteNonQuery(storedProcCommand, dbTran) == 1);
 }
开发者ID:ZhangVic,项目名称:asp1110git,代码行数:89,代码来源:OrderDao.cs

示例4: GenerateWeixinMessageWhenOrderClose

 private static TemplateMessage GenerateWeixinMessageWhenOrderClose(string templateId, SiteSettings settings, MemberInfo user, OrderInfo order, string reason)
 {
     if (string.IsNullOrWhiteSpace(user.OpenId))
     {
         return null;
     }
     string weixinToken = settings.WeixinToken;
     TemplateMessage message2 = new TemplateMessage {
         Url = "",
         TemplateId = templateId,
         Touser = user.OpenId
     };
     TemplateMessage.MessagePart[] partArray = new TemplateMessage.MessagePart[5];
     TemplateMessage.MessagePart part = new TemplateMessage.MessagePart {
         Name = "first",
         Value = "您好,您的订单已关闭,请核对"
     };
     partArray[0] = part;
     TemplateMessage.MessagePart part2 = new TemplateMessage.MessagePart {
         Name = "transid",
         Value = order.OrderId
     };
     partArray[1] = part2;
     TemplateMessage.MessagePart part3 = new TemplateMessage.MessagePart {
         Name = "fee",
         Color = "#ff3300",
         Value = "¥" + order.GetTotal().ToString("F2")
     };
     partArray[2] = part3;
     TemplateMessage.MessagePart part4 = new TemplateMessage.MessagePart {
         Name = "pay_time",
         Value = (order.PayDate.ToString() != "") ? DateTime.Parse(order.PayDate.ToString()).ToString("M月d日 HH:mm:ss") : DateTime.Parse(order.OrderDate.ToString()).ToString("M月d日 HH:mm:ss")
     };
     partArray[3] = part4;
     TemplateMessage.MessagePart part5 = new TemplateMessage.MessagePart {
         Name = "remark",
         Color = "#000000",
         Value = "关闭原因:" + reason
     };
     partArray[4] = part5;
     message2.Data = partArray;
     return message2;
 }
开发者ID:ZhangVic,项目名称:asp1110git,代码行数:43,代码来源:Messenger.cs

示例5: UpdateOrder

 public bool UpdateOrder(OrderInfo order, DbTransaction dbTran = null)
 {
     DbCommand sqlStringCommand = this.database.GetSqlStringCommand("UPDATE Hishop_Orders SET  OrderStatus = @OrderStatus, [email protected], PayDate = @PayDate, [email protected], FinishDate = @FinishDate, RegionId = @RegionId, ShippingRegion = @ShippingRegion, Address = @Address, ZipCode = @ZipCode,ShipTo = @ShipTo, TelPhone = @TelPhone, CellPhone = @CellPhone, [email protected] ,[email protected], RealShippingModeId = @RealShippingModeId, RealModeName = @RealModeName, ShipOrderNumber = @ShipOrderNumber,  ExpressCompanyName = @ExpressCompanyName,ExpressCompanyAbb = @ExpressCompanyAbb, [email protected],[email protected], Gateway = @Gateway, [email protected],[email protected],[email protected], OrderTotal = @OrderTotal, [email protected],[email protected],[email protected], AdjustedFreight = @AdjustedFreight, PayCharge = @PayCharge, [email protected],[email protected],[email protected] WHERE OrderId = @OrderId");
     this.database.AddInParameter(sqlStringCommand, "OrderStatus", DbType.Int32, (int) order.OrderStatus);
     this.database.AddInParameter(sqlStringCommand, "CloseReason", DbType.String, order.CloseReason);
     this.database.AddInParameter(sqlStringCommand, "PayDate", DbType.DateTime, order.PayDate);
     this.database.AddInParameter(sqlStringCommand, "ShippingDate", DbType.DateTime, order.ShippingDate);
     this.database.AddInParameter(sqlStringCommand, "FinishDate", DbType.DateTime, order.FinishDate);
     this.database.AddInParameter(sqlStringCommand, "RegionId", DbType.String, order.RegionId);
     this.database.AddInParameter(sqlStringCommand, "ShippingRegion", DbType.String, order.ShippingRegion);
     this.database.AddInParameter(sqlStringCommand, "Address", DbType.String, order.Address);
     this.database.AddInParameter(sqlStringCommand, "ZipCode", DbType.String, order.ZipCode);
     this.database.AddInParameter(sqlStringCommand, "ShipTo", DbType.String, order.ShipTo);
     this.database.AddInParameter(sqlStringCommand, "TelPhone", DbType.String, order.TelPhone);
     this.database.AddInParameter(sqlStringCommand, "CellPhone", DbType.String, order.CellPhone);
     this.database.AddInParameter(sqlStringCommand, "ShippingModeId", DbType.Int32, order.ShippingModeId);
     this.database.AddInParameter(sqlStringCommand, "ModeName", DbType.String, order.ModeName);
     this.database.AddInParameter(sqlStringCommand, "RealShippingModeId", DbType.Int32, order.RealShippingModeId);
     this.database.AddInParameter(sqlStringCommand, "RealModeName", DbType.String, order.RealModeName);
     this.database.AddInParameter(sqlStringCommand, "ShipOrderNumber", DbType.String, order.ShipOrderNumber);
     this.database.AddInParameter(sqlStringCommand, "ExpressCompanyName", DbType.String, order.ExpressCompanyName);
     this.database.AddInParameter(sqlStringCommand, "ExpressCompanyAbb", DbType.String, order.ExpressCompanyAbb);
     this.database.AddInParameter(sqlStringCommand, "PaymentTypeId", DbType.Int32, order.PaymentTypeId);
     this.database.AddInParameter(sqlStringCommand, "PaymentType", DbType.String, order.PaymentType);
     this.database.AddInParameter(sqlStringCommand, "Gateway", DbType.String, order.Gateway);
     this.database.AddInParameter(sqlStringCommand, "ManagerMark", DbType.Int32, order.ManagerMark);
     this.database.AddInParameter(sqlStringCommand, "ManagerRemark", DbType.String, order.ManagerRemark);
     this.database.AddInParameter(sqlStringCommand, "IsPrinted", DbType.Boolean, order.IsPrinted);
     this.database.AddInParameter(sqlStringCommand, "OrderTotal", DbType.Currency, order.GetTotal());
     this.database.AddInParameter(sqlStringCommand, "OrderProfit", DbType.Currency, order.GetProfit());
     this.database.AddInParameter(sqlStringCommand, "Amount", DbType.Currency, order.GetAmount());
     this.database.AddInParameter(sqlStringCommand, "OrderCostPrice", DbType.Currency, order.GetCostPrice());
     this.database.AddInParameter(sqlStringCommand, "AdjustedFreight", DbType.Currency, order.AdjustedFreight);
     this.database.AddInParameter(sqlStringCommand, "PayCharge", DbType.Currency, order.PayCharge);
     this.database.AddInParameter(sqlStringCommand, "AdjustedDiscount", DbType.Currency, order.AdjustedDiscount);
     this.database.AddInParameter(sqlStringCommand, "OrderPoint", DbType.Int32, order.Points);
     this.database.AddInParameter(sqlStringCommand, "GatewayOrderId", DbType.String, order.GatewayOrderId);
     this.database.AddInParameter(sqlStringCommand, "OrderId", DbType.String, order.OrderId);
     if (dbTran != null)
     {
         return (this.database.ExecuteNonQuery(sqlStringCommand, dbTran) > 0);
     }
     return (this.database.ExecuteNonQuery(sqlStringCommand) > 0);
 }
开发者ID:ZhangVic,项目名称:asp1110git,代码行数:44,代码来源:OrderDao.cs

示例6: UpdateCalculationCommission

 public static bool UpdateCalculationCommission(OrderInfo order)
 {
     DistributorsInfo userIdDistributors = GetUserIdDistributors(order.ReferralUserId);
     bool flag = false;
     if (userIdDistributors != null)
     {
         Dictionary<string, LineItemInfo> lineItems = order.LineItems;
         LineItemInfo info2 = new LineItemInfo();
         DataView defaultView = CategoryBrowser.GetAllCategories().DefaultView;
         string str2 = null;
         string str3 = null;
         string str4 = null;
         decimal subTotal = 0M;
         foreach (KeyValuePair<string, LineItemInfo> pair in lineItems)
         {
             string key = pair.Key;
             info2 = pair.Value;
             DataTable productCategories = ProductBrowser.GetProductCategories(info2.ProductId);
             if ((productCategories.Rows.Count > 0) && (productCategories.Rows[0][0].ToString() != "0"))
             {
                 defaultView.RowFilter = " CategoryId=" + productCategories.Rows[0][0];
                 str2 = defaultView[0]["FirstCommission"].ToString();
                 str3 = defaultView[0]["SecondCommission"].ToString();
                 str4 = defaultView[0]["ThirdCommission"].ToString();
                 if ((!string.IsNullOrEmpty(str2) && !string.IsNullOrEmpty(str3)) && !string.IsNullOrEmpty(str4))
                 {
                     ArrayList referralBlanceList = new ArrayList();
                     ArrayList userIdList = new ArrayList();
                     ArrayList ordersTotalList = new ArrayList();
                     subTotal = info2.GetSubTotal();
                     if (string.IsNullOrEmpty(userIdDistributors.ReferralPath))
                     {
                         referralBlanceList.Add((decimal.Parse(str2.Split(new char[] { '|' })[0]) / 100M) * info2.GetSubTotal());
                         userIdList.Add(order.ReferralUserId);
                         ordersTotalList.Add(subTotal);
                     }
                     else
                     {
                         string[] strArray = userIdDistributors.ReferralPath.Split(new char[] { '|' });
                         if (strArray.Length == 1)
                         {
                             referralBlanceList.Add((decimal.Parse(str2.Split(new char[] { '|' })[1]) / 100M) * info2.GetSubTotal());
                             userIdList.Add(strArray[0]);
                             ordersTotalList.Add(subTotal);
                             referralBlanceList.Add((decimal.Parse(str3.Split(new char[] { '|' })[0]) / 100M) * info2.GetSubTotal());
                             userIdList.Add(order.ReferralUserId);
                             ordersTotalList.Add(subTotal);
                         }
                         if (strArray.Length == 2)
                         {
                             referralBlanceList.Add((decimal.Parse(str2.Split(new char[] { '|' })[2]) / 100M) * info2.GetSubTotal());
                             userIdList.Add(strArray[0]);
                             ordersTotalList.Add(subTotal);
                             referralBlanceList.Add((decimal.Parse(str3.Split(new char[] { '|' })[1]) / 100M) * info2.GetSubTotal());
                             userIdList.Add(strArray[1]);
                             ordersTotalList.Add(subTotal);
                             referralBlanceList.Add((decimal.Parse(str4.Split(new char[] { '|' })[0]) / 100M) * info2.GetSubTotal());
                             userIdList.Add(order.ReferralUserId);
                             ordersTotalList.Add(subTotal);
                         }
                     }
                     flag = new DistributorsDao().UpdateCalculationCommission(userIdList, referralBlanceList, order.OrderId, ordersTotalList, order.UserId.ToString());
                 }
             }
         }
         flag = new DistributorsDao().UpdateDistributorsOrderNum(order.ReferralUserId.ToString(), order.GetTotal().ToString());
         RemoveDistributorCache(userIdDistributors.UserId);
     }
     return flag;
 }
开发者ID:ZhangVic,项目名称:asp1110git,代码行数:70,代码来源:DistributorsBrower.cs

示例7: ConfirmPay

 public static bool ConfirmPay(OrderInfo order)
 {
     ManagerHelper.CheckPrivilege(Privilege.CofimOrderPay);
     bool flag = false;
     if (order.CheckAction(OrderActions.SELLER_CONFIRM_PAY))
     {
         OrderDao dao = new OrderDao();
         order.OrderStatus = OrderStatus.BuyerAlreadyPaid;
         order.PayDate = new DateTime?(DateTime.Now);
         flag = dao.UpdateOrder(order, null);
         if (!flag)
         {
             return flag;
         }
         dao.UpdatePayOrderStock(order.OrderId);
         foreach (LineItemInfo info in order.LineItems.Values)
         {
             ProductDao dao2 = new ProductDao();
             ProductInfo productDetails = dao2.GetProductDetails(info.ProductId);
             productDetails.SaleCounts += info.Quantity;
             productDetails.ShowSaleCounts += info.Quantity;
             dao2.UpdateProduct(productDetails, null);
         }
         UpdateUserAccount(order);
         Messenger.OrderPayment(new MemberDao().GetMember(order.UserId), order.OrderId, order.GetTotal());
         EventLogs.WriteOperationLog(Privilege.CofimOrderPay, string.Format(CultureInfo.InvariantCulture, "确认收款编号为\"{0}\"的订单", new object[] { order.OrderId }));
     }
     return flag;
 }
开发者ID:ZhangVic,项目名称:asp1110git,代码行数:29,代码来源:OrderHelper.cs

示例8: UpdateUserAccount

 private static void UpdateUserAccount(OrderInfo order)
 {
     MemberInfo member = new MemberDao().GetMember(order.UserId);
     if (member != null)
     {
         MemberDao dao = new MemberDao();
         PointDetailInfo point = new PointDetailInfo {
             OrderId = order.OrderId,
             UserId = member.UserId,
             TradeDate = DateTime.Now,
             TradeType = PointTradeType.Bounty,
             Increased = new int?(order.Points),
             Points = order.Points + member.Points
         };
         if ((point.Points > 0x7fffffff) || (point.Points < 0))
         {
             point.Points = 0x7fffffff;
         }
         PointDetailDao dao2 = new PointDetailDao();
         dao2.AddPointDetail(point);
         member.Expenditure += order.GetTotal();
         member.OrderNumber++;
         dao.Update(member);
         int historyPoint = dao2.GetHistoryPoint(member.UserId);
         List<MemberGradeInfo> memberGrades = new MemberGradeDao().GetMemberGrades() as List<MemberGradeInfo>;
         foreach (MemberGradeInfo info3 in from item in memberGrades
             orderby item.Points descending
             select item)
         {
             if (member.GradeId == info3.GradeId)
             {
                 break;
             }
             if (info3.Points <= historyPoint)
             {
                 member.GradeId = info3.GradeId;
                 dao.Update(member);
                 break;
             }
         }
     }
 }
开发者ID:ZhangVic,项目名称:asp1110git,代码行数:42,代码来源:OrderHelper.cs

示例9: BindTatolAmount

 private void BindTatolAmount(OrderInfo order)
 {
     decimal amount = order.GetAmount();
     this.lblAllPrice.Money = amount;
     this.lblWeight.Text = order.Weight.ToString(CultureInfo.InvariantCulture);
     this.litIntegral.Text = order.Points.ToString(CultureInfo.InvariantCulture);
     this.litTotal.Text = Globals.FormatMoney(order.GetTotal());
 }
开发者ID:ZhangVic,项目名称:asp1110git,代码行数:8,代码来源:EditOrder.cs


注:本文中的OrderInfo.GetTotal方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。