{
DataTable bang = new DataTable();
DataTable bang1 = new DataTable();
bang = lop.table("select * from Menucap1");
for (int i = 0; i < bang.Rows.Count; i++)
{
ToolStripMenuItem mm = new ToolStripMenuItem();
mm.Text = bang.Rows[i][1].ToString().Trim() ;
bang1 = lop.table(string.Format("select * from Menucap2 where Macap1 ='{0}'", bang.Rows[i][0].ToString()));
for (int j = 0; j < bang1.Rows.Count; j++)
{
ToolStripMenuItem mm1 = new ToolStripMenuItem();
mm1.Text = bang1.Rows[j][1].ToString().Trim();
mm.DropDownItems.Add(mm1);
}
menuStrip1.Items.Add(mm);
}
}
» Tin mới nhất:
» Các tin khác: