示例#1
0
 private void button9_Click(object sender, EventArgs e)
 {
     if (creListBox1.SelectedIndex < creListBox1.Items.Count - 1)
     {
         TSButtonDept tmp         = (TSButtonDept)creListBox1.SelectedItem;
         int          selectIndex = creListBox1.SelectedIndex;
         creListBox1.ClearSelected();
         creListBox1.Items.RemoveAt(selectIndex);
         creListBox1.Items.Insert(selectIndex + 1, tmp);
         creListBox1.SelectedIndex = selectIndex + 1;
     }
 }
示例#2
0
        public ArrayList GetTSButtonDept(string storeID)
        {
            DataTable table = getGui.GetAllTSButtonDept(storeID);
            ArrayList re    = new ArrayList();

            for (int i = 0; i < table.Rows.Count; i++)
            {
                TSButtonDept tsButton = new TSButtonDept("01", Convert.ToInt32(table.Rows[i]["Index"]),
                                                         table.Rows[i]["Caption"].ToString(), table.Rows[i]["Picture"].ToString(), table.Rows[i]["Option1"].ToString(),
                                                         Convert.ToInt32(table.Rows[i]["BackColor"]), Convert.ToInt32(table.Rows[i]["ForeColor"]), Convert.ToBoolean(table.Rows[i]["Visible"]),
                                                         table.Rows[i]["Ident"].ToString(), GetTSButtonInvent(table.Rows[i]["Ident"].ToString(), storeID));
                re.Add(tsButton);
            }
            return(re);
        }