Click here to Skip to main content
15,887,320 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# make executabloe a dll Pin
Mycroft Holmes5-Dec-12 18:31
professionalMycroft Holmes5-Dec-12 18:31 
AnswerRe: C# make executabloe a dll Pin
Pete O'Hanlon6-Dec-12 7:47
mvePete O'Hanlon6-Dec-12 7:47 
Questionhelp me Pin
siawash_s5-Dec-12 11:44
siawash_s5-Dec-12 11:44 
AnswerRe: help me Pin
Richard MacCutchan5-Dec-12 12:17
mveRichard MacCutchan5-Dec-12 12:17 
GeneralRe: help me Pin
Paul Conrad5-Dec-12 12:36
professionalPaul Conrad5-Dec-12 12:36 
AnswerRe: help me Pin
Paul Conrad5-Dec-12 12:39
professionalPaul Conrad5-Dec-12 12:39 
GeneralRe: help me Pin
Richard MacCutchan5-Dec-12 12:46
mveRichard MacCutchan5-Dec-12 12:46 
QuestionInsert decimal from textbox values C# to SQL Server Pin
bneveux5-Dec-12 7:46
bneveux5-Dec-12 7:46 
Hello guys,

I am doing a C# application + SQL Server DB to manage employees, contracts, rate of work, contract durations, hourly rates... and do some funny calculations with that.
Basically, I need to store some values with the format "0000,0000" in my DB

I have actually build my app interface with winforms and i didn't have any problem to insert, select, update to my SQL Server DB, until I started to play with the numeric/double/float values Mad | :mad:

- I have set my table with all columns where i require these "000,0000" values to decimal

- In my forms, i haven't specified any specific properties to my textboxes,

- To insert I use a method for which i defined decimal arguments
C#
public void createNewContract(int employeeId, string agency, string role, string contractType, string startDate,
    string endDate, string lineManager, string reportTo, string costCenter, string functionEng, string atrNo, string atrDate, string prNo, string prDate,
    string poNo, string poDate, string comments, decimal duration, decimal workRatePercent, string currency, decimal hourlyRate, decimal value)

- To capture my textbox values and send them through my method 'createNewContrat', I have tried
C#
Convert.ToDecimal(this.txtDuration.Text)

and plenty other things that seemed good to me, but i don't manage to understand the mechanic and i'm certainly not using the most pratical/clever solution... WTF | :WTF:

What would you recommend?

Thank you for your help

Brice
GeneralRe: Insert decimal from textbox values C# to SQL Server Pin
PIEBALDconsult5-Dec-12 8:11
mvePIEBALDconsult5-Dec-12 8:11 
AnswerRe: Insert decimal from textbox values C# to SQL Server Pin
Paul Conrad5-Dec-12 10:16
professionalPaul Conrad5-Dec-12 10:16 
GeneralRe: Insert decimal from textbox values C# to SQL Server Pin
bneveux5-Dec-12 10:40
bneveux5-Dec-12 10:40 
GeneralRe: Insert decimal from textbox values C# to SQL Server Pin
Paul Conrad5-Dec-12 10:48
professionalPaul Conrad5-Dec-12 10:48 
GeneralRe: Insert decimal from textbox values C# to SQL Server Pin
Paul Conrad5-Dec-12 11:12
professionalPaul Conrad5-Dec-12 11:12 
GeneralRe: Insert decimal from textbox values C# to SQL Server Pin
bneveux5-Dec-12 11:53
bneveux5-Dec-12 11:53 
GeneralRe: Insert decimal from textbox values C# to SQL Server Pin
Paul Conrad5-Dec-12 11:56
professionalPaul Conrad5-Dec-12 11:56 
Questiontheme Pin
maryam-665-Dec-12 6:24
maryam-665-Dec-12 6:24 
AnswerRe: theme Pin
Dave Kreskowiak5-Dec-12 6:31
mveDave Kreskowiak5-Dec-12 6:31 
GeneralRe: theme Pin
maryam-6614-Dec-12 3:50
maryam-6614-Dec-12 3:50 
AnswerRe: theme Pin
PIEBALDconsult5-Dec-12 17:35
mvePIEBALDconsult5-Dec-12 17:35 
QuestionGPS frame Pin
chouu5-Dec-12 4:32
chouu5-Dec-12 4:32 
AnswerRe: GPS frame Pin
Dave Kreskowiak5-Dec-12 4:38
mveDave Kreskowiak5-Dec-12 4:38 
GeneralRe: GPS frame Pin
chouu5-Dec-12 6:13
chouu5-Dec-12 6:13 
GeneralRe: GPS frame Pin
Dave Kreskowiak5-Dec-12 6:17
mveDave Kreskowiak5-Dec-12 6:17 
GeneralRe: GPS frame Pin
chouu5-Dec-12 7:55
chouu5-Dec-12 7:55 
GeneralRe: GPS frame Pin
Richard MacCutchan5-Dec-12 9:27
mveRichard MacCutchan5-Dec-12 9:27 

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.