using system;
using system.collections.generic;
using system.componentmodel;
using system.data;
using system.drawing;
using system.linq;
using system.text;
using system.threading.tasks;
using system.windows.forms;
using system.data.sqlclient;
namespace qq通訊錄動態載入與刪除
private
void
tsmidelete_click
(object sender,
eventargs e)
",qqnumber)
; messagebox.
show
(sql)
;//開啟連線物件
conn.
open()
;//生成執法者
sqlcommand cmd =
newsqlcommand
(sql,conn)
;//執法者呼叫方法,執行不查詢的方法
int n = cmd.
executenonquery()
; messagebox.
show
("受影響的行數為"
+n);
//假設需要刪除yyy
//delect from 表名 where name='yyy';
//關閉連線物件
conn.
close()
;//清空listview物件中的項
lvcards.items.
clear()
;//重新呼叫乙個load方法
loaddata()
;}private
void
tsmiadd_click
(object sender,
eventargs e)
private
void
cardlist_load
(object sender,
eventargs e)
public
void
loaddata()
conn.
close()
;}private
void
tsmiaddcards_click
(object sender,
eventargs e)
}}
通訊錄(C語言)
include include include define m 1000 結構體變數的大小 void insert 增加聯絡人資訊 int delet 刪除聯絡人資訊 void find 查詢指定聯絡人資訊 void change 修改聯絡人資訊 void show 顯示所有聯絡人資訊 void ...
C語言通訊錄
include include include typedef struct atnn 定義結構體 attn void menu 選單 void print attn attn at,int sz 顯示所有聯絡人資訊 void add attn attn at,int sz 新增聯絡人資訊 if s...
C 通訊錄實現
昨晚實現了用c 編寫通訊錄,深刻的感受到了封裝的便利性啊,vector真是太方便了!如下 info.h ifndef person h define person h include include include using namespace std class info endif info....