The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
PanelGroup
Posted by: Alexandr | March 4, 2011 @ 9:55am
C# Code
[
Download
]
private void button3_Click(object sender, EventArgs e) { List<itemObjOrdered> listt2 = new List<itemObjOrdered>(listt); gf.SaveGroup((comboBox1.SelectedItem as itemObj).Id_o, textBox1.Text, textBox2.Text); foreach (itemObjOrdered it in listt) { bool del = true; foreach (itemObjOrdered it2 in listBox1.Items) if (it.Id_o == it2.Id_o) { del = false; break; } if (del) { gf.DeleteTableFromGroup((comboBox1.SelectedItem as itemObj).Id_o, it.Id_o); } } foreach (itemObjOrdered it in listBox1.Items) { bool add = true; foreach (itemObjOrdered it2 in listt) if (it.Id_o == it2.Id_o) { add = false; break; } if (add) { gf.MoveTableToGroup((comboBox1.SelectedItem as itemObj).Id_o, it.Id_o); } } for (int i = 0; i < listBox1.Items.Count; i++) { if ((listBox1.Items[i] as itemObjOrdered).order != i) { (listBox1.Items[i] as itemObjOrdered).order = i; gf.SetOrderTableInGroup((comboBox1.SelectedItem as itemObj).Id_o, (listBox1.Items[i] as itemObjOrdered).Id_o, (listBox1.Items[i] as itemObjOrdered).order); } } comboBox1_SelectedIndexChanged(this, null); }
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.99 / 8
113 Votes
http://codebin.yi.org/1151
page generated in 0.01 seconds