Esempio n. 1
0
        /// <summary>
        ///     获取用户的教育经历
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        public SysUserEdu GetUserEdus(int eduId)
        {
            string where = " EduId=" + eduId;
            SysUserEdu userExtend = _dataAccess.GetList <SysUserEdu>(where).FirstOrDefault();

            return(userExtend);
        }
Esempio n. 2
0
        public JsonResult SaveUserEdu(int dataId, int userId, DateTime stime, DateTime?etime, string school, string major,
                                      string education,
                                      string majorDescription, string isAbroad)
        {
            SysUserEdu edu;

            if (dataId == 0)
            {
                edu = new SysUserEdu {
                    CreateTime = DateTime.Now, CreateUser = userId
                }
            }
            ;
            else
            {
                edu = _userManager.GetUserEdus(dataId);
            }

            edu.UserId           = userId;
            edu.StartTime        = stime;
            edu.EndTime          = etime;
            edu.School           = school;
            edu.Major            = major;
            edu.MajorDescription = majorDescription;
            if (isAbroad == "on")
            {
                edu.IsAbroad = true;
            }

            _userManager.SaveUserEdu(edu);
            return(Json(new { result = 1, dataId = edu.EduId, msg = "保存成功" }));
        }
Esempio n. 3
0
        public ActionResult EditEdu(int id = 0, int userId = 0)
        {
            var model = new SysUserEdu {
                EduId = 0, UserId = userId
            };

            if (id > 0)
            {
                model = _userManager.GetUserEdus(id);
            }
            return(View(model));
        }
Esempio n. 4
0
 /// <summary>
 ///     保存用户的教育经历
 /// </summary>
 /// <param name="userEdus"></param>
 public int SaveUserEdu(SysUserEdu userEdus)
 {
     if (userEdus == null)
     {
         throw new Exception("教育经历为空!");
     }
     if (userEdus.EduId > 0)
     {
         _dataAccess.UpdateEntity(userEdus);
     }
     else
     {
         userEdus.EduId = _dataAccess.AddEntity(userEdus);
     }
     return(userEdus.EduId);
 }
Esempio n. 5
0
        public ActionResult DetailEdu(int id)
        {
            SysUserEdu model = _userManager.GetUserEdus(id);

            return(View(model));
        }