Пример #1
0
        public DataRes <bool> Edit([FromBody] V_PubUser_Dept model)
        {
            DataRes <bool> res = new DataRes <bool>()
            {
                code = ResCode.Success, data = true
            };

            model.Lmdt = DateTime.Now;
            var user = new LQExtensionUser(User);

            model.Lmid = $"{user.UserCode}-{user.UserName}";
            var r = bll.Edit(model);

            if (!r.Item1)
            {
                res.code = ResCode.Error;
                res.data = false;
                res.msg  = r.Item2;
            }

            return(res);
        }
Пример #2
0
        public DataRes <bool> Edit([FromBody] V_PubUser_Dept model)
        {
            DataRes <bool> res = new DataRes <bool>()
            {
                code = ResCode.Success, data = true
            };

            model.Lmdt = DateTime.Now;
            var user = User.GetZXYLUser();

            model.Lmid = string.Format("{0}-{1}", user.UserCode, user.UserName);
            var r = bll.Edit(model);

            if (!r.Item1)
            {
                res.code = ResCode.Error;
                res.data = false;
                res.msg  = r.Item2;
            }

            return(res);
        }