Click here to Skip to main content
15,904,655 members

Comments by Anant Beriwal (Top 9 by date)

Anant Beriwal 7-Jan-16 3:10am View    
purging
Anant Beriwal 7-Jan-16 2:51am View    
Asif, here I have updations too on existing row, in any case , job is deleting old items from database. but job cant run every minute(It will be a very operation), so it is schedule for half hour. now the only problem is this half hour time stamp which can be left out of calculation via calculating records of last 24 hours. Can delete and then simply count will not be a good idea?
Anant Beriwal 7-Jan-16 1:58am View    
error: function(Error) { alert(Error.responseText) }
use syntax like this, it may give a better insight of error
Anant Beriwal 7-Jan-16 1:50am View    
debug a little, press f12 on browser then see any error message is there or not. in most cases, there is a specific error present there.
Anant Beriwal 5-Jan-16 12:33pm View    
simple, it is a database field having length of decimal (18,5) (means 5 digits after decimal). so code picks it up at it is. problem is simple. when the transaction was done and now when the reports are generated, there is a difference of some dollars( there are more than 1000 transactions). I hit and try some other ways and find out that the way of calculation is the problem. The same issue lie with 3 decimal places too. See the code

static void Main(string[] args)
{
decimal ab = new decimal();
ab = (decimal)4.445;
decimal Round1 = Math.Round(ab,2);
decimal c = ab / 3;
decimal d = c * 3;
decimal Round2=Math.Round(d,2);
}

I have already closed the issue at my end. I changed the way how calculations will be done at time of actual transaction. (I removed the division part from equation). I am just curious how much bigger blunder this kind of thing can cause. Sorry but I am fond of full proof solutions :)