|
You can use the Format[^] method like:
uint EmployeeNumber = 1;
String.Format( "EMPLOYEE{8:D}", EmployeeNumber );
Remember you will be limited to 999999 employees.
0100000101101110011001000111001011101001
|
|
|
|
|
It is
string.Format("EMPLOYEE{0:D6}",EmployeeNumber);
|
|
|
|
|
Where is the employee code stored? How do you determine which EMPLOYEE should be EMPLOYEE00001 and which EMPLOYEE00075?
We need more information before we can give you a meaningful answer.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
André Kraak,ProEnggSoft
Thank you for your answer and it's works!
OriginalGriff, the employee code is stored in the database and it just a field for naming(like a roll no) a employee. i have a id filed for managing employees.
when admin add a employee program fetch last inserted employee code. i writed a program for increasing the count.
Thanks,
Arunkumar.t
|
|
|
|
|
Arunkumar.Koloth wrote: OriginalGriff, the employee code is stored in the database and it just a field for naming(like a roll no) a employee. i have a id filed for managing employees.
when admin add a employee program fetch last inserted employee code. i writed a program for increasing the count.
If you're using SQL Server why are you not using the identity column instead?
http://msdn.microsoft.com/en-us/library/aa933196(v=sql.80).aspx[^]
If you're not using SQL server there's probably some similar function in your database.
|
|
|
|
|
Marcus_2,
My project is in MySQL server so i thing it is required.. suggest me if you have any other great idea.
Thank you
Arunkumar
|
|
|
|
|
Hi
I've no idea about MyQL, but perhaps this might be helpful or at lest something to read and remember the functionality for future use:
http://bytes.com/topic/mysql/answers/652076-how-create-identity-column-mysql
It depends on how you do it, I just read this
Arunkumar.Koloth wrote: i writed a program for increasing the count.
and tried to give an idea about using a feature built into a lot of databases.
|
|
|
|
|
Thanks For the link Marcus_2
|
|
|
|
|
OK so i will try again to explain
the full url or request is http://www.yonewmail.com?hellocarl but the ?hellocarl part is diffrent each time i need to be able to set this field with a text box entry
webBrowser1.Navigate(http://www.yonewmail.com,+ textbox1.text"_self", null, "Mozilla/5.0 (");
can someone help me please
|
|
|
|
|
Have you tried
webBrowser1.Navigate("http://www.yonewmail.com" + "?" + textbox1.text);
|
|
|
|
|
webBrowser1.Navigate("http://www.coolmail.com/en/?", "_self", null, "Mozilla/5.0 " + textBox1.Text);
<pre lang="c#">textBox1.Text="hello : example code
upon checking with a http debuger it send this string to web
http:
it does not send the textbox text at all
the string should look like this
http:
|
|
|
|
|
You would be better to use a StringBuilder[^] in such a case, as it allows much greater flexibility than a simple String . It is also not good form to use concatenation in cases like this as it can lead to injection issues where your code can be hacked by malicious users.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
|
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
webBrowser1.Navigate(http://www.yonewmail.com?"+ textbox1.text+"_self", null, "Mozilla/5.0");
Chona1171
Web Developer (C#), Silverlight
|
|
|
|
|
Hi all!
I asked for the issue as follows:
I can program in C
Windows Form. I have two Form: Form1 and Form2.
Form1 has a datagrid and a button1. In the DataGrid displays the user with 2 column username and password.
Form2 has two TextBox is txtTenDangNhap and txtMatKhau, and a Button btnLuu.
In Form1:
When Form1 loads the program will load a list of accounts available in the database to the DataGrid.
When you click Button1, then Form2 will appear in the form of ShowDialog. (Form2 f2 = new Form2 (); f2. ShowDialog ()) (Note: Form1 is still not closed)
On Form2: When pressing Button btnLuu, the new account will be saved to the database and Form2 will close.
When Form2 is closed on Form1 DataGrid will load the data with the new account added.
For help yourself with!
|
|
|
|
|
Do you have a specific question you need help with?
/ravi
|
|
|
|
|
I have done, but also want to address up on this issue and for all, who needs it to use:
In Form1:
Set the button code below in the form1
Form2 f = new Form2();
if (f.ShowDialog() == DialogResult.OK)
{
}
else
{
}
In form2:
Set the button code below in the form 2
this.DialogResult = DialogResult.Cancel;
|
|
|
|
|
If a dialog wants the caller Form to perform some action, then it normally sets DialogResult to one of the predefined values (but not None nor Cancel), and the caller tests for that value.
Using Cancel and putting the action in the else part of the test is extremely weird. Were you sober when you wrote this?
|
|
|
|
|
The "proper" way to do this is to provide two buttons in Form2, and set their properties appropriately.
The "OK" button has the DialogResult set to Dialogresult.OK
The "Cancel" button has the DialogResult set to Dialogresult.Cancel
The Form has its AcceptButton property set to the OK button, and is CancelButton set to the Cancel Button.
The framework will then handle the buttons without any event handlers being necessary.
These properties can be set at design time.
In fact, I use a OK/Cancel button so often, I have made a VS Template to create it automatically - there is a Tip here which describes how to do it: Create Visual Studio forms for items you frequently use[^]
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
need assistance or information on how to take information found in one class and link it into Program.cs.
It is a menu system, basically I want the user to be able to locate a vehicle (option 1) and when they enter option 1, all the relevant vehicle information is pulled from the vehicle class and displayed.
I need the application to display vehicleMake, vehicleModel, vehicleWeight and vehicleRegNo once option 1 is pressed. If anyone out there would be able to assist me and wants to take a look at the code, please reply in this thread and I will show you the code.
I have my vehicle details inside Program.cs
Say for example myDepots[0].AddVehicle(new Vehicle("Ford", "L9000", "200KG", "123"));
This is an example of 1 vehicle which is at the first depot, what I need the menu to do is when the user chooses option 1 (locate a vehicle), the user will enter "Ford" and the application will then look through the code and display:
"This vehicle is the Ford L9000 which has a capacity of 200KG and the regNo is 123."
If you know what I mean? I can post the actual code if someone is able to help, please bare in mind I'm a C# BEGINNER and am not knowledgeable of complex terms, so if someone is able to help and uses complex programming language, expect me to reply and ask for a more simplified version
Thank you
Rafa
|
|
|
|
|
What type of project? Windows forms, console? Post at least some of the relevant code inside a code tag and I'm sure someone will be able to help.
"You get that on the big jobs."
|
|
|
|
|
Hi to all my fellow C# peeps out there, i have a question regarding profession and compensation.
What should a C# developer with 5+ years experience, that holds 2 diplomas (internationally) in software engineering with a thorough understanding of all language aspects , ORM, Reflection, systems integration, biometrics , serial devices, robotics, Multithreading ASP.NET MVC ect expect to earn.
I know the result should be different depending on the area, and what the job should be but any takers give an amount and basic job descripion it should give me a baseline of what my answer should be. Obviously a experienced developer doing desktop support is not what I am asking.
Chona1171
Web Developer (C#), Silverlight
|
|
|
|
|
It really depends on who you are as a person. If you're very good, you can expect to earn more than if you just get by.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Not the best forum to discuss this - The Lounge may be a better bet.
|
|
|
|