publicclass
se
public
int age
public
string name
public
string gender
}public
enum
gender
1public
class
record25
//簽退時間
6public datetime signouttime 7//
工號8public
string id 9//
員工姓名
//列表上用於儲存se物件
2public listprogrammerlist = new list();3//
重新整理datagridview資料
4public
void bindgrid(listlist)58
9private
void 新增toolstripmenuitem_click(object
sender, eventargs e)
1016
17private
void btncha_click(object
sender, eventargs e)
1827}28
this.datagridview1.datasource = new bindinglist(list);29}
3031
private dictionary recordlist = new dictionary();
32private
void 簽到toolstripmenuitem_click(object
sender, eventargs e)
3340
//確認是否簽到
41string workno = datagridview1.selectedrows[0].cells[0
].value.tostring();
42foreach (string id in
recordlist.keys)
4349}50
//執行簽到
51 record record = new
record();
52 record.id =workno;
53 record.name = datagridview1.selectedrows[0].cells[1
].value.tostring();
54 record.signintime = datetime.now;//
獲取系統當前時間
55this.recordlist.add(record.id, record);//
新增到簽到記錄中
56 messagebox.show("
簽到成功!");
57}5859
private
void 簽退toolstripmenuitem_click(object
sender, eventargs e)
6067
string id = datagridview1.selectedrows[0].cells[0
].value.tostring();
68bool isout = false;//
標識是否已經簽到過
69foreach (string key in
recordlist.keys)
7078}79
if (!isout)
8083
} 84
private
void 打卡記錄toolstripmenuitem_click(object
sender, eventargs e)
8593
94private
void 刪除toolstripmenuitem_click(object
sender, eventargs e)
95110
}111
112}
113else
114118
119 }
1private
void btncun_click(object
sender, eventargs e)213
else
1417
//驗證工號唯一性
18foreach (se item in
frmparent.programmerlist)
1925}26
frmparent.programmerlist.add(pr);
27this
.close();28}
29catch
(exception ex)
3034
finally
3538 }
人員資訊管理( )
class employee employee employee employee employee void employee increaseempno int steps void employee promote int increment void employee setaccumpay...
人員資訊管理( )
class employee int employee employeeno 1000 員工編號基數為 1000 employee employee employee employee void employee increaseempno int steps void employee promo...
資訊管理系統
輸入5個員工的資訊 輸入 每個員工含有成員名為 工號 姓名 基本工資 補貼 獎金 水電費 房租 實發工資 工資排名 編寫函式完成下列要求 1 輸入乙個員工的工號,查詢該員工的資訊並輸出,若不存在顯示沒找到 查詢 2 輸入乙個新員工的資訊,按工號順序將該員工的資訊插入後輸出 顯示 3 輸入乙個已存在員...