|
add a ICON file by using Add>> File to your Application Folder then on the properties of your shortcut specify the icon property with the icon you have just added.
|
|
|
|
|
hi, I want to send a string from a computer to electric machines wirelessly using serial port. should I specify the port number in the code(eg. COM1)? my code is:
private void sendButton_Click(object sender, EventArgs e)
{
try
{
sp.Open();
sp.BaudRate = 9600;
ExceptionLabel.Text = "";
//write line to serial port
sp.WriteLine(textBox.Text);
//clear the text box
textBox.Text = "";
sp.Close();
}
catch (System.Exception ex)
{
ExceptionLabel.Text = ex.Message;
}
}
thank you.
hana
|
|
|
|
|
U want to send the data wirelessly? then you hav to go for either infrared or wifi.. COM ports needs the physical connection. Addition to that to transfer the data u need to mention portname,baud rate,data bit and stop bit in order to recieve..
|
|
|
|
|
Does anyone know how to get datatable size- not original size, but how many data was written into datatable- how many rows? help
|
|
|
|
|
|
If you have a table with row already in it and you've added more. You can check this by:
int count = 0;
foreach (DataRow row in myDataTable)
{
if (row.RowState = DataRowState.Added)
{
count++;
}
}
|
|
|
|
|
What i am doing is my application has opportunity section, where we add new opportunity from clients if they are going to buy some products in the future.
I need to store manufactuerid, some amount entered in textbox, some text entered in textboxes and some values selected from dropdowns.
i want to add another set of same thing and store them temporarily until i store the main opportunity details after which i get the ID of the opportunity with which i can add manufacturers and other details selected before adding the opportunity.
I am using one table to add these manufacturer details, and another table for opportunity details.
So is there a mechanism where i can store multiples of details temporarily and save them after saving the main details only then i will get the iD using this id i want to store temporary values that i have captured into a table
thank you,
|
|
|
|
|
It depends how temporary you want to be. If you want stuff in memory within your app then create a collection<t> and stick your objects in there. If its a web app maybe you need to create an "InProgress" table in the DB. If it's a remote client like a sales laptop maybe you can save an XML file to disk. There are always thousands of solutions to these problems and you need to work out the best one for your task.
Is your database creating the IDs? If it is I would be tempted to get the clients to create the IDs using GUID.NewGUID(); and use the same GUID for all the linked records.
The ID that the customer sees does not have to be the same ID that links the table. GUIDs aren't everyone's cup of tea though; I'm sure there have been a fair few conversations on code project in the past about using them.
HTH
Russell
|
|
|
|
|
The best way to go about is create your own Types.
In your case it will be "manufacturer" and "opportunity" Types with their respective details. Then create any required number of instances of these Types and fill them with values.
Regards,
Bhupi Bhai.
|
|
|
|
|
this is like i need to add opportunity line items in a different table.
i have two tables one is Opportunity, another is opportunitymanufacturers
following are the columns of Opportunity
opportunityid name clientid description status timeframedue
1 ibmproje 25 need desktops won 12-02-2007
2 ibmproje 25 need desktops won 12-02-2007
3 ibmproje 25 need desktops won 12-02-2007
following are the columns of opportunitymanufacturers
id opportunityid manufacturerID categoryname vendorcatgrycode qtyrequired amountworth timefram
1 1 15 workstations pl 20 $100000 12-02-2007
1 2 15 monitors gl 100 $200000 12-02-2007
1 1 20 lasers pl 20 $300000 12-02-2007
1 1 33 workstations pl 20 $120000 12-02-2007
i am going to desing my webpage which will accept the name, cliename from the dropdown,description from the textbox,status dropdown and timefame,
and i have manufacturer dropdown on selectedindex change i have to populate categorynames on selected index changed i want populate correpsoning vendorcategorycode automatically selected and i want to add two text boxes for qty, amount and datepicker for the timeframe.
user should be able to add multiples of manufacturer and category,qty etc details
now the user adds the first table information and he comes to manufacter part of the opportunity when he comes to manufacturer sections he will select the first lot of manufacturer details,
question is where should i add these 2nd table values, i cant add them to 2nd table yet becoz i dont have the opportunityID.
i will get it only after saving the 1 table values.
So i need to store the first lot of manufacturer details in the front enditself and show him what he added, and he should be able to add some more manufacturer details before he actually saves the entire opportunity.
how do i do this? how do i keep manufacturer details temporarily in the front end itself
add these temporary values as soon as i add 1st table values i get the opportunity id and i want to be able to read the manufacturer details which are in the temporary details to the 2nd table with opportunityID that i got after saving the 1st table values.
please help me out in advising me how should I desing my page in regards to adding mulitples of manufacturer line items. shold i place an add button for each of manufacturer details transaction and store them in the sqlserver some temp table and read them when i am actually saving the opportunity.
help would be really appreciated
thanks
am adding a new opportunity, i need to get the values and insert into the above tables simultaneously.
|
|
|
|
|
Hey
how can i split a string into individual characters...
my input string is always a set of numbers like '15323' and i want to split it up and add all the numbers together so i end up with a total of 14 (from before).
Roman
|
|
|
|
|
You can use array syntax to iterate over the characters in a string, use int.TryParse to turn them into numbers, and add them. Something like this
string input = "12324590234"
int total = 0;
foreach(char c in input) // oh yeah, I reckon this will work, too
{
int next = 0;
if(int.TryParse(c.ToString(), out next))
{
total += next;
}
}
MessageBox.Show(next.ToString());
That's off the cuff, but it should be close.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
if you are building that string dynamically try to add a character like',' in between, so your string should be"1,2,3,4,5".
If your string is this way then we could easily convert it to an array using the split method...
example: string str1="1,2,3,4,5";
then str1.split(',')
....later you can use a for loop and add the elements in the array.....
Gautham
|
|
|
|
|
Hi,
char[] chars = "123456".ToCharArray();<br />
Robert
|
|
|
|
|
hi ,
hope the below codesnippet will satisfy your needs
string s ="123456";
int total=0;
for(int i =0 ; i <s.Length ;i++>
)
{
int m = Convert.ToInt32(s[i].ToString());
total += m;
}
Thanks
Saravanan R
|
|
|
|
|
|
I'm assuming that you are trolling.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
You will fild lots of projects at codeproject.com, sourceforge.net, codeplex.com... Check them out
|
|
|
|
|
You got my "5" voting for that funny post!
Thanks!
|
|
|
|
|
I'm a worker in the UK.
I'll do you a deal. You do this stack of work that my boss wants me to get done and I'll send you a completed Project with all the documentation and code you require.
Russell
PS when 5 projects are "The most critical one" which do you start first?
|
|
|
|
|
Good Beta
My dear you should be ashamed of your behaviour. On one side you are using reference of Pakistan and on the other hand you are begging for a project. Pakistan is a country who has produced famous scientists and its engineers are working all over the world. But the idiot persons like you become the cause of embarrasment for them in the foreign countries. People like you tarnish the image of Pakistanis all over the world.
How hard is the final project to do? I think its nothing if you dare.
I am also a graduate from Pakistan. And i know how difficult it is to do final project.
Instead of begging for project and its source code, you should have only asked for the project ideas. But
AAP JAISAY BANDON MAIN ITNI TAQT KAHAN
Shame Shame Shame Shame Shame Shame Shame Shame Shame Shame Shame Shame for you
|
|
|
|
|
Hello All,
I want to connect to my oracle DB from my login control ,how can I do this???
Hello All,
I want to connect to my oracle DB from my login control ,how can I do this???
Nishu
|
|
|
|
|
Your UI layer shouldn't connect to any DB, you should have a business logic layer implimenting the action, and a data layer talking to the database. Connecting to Oracle is easy, google has tons of example code and info.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I want to connect my login control of ASP.NET 2.0 to oracle database...by default it is connect to the default sql server.....I wanto use my oracle DB for validation ....
nishu
|
|
|
|
|
Hi,
Connect to Oracle Database using ADODB.
first you need to add adodb in reference
and then:
ADODB.Connection objConnection = new ADODB.Connection();
if (objConnection.State == 1) objConnection.Close();
// If you are using network terminal
// ---------------------------------
objConnection.ConnectionString = "SERVER=SIDNAME; UID=USERNAME; PWD=PASSWORD;
" Driver={Microsoft ODBC for Oracle};"
// If you are working on Server
// ----------------------------
objConnection.ConnectionString = "UID=USERNAME; PWD=PASSWORD;
" Driver={Microsoft ODBC for Oracle};"
objConnection.Open("", "", "", -1);
Riaz
-- modified at 2:15 Wednesday 24th January, 2007
|
|
|
|