public string GetCustomerInfoHtml() { string ret = string.Format("<b>{0}</b>", FullName); ret += string.Format("\r\n{1}: <b>{0:d6}</b>", Id, CaptionHelper.GetMemberCaption(GetType(), "CardNumber")); if (Birthday != DateTime.MinValue) { ret += string.Format("\r\n{1}: <b>{0:d}</b>", Birthday, CaptionHelper.GetMemberCaption(GetType(), "BirthDate")); } if (!string.IsNullOrEmpty(Email)) { ret += string.Format("\r\n{1}: <b>{0}</b>", Email, CaptionHelper.GetMemberCaption(GetType(), "Email")); } if (!string.IsNullOrEmpty(Phone)) { ret += string.Format("\r\n{1}: <b>{0}</b>", Phone, CaptionHelper.GetMemberCaption(GetType(), "Phone")); } if (!string.IsNullOrEmpty(Address)) { ret += string.Format("\r\n{1}: <b>{0}</b>", Address, CaptionHelper.GetMemberCaption(GetType(), "Address")); } ret += string.Format("\r\n{2}: <b>{0}({1:p})</b>", DiscountLevel.ToString(), Discount, CaptionHelper.GetMemberCaption(GetType(), "DiscountLevel")); if (!string.IsNullOrEmpty(Comments)) { ret += string.Format("\r\n{1}: <i>{0}</i>", Comments, CaptionHelper.GetMemberCaption(GetType(), "Comments")); } return(ret); }
public double CalculateDiscount(DiscountLevel discountLevel) { switch (discountLevel) { case DiscountLevel.Platinum: return(15.0); case DiscountLevel.Gold: return(10.0); case DiscountLevel.Silver: return(5.0); case DiscountLevel.Bronze: return(2.5); default: throw new Exception("Unanticipated discount level"); } }
void SetColor(CustomDrawSeriesPointEventArgs e, DiscountLevel discountLevel) { e.SeriesDrawOptions.Color = PivotGridListEditor.ChartControl.Series[discountLevel.ToString()].View.Color; }
private void OfferDiscount(DiscountLevel discount) { }