コード例 #1
0
        public ActionResult Delete(int id)
        {
            var         userStatus       = UserStatusManage.getUserStatus();
            IUserEduBLL userEducationBLL = new UserEduBLL();
            t_user_edu  userEdu          = userEducationBLL.GetEntity(o => o.pkid == id);
            bool        b = userEducationBLL.DeleteEduRecord(userEdu, userStatus);

            return(Json(""));
        }
コード例 #2
0
        public ActionResult EditSave(int id)
        {
            var         userStatus       = UserStatusManage.getUserStatus();
            IUserEduBLL userEducationBLL = new UserEduBLL();
            t_user_edu  userEdu          = userEducationBLL.GetEntity(o => o.pkid == id);

            GenerateUserEdu(userEdu);
            userEducationBLL.AddEduRecord(userEdu, userStatus);
            return(Json(""));
        }
コード例 #3
0
        public ActionResult CreateSave()
        {
            var        userStatus = UserStatusManage.getUserStatus();
            t_user_edu userEdu    = new t_user_edu();

            GenerateUserEdu(userEdu);
            IUserEduBLL userEducationBLL = new UserEduBLL();

            userEducationBLL.AddEduRecord(userEdu, userStatus);
            return(Json(""));
        }
コード例 #4
0
        private void GenerateUserEdu(t_user_edu userEdu)
        {
            if (string.IsNullOrEmpty(Request["userid"]))
            {
                throw new ArgumentException("userid 为空");
            }
            var userStatus = UserStatusManage.getUserStatus();

            userEdu.userid       = int.Parse(Request["userid"]);
            userEdu.university   = Request["university"];
            userEdu.city         = string.IsNullOrEmpty(Request["city"]) ? default(int?) : int.Parse(Request["city"]);
            userEdu.startdate    = string.IsNullOrEmpty(Request["startdate"]) ? default(DateTime?) : DateTime.Parse(Request["startdate"]);
            userEdu.enddate      = string.IsNullOrEmpty(Request["enddate"]) ? default(DateTime?) : DateTime.Parse(Request["enddate"]);
            userEdu.education    = string.IsNullOrEmpty(Request["education"]) ? default(int?) : int.Parse(Request["education"]);
            userEdu.major        = Request["university"];
            userEdu.desc         = Request["university"];
            userEdu.updatetime   = DateTime.Now;
            userEdu.updateuserid = userStatus.UserID;
        }