locked
read from textbox & display data in listbox on button clicked RRS feed

  • Question

  • Hi there,
                I'm really need help with this windows application.
    I have textbox,listbox and a button.i want when i enter a date in textbox.the specified data in listbox is displayed which is from a log file.Now.I want only when i select a current Date,only the output data is displayed,not all the data from the log file which displayed before
    here is the code  for the button to display the data.
    [code]
    if (BioBridgeSDK.ReadGeneralLog(ref log) == 0)
                {
                    while (BioBridgeSDK.GetGeneralLog(ref EnrollNo, ref yr, ref mth, ref day_Renamed, ref hr, ref min, ref sec, ref ver, ref io, ref work) == 0)
               [icode]     //read the information logs from the memory buffer[/icode]
    {
    if (io == 0)
                            {
                                            
                               listBox2.Items.Add(("No: " + Convert.ToString(EnrollNo) + " Date:" + Convert.ToString(day_Renamed) + "/" + Convert.ToString(mth) + "/" + Convert.ToString(yr) + " Time: " + Convert.ToString(hr) + ":" + Convert.ToString(min) + ":" + Convert.ToString(sec) + " I/O: Check In"));
                                //listBox2.Items.Add(textBox2.TextChanged);
                            }
                            else
                                listBox2.Items.Add(("No: " + Convert.ToString(EnrollNo) + " Date:" + Convert.ToString(day_Renamed) + "/" + Convert.ToString(mth) + "/" + Convert.ToString(yr) + " Time: " + Convert.ToString(hr) + ":" + Convert.ToString(min) + ":" + Convert.ToString(sec) + " I/O: Check Out"));
                           // if (textBox2.Text = DateTime())
    {

    }
    [/code]
    i dont know what to write in order to make the selected date to appear the specified log.Also,do i need textBox2_TextChanged
    to be fired each time i change the date in the textbox or not?.
    Thanks,
     

    Tuesday, March 24, 2009 12:37 PM

Answers