Beispiel #1
0
        public static void bingMemberComboBoxData(int id)
        {
            my_connection.Open();

            OleDbDataAdapter memberData   = new OleDbDataAdapter("select * from [member];", my_connection);
            DataSet          my_memberSet = new DataSet();

            memberData.Fill(my_memberSet);
            DataTable memberTable = my_memberSet.Tables[0];

            App.MemberComboBoxData.Clear();

            for (int i = 0; i < memberTable.Rows.Count; i++)
            {
                DataRow tempRow = memberTable.Rows[i];

                if ((int)tempRow["parentID"] == id)
                {
                    singleData = new ShowComboBoxData((int)tempRow["ID"], tempRow["name"].ToString());
                    App.MemberComboBoxData.Add(singleData);
                }
            }

            my_connection.Close();
        }
Beispiel #2
0
        private void cmb_whichgroup_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (cmb_whichgroup.SelectedItem == null)
            {
                return;
            }

            whichGroup      = cmb_whichgroup.SelectedItem as ShowComboBoxData;
            selectIndexStar = cmb_whichgroup.SelectedIndex;
        }
Beispiel #3
0
 private static void bindGroupComboBoxData(int id, string name)
 {
     singleData = new ShowComboBoxData(id, name);
     App.GroupComboBoxData.Add(singleData);
 }