/// <summary> /// 插入数据 /// </summary> /// <param name="entity">数据实体</param> /// <returns>新增记录编号</returns> /// <remarks>2016-03-22 王耀发 创建</remarks> public override int Insert(WhInventoryAlarm entity) { entity.SysNo = Context.Insert("WhInventoryAlarm", entity) .AutoMap(o => o.SysNo) .ExecuteReturnLastId <int>("SysNo"); return(entity.SysNo); }
/// <summary> /// 更新数据 /// </summary> /// <param name="entity">数据实体</param> /// <returns></returns> /// <remarks>2016-03-22 王耀发 创建</remarks> public override void Update(WhInventoryAlarm entity) { Context.Update("WhInventoryAlarm", entity) .AutoMap(o => o.SysNo) .Where("SysNo", entity.SysNo) .Execute(); }
/// <summary> /// 保存报警信息 /// </summary> /// <param name="productStockSysNo">库存编号</param> /// <returns></returns> /// <remarks>2016-03-22 王耀发 创建</remarks> public Result SaveWhInventoryAlarm(int productStockSysNo, WhInventoryAlarm model) { Result result = new Result(); result.Status = true; WhInventoryAlarm Entity = IWhInventoryAlarmDao.Instance.GetAlarmByStockSysNo(productStockSysNo); try { if (Entity != null) { model.CreatedBy = Entity.CreatedBy; model.CreatedDate = Entity.CreatedDate; model.LastUpdateBy = BLL.Authentication.AdminAuthenticationBo.Instance.Current.Base.SysNo; model.LastUpdateDate = DateTime.Now; IWhInventoryAlarmDao.Instance.Update(model); } else { model.CreatedBy = BLL.Authentication.AdminAuthenticationBo.Instance.Current.Base.SysNo; model.CreatedDate = DateTime.Now; model.LastUpdateBy = BLL.Authentication.AdminAuthenticationBo.Instance.Current.Base.SysNo; model.LastUpdateDate = DateTime.Now; IWhInventoryAlarmDao.Instance.Insert(model); } result.Status = true; } catch (Exception e) { result.Status = false; result.Message = e.Message; } return(result); }
public void UpdateMod(WhInventoryAlarm mod) { IWhInventoryAlarmDao.Instance.Update(mod); }
public int InserMod(WhInventoryAlarm mod) { return(IWhInventoryAlarmDao.Instance.Insert(mod)); }
/// <summary> /// 更新数据 /// </summary> /// <param name="entity">数据实体</param> /// <returns></returns> /// <remarks>2016-03-22 王耀发 创建</remarks> public abstract void Update(WhInventoryAlarm entity);
/// <summary> /// 插入数据 /// </summary> /// <param name="entity">数据实体</param> /// <returns>新增记录编号</returns> /// <remarks>2016-03-22 王耀发 创建</remarks> public abstract int Insert(WhInventoryAlarm entity);