Click here to Skip to main content
15,892,746 members
Home / Discussions / C#
   

C#

 
AnswerRe: XML Pin
PIEBALDconsult7-Dec-09 6:23
mvePIEBALDconsult7-Dec-09 6:23 
AnswerRe: XML Pin
wenjinxu7-Dec-09 23:05
wenjinxu7-Dec-09 23:05 
Question2D array to Image Pin
umesh adiga7-Dec-09 4:55
umesh adiga7-Dec-09 4:55 
AnswerRe: 2D array to Image Pin
Md. Marufuzzaman7-Dec-09 9:09
professionalMd. Marufuzzaman7-Dec-09 9:09 
QuestionVisual Studio Addin Pin
LimitedAtonement7-Dec-09 3:53
LimitedAtonement7-Dec-09 3:53 
QuestionNeed help in opening cash drawer Pin
yousaf287-Dec-09 3:45
yousaf287-Dec-09 3:45 
Questiondebit & credit question Pin
Jassim Rahma7-Dec-09 2:12
Jassim Rahma7-Dec-09 2:12 
AnswerRe: debit & credit question [modified] Pin
Eddy Vluggen7-Dec-09 2:52
professionalEddy Vluggen7-Dec-09 2:52 
jrahma wrote:
should I save the debit and credit in a table in the same field (trxn_amount with + or - sign? or save them in separate fields (trx_amount_debit and trxn_amount_credit?


What do you mean with "best result"? From a developers' perspective, things that are the same go into the same table. Splitting them into separate tables gives no advantages that I can think of.

--edit--

I'd simply derive the credit/debit type from the amount, e.g., everything positive is credit. Developers don't store the same information twice. So, from a dev's view, storing the credit/debit type is redundant if it's value can be derived from the stored information.

Now, I have been told that this is inconvenient for reporting, and that it's rather convenient to have a flag in the database that indicates the direction of the transaction. The thing I missed, is that I could be credited $-1, and that would be something completely different from being debited a dollar.

I are Troll Suspicious | :suss:

modified on Monday, December 7, 2009 11:38 AM

AnswerRe: debit & credit question Pin
Sunil G7-Dec-09 2:56
Sunil G7-Dec-09 2:56 
AnswerRe: debit & credit question Pin
yousaf287-Dec-09 3:50
yousaf287-Dec-09 3:50 
AnswerRe: debit & credit question Pin
Shameel7-Dec-09 7:23
professionalShameel7-Dec-09 7:23 
AnswerRe: debit & credit question Pin
Gerry Schmitz7-Dec-09 18:42
mveGerry Schmitz7-Dec-09 18:42 
QuestionDetermine Least Significant Digits Pin
MumbleB7-Dec-09 2:08
MumbleB7-Dec-09 2:08 
AnswerRe: Determine Least Significant Digits Pin
OriginalGriff7-Dec-09 2:13
mveOriginalGriff7-Dec-09 2:13 
GeneralRe: Determine Least Significant Digits Pin
MumbleB7-Dec-09 2:19
MumbleB7-Dec-09 2:19 
GeneralRe: Determine Least Significant Digits Pin
OriginalGriff7-Dec-09 2:28
mveOriginalGriff7-Dec-09 2:28 
GeneralRe: Determine Least Significant Digits Pin
MumbleB7-Dec-09 2:40
MumbleB7-Dec-09 2:40 
AnswerRe: Determine Least Significant Digits Pin
Covean7-Dec-09 2:29
Covean7-Dec-09 2:29 
QuestionConvert a structure to a byte array (C# 3.5) Pin
stefanidou7-Dec-09 1:30
stefanidou7-Dec-09 1:30 
AnswerRe: Convert a structure to a byte array (C# 3.5) Pin
Abhinav S7-Dec-09 1:34
Abhinav S7-Dec-09 1:34 
QuestionGenerating a Unique ID. Pin
farshad1237-Dec-09 1:00
farshad1237-Dec-09 1:00 
AnswerRe: Generating a Unique ID. Pin
dan!sh 7-Dec-09 1:03
professional dan!sh 7-Dec-09 1:03 
GeneralRe: Generating a Unique ID. Pin
Ashfield7-Dec-09 1:10
Ashfield7-Dec-09 1:10 
GeneralRe: Generating a Unique ID. Pin
dan!sh 7-Dec-09 1:13
professional dan!sh 7-Dec-09 1:13 
GeneralRe: Generating a Unique ID. Pin
farshad1237-Dec-09 1:20
farshad1237-Dec-09 1:20 

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.