/*Elotte sokszar*/
button8.Visible = false; //register
button9.Visible = false; //login
button7.Visible = false; //adminpanel
button11.Visible = true; //logout
button6.Visible = true; //csillag
button13.Visible = true; //settings
OleDbConnection c
= new OleDbConnection
("Provider=Microsoft.Jet.OLEDB.4.0; Data source='db.mdb'");
OleDbDataAdapter a
= new OleDbDataAdapter
();
try{
c.Open();
OleDbCommand s
= new OleDbCommand
("SELECT * FROM Bookmarks WHERE login = '" + op
.nev + "'",c
);
OleDbDataReader r = s.ExecuteReader();
OleDbCommand s1
= new OleDbCommand
("SELECT COUNT(*) FROM Bookmarks WHERE login = '" + op
.nev + "' AND btype = 'Elektrotechnika'",c
);
int x = Convert.ToInt32(s1.ExecuteScalar());
MessageBox.Show(Convert.ToString(x));
while(r.Read()){
tbnev[db] = r.GetString(2);
tburl[db] = r.GetString(3);
tbdate[db] = r.GetString(4);
db++;
}
r.Close();
int poz = 113;
foreach (string index in tbnev)
{
Button button
= new Button
();
button
.Location = new System.Drawing.Point(poz,
6);
button.Name = index;
button
.Size = new System.Drawing.Size(75,
23);
button.TabIndex = 0;
button.Text = index;
button.UseVisualStyleBackColor = true;
button
.Click += new System.EventHandler(Button14Click
); // Itt kene atadni az tburl tombot, nem?
poz += 90;
panel1.Controls.Add(button);
}
}catch(Exception ex){
MessageBox.Show("hiba"+ ex);
}
/* EVENT */
void Button14Click(object sender, EventArgs e, string[] url)
{
MessageBox.Show(Convert.ToString(url[0]));
}
Replies to bajom
Title |
Name |
Language |
When |
Re: bajom |
Rock3r |
csharp |
8 Years ago. |
{"text":"text","html5":"html","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"lua","bash":"sh","erlang":"erlang","go":"golang","c":"c_cpp","cpp":"c_cpp","diff":"diff","latex":"latex","sql":"sql","xml":"xml","0":"text","abap":"abap","actionscript":"actionscript","actionscript3":"actionscript","ada":"ada","apache":"apache_conf","applescript":"applescript","asm":"assembly_x86","autohotkey":"autohotkey","closure":"closure","cobol":"cobol","coffeescript":"coffee","cpp-winapi":"c_cpp","c_loadrunner":"c_cpp","c_mac":"c_cpp","c_winapi":"c_cpp","csharp":"csharp","d":"d","dart":"dart","dot":"dot","eiffel":"eiffel","fortran":"fortran","groovy":"groovy","haskell":"haskell","haxe":"haxe","ini":"ini","io":"io","java":"java","java5":"java","make":"makefile","matlab":"matlab","mysql":"mysql","objc":"objectivec","ocaml":"ocaml","pascal":"pascal","perl":"perl","perl6":"perl","postgresql":"pgsql","powershell":"powershell","prolog":"prolog","properties":"properties","rails":"ruby","rust":"rust","scala":"scala","scheme":"scheme","smarty":"smarty","tcl":"tcl","vala":"vala","vb":"vbscript","verilog":"verilog","vhdl":"vhdl","yaml":"yaml"}