/// <summary> /// 添加新动态 /// </summary> /// <param name="model"></param> public static void AddDynamic(Model.DynamicModel model) { model.CreateTime = DateTime.Now; model.FlagInvalid = false; DAL.DynamicDAL dal = new DAL.DynamicDAL(); dal.Add(model); }
/// <summary> /// 完善资料 /// </summary> private void SaveMyUserInfo() { BLL.UserBLL ubll = new BLL.UserBLL(); Model.UserInfoModel model = ubll.GetModel(ubll.CurrentUserId()); if (model.UserId.Trim() != "") { model = ubll.GetModel(model.UserId); } model.Birthday = ReTime("Birthday"); model.CreateTime = DateTime.Now; model.Memo = ReStr("Memo"); model.RealName = ReStr("RealName"); model.Sex = ReStr("Sex"); model.TownId = ReDecimal("TownId"); if (model.UserTitle != ReStr("UserTitle")) { try { //用户修改了状态 Model.DynamicModel dyModel = new Model.DynamicModel(); dyModel.DynamicLv = 80; dyModel.DynamicMerId = 0; dyModel.DynamicTitle = "" + model.UserId + "修改了自己的状态: '" + Common.StringPlus.GetLeftStr(ReStr("UserTitle"), 100, "...") + "'"; dyModel.DynamicType = "用户状态"; dyModel.DynamicUserId = model.UserId; BLL.CommBLL.AddDynamic(dyModel); } catch (Exception ex) { //什么都不做,失败就算了,不重要. } } model.UserTitle = ReStr("UserTitle"); model.PicBig = ReStr("PicBig"); model.PicMid = model.PicBig; model.PicSmall = model.PicBig; model.qq = ReStr("qq", ""); ubll.SaveMyUserInfo(model); ReTrue(); }
/// <summary> /// 添加 /// </summary> /// <param name="model"></param> public void AddNewDynamic(Model.DynamicModel model) { DAL.DynamicDAL dal = new DAL.DynamicDAL(); dal.Add(model); }