Click here to Skip to main content
15,896,111 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to read data from crl file in C# Pin
Richard MacCutchan5-Dec-12 21:32
mveRichard MacCutchan5-Dec-12 21:32 
AnswerRe: How to read data from crl file in C# Pin
Eddy Vluggen6-Dec-12 2:34
professionalEddy Vluggen6-Dec-12 2:34 
QuestionMultiThreading Pin
MAW305-Dec-12 17:49
MAW305-Dec-12 17:49 
AnswerRe: MultiThreading Pin
Dave Kreskowiak5-Dec-12 18:28
mveDave Kreskowiak5-Dec-12 18:28 
GeneralRe: MultiThreading Pin
MAW305-Dec-12 18:40
MAW305-Dec-12 18:40 
GeneralRe: MultiThreading Pin
Dave Kreskowiak6-Dec-12 1:45
mveDave Kreskowiak6-Dec-12 1:45 
Questionimage processing Pin
Bishwajit Nepali5-Dec-12 17:37
Bishwajit Nepali5-Dec-12 17:37 
AnswerRe: image processing Pin
Dave Kreskowiak5-Dec-12 18:17
mveDave Kreskowiak5-Dec-12 18:17 
AnswerRe: image processing Pin
Mycroft Holmes5-Dec-12 18:35
professionalMycroft Holmes5-Dec-12 18:35 
GeneralRe: image processing Pin
Adam R Harris6-Dec-12 9:13
Adam R Harris6-Dec-12 9:13 
GeneralRe: image processing Pin
Mycroft Holmes6-Dec-12 11:58
professionalMycroft Holmes6-Dec-12 11:58 
QuestionC# make executabloe a dll Pin
sc steinhayse5-Dec-12 16:43
sc steinhayse5-Dec-12 16:43 
AnswerRe: C# make executabloe a dll Pin
Abhinav S5-Dec-12 17:04
Abhinav S5-Dec-12 17:04 
AnswerRe: C# make executabloe a dll Pin
PIEBALDconsult5-Dec-12 18:08
mvePIEBALDconsult5-Dec-12 18:08 
GeneralRe: C# make executabloe a dll Pin
sc steinhayse6-Dec-12 7:22
sc steinhayse6-Dec-12 7:22 
GeneralRe: C# make executabloe a dll Pin
PIEBALDconsult6-Dec-12 8:05
mvePIEBALDconsult6-Dec-12 8:05 
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 

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.