public string AddCv(string userId) { var res = baseInfoApp.IQueryable(x => x.UserID == userId).FirstOrDefault(); if (res == null) { res = new ResumeBaseInfo { UserID = userId }; res.ID = CommonUtility.GuId(); baseInfoApp.Insert(res); } return(res.ID); }
//保存基本信息 public string SaveCv(CvModel model) { ResumeBaseInfo resume = null; resume = baseInfoApp.FindEntity(model.Id); if (resume == null) { return(resume.ID); } resume.TrueName = model.Username; resume.Gender = model.UserSex; resume.Age = model.UserAge; resume.Address = model.UserAddress; resume.Phone = model.UserTel; resume.Email = model.UserEmail; resume.HeadPicID = model.Logo; resume.Skill = model.SkillContent; resume.SelfVal = model.SelfContent; baseInfoApp.Update(resume); return(resume.ID); }
public ActionResult SaveBaseInfo(ResumeBaseInfo model) { bool status = false; if (!ModelState.IsValid) { return(this.JsonFormat(ModelState, !status, "ERROR")); } MST_RESUME resume = new MST_RESUME(); resume.RESUME_CD = model.RESUME_CD; resume.NAME = model.NAME; resume.EMAIL = model.EMAIL; resume.EDUCATION = model.EDUCATION; resume.EXPERIENCE = model.EXPERIENCE; resume.SEX = model.SEX; resume.PHONE = model.PHONE; resume.CURRENT_STATE = model.CURRENT_STATE; resume.PORTRAIT = model.PORTRAIT; resumeManager.Modify(resume, "NAME", "EMAIL", "EDUCATION", "EXPERIENCE", "SEX", "PHONE", "CURRENT_STATE", "PORTRAIT"); status = true; return(this.JsonFormat(resume, !status, "保存成功")); }