User1 has the following fieldnames enabled:
TrialStartDate: 26/05/2013
TrialExpiryDate: 31/05/2013
WIC_ALL: true
Price_StartDate: 28/05/2013
Price_ExpiryDate: 31/05/2013
If User1 has trialStart and trialExpiry Date setup, then user becomes a newsUser. However , when the user1 also has wic_all, PriceStart and PriceExpiry Date setup too, then user1 becomes full user, making it overide the (NewsTrials) query.
My issue is that I am unable to login user1 as FullUser using the (full-test) query. I would like to know how can overide the newsTrial query?
Please help.
public UserDetail NewsTrial(string username, string password)
{
var query = from s in db.Subscriptions
join u in db.UserDetails on s.sUID equals u.uID
where s.sTrialExpiryDate >= DateTime.Now &&
s.sPID.Value == 163 &&
u.uUsername == username &&
u.uPassword == password
select u;
return query.FirstOrDefault();
}
public UserDetail full_test(string username, string password)
{
var query = from s in db.Subscriptions
join u in db.UserDetails on s.sUID equals u.uID
where s.sPrice_ExpiryDate >= DateTime.Now &&
s.sPID.Value == 163 &&
s.sWIC_All.Value == true &&
u.uUsername == username &&
u.uPassword == password
select u;
return query.FirstOrDefault();
}
Many thanks.