Click here to Skip to main content
15,897,291 members
Home / Discussions / C#
   

C#

 
GeneralRe: Email button in Datagridview Pin
pmcm4-Mar-12 22:23
pmcm4-Mar-12 22:23 
AnswerRe: Email button in Datagridview Pin
satalaj2-Mar-12 5:23
satalaj2-Mar-12 5:23 
GeneralRe: Email button in Datagridview Pin
pmcm4-Mar-12 22:29
pmcm4-Mar-12 22:29 
QuestionFiltering excel Application Pin
polachan28-Feb-12 23:48
polachan28-Feb-12 23:48 
AnswerRe: Filtering excel Application Pin
Not Active29-Feb-12 1:10
mentorNot Active29-Feb-12 1:10 
AnswerRe: Filtering excel Application Pin
Shameel29-Feb-12 4:05
professionalShameel29-Feb-12 4:05 
QuestionLimiting Users Download Size Pin
Majid Shahabfar28-Feb-12 21:14
Majid Shahabfar28-Feb-12 21:14 
AnswerRe: Limiting Users Download Size Pin
Pete O'Hanlon28-Feb-12 21:35
mvePete O'Hanlon28-Feb-12 21:35 
You should really have asked this in the ASP.NET forum. Anyway, assuming that you only allow logged in users to download files, on every download request you would get the size of the specified file and see if adding it to the days total would take the user over the limit.

I know this seems obvious, but bear with me: the wrinkle you have is in defining what counts as a day - is it based on the last 24 hours activity, or is it based on an arbitrary point such as midnight on the database server. The reason you need to know this is because this will affect your calculation as to the previous day. Now, I would suggest storing the current server time in the database against each download for the user as it will make your calculations easier.

Further wrinkles for you to think about. What happens if the user aborts a download and then restarts it? Does this count towards your size limit? How are you going to handle the switch over when the clocks go forwards and backwards by an hour?

*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

"Mind bleach! Send me mind bleach!" - Nagy Vilmos


My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility


GeneralRe: Limiting Users Download Size Pin
Majid Shahabfar29-Feb-12 0:53
Majid Shahabfar29-Feb-12 0:53 
GeneralRe: Limiting Users Download Size Pin
Pete O'Hanlon29-Feb-12 0:58
mvePete O'Hanlon29-Feb-12 0:58 
GeneralRe: Limiting Users Download Size Pin
Majid Shahabfar29-Feb-12 8:41
Majid Shahabfar29-Feb-12 8:41 
GeneralRe: Limiting Users Download Size Pin
Pete O'Hanlon29-Feb-12 8:53
mvePete O'Hanlon29-Feb-12 8:53 
GeneralRe: Limiting Users Download Size Pin
Majid Shahabfar29-Feb-12 21:19
Majid Shahabfar29-Feb-12 21:19 
GeneralRe: Limiting Users Download Size Pin
Pete O'Hanlon29-Feb-12 21:50
mvePete O'Hanlon29-Feb-12 21:50 
AnswerRe: Limiting Users Download Size Pin
Pete O'Hanlon28-Feb-12 21:40
mvePete O'Hanlon28-Feb-12 21:40 
QuestionPush data from WCF to client Pin
nitin_ion28-Feb-12 17:43
nitin_ion28-Feb-12 17:43 
AnswerRe: Push data from WCF to client Pin
Abhinav S28-Feb-12 19:39
Abhinav S28-Feb-12 19:39 
AnswerRe: Push data from WCF to client Pin
BobJanova28-Feb-12 22:29
BobJanova28-Feb-12 22:29 
GeneralRe: Push data from WCF to client Pin
Pete O'Hanlon28-Feb-12 23:27
mvePete O'Hanlon28-Feb-12 23:27 
GeneralRe: Push data from WCF to client Pin
BobJanova29-Feb-12 1:55
BobJanova29-Feb-12 1:55 
GeneralRe: Push data from WCF to client Pin
Pete O'Hanlon29-Feb-12 2:02
mvePete O'Hanlon29-Feb-12 2:02 
AnswerRe: Push data from WCF to client Pin
PIEBALDconsult29-Feb-12 2:41
mvePIEBALDconsult29-Feb-12 2:41 
GeneralRe: Push data from WCF to client Pin
jschell29-Feb-12 11:47
jschell29-Feb-12 11:47 
GeneralRe: Push data from WCF to client Pin
BobJanova1-Mar-12 1:47
BobJanova1-Mar-12 1:47 
GeneralRe: Push data from WCF to client Pin
jschell1-Mar-12 8:43
jschell1-Mar-12 8:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.