var WorkList = new Array();//陣列物件
//下面是自己定義的實體
function WorkEx(depart, title, begintime, endtime) {
this.SId = 0;
this.Id = -(WorkList.leng 11);
this.DepartmentName = depart;
this.Title = title;
this.BeginTime = begintime; this .Enable = 0;
return this;
}
function DeleteWork(guid) {
WorkList = $.grep = guid;
});
ShowWork();
}
function ShowWork() {
var html = ""; val) {
html = html "
" val.DepartmentName ":" val.Title
EndTime) "×";
});
$("#tdWorkList ").html(html);
}
function AddWork() {
if(CheckIsNull("workaddress","工作地址不能為空白")
vel Isull &" ,Isull &"職責不能為空")
&& CheckIsNull("WorkBegin", "工作開始日期不能為空")
&& CheckIsNull("Work> && CheckIsNull("Workrkave", "工作結束日期不能為> {
var isok = true;
$.each(WorkList, function (key, val ) . .val()
&& val.Title == $("#worklevel").val()
&& val.BeginTimeo val.EndTime == $("# WorkLeave").val()
)
"); isok= false;
}
});
var onework = new WorkEx($("#workaddress").val(), $("# worklevel").val(),
$("#Work."). WorkList.push(onework);
//
四川省樂天區某某製藥廠× >}