Beispiel #1
0
        public WCFAddUpdateResult DelInfo(CRM_VisitPlanLineParam param)
        {
            WCFAddUpdateResult ret = new WCFAddUpdateResult();
            ExeResult          rst = new ExeResult();

            rst = this.Execute("ZNLCRM.BLL.CRM.CRM_VisitPlanLineBLL", "DelInfo", param);
            ret = (rst == null ? new WCFAddUpdateResult() : rst.Result as WCFAddUpdateResult);
            return(ret);
        }
Beispiel #2
0
        public CRM_VisitPlanLineResult GetInfo(CRM_VisitPlanLineParam param)
        {
            CRM_VisitPlanLineResult ret = new CRM_VisitPlanLineResult();
            ExeResult rst = new ExeResult();

            rst = this.Execute("ZNLCRM.BLL.CRM.CRM_VisitPlanLineBLL", "GetInfo", param);
            ret = rst == null ? new CRM_VisitPlanLineResult() : rst.Result as CRM_VisitPlanLineResult;
            return(ret);
        }
Beispiel #3
0
        public List <CRM_VisitPlanLineResult> GetList(CRM_VisitPlanLineParam param)
        {
            ExeResult rst = new ExeResult();

            rst = this.Execute("ZNLCRM.BLL.CRM.CRM_VisitPlanLineBLL", "GetList", param);
            List <CRM_VisitPlanLineResult> list = new List <CRM_VisitPlanLineResult>();

            list = (rst == null ? new List <CRM_VisitPlanLineResult>() : rst.Result as List <CRM_VisitPlanLineResult>);
            return(list);
        }
Beispiel #4
0
        private void BindLineDataGridView()
        {
            CRM_VisitPlanLineParam param = new CRM_VisitPlanLineParam();

            param.CustVstPlnGuID = custVstPlnGuID;
            param.VstName        = txtVstName.Text.Trim();
            List <CRM_VisitPlanLineResult> lineList = this.AsyncExecute <List <CRM_VisitPlanLineResult>, CRM_VisitPlanLineParam>(param, cvpLineLogic.GetList, a =>
            {
                dgvLine.DataSource = a;
            });
        }
Beispiel #5
0
        public DateTime?GetLastVisitTime(CRM_VisitPlanLineParam param)
        {
            object obj = this.Max <CRM_VisitPlanLineResult>(new Field("VstDate"), GetWhereClip(param));

            if (obj != null)
            {
                return(obj.ToDateTime());
            }
            else
            {
                return(null);
            }
        }
Beispiel #6
0
        /// <summary>
        /// 获取一条信息记录
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public CRM_VisitPlanLineResult GetInfo(CRM_VisitPlanLineParam param)
        {
            this.CheckSession();
            CRM_VisitPlanLineResult rst = new CRM_VisitPlanLineResult();

            #region 判断
            if (param.CustVstPlnLineID == null)
            {
                throw new WarnException("请指定拜访明细ID!");
            }
            #endregion
            #region 保存实体
            WhereClip where = GetWhereClip(param);

            rst = this.Select <CRM_VisitPlanLineResult>(where);
            //Sys_EmpDataRightBLL.SetRecIsEdit<CRM_VisitPlanLineResult>(rst, "BeLongEmpID", "", "OrgID", this.SessionInfo);
            #endregion
            return(rst);
        }
Beispiel #7
0
        /// <summary>
        /// 删除实体
        /// </summary>
        /// <param name="param">删除条件实体</param>
        /// <returns></returns>
        public WCFAddUpdateResult DelInfo(CRM_VisitPlanLineParam param)
        {
            this.CheckSession();
            WCFAddUpdateResult ret = new WCFAddUpdateResult();
            int affect             = 0;

            try
            {
                #region 判断
                if (param.CustVstPlnLineID == null)
                {
                    throw new WarnException("请指定要删除的记录!");
                }
                #endregion
                WhereClip where = GetWhereClip(param);
                //CRM_VisitPlanLineResult oldInfo = this.GetInfo(param);
                //oldInfo = Sys_EmpDataRightBLL.SetRecIsEdit<CRM_VisitPlanLineResult>(oldInfo, "BeLongEmpID", "", "OrgID", this.SessionInfo);
                //if (oldInfo.RecStatu != 2)
                //{
                //    throw new WarnException("您无权删除当前记录!");
                //}
                CRM_VisitPlanLineResult info = new CRM_VisitPlanLineResult();
                info.IsDeleted      = true;
                info.UpdatedTime    = DateTime.Now;
                info.UpdatedEmpID   = this.SessionInfo.UserID;
                info.UpdatedEmpName = this.SessionInfo.UserName;
                affect = this.Update <CRM_VisitPlanLineResult>(info, where);
                #region 设置返回值
                ret.Key = affect;
                #endregion
            }
            catch (WarnException exp)
            {
                throw exp;
            }
            catch (System.Exception exp)
            {
                LogInfoBLL.WriteLog(this.SessionInfo, exp);
                throw exp;
            }
            return(ret);
        }
Beispiel #8
0
        /// <summary>
        /// 查询记录,并返回分页列表
        /// </summary>
        /// <param name="param">查询条件实体</param>
        /// <returns></returns>
        public List <CRM_VisitPlanLineResult> GetList(CRM_VisitPlanLineParam param)
        {
            this.CheckSession();
            List <CRM_VisitPlanLineResult> rst = new List <CRM_VisitPlanLineResult>();

            try
            {
                WhereClip whereClip = GetWhereClip(param);
                rst = this.SelectList <CRM_VisitPlanLineResult>(whereClip, CRM_VisitPlanLineResult._.CreatedTime.Asc);
            }
            catch (WarnException exp)
            {
                throw exp;
            }
            catch (System.Exception exp)
            {
                LogInfoBLL.WriteLog(this.SessionInfo, exp);
                throw exp;
            }
            return(rst);
        }
Beispiel #9
0
        /// <summary>
        /// 获取条件的公共方法
        /// </summary>
        /// <param name="param">条件实体</param>
        /// <returns></returns>
        WhereClip GetWhereClip(CRM_VisitPlanLineParam param)
        {
            this.CheckSession();
            WhereClip where = CRM_VisitPlanLine._.IsDeleted == 0;
            if (param.CustVstPlnLineID != null)
            {
                where = where && CRM_VisitPlanLine._.CustVstPlnLineID == param.CustVstPlnLineID;
            }
            if (param.CustVstPlnLineGuID != null)
            {
                where = where && CRM_VisitPlanLine._.CustVstPlnLineGuID == param.CustVstPlnLineGuID;
            }
            if (param.CustVstPlnGuID != null)
            {
                where = where && CRM_VisitPlanLine._.CustVstPlnGuID == param.CustVstPlnGuID;
            }
            if (param.VstName != null)
            {
                where = where && CRM_VisitPlanLine._.VstName.Like("%" + param.VstName + "%");
            }

            return(where);
        }
Beispiel #10
0
 public int GetTotalVisitCount(CRM_VisitPlanLineParam param)
 {
     return(this.Count <CRM_VisitPlanLineResult>(GetWhereClip(param)));;
 }