private void button1_Click(object sender, EventArgs e) { tbTelRecordClass tbClass = new tbTelRecordClass(); tbTelRecordMenthod tbMenthod = new tbTelRecordMenthod(); tbClass.strsType = "´òÈë"; OleDbDataReader dr = tbMenthod.tbTelRecordSecrf(tbClass, "2"); listView1.Items.Clear(); int intFalg = 0; while (dr.Read()) { listView1.Items.Add(dr[1].ToString()); listView1.Items[intFalg].SubItems.Add(dr[2].ToString()); listView1.Items[intFalg].SubItems.Add(dr[3].ToString()); listView1.Items[intFalg].SubItems.Add(dr[5].ToString()); intFalg++; }// dr.Close(); }
private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "") { MessageBox.Show("输入查询条件!", "提示"); textBox1.Focus(); return; } tbTelRecordClass tbClass = new tbTelRecordClass(); tbTelRecordMenthod tbMenthod = new tbTelRecordMenthod(); tbClass.strfldTel = textBox1.Text; OleDbDataReader dr = tbMenthod.tbTelRecordSecrf(tbClass, "1"); dr.Read(); listView1.Items.Clear(); if (dr.HasRows) { listView1.Items.Add(dr[1].ToString()); listView1.Items[0].SubItems.Add(dr[2].ToString()); listView1.Items[0].SubItems.Add(dr[3].ToString()); listView1.Items[0].SubItems.Add(dr[5].ToString()); } // dr.Close(); }
public void tbTelRecordAdd(string stringId, int intChannel) { tbTelRecordClass tbClass = new tbTelRecordClass(); tbTelRecordMenthod tbMenhod = new tbTelRecordMenthod(); tbCustomerMethod tbCustom = new tbCustomerMethod(); tbCustomerClass tbCuClass = new tbCustomerClass(); tbClass.strfldTel = stringId; tbClass.daSearchDate = DateTime.Now; tbClass.shfldChannel = intChannel; if (intLY == 1) { tbCuClass.kuTel = stringId; tbCuClass.kuOffice = stringId; int intFalgTel = DataGridFalg(tbCustom.tbCustomerSecarf(tbCuClass, "khTel"), DataGridViewCount(tbCustom.tbCustomerSecarf(tbCuClass, "khTel"))); tbClass.strsType = "打入"; } if (intLY == 0) { tbClass.strsType = "打出"; } tbMenhod.tbTelRecordAdd(tbClass); intLY = 0; }