Exemplo n.º 1
0
 public int Updata(UserInfo userInfo)
 {
     if (userInfo != null)
     {
         db.Updata(userInfo);
     }
     return(1);
 }
Exemplo n.º 2
0
        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int Updata(JObject json, int id)
        {
            NoticeInfo noticeInfo = JsonConvert.DeserializeObject <NoticeInfo>(json.ToString());

            noticeInfo.ID = id;
            //var userInfo = db.UserInfoes.FirstOrDefault(item => item.ID == id);
            if (noticeInfo != null)
            {
                db.Updata(noticeInfo);
            }
            return(1);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int Updata(JObject json, int id)
        {
            StudentProjectInfo studentProjectInfo = JsonConvert.DeserializeObject <StudentProjectInfo>(json.ToString());

            studentProjectInfo.ID = id;
            //var studentProjectInfo = db.StudentInfoes.FirstOrDefault(item => item.ID == id);
            if (studentProjectInfo != null)
            {
                db.Updata(studentProjectInfo);
            }
            return(1);
        }
Exemplo n.º 4
0
        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int Updata(JObject json, int id)
        {
            ProjectInfo projectInfo = JsonConvert.DeserializeObject <ProjectInfo>(json.ToString());

            projectInfo.ID = id;
            var _ProjectInfo = db.ProjectInfoes.AsNoTracking().FirstOrDefault(item => item.ID == id);

            if (projectInfo != null)
            {
                db.Updata(projectInfo);
            }
            return(1);
        }
Exemplo n.º 5
0
        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int Updata(JObject json, int id)
        {
            SignInfo signInfo = JsonConvert.DeserializeObject <SignInfo>(json.ToString());

            signInfo.ID = id;
            var _signInfo = db.SignInfoes.AsNoTracking().FirstOrDefault(item => item.ID == id);

            if (_signInfo != null)
            {
                db.Updata(signInfo);
            }
            return(1);
        }
Exemplo n.º 6
0
        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int Updata(JObject json, int id)
        {
            MeunInfo userInfo = JsonConvert.DeserializeObject <MeunInfo>(json.ToString());

            userInfo.ID = id;
            var _meunInfo = db.MeunInfoes.AsNoTracking().FirstOrDefault(item => item.ID == id);

            userInfo.TreeParentID = _meunInfo.TreeParentID;
            if (userInfo != null)
            {
                db.Updata(userInfo);
            }
            return(1);
        }