private void btnDelJuXingName_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(this.lstJuxingEdit.SelectedValue.ToString())) { //delete mingxi JuxingHelper.DelJuXing(this.lstJuxingEdit.SelectedValue.ToString()); BindJuxingEditList(); LoadJuxing(); } }
private void btnAddJuXingName_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(this.txtInputJuXingDetail.Text.Trim())) { JuxingHelper.AddJuXing(this.txtInputJuXingDetail.Text.Trim()); BindJuxingEditList(); LoadJuxing(); this.txtInputJuXingDetail.Text = ""; } }
//加载句型集合 private void BindJuxingEditList() { this.lstJuxingEdit.DataSource = null; this.lstJuxingEdit.Items.Clear(); DataTable juxingList = JuxingHelper.LoadJuxingColList("1"); this.lstJuxingEdit.DisplayMember = "det_memo"; this.lstJuxingEdit.ValueMember = "det_id"; this.lstJuxingEdit.DataSource = juxingList; }
//加载句型明细 private void LoadJuxingCol(string colid) { this.juxingcollist.DataSource = null; this.juxingcollist.Items.Clear(); DataTable juxingcolList = JuxingHelper.LoadJuxingColList(colid); this.juxingcollist.DisplayMember = "det_memo"; this.juxingcollist.ValueMember = "det_id"; this.juxingcollist.DataSource = juxingcolList; }
//加载句型集合 private void LoadJuxing() { this.cmbJuxingJiheList.DataSource = null; this.cmbJuxingJiheList.Items.Clear(); DataTable juxingList = JuxingHelper.LoadJuxingList(); this.cmbJuxingJiheList.DisplayMember = "col_name"; this.cmbJuxingJiheList.ValueMember = "col_id"; this.cmbJuxingJiheList.DataSource = juxingList; }