Saturday, April 6, 2019
Webform2 â⬠wireless LAN, users and access points management Essay Example for Free
Webform2 wireless LAN, users and access points management EssayPrivate debauch Page_Load( bearing sender, System. EventArgs e) // intializing the sqlDataAdapter and dataSet sqlDataAdapter2. SelectCommand = bleak SqlCommand( SELECT * FROM AP,sqlConnection1) sqlDataAdapter3. SelectCommand = invigorated SqlCommand( SELECT * FROM APusers,sqlConnection1) sqlDataAdapter2. Fill(apDataSet1) sqlDataAdapter3. Fill(usersDataSet11) sqlDataAdapter2. AcceptChangesDuringFill = full-strength sqlDataAdapter3. AcceptChangesDuringFill = dead on tar live on snobby stave off Button9_Click(object sender, System.EventArgs e) //add button(users) //saving the data the manager recruit and adding it to the users add-in//goto each AP checked by the manager using SNMP protocol and add //them the user chemical chain user_name,user_id,user_MACString str2=,str3= int i,j,tmp,k user_name = schoolbookBox1. text. ToString() user_id = school textBox2. schoolbook. ToString() user_MAC = school text Box5. Text. ToString() int items = CheckBoxList1. Items. Count // APs will hold the name c exclusivelying of all the APs that the user // can access string APs = unfermentedfound stringitems k=0 APs. Initialize() look for apDataSet1. Clear() sqlDataAdapter2. SelectCommand = spick-and-span SqlCommand( SELECT APname FROM AP,sqlConnection1) sqlDataAdapter2. Fill(apDataSet1,AP) DataRow arr = apDataSet1.AP. Select() i = arr. GetLength(0) // add this user to the table // str2 has the names of all the APs coulms // str3 has the values of all the coulms j=0 for(j=0jij++) str3= str3 + arrj. ItemArray. GetValue(0) .ToString()+, str3 = str3. Remove(((str3. Length)-2),2) str2= +user_name +, + user_id +, +user_MAC + , tmp = CheckBoxList1. SelectedIndex for(j=0jij++) if (tmp==j) APsk=CheckBoxList2. SelectedItem. Text k++ str2= str2 + 1, CheckBoxList1. SelectedItem. Selected = fictitious tmp = CheckBoxList1. SelectedIndex else str2= str2 + 0, str2 = str2. Remove(((str2. Length)-2 ),2)SqlCommand insCommand = new SqlCommand( INSERT INTO APusers (userName, id_num, mac_adr, + str3 + ) VALUES ( + str2 + ),sqlConnection1) insCommand. Connection. Open() insCommand. ExecuteNonQuery() insCommand. Connection. Close() sqlDataAdapter2. SelectCommand = new SqlCommand( SELECT FROM AP,sqlConnection1) sqlDataAdapter2. Fill(apDataSet1,AP) / the travel to update the access points 1. for each AP in the APs array * 1. 1 get the AP IP address from the AP database.1. 2 get the add entry to table object ID * 1. 3 call snmpSET move */ /* String IPaddr,OID * for(i=0iki++) * DataRow arr = apDataSet1. AP. Select(Apname =+APsi+) * IPaddr = arr0. ItemArray. GetValue(1). ToString() * OID = avaya. addEntry() * snmpexe. snmpSet(IPaddr,OID,user_MAC) * */ catch(Exception ev) Label6. Text= mistake ACSESSING THE DATABASE TextBox7. Text= TextBox1. Text= TextBox2. Text= TextBox5. Text= TextBox3. Text= TextBox4. Text= private int GetIndexofelement(string , arr,string elem) int j,i = ar r. Length for(j=0jii++) if (arr0,j. ToString() == elem) return j return -1 private void Button3_Click(object sender, System. EventArgs e) // stamp out user button. CheckBox1. ocular= ill-judged Label12. in sight= imitative TextBox7. patent= assumed DataGrid2. viewable= irrational DataGrid1. telescopic= treacherously Button9. transparent= morose TextBox1. patent= imitation TextBox2. apparent= morose Label3. macroscopical= dour TextBox5. perceptible= insincere Label10. tangible= fictional Label4. plain= simulated Label5. transparent= incorrect CheckBoxList1. manifest= infatuated Label1. macroscopic= faux Label2. unmistakable= ludicrous Button10. palpable= mistaken TextBox3. visible(a)= ill-advised TextBox4. clear= bogus DropDownList2. ocular= paradoxical Button8. gross= ill-considered DropDownList1. plain= square Button6. perceptible= consecutive DropDownList3. seeable= stupid Button12. subgross=falseLabel13. clear=false Label14. patent=false Label15. te lescopic=false Label16. overt=false TextBox6. tangible=false TextBox8. macroscopic=false TextBox9. macroscopical=false CheckBoxList2. subgross=false Button13. conspicuous=false DropDownList4. perceptible=false Button16. tangible=false Button15. telescopic=false Label11. obvious=false Label17. conspicuous=false Label18. telescopic=false TextBox11. tangible=false TextBox12. ocular=false TextBox10. macroscopical=false CheckBox2. transparent=false Label6. Text=Select the user you offer to nullify and press remove /////////////////// // amaze the users list into the dropdown box DropDownList1.Items. Clear() int i=0 try usersDataSet11. Clear() sqlDataAdapter3. SelectCommand. CommandText = SELECT userName FROM APusers sqlDataAdapter3. Fill(usersDataSet11) DataRow arr = usersDataSet11. APusers. Select() i = arr. GetLength(0) while (i =0) DropDownList1. Items. Add(arri-1. ItemArray. GetValue(0). ToString()) i=i-1 sqlDataAdapter3. SelectCommand = new SqlCommand( SELECT * FROM APusers,sqlConnection1) sqlDataAdapter3. Fill(usersDataSet11,APusers) catch(Exception ev) Label6. Text=ERROR ACSESSING THE DATABASE private void Button1_Click(object sender, System. EventArgs e)// add AP button CheckBox1. discernible=true Label12. distinct=true TextBox7. visible(a)=true DataGrid2. viewable=false DataGrid1. Visible=false Label1. Visible=true Label2. Visible=true Button10. Visible=true TextBox3. Visible=true TextBox4. Visible=true TextBox5. Visible=false Label10. Visible=false Button9. Visible=false TextBox1. Visible=false TextBox2. Visible=false Label3. Visible=false Label4. Visible=false Label5. Visible=false CheckBoxList1. Visible=false DropDownList1. Visible=false Button6. Visible=false DropDownList2. Visible=false Button8. Visible=false DropDownList3. Visible=false Button12.Visible=false Label13. Visible=false Label14. Visible=false Label15. Visible=false Label16. Visible=false TextBox6. Visible=false TextBox8. Visible=false TextBox9. Visible=false CheckBoxList2. Visible=false Button13. Visible=false DropDownList4. Visible=false Button16. Visible=false Button15. Visible=false Label11. Visible=false Label17. Visible=false Label18. Visible=false TextBox11. Visible=false TextBox12. Visible=false TextBox10. Visible=false CheckBox2. Visible=false Label6. Text=Insert the AP detials and press add private void Button4_Click(object sender, System. EventArgs e) //remove AP button. CheckBox1. Visible=false Label12. Visible=false TextBox7. Visible=false DataGrid2. Visible=false DataGrid1. Visible=false DropDownList2. Visible=true Button8. Visible=true Button9. Visible=false TextBox5. Visible=false Label10. Visible=false TextBox1. Visible=false TextBox2. Visible=false Label3. Visible=false Label4. Visible=false Label5. Visible=false CheckBoxList1. Visible=false DropDownList1. Visible=false Button6. Visible=false Label1. Visible=false Label2. Visible=false Button10. Visible=false TextBox3. Visible=false TextBox4. Visible=false DropDownList 3. Visible=false Button12. Visible=falseLabel13. Visible=false Label14. Visible=false Label15. Visible=false Label16. Visible=false TextBox6. Visible=false TextBox8. Visible=false TextBox9. Visible=false CheckBoxList2. Visible=false Button13. Visible=false DropDownList4. Visible=false Button16. Visible=false Button15. Visible=false Label11. Visible=false Label17. Visible=false Label18. Visible=false TextBox11. Visible=false TextBox12. Visible=false TextBox10. Visible=false CheckBox2. Visible=false Label6. Text=Select the AP you wish to remove and press remove // stick the APs list into the dropdown box try DropDownList2. Items. Clear()int i=0 apDataSet1. Clear() sqlDataAdapter2. SelectCommand = new SqlCommand( SELECT APname FROM AP,sqlConnection1) sqlDataAdapter2. Fill(apDataSet1,AP) DataRow arr = apDataSet1. AP. Select() i = arr. GetLength(0) while (i =0) DropDownList2. Items. Add(arri-1. ItemArray. GetValue(0). ToString()) i=i-1 sqlDataAdapter2. SelectCommand = new SqlCommand( SELECT * FROM AP,sqlConnection1) sqlDataAdapter2. Fill(apDataSet1,AP) catch(Exception ev) Label6. Text=ERROR ACSESSING THE DATABASE private void Button5_Click(object sender, System. EventArgs e) //show all users button CheckBox1.Visible=false Label12. Visible=false TextBox7. Visible=false DataGrid2. Visible=false DataGrid1. Visible=true Button9. Visible=false TextBox1. Visible=false TextBox2. Visible=false TextBox5. Visible=false Label10. Visible=false Label3. Visible=false Label4. Visible=false Label5. Visible=false CheckBoxList1. Visible=false DropDownList1. Visible=false Button6. Visible=false Label1. Visible=false Label2. Visible=false Button10. Visible=false TextBox3. Visible=false TextBox4. Visible=false DropDownList2. Visible=false Button8. Visible=false DropDownList3. Visible=false Button12. Visible=false Label13.Visible=false Label14. Visible=false Label15. Visible=false Label16. Visible=false TextBox6. Visible=false TextBox8. Visible=false TextBox9. Visible=false Che ckBoxList2. Visible=false Button13. Visible=false DropDownList4. Visible=false Button16. Visible=false Button15. Visible=false Label11. Visible=false Label17. Visible=false Label18. Visible=false TextBox11. Visible=false TextBox12. Visible=false TextBox10. Visible=false CheckBox2. Visible=false try sqlDataAdapter3. SelectCommand = new SqlCommand( SELECT * FROM APusers,sqlConnection1) sqlDataAdapter3. Fill(usersDataSet11,APusers) DataGrid1.DataSource = usersDataSet11 DataGrid1. DataBind() catch(Exception ev) Label6. Text=ERROR ACSESSING THE DATABASE Label6. Text=which operation would you like to behave? private void Button6_Click(object sender, System. EventArgs e) // remove button(users) //goto all APs listed for this user and remove the user from //ther table and then remove the user from the data base String user_name try user_name = DropDownList1. SelectedItem. Text. ToString() Label6. Text=Remove user + user_name /* * the steps to update the access points * 0. create an array with the APs name * 1. for each AP in the APs array* 1. 1 get the AP IP address from the AP database * 1. 2 get the remove entry to table object ID * 1. 3 call snmpSET function */ /* String IPaddr,OID * for(i=0iki++) * * DataRow arr = apDataSet1. AP. Select(APname =+APsi+) * IPaddr = arr0. ItemArray. GetValue(1). ToString() * OID = avaya. removeEntry() * snmpexe. snmpSet(IPaddr,OID,user_MAC) * */ SqlCommand DelCommand = new SqlCommand(DELETE FROM APusers WHERE userName = + user_name + ,sqlConnection1) DelCommand. Connection. Open() DelCommand. ExecuteNonQuery() DelCommand. Connection. Close() usersDataSet11. Clear()sqlDataAdapter2. Fill(apDataSet1) sqlDataAdapter3. Fill(usersDataSet11) //todo refrash list DropDownList1. Items. Clear() int i=0 usersDataSet11. Clear() sqlDataAdapter3. SelectCommand = new SqlCommand( SELECT userName FROM APusers,sqlConnection1) sqlDataAdapter3. Fill(usersDataSet11) DataRow arr = usersDataSet11. APusers. Select() i = arr. GetLength(0) while (i =0) DropDownList1. Items. Add(arri-1. ItemArray. GetValue(0). ToString()) i=i-1 sqlDataAdapter3. SelectCommand = new SqlCommand( SELECT * FROM APusers,sqlConnection1) sqlDataAdapter3. Fill(usersDataSet11,APusers) catch(Exception ev).Label6. Text=ERROR ACSESSING THE DATABASE private void Button10_Click(object sender, System. EventArgs e) //add button(AP) //updata the APs table and init the AP String AP_name,AP_ip,Location bool active try AP_name = TextBox3. Text. ToString() AP_ip = TextBox4. Text. ToString() Location = TextBox7. Text. ToString() active = CheckBox1. Checked apDataSet1. AP. AddAPRow(AP_name,AP_ip,Location,active) sqlDataAdapter2. Update(apDataSet1) SqlCommand myCommand = new SqlCommand(ALTER TABLE APusers ADD +AP_name+ bit,sqlConnection1) myCommand. Connection. Open() myCommand. ExecuteNonQuery() myCommand. Connection.Close() //todo impart all the users in the APusers table marked as not allowed to this AP myCommand = new SqlCommand( UPDATE APusers SET +AP_na me+= 0,sqlConnection1) myCommand. Connection. Open() myCommand. ExecuteNonQuery() myCommand. Connection. Close() /* the steps to update the access points * 1. connect to the AP IP address from the AP database * 2. get the remove entry to table object ID *3. call snmpSET function */ /* String IPaddr,OID * for(i=0iki++) * * OID = avaya. setName() * snmpexe. snmpSet(AP_ip,OID,AP_name) * OID = avaya. setLocation() * snmpexe. snmpSet(AP_ip,OID,Location) * */ catch(Exception ev) Label6. Text=ERROR ACSESSING THE DATABASE TextBox7. Text= TextBox1.Text= TextBox2. Text= TextBox5. Text= TextBox3. Text= TextBox4. Text= private void Button8_Click(object sender, System. EventArgs e) //remove button(AP) //remove the APs table String AP_name try AP_name = DropDownList2. SelectedItem. Text. ToString() Label6. Text=Removing AP + AP_name SqlCommand DelCommand = new SqlCommand(DELETE FROM AP WHERE APname = + AP_name + ,sqlConnection1) DelCommand. Connection. Open() DelCommand. ExecuteNonQuery() DelCommand.Connection. Close() apDataSet1. Clear()sqlDataAdapter2. Fill(apDataSet1) sqlDataAdapter3. Fill(usersDataSet11) sqlDataAdapter2. AcceptChangesDuringFill = true sqlDataAdapter3. AcceptChangesDuringFill = true DataGrid1. DataSource = apDataSet1 DataGrid1. DataBind() //todo refrash list DropDownList2. Items. Clear() int i=0 apDataSet1. Clear() sqlDataAdapter2. SelectCommand = new SqlCommand( SELECT APname FROM AP,sqlConnection1) sqlDataAdapter2. Fill(apDataSet1,AP) DataRow arr = apDataSet1. AP. Select() i = arr. GetLength(0) while (i =0) DropDownList2. Items. Add(arri-1. ItemArray. GetValue(0). ToString()) i=i-1 sqlDataAdapter2.SelectCommand = new SqlCommand( SELECT * FROM AP,sqlConnection1) sqlDataAdapter2. Fill(apDataSet1,AP) //todo remove the AP_name culomn from the APusers table SqlCommand myCommand = new SqlCommand(ALTER TABLE APusers DROP towboat +AP_name,sqlConnection1) myCommand. Connection. Open() myCommand. ExecuteNonQuery() myCommand. Connection. Close() catc h(Exception ev) Label6. Text=ERROR ACSESSING THE DATABASE /*SNMP * goto the selected AP * a. go to the data base and get the AP IP number * b. snmp. snmpSet(IP,DisableAllUsers) */ private void Button2_Click(object sender, System. EventArgs e) // add user button. int i=0 CheckBox1. Visible=false Label12. Visible=false TextBox7. Visible=false DataGrid2. Visible=false DataGrid1. Visible=false Button9. Visible=true TextBox1. Visible=true TextBox2. Visible=true TextBox5. Visible=true Label10. Visible=true Label3. Visible=true Label4. Visible=true Label5. Visible=true CheckBoxList1. Visible=true DropDownList1. Visible=false Button6. Visible=false Label1. Visible=false Label2. Visible=false Button10. Visible=false TextBox3. Visible=false TextBox4. Visible=false DropDownList2. Visible=false Button8. Visible=false DropDownList3. Visible=false Button12. Visible=falseLabel13. Visible=false Label14. Visible=false Label15. Visible=false Label16. Visible=false TextBox6. Visible=false TextBox8. Visible=false TextBox9. Visible=false CheckBoxList2. Visible=false Button13. Visible=false DropDownList4. Visible=false Button16. Visible=false Button15. Visible=false Label11. Visible=false Label17. Visible=false Label18. Visible=false TextBox11. Visible=false TextBox12. Visible=false TextBox10. Visible=false CheckBox2. Visible=false Label6. Text=Insert the user detials and press add //bring to the checkbox list all the APs available CheckBoxList1. Items. Clear() apDataSet1. Clear()Try sqlDataAdapter2. SelectCommand = new SqlCommand( SELECT APname FROM AP,sqlConnection1) sqlDataAdapter2. Fill(apDataSet1,AP) DataRow arr = apDataSet1. AP. Select() i = arr. GetLength(0) int j =i while (i =0) CheckBoxList1. Items. Add(arrj-i. ItemArray. GetValue(0). ToString()) i=i-1 sqlDataAdapter2. SelectCommand = new SqlCommand( SELECT * FROM AP,sqlConnection1) sqlDataAdapter2. Fill(apDataSet1,AP) catch(Exception ev) Label6. Text=ERROR ACSESSING THE DATABASE private void Button11_Click(obje ct sender, System. EventArgs e) //show all APs button CheckBox1. Visible=falseLabel12. Visible=false TextBox7. Visible=false DataGrid2. Visible=true DataGrid1. Visible=false Button9. Visible=false TextBox1. Visible=false TextBox2. Visible=false TextBox5. Visible=false Label10. Visible=false Label3. Visible=false Label4. Visible=false Label5. Visible=false CheckBoxList1. Visible=false DropDownList1. Visible=false Button6. Visible=false Label1. Visible=false Label2. Visible=false Button10. Visible=false TextBox3. Visible=false TextBox4. Visible=false DropDownList2. Visible=false Button8. Visible=false DropDownList3. Visible=false Button12. Visible=false Label13. Visible=false Label14.Visible=false Label15. Visible=false Label16. Visible=false TextBox6. Visible=false TextBox8. Visible=false TextBox9. Visible=false CheckBoxList2. Visible=false Button13. Visible=false DropDownList4. Visible=false Button16. Visible=false Button15. Visible=false Label11. Visible=false Label17. Visible=fal se Label18. Visible=false TextBox11. Visible=false TextBox12. Visible=false TextBox10. Visible=false CheckBox2. Visible=false try DataGrid2. DataSource = apDataSet1 DataGrid2. DataBind() catch(Exception ev) Label6. Text=ERROR ACSESSING THE DATABASE Label6.Text=which operation would you like to perform? private void Button7_Click(object sender, System. EventArgs e) CheckBox1. Visible=false Label12. Visible=false TextBox7. Visible=false DataGrid2. Visible=false DataGrid1. Visible=false Button9. Visible=false TextBox1. Visible=false TextBox2. Visible=false Label3. Visible=false TextBox5. Visible=false Label10. Visible=false Label4. Visible=false Label5. Visible=false CheckBoxList1. Visible=false Label1. Visible=false Label2. Visible=false Button10. Visible=false TextBox3. Visible=false TextBox4. Visible=false DropDownList2. Visible=false Button8. Visible=false DropDownList1. Visible=false Button6.Visible=false DropDownList3. Visible=true Button12. Visible=true Label13. Visible=fa lse Label14. Visible=false Label15. Visible=false Label16. Visible=false TextBox6. Visible=false TextBox8. Visible=false TextBox9. Visible=false CheckBoxList2. Visible=false Button13. Visible=false DropDownList4. Visible=false Button16. Visible=false Button15. Visible=false Label11. Visible=false Label17. Visible=false Label18. Visible=false TextBox11. Visible=false TextBox12. Visible=false TextBox10. Visible=falseCheckBox2. Visible=false Label6. Text=Select the user whose details you wish to update bring the users list into the dropdown box DropDownList3. Items. Clear() int i=0 try usersDataSet11. Clear() sqlDataAdapter3. SelectCommand. CommandText = SELECT userName FROM APusers sqlDataAdapter3. Fill(usersDataSet11) DataRow arr = usersDataSet11. APusers. Select() i = arr. GetLength(0) while (i =0) DropDownList3. Items. Add(arri-1. ItemArray. GetValue(0). ToString()) i=i-1 sqlDataAdapter3.SelectCommand = new SqlCommand( SELECT * FROM APusers,sqlConnection1) sqlDataAdapter3. Fill (usersDataSet11,APusers) catch(Exception ev) Label6. Text=ERROR ACSESSING THE DATABASE private void Button12_Click(object sender, System. EventArgs e) string user, id_num, mac_addr int i=3, length int APnum user= DropDownList3.SelectedItem. Text. ToString() authorized = user Label6. Text=Update user + user DropDownList3. Visible=false Button12. Visible=false Label13. Visible=true Label14. Visible=true Label15. Visible=true Label16. Visible=true TextBox6. Visible=true TextBox8. Visible=true TextBox9. Visible=true CheckBoxList2. Visible=true Button13. Visible=true //filling the text boxs with the subsisting user data CheckBoxList2. Items. Clear() sqlDataAdapter3. Fill(usersDataSet11)DataRow arr = usersDataSet11. APusers. Select(userName =+user+) id_num = arr0. ItemArray. GetValue(1). ToString() mac_addr = arr0. ItemArray. GetValue(2). ToString() //displaying the current user data in text boxs TextBox6. Text=user TextBox8. Text=id_num TextBox9. Text=mac_addr CheckBoxList2. Item s. Clear() apDataSet1. Clear() try sqlDataAdapter2. SelectCommand = new SqlCommand( SELECT APname FROM AP,sqlConnection1) sqlDataAdapter2. Fill(apDataSet1,AP) DataRow arr1 = apDataSet1. AP. Select() APnum = arr1. GetLength(0) i = APnum int j =i while (i =0) CheckBoxList2. Items. Add(arr1j-i. ItemArray.GetValue(0). ToString()) i=i-1 sqlDataAdapter2. SelectCommand = new SqlCommand( SELECT * FROM AP,sqlConnection1) sqlDataAdapter2. Fill(apDataSet1,AP) for(i=0iAPnumi++) SqlCommand myCommand = new SqlCommand( SELECT + CheckBoxList2. Itemsi. Text + FROM APusers WHERE (userName = + user +),sqlConnection1) myCommand. Connection. Open() SqlDataReader data = myCommand. ExecuteReader() data. Read() CheckBoxList2. Itemsi. Selected = data. GetBoolean(0) myCommand. Connection. Close() catch(Exception ev) Label6. Text=ERROR ACSESSING THE DATABASE private void Button13_Click(object sender, System.EventArgs e) String user_name,user_id,user_MAC String str2=,str3= int i,j,tmp user_name = T extBox6. Text. ToString() user_id = TextBox8. Text. ToString() user_MAC = TextBox9. Text. ToString() int items = CheckBoxList2. Items. Count try apDataSet1. Clear() sqlDataAdapter2. SelectCommand = new SqlCommand( SELECT APname FROM AP,sqlConnection1) sqlDataAdapter2. Fill(apDataSet1,AP) DataRow arr = apDataSet1. AP. Select() i = arr. GetLength(0) //todo add this user to the table //todo create str2 with the names of all the APs coulms //todo create str3 with the values of all the coulms j=0for(j=0jij++) str3= str3 + arrj. ItemArray. GetValue(0). ToString()+, str3 = str3. Remove(((str3. Length)-2),2) Label6. Text =CheckBoxList2. SelectedIndex. ToString() str2= +user_name +, + user_id +, +user_MAC + , tmp = CheckBoxList2. SelectedIndex for(j=0jij++) if (tmp==j) str2= str2 + 1, CheckBoxList2. SelectedItem. Selected = false tmp = CheckBoxList2. SelectedIndex else str2= str2 + 0, str2 = str2. Remove(((str2. Length)-2),2) Label6. Text =str2 SqlCommand delCommand = new SqlComm and(DELETE FROM APusers WHERE userName = + original + ,sqlConnection1) delCommand.Connection. Open() delCommand. ExecuteNonQuery() delCommand. Connection. Close() SqlCommand insCommand = new SqlCommand(INSERT INTO APusers (userName, id_num, mac_adr, + str3 + ) VALUES ( + str2 + ),sqlConnection1) insCommand. Connection. Open() insCommand. ExecuteNonQuery() insCommand. Connection. Close() sqlDataAdapter2. SelectCommand = new SqlCommand( SELECT * FROM AP,sqlConnection1) sqlDataAdapter2. Fill(apDataSet1,AP) catch(Exception ev) Label6. Text=ERROR ACSESSING THE DATABASE /*SNMP * goto the selected user * a. get all the APs IP numbers * b. for each IP * if checked.* snmp. snmpSet(IP,addUsers) * else * snmp. snmpSet(IP,removeUsers) */ Label13. Visible=false Label14. Visible=false Label15. Visible=false Label16. Visible=false TextBox6. Visible=false TextBox8. Visible=false TextBox9. Visible=false CheckBoxList2. Visible=false Button13. Visible=false private void Button14_Click(object s ender, System. EventArgs e) CheckBox1. Visible=false Label12. Visible=false TextBox7. Visible=false DataGrid2. Visible=false DataGrid1. Visible=false Button9. Visible=false TextBox1. Visible=false TextBox2. Visible=false TextBox5. Visible=false Label10.Visible=false Label3. Visible=false Label4. Visible=false Label5. Visible=false CheckBoxList1. Visible=false DropDownList1. Visible=false Button6. Visible=false Label1. Visible=false Label2. Visible=false Button10. Visible=false TextBox3. Visible=false TextBox4. Visible=false DropDownList2. Visible=false Button8. Visible=false DropDownList3. Visible=false Button12. Visible=false Label13. Visible=false Label14. Visible=false Label15. Visible=false Label16. Visible=false TextBox6. Visible=false TextBox8. Visible=false TextBox9. Visible=false CheckBoxList2. Visible=false Button13. Visible=falseDropDownList4. Visible=true Button16. Visible=true Button15. Visible=false Label11. Visible=false Label17. Visible=false Label18. Visible=false T extBox11. Visible=false TextBox12. Visible=false TextBox10. Visible=false CheckBox2. Visible=false Label6. Text=Select the AP you wish to update and press select //bring the APs list into the dropdown box try DropDownList4. Items. Clear() int i=0 apDataSet1. Clear() sqlDataAdapter2. SelectCommand = new SqlCommand( SELECT APname FROM AP,sqlConnection1) sqlDataAdapter2. Fill(apDataSet1,AP) DataRow arr = apDataSet1. AP. Select() i = arr.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment