B
BenTam
Guest
Dear All,
I want to make the redlines diappear. How?
TIA
The code is as follows.
using System;
namespace Interface1
{
class Program
{
static void Main(string[] args)
{
var x = ComputeLoyaltyDiscount(12, );
}
}
class ComputeLoyalty // Version 2:
{
public static void SetLoyaltyThresholds(
TimeSpan ago,
int minimumOrders = 10,
decimal percentageDiscount = 0.10m)
{
length = ago;
orderCount = minimumOrders;
discountPercent = percentageDiscount;
}
private static TimeSpan length = new TimeSpan(365 * 2, 0, 0, 0); // two years
private static int orderCount = 10;
private static decimal discountPercent = 0.10m;
public decimal ComputeLoyaltyDiscount(DateTime DateJoined)
{
DateTime start = DateTime.Now - length;
if ((DateJoined < start) && (PreviousOrders.Count() > orderCount))
{
return discountPercent;
}
return 0;
}
}
}
Continue reading...
I want to make the redlines diappear. How?
TIA
The code is as follows.
using System;
namespace Interface1
{
class Program
{
static void Main(string[] args)
{
var x = ComputeLoyaltyDiscount(12, );
}
}
class ComputeLoyalty // Version 2:
{
public static void SetLoyaltyThresholds(
TimeSpan ago,
int minimumOrders = 10,
decimal percentageDiscount = 0.10m)
{
length = ago;
orderCount = minimumOrders;
discountPercent = percentageDiscount;
}
private static TimeSpan length = new TimeSpan(365 * 2, 0, 0, 0); // two years
private static int orderCount = 10;
private static decimal discountPercent = 0.10m;
public decimal ComputeLoyaltyDiscount(DateTime DateJoined)
{
DateTime start = DateTime.Now - length;
if ((DateJoined < start) && (PreviousOrders.Count() > orderCount))
{
return discountPercent;
}
return 0;
}
}
}
Continue reading...