Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

Bong M

@Bong M
About
Posts
2
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • passing data
    B Bong M

    I am a newbie, and I am starting to use the C# language, and I need a little help. Here goes: Main Form: I put a textbox where card number should be inputted. When the user presses the Enter key it should look into the database (table) the value of the textbox. Condition is: If only one (1) item found, the information will be displayed on the Main Form other textboxes. Otherwise if two or more items found, it will pass the card number to Form 2. Form 2: will be shown if Main Form calls Receive the card number passed by Main Form and search again the database (table) and display the items found on the datagridview. Then the user should select one (1) item, and pass back the single item with the complete (full) card number selected on the Main Form. My questions: How will I get the value of the current cell that I selected? How will I pass back the value I selected to the Main Form? How will Main Form receive the data being passed by Form 2? Many thanks! Form 1: public partial class MRRMainForm : Form { // start partial class MRRMainForm public String myConString = @"Provider=VFPOLEDB.1;" + @"Data Source=" + D:\\MyMaintable.DBF"; public String cardNumber; OleDbConnection con; OleDbDataAdapter da; OleDbCommand cmd = new OleDbCommand(); DataSet ds = new DataSet(); String commandSearch; public MRRMainForm() { InitializeComponent(); } private void txtCardNumber_KeyDown(object sender, KeyEventArgs e) { switch (e.KeyCode) { // will trap other keys later.. //case Keys. // break; case Keys.Enter: findCardNumber(); txtDescription.Focus(); break; } // end switch } private void findCardNumber() { commandSearch = "Select * from MyMaintable where substr(prod_code,6,7)=\"" + txtCardNumber.Text + "\""; con = new OleDbConnection(myConString); cmd.CommandText = commandSearch; cmd.Connection = con; con.Open(); cmd.ExecuteNonQuery(); da = new OleDbDataAdapter(cmd); da.Fill(ds); if (ds.Tables[0].Rows.Count > 0) { if (ds.Tables[0].Rows.Count > 1) {

    C# csharp database help question

  • find ip addresses of pc's connected to lan
    B Bong M

    How can I find/get all the ip addresses of workstations connected in lan including the server using vb 2005? I do appreciate it if you could give some working code. And from that I can start modifying it to suit my needs. I am new to vb.net programming and I need advice/help from other coders. Thanks!

    BM

    Visual Basic question csharp sysadmin help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups