473,473 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

synchronization

i have a dropdownlist (ddlConsultantCategory) and a textbox (txtRate) that
needs to be synchronized. the dropdownlist shows the "Consultant Category"
and the "Rate" (behaves as if it has 2 columns). when the user makes a
selection in the dropdownlist, txtRate should be populated with the value of
"Rate" which is the same as the 2nd column of the selected item in the
dropdownlist. this seems redundant but unfortunately that's the software
requirement. thanks in advance.

code:
string sCCI = "SELECT activity_no, des1, bill_rate "
+ "FROM pa_activity "
+ "WHERE (activity_no LIKE Upper('D0%') or activity_no LIKE
Upper('S0%')) And last_status <> 'D' "
+ " And activity_type = 'L' "
+ "ORDER BY des1 ";

OracleDataReader oraReader;
OracleConnection oraConn = new OracleConnection(connStr);
OracleCommand oraCMD = new OracleCommand(sCCI, oraConn);
oraConn.Open();
oraReader = oraCMD.ExecuteReader(CommandBehavior.CloseConnecti on);
while(oraReader.Read())
{
ListItem listItem = new ListItem();
listItem.Text = oraReader.GetString(1).ToString() + " - " +
oraReader.GetInt32(2).ToString();
listItem.Value = oraReader.GetString(1);
ddlConsultantCategory.Items.Add(listItem);
}
oraReader.Close();
oraConn.Close();
Nov 17 '05 #1
2 1280
Hey Newbie,

Watch for the ListView's SeelctedIndexChanged events, and once the selected
index changes, retrieve the value of the second column (the corresponding
sub-item's text, to be exact) and update the txtRate's Text property with
the retrieved value.

--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]
"Newbie" <Ne****@discussions.microsoft.com> wrote in message
news:A5**********************************@microsof t.com...
i have a dropdownlist (ddlConsultantCategory) and a textbox (txtRate) that
needs to be synchronized. the dropdownlist shows the "Consultant Category"
and the "Rate" (behaves as if it has 2 columns). when the user makes a
selection in the dropdownlist, txtRate should be populated with the value
of
"Rate" which is the same as the 2nd column of the selected item in the
dropdownlist. this seems redundant but unfortunately that's the software
requirement. thanks in advance.

code:
string sCCI = "SELECT activity_no, des1, bill_rate "
+ "FROM pa_activity "
+ "WHERE (activity_no LIKE Upper('D0%') or activity_no LIKE
Upper('S0%')) And last_status <> 'D' "
+ " And activity_type = 'L' "
+ "ORDER BY des1 ";

OracleDataReader oraReader;
OracleConnection oraConn = new OracleConnection(connStr);
OracleCommand oraCMD = new OracleCommand(sCCI, oraConn);
oraConn.Open();
oraReader = oraCMD.ExecuteReader(CommandBehavior.CloseConnecti on);
while(oraReader.Read())
{
ListItem listItem = new ListItem();
listItem.Text = oraReader.GetString(1).ToString() + " - " +
oraReader.GetInt32(2).ToString();
listItem.Value = oraReader.GetString(1);
ddlConsultantCategory.Items.Add(listItem);
}
oraReader.Close();
oraConn.Close();


Nov 17 '05 #2
this has to be done on the client side (perhaps javascript)

"Dmytro Lapshyn [MVP]" wrote:
Hey Newbie,

Watch for the ListView's SeelctedIndexChanged events, and once the selected
index changes, retrieve the value of the second column (the corresponding
sub-item's text, to be exact) and update the txtRate's Text property with
the retrieved value.

--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]
"Newbie" <Ne****@discussions.microsoft.com> wrote in message
news:A5**********************************@microsof t.com...
i have a dropdownlist (ddlConsultantCategory) and a textbox (txtRate) that
needs to be synchronized. the dropdownlist shows the "Consultant Category"
and the "Rate" (behaves as if it has 2 columns). when the user makes a
selection in the dropdownlist, txtRate should be populated with the value
of
"Rate" which is the same as the 2nd column of the selected item in the
dropdownlist. this seems redundant but unfortunately that's the software
requirement. thanks in advance.

code:
string sCCI = "SELECT activity_no, des1, bill_rate "
+ "FROM pa_activity "
+ "WHERE (activity_no LIKE Upper('D0%') or activity_no LIKE
Upper('S0%')) And last_status <> 'D' "
+ " And activity_type = 'L' "
+ "ORDER BY des1 ";

OracleDataReader oraReader;
OracleConnection oraConn = new OracleConnection(connStr);
OracleCommand oraCMD = new OracleCommand(sCCI, oraConn);
oraConn.Open();
oraReader = oraCMD.ExecuteReader(CommandBehavior.CloseConnecti on);
while(oraReader.Read())
{
ListItem listItem = new ListItem();
listItem.Text = oraReader.GetString(1).ToString() + " - " +
oraReader.GetInt32(2).ToString();
listItem.Value = oraReader.GetString(1);
ddlConsultantCategory.Items.Add(listItem);
}
oraReader.Close();
oraConn.Close();


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: WebRod | last post by:
Hi, i am tyring to find a solution to synchronize 2 environnement for months!! How do you synchonize one (or several!!) production environnement from DEV???? I am looking for a software...
5
by: Cyrus | last post by:
I have a question regarding synchronization across multiple threads for a Hashtable. Currently I have a Threadpool that is creating worker threads based on requests to read/write to a hashtable....
4
by: scott | last post by:
hi all, Thx to any one that can offer me help, it will be much appreciated. iv got a multithreaded program and need to use thread synchronization. The synchronization does not have to...
0
by: Rod | last post by:
I orginally posted this to microsoft.public.sqlserver.ce but had not received any responses. I have a CF.NET application (C#) with a SqlCE database. We had originally planned to use SQL...
5
by: fei.liu | last post by:
Hello, in the application I am developing, I am having trouble to synchronize event triggered actions using 'lock(ob){...};' technique. Here is a outline of my code: class C{ int x = 0; public...
12
by: emma_middlebrook | last post by:
Hi Say you had N threads doing some jobs (not from a shared queue or anything like that, they each know how to do their own set of jobs in a self-contained way). How can you coordinate them so...
0
by: lbrtchx | last post by:
Say you need to serve the same Web content from a number of IP address, which you need to keep out there with high availability requirements ~ I think Web Services would be a good candidate for...
0
by: sundman.anders | last post by:
Hi all! I have a question about thread synchronization and c++ streams (iostreams, stringstreams, etc). When optimizing a program for a multicore processor I found that stringstream was causing...
3
by: CKKwan | last post by:
Dear All, Can synchronize a class, any function is called and the entire class is locked. Can synchronize a method What if I need to Lock a class only when specific method is call?
15
by: ingejg | last post by:
I am starting to study internet synchronization, and my head is still spinning since internet is not my forte, however my boss is breathing down my neck at the moment. Our company has only one...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.