Exemple #1
0
        /// <summary>
        /// 获取条件的公共方法
        /// </summary>
        /// <param name="param">条件实体</param>
        /// <returns></returns>
        WhereClip GetWhereClip(CRM_JobMastParam param)
        {
            this.CheckSession();
            WhereClip where = CRM_JobMast._.IsDeleted == 0;
            if (param.EmpJobGuid != null)
            {
                where = where && CRM_JobMast._.EmpJobGuid == param.EmpJobGuid;
            }
            if (!string.IsNullOrEmpty(param.JobName))
            {
                where = where && CRM_JobMast._.JobName.Like("%" + param.JobName + "%");
            }
            if (!string.IsNullOrEmpty(param.JobType))
            {
                where = where && CRM_JobMast._.JobType == param.JobType;
            }
            if (param.JobDateS != null)
            {
                where = where && CRM_JobMast._.JobDate >= param.JobDateS;
            }
            if (param.JobDateE != null)
            {
                where = where && CRM_JobMast._.JobDate < param.JobDateE.Value.AddDays(1);
            }

            where = Sys_EmpDataRightBLL.GetEmpIDInWhere(where, CRM_JobMast._.JobDate, CRM_JobMast._.BeLongEmpID, CRM_JobMast._.OrgID, CRM_JobMast._.DeptID, this.SessionInfo);
            return(where);
        }
Exemple #2
0
        /// <summary>
        /// 获取上一条或下一条记录
        /// </summary>
        /// <param name="param">条件实体</param>
        /// <returns></returns>
        public CRM_JobMastResult GetNextOrPreInfo(CRM_JobMastParam param)
        {
            this.CheckSession();
            CRM_JobMastResult rst = new CRM_JobMastResult();

            #region 判断
            if (param.EmpJobGuid == null)
            {
                throw new WarnException("请指定关键字GUID!");
            }
            #endregion
            #region 保存实体
            WhereClip where = CRM_JobMast._.EmpJobGuid == param.EmpJobGuid;
            where           = Sys_EmpDataRightBLL.GetEmpIDInWhere(where, CRM_JobMast._.JobDate, CRM_JobMast._.BeLongEmpID, CRM_JobMast._.OrgID, CRM_JobMast._.DeptID, this.SessionInfo);
            rst             = this.Select <CRM_JobMastResult>(where);
            #endregion
            return(rst);
        }
Exemple #3
0
        /// <summary>
        /// 获取条件的公共方法
        /// </summary>
        /// <param name="param">条件实体</param>
        /// <returns></returns>
        WhereClip GetWhereClip(CRM_VisitPlanParam param)
        {
            this.CheckSession();
            WhereClip where = CRM_VisitPlan._.IsDeleted == 0;
            if (param.CustVstPlnID != null)
            {
                where = where && CRM_VisitPlan._.CustVstPlnID == param.CustVstPlnID;
            }
            if (param.CustVstPlnGuID != null)
            {
                where = where && CRM_VisitPlan._.CustVstPlnGuID == param.CustVstPlnGuID;
            }
            if (param.PlanName != null)
            {
                where = where && CRM_VisitPlan._.PlanName.Like("%" + param.PlanName + "%");
            }
            where = Sys_EmpDataRightBLL.GetEmpIDInWhere(where, CRM_VisitPlan._.CreatedTime, CRM_VisitPlan._.OpEmpID, CRM_VisitPlan._.OrgID, CRM_VisitPlan._.DeptID, this.SessionInfo);

            return(where);
        }