コード例 #1
0
        public void ComboxUserListInitialize()
        {
            var res = accessHelper.ExecuteDataTable("SELECT * FROM YM_USER;");

            for (int i = 0; i < res.Rows.Count; i++)
            {
                var item = res.Rows[i];
                //new ComboBoxItem(string.Format("{0}({1},{2})", item["GameName"], item["GameJianPin"], item["GameQuanPin"]), item["ID"].ToString())
                listComBox.Add(new ComboBoxItem(string.Format("{0}({1},{2})", item["GameName"], item["GameJianPin"], item["GameQuanPin"]), item["ID"].ToString()));
                this.comboBoxUserList.Items.Add(new ComboBoxItem(string.Format("{0}({1},{2})", item["GameName"], item["GameJianPin"], item["GameQuanPin"]), item["ID"].ToString()));
            }
            this.comboBoxUserList.AutoCompleteSource = AutoCompleteSource.ListItems;
            this.comboBoxUserList.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
        }
コード例 #2
0
 public void Edit()
 {
     if (EditId != 0)
     {
         var res = accessHelper.ExecuteDataTable(string.Format("SELECT * FROM YM_USER WHERE [ID] = {0};", EditId));
         if (res.Rows.Count > 0)
         {
             ZhanjieInput.Text       = res.Rows[0]["ZHANJIE"].ToString();
             dateTimePicker1.Value   = Convert.ToDateTime(res.Rows[0]["CREATETIME"]);
             GoldInput.Text          = res.Rows[0]["GOLD"].ToString();
             BreakInput.Text         = res.Rows[0]["BREAK"].ToString();
             checkBoxJiesuan.Checked = bool.Parse(res.Rows[0]["JIESUAN"].ToString());
             comboBoxUserList.Text   = res.Rows[0]["YM_USER_ID"].ToString();
         }
     }
 }
コード例 #3
0
        public void SearchFunc()
        {
            ListViewInitialize();
            var res = accessHelper.ExecuteDataTable(string.Format("SELECT * FROM YM_USER WHERE GAMENAME LIKE '%{0}%' OR GAMEJIANPIN LIKE '%{0}%' OR GAMEQUANPIN LIKE '%{0}%';", SearchInput.Text));

            UpdateListView(res);
        }