public DataRes <bool> Add([FromBody] V_PubUser_Dept model) { DataRes <bool> res = new DataRes <bool>() { code = ResCode.Success, data = true }; model.Crdt = model.Lmdt = DateTime.Now; var user = new LQExtensionUser(User); model.Crid = model.Lmid = $"{user.UserCode}-{user.UserName}"; var r = bll.Add(model); if (!r.Item1) { res.code = ResCode.Error; res.data = false; res.msg = r.Item2; } return(res); }
public DataRes <bool> Add([FromBody] V_PubUser_Dept model) { DataRes <bool> res = new DataRes <bool>() { code = ResCode.Success, data = true }; model.Crdt = model.Lmdt = DateTime.Now; var user = User.GetZXYLUser(); model.Crid = model.Lmid = string.Format("{0}-{1}", user.UserCode, user.UserName); var r = bll.Add(model); if (!r.Item1) { res.code = ResCode.Error; res.data = false; res.msg = r.Item2; } return(res); }