Exemplo n.º 1
0
 WhereClip GetWhereClip(ORD_PurchaseReturnLineParam param)
 {
     this.CheckSession();
     WhereClip where = ORD_PurchaseReturnLine._.IsDeleted == 0;
     if (param.PRLineGuid != null)
     {
         where = where && ORD_PurchaseReturnLine._.PRLineGuid == param.PRLineGuid;
     }
     if (param.PRGuid != null)
     {
         where = where && ORD_PurchaseReturnLine._.PRGuid == param.PRGuid;
     }
     if (param.POLineGuids != null && param.POLineGuids.Length > 0)
     {
         where = where && ORD_PurchaseReturnLine._.POLineGuid.In(param.POLineGuids);
     }
     if (!string.IsNullOrEmpty(param.Model))
     {
         where = where && ORD_PurchaseReturnLine._.Model.Like(param.Model + "%");
     }
     if (param.StkInLineGuids != null && param.StkInLineGuids.Length > 0)
     {
         where = where && ORD_PurchaseReturnLine._.StkInLineGuid.In(param.StkInLineGuids);
     }
     return(where);
 }
Exemplo n.º 2
0
        /// <summary>
        /// 删除实体
        /// </summary>
        /// <param name="param">删除条件实体</param>
        /// <returns></returns>
        public WCFAddUpdateResult DelInfo(ORD_PurchaseReturnLineParam param)
        {
            this.CheckSession();
            WCFAddUpdateResult ret = new WCFAddUpdateResult();
            int affect             = 0;

            try
            {
                #region 判断
                if (param.PRLineGuid == null)
                {
                    throw new WarnException("请指定明细GUID!");
                }
                #endregion
                WhereClip whereClip = GetWhereClip(param);
                ORD_PurchaseReturnLineResult info = new ORD_PurchaseReturnLineResult();
                info.IsDeleted = true;
                affect         = this.Update <ORD_PurchaseReturnLineResult>(info, whereClip);
                #region 设置返回值
                ret.Key = affect;
                #endregion
            }
            catch (WarnException exp)
            {
                throw exp;
            }
            catch (System.Exception exp)
            {
                LogInfoBLL.WriteLog(this.SessionInfo, exp);
                throw exp;
            }
            return(ret);
        }
Exemplo n.º 3
0
        public ORD_PurchaseReturnLineResult GetInfo(ORD_PurchaseReturnLineParam param)
        {
            ORD_PurchaseReturnLineResult ret = new ORD_PurchaseReturnLineResult();
            ExeResult rst = new ExeResult();

            rst = this.Execute("ZNLCRM.BLL.PPM.ORD_PurchaseReturnLineBLL", "GetInfo", param);
            ret = rst == null ? new ORD_PurchaseReturnLineResult() : rst.Result as ORD_PurchaseReturnLineResult;
            return(ret);
        }
Exemplo n.º 4
0
        public List <ORD_PurchaseReturnLineResult> GetList(ORD_PurchaseReturnLineParam param)
        {
            ExeResult rst = new ExeResult();

            rst = this.Execute("ZNLCRM.BLL.PPM.ORD_PurchaseReturnLineBLL", "GetList", param);
            List <ORD_PurchaseReturnLineResult> list = new List <ORD_PurchaseReturnLineResult>();

            list = (rst == null ? new List <ORD_PurchaseReturnLineResult>() : rst.Result as List <ORD_PurchaseReturnLineResult>);
            return(list);
        }
Exemplo n.º 5
0
        /// <summary>
        /// 获取一条信息记录
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public ORD_PurchaseReturnLineResult GetInfo(ORD_PurchaseReturnLineParam param)
        {
            this.CheckSession();
            ORD_PurchaseReturnLineResult rst = new ORD_PurchaseReturnLineResult();

            #region 判断
            if (param.PRLineGuid == null)
            {
                throw new WarnException("请指定明细GUID!");
            }
            #endregion
            #region 获取实体

            rst = this.Select <ORD_PurchaseReturnLineResult>(GetWhereClip(param));

            #endregion
            return(rst);
        }
Exemplo n.º 6
0
        /// <summary>
        /// 获取集合
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public List <ORD_PurchaseReturnLineResult> GetList(ORD_PurchaseReturnLineParam param)
        {
            this.CheckSession();
            List <ORD_PurchaseReturnLineResult> ret = new List <ORD_PurchaseReturnLineResult>();

            try
            {
                WhereClip whereClip = GetWhereClip(param);
                ret = this.SelectList <ORD_PurchaseReturnLineResult>(whereClip, ORD_PurchaseReturnLine._.CreatedTime.Asc);
            }
            catch (WarnException exp)
            {
                throw exp;
            }
            catch (System.Exception exp)
            {
                LogInfoBLL.WriteLog(this.SessionInfo, exp);
                throw exp;
            }
            return(ret);
        }
Exemplo n.º 7
0
        public PageList <ORD_PurchaseReturnLineResult> GetPageList(ORD_PurchaseReturnLineParam param)
        {
            PageList <ORD_PurchaseReturnLineResult> ret = new PageList <ORD_PurchaseReturnLineResult>();

            try
            {
                ret = this.SelectList <ORD_PurchaseReturnLineResult>(param.PageIndex.GetValueOrDefault(1), param.PageSize.GetValueOrDefault(50), new List <Field> {
                    Field.All
                }, GetWhereClip(param), ORD_PurchaseReturnLine._.CreatedTime.Desc);
            }
            catch (WarnException exp)
            {
                throw exp;
            }
            catch (System.Exception exp)
            {
                LogInfoBLL.WriteLog(this.SessionInfo, exp);
                throw exp;
            }
            return(ret);
        }