public JsonResult MyProfile() { 人資料 UserProfile = db.人資料.Find(Convert.ToInt32(Request.Cookies["AutoLg"]["id"])); var mvm = new { 中文姓名 = UserProfile.中文姓名, 英文姓名 = UserProfile.英文姓名, 性別 = UserProfile.性別, EmployeeID = UserProfile.EmployeeID, 出生年月日 = UserProfile.出生年月日, 受雇日期 = UserProfile.受雇日期, 職稱 = UserProfile.職稱, 部門 = UserProfile.部門, 信箱 = UserProfile.信箱, 電話 = UserProfile.電話, 居住地 = UserProfile.居住地, 婚姻狀況 = UserProfile.婚姻狀況, 特休 = UserProfile.特休, 薪資 = UserProfile.薪資, 限 = UserProfile.限, 狀態 = UserProfile.狀態, }; return(Json(mvm, JsonRequestBehavior.AllowGet)); }
public JsonResult HREditt(int id) { 人資料 EditProfile = db.人資料.Find(id); var MVM = new { EmployeePW = EditProfile.EmployeePW, 中文姓名 = EditProfile.中文姓名, 英文姓名 = EditProfile.英文姓名, 性別 = EditProfile.性別, EmployeeID = EditProfile.EmployeeID, 出生年月日 = EditProfile.出生年月日, 受雇日期 = EditProfile.受雇日期, 職稱 = EditProfile.職稱, 部門 = EditProfile.部門, 信箱 = EditProfile.信箱, 電話 = EditProfile.電話, 居住地 = EditProfile.居住地, 婚姻狀況 = EditProfile.婚姻狀況, 特休 = EditProfile.特休, 薪資 = EditProfile.薪資, 限 = EditProfile.限, 狀態 = EditProfile.狀態, }; return(Json(MVM, JsonRequestBehavior.AllowGet)); }
public JsonResult HRAdd(人資料 mlvm) { 人資料 mmb = new 人資料() { EmployeePW = mlvm.EmployeePW, 中文姓名 = mlvm.中文姓名, 英文姓名 = mlvm.英文姓名, 性別 = mlvm.性別, EmployeeID = mlvm.EmployeeID, 出生年月日 = mlvm.出生年月日, 受雇日期 = mlvm.受雇日期, 職稱 = mlvm.職稱, 部門 = mlvm.部門, 信箱 = mlvm.信箱, 電話 = mlvm.電話, 居住地 = mlvm.居住地, 婚姻狀況 = mlvm.婚姻狀況, 特休 = mlvm.特休, 薪資 = mlvm.薪資, 限 = mlvm.限, 狀態 = mlvm.狀態 }; db.人資料.Add(mmb); db.SaveChanges(); return(Json(mmb, JsonRequestBehavior.AllowGet)); }
public JsonResult HRDelete(int id) { 人資料 mlvm = db.人資料.Find(id); db.人資料.Remove(mlvm); //mlvm.狀態 = "不在職"; //db.Entry<個人資料>(mlvm).State = EntityState.Modified; db.SaveChanges(); return(Json(mlvm, JsonRequestBehavior.AllowGet)); }
public void 應徵員工(人資料 某人, 政策 人資) { }