毕业论文

打赏
当前位置: 毕业论文 > 电子通信 >

无线传感器网络中数据传输最优路径选择(11)

时间:2017-01-14 10:44来源:毕业论文
zd.y = 80; MessageBox.Show(变换成功); } else if (iiii == 5) { qd.x = 100; qd.y = 40; zd.x = 260; zd.y = 60; MessageBox.Show(变换成功); } else iiii = 1; button1.Enabled = true; button7.Enabled=


                zd.y = 80;
                MessageBox.Show("变换成功");
              
            }
            else if (iiii == 5)
            {
                qd.x = 100;
                qd.y = 40;
                zd.x = 260;
                zd.y = 60;
                MessageBox.Show("变换成功");
               
            }

            else
                iiii = 1;
            button1.Enabled = true;
            button7.Enabled=false ;
 
图 5-3变换始终节点界面
5.4    保存实验结果模块功能
保存实验结果模块主要是计算实验的结果,连接数据库并将算出的结果存入数据库。
代码如下:
   SqlConnection conn = new SqlConnection("Data Source=KONG\\SQLEXPRESS;Trusted_Connection=SSPI;Initial Catalog=qqq");
                
                conn.Open();
              SqlCommand com = new SqlCommand("delete ta where 实验次数 is not NULL",conn);
              com.ExecuteNonQuery();
              conn.Close();*/

                 MessageBox.Show("连接成功");
              SqlDataAdapter myadapter = new SqlDataAdapter("select *from ta", conn);
              SqlCommandBuilder sqlBulider = new SqlCommandBuilder(myadapter);
              DataSet ds = new DataSet();
              myadapter.Fill(ds, "ta");
              SqlCommandBuilder sqlBulider = new SqlCommandBuilder(myadapter);
              DataRow row;
              row = ds.Tables["ta"].NewRow();
              ds.Tables["ta"].Rows.Add(row);
              ds.Tables["ta"].Rows[ggg]["实验次数"] =ggg+1;
              ds.Tables["ta"].Rows[ggg]["gdr跳数"] = ts[0]; 无线传感器网络中数据传输最优路径选择(11):http://www.youerw.com/tongxin/lunwen_2234.html
------分隔线----------------------------
推荐内容