Exemple #1
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 /// <param name="entity">实体类</param>
 /// <returns></returns>
 public bool Update(AMS_MeetingRoom entity)
 {
     //return dal.Update(entity) >= 0 ? true : false;
     #region 获取旧值
     var oldEntity = this.GetEntity(AMS_SysLogBLL.Instance.GetKeyFieldValue<AMS_MeetingRoom>(entity).ToString());
     #endregion
     int IsOk = DbUtils.Update(entity, "RoomId");
     #region 写入操作日志
     if (IsOk > 0)
     {
         AMS_SysLogBLL.Instance.UpdateTaskLog<AMS_MeetingRoom>(oldEntity, entity, RequestSession.GetSessionUser().UserId, RequestSession.GetSessionUser().UserName);
     }
     #endregion
     return IsOk >= 0 ? true : false;
 }
Exemple #2
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 /// <param name="entity">实体类</param>
 /// <returns></returns>
 public bool Insert(AMS_MeetingRoom entity)
 {
     //return dal.Insert(entity) >= 0 ? true : false;
     int IsOk = DbUtils.Insert(entity);
     #region 写日操作日志
     if (IsOk > 0)
     {
         AMS_SysLogBLL.Instance.AddTaskLog<AMS_MeetingRoom>(entity, RequestSession.GetSessionUser().UserId, RequestSession.GetSessionUser().UserName);
     }
     #endregion
     return IsOk >= 0 ? true : false;
 }