I have a WPF application with a WPF window with a textbox called
Right now the user enters a string into the textbox and then that string is converted to an integer before it's stored into the sql server database.
I am changing this textbox to have a user enter a value that is stored as varchar(50) datatype in sql server.
Below is the snippet that parses the textbox and converts the string entered to an integer.
Does anyone know how to change this snippet so instead of converting the string that is entered to an integer it changes it to: varchar(50)
The key part of the snippet is: Int32.Parse
I tried to change that to: string
But that doesnt work.
Can anyone please help?
private List<Case> GetCaseList()
List<Case> empList = null;
AccessCases emp = new AccessCases();
//converts the string representation of a number in a specificied style to
//its 32bit signed integer equivalent
empList = emp.GetCases(Int32.Parse(textBox1.Text));