CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2014
    Posts
    29

    Can i use only one textbox in function and replace otheres

    Hi guys i make dynamic search based on dynamic stored procedure. it is working success but i need to using only textbox1 because i have more textbox
    if i need to use only textbox1 in place of all textboxes exist
    What i do or change
    This is my function

    FleetManagment.Fleet fleet = new FleetManagment.Fleet();

    DataTable Table = fleet.SearchEmployeeAllDateBetween("Data Source=" + value1 + ";Initial Catalog=" + value2 + ";User ID=" + value3 + ";Password=" + value4 + "", textBox1.Text, textBox2.Text, textBox5.Text, textBox28.Text, textBox7.Text, textBox8.Text, textBox9.Text, textBox10.Text, textBox11.Text, textBox12.Text, textBox13.Text, textBox14.Text, textBox15.Text, textBox16.Text, textBox17.Text, textBox18.Text, textBox19.Text, textBox20.Text, textBox21.Text, textBox22.Text, textBox23.Text, textBox24.Text, textBox25.Text, textBox26.Text, textBox31.Text, textBox32.Text, textBox27.Text, textBox30.Text, textBox29.Text, textBox6.Text, textBox4.Text, textBox33.Text, textBox53.Text, textBox3.Text, textBox34.Text, textBox56.Text, textBox51.Text, label33.Text, label34.Text);

    dataGridView1.DataSource = Table;

    dataGridView1.Refresh();

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Can i use only one textbox in function and replace otheres

    Yes, that code can definitely be cleaned up.

  3. #3
    Join Date
    Jan 2014
    Posts
    29

    Re: Can i use only one textbox in function and replace otheres

    Thank you for reply
    can you help me in code by c#

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured