コード例 #1
0
 /// <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);
 }
コード例 #2
0
 /// <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();
 }
コード例 #3
0
        /// <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);
        }
コード例 #4
0
 public void UpdateMod(WhInventoryAlarm mod)
 {
     IWhInventoryAlarmDao.Instance.Update(mod);
 }
コード例 #5
0
 public int InserMod(WhInventoryAlarm mod)
 {
     return(IWhInventoryAlarmDao.Instance.Insert(mod));
 }
コード例 #6
0
 /// <summary>
 /// 更新数据
 /// </summary>
 /// <param name="entity">数据实体</param>
 /// <returns></returns>
 /// <remarks>2016-03-22 王耀发 创建</remarks>
 public abstract void Update(WhInventoryAlarm entity);
コード例 #7
0
 /// <summary>
 /// 插入数据
 /// </summary>
 /// <param name="entity">数据实体</param>
 /// <returns>新增记录编号</returns>
 /// <remarks>2016-03-22 王耀发 创建</remarks>
 public abstract int Insert(WhInventoryAlarm entity);