示例#1
0
    protected string ShowBuyNum(TMS.V_Promotion_GroupInfo model)
    {
        string num = "1";

        if (model.PromotionType == PromotionType.Bundle)
        {
            num = model.TotalPayOneTimeJoinNum.ToString();
        }

        return(num);
    }
示例#2
0
    /// <summary>
    /// 显示原价,现价
    /// </summary>
    /// <param name="model"></param>
    /// <returns></returns>
    protected string ShowPrice(TMS.V_Promotion_GroupInfo model)
    {
        string format = "<span style='color:red;font-weight:bold;font-size:16px;'>¥{0}</span>&nbsp;&nbsp;&nbsp;&nbsp;原价:<span class='black font-n16'>¥{1}</span>";
        string result = "";

        if (model.PromotionType == PromotionType.Discount)
        {
            decimal oPrice1 = model.RawOuterPrice;
            decimal nPrice1 = decimal.Round(model.RawOuterPrice * model.Discount, 0);
            result = string.Format(format, nPrice1, oPrice1);
        }
        else if (model.PromotionType == PromotionType.Bundle)
        {
            decimal oPrice2 = model.RawOuterPrice * model.TotalPayOneTimeJoinNum;
            decimal nPrice2 = model.TotalPayOneTime;
            result = string.Format(format, nPrice2, oPrice2);
        }
        return(result);
    }
示例#3
0
    /// <summary>
    /// 显示原价,现价
    /// </summary>
    /// <param name="model"></param>
    /// <returns></returns>
    protected string ShowPrice(TMS.V_Promotion_GroupInfo model)
    {
        string format = "<p class='black font-n16'>原价:¥{0}</p><p class='red font-s16'><b>现价:¥{1}</b></p>";
        string result = "";

        if (model.PromotionType == PromotionType.Discount)
        {
            decimal oPrice1 = model.RawOuterPrice;
            decimal nPrice1 = decimal.Round(model.RawOuterPrice * model.Discount, 0);
            result = string.Format(format, oPrice1, nPrice1);
        }
        else if (model.PromotionType == PromotionType.Bundle)
        {
            decimal oPrice2 = model.RawOuterPrice * model.TotalPayOneTimeJoinNum;
            decimal nPrice2 = model.TotalPayOneTime;
            result = string.Format(format, oPrice2, nPrice2);
        }
        return(result);
    }
示例#4
0
 private void fillModel(DbDataReader dr, V_Promotion_GroupInfo model)
 {
     model.ID          = dr.GetInt32(0);
     model.PromotionID = dr.GetInt32(1);
     model.GroupID     = dr.GetInt32(2);
     model.LineID      = dr.GetInt32(3);
     model.TotalNum    = dr.GetInt32(4);
     model.SelledNum   = dr.GetInt32(5);
     model.AddTime     = dr.GetDateTime(6);
     model.ExtraFields = FieldsHelper.XmlDeserialize(dr.GetString(7));
     if (!dr.IsDBNull(8))
     {
         model.PromotionName = dr.GetString(8);
     }
     if (!dr.IsDBNull(9))
     {
         model.LineName = dr.GetString(9);
     }
     if (!dr.IsDBNull(10))
     {
         model.GoDate = dr.GetDateTime(10);
     }
     if (!dr.IsDBNull(11))
     {
         model.BackDate = dr.GetDateTime(11);
     }
     if (!dr.IsDBNull(12))
     {
         model.GruopLeader = dr.GetString(12);
     }
     if (!dr.IsDBNull(13))
     {
         model.TravelGuide = dr.GetString(13);
     }
     if (!dr.IsDBNull(14))
     {
         model.GatheringTime = dr.GetString(14);
     }
     if (!dr.IsDBNull(15))
     {
         model.GatheringPlace = dr.GetString(15);
     }
     if (!dr.IsDBNull(16))
     {
         model.TransferPlace = dr.GetString(16);
     }
     if (!dr.IsDBNull(17))
     {
         model.CoverPath = dr.GetString(17);
     }
     if (!dr.IsDBNull(18))
     {
         model.StartAddress = dr.GetString(18);
     }
     if (!dr.IsDBNull(19))
     {
         model.TargetAddress = dr.GetString(19);
     }
     if (!dr.IsDBNull(20))
     {
         model.GoTravel = dr.GetString(20);
     }
     if (!dr.IsDBNull(21))
     {
         model.BackTravel = dr.GetString(21);
     }
     if (!dr.IsDBNull(22))
     {
         model.SignUpNotice = dr.GetString(22);
     }
     if (!dr.IsDBNull(23))
     {
         model.LineDesc = dr.GetString(23);
     }
     if (!dr.IsDBNull(24))
     {
         model.WarmTips = dr.GetString(24);
     }
     if (!dr.IsDBNull(25))
     {
         model.OtherNotice = dr.GetString(25);
     }
     if (!dr.IsDBNull(26))
     {
         model.ProductNum = dr.GetString(26);
     }
     if (!dr.IsDBNull(27))
     {
         model.TravelDays = dr.GetString(27);
     }
     if (!dr.IsDBNull(28))
     {
         model.PromotionType = dr.GetString(28);
     }
     if (!dr.IsDBNull(29))
     {
         model.Discount = dr.GetDecimal(29);
     }
     if (!dr.IsDBNull(30))
     {
         model.TotalPayOneTime = dr.GetDecimal(30);
     }
     if (!dr.IsDBNull(31))
     {
         model.TotalPayOneTimeJoinNum = dr.GetInt32(31);
     }
     if (!dr.IsDBNull(32))
     {
         model.FullCutTotal = dr.GetDecimal(32);
     }
     if (!dr.IsDBNull(33))
     {
         model.FullCutMinus = dr.GetDecimal(33);
     }
     if (!dr.IsDBNull(34))
     {
         model.SecondKillPrice = dr.GetDecimal(34);
     }
     if (!dr.IsDBNull(35))
     {
         model.StartTime = dr.GetDateTime(35);
     }
     if (!dr.IsDBNull(36))
     {
         model.EndTime = dr.GetDateTime(36);
     }
     if (!dr.IsDBNull(37))
     {
         model.IsDel = dr.GetInt32(37);
     }
     model.RawInnerPrice = dr.GetDecimal(38);
     model.RawOuterPrice = dr.GetDecimal(39);
     model.RemainNum     = dr.GetInt32(40);
 }