예제 #1
0
        //public EntityObject[] GetLookupData(Dictionary<string, string> args)
        //{
        //    OvertimeRewardDAL dalOvertimeReward = new OvertimeRewardDAL();
        //    StringBuilder strfilter = new StringBuilder();
        //    List<string> objArgs = new List<string>();
        //    string strOrderBy = string.Empty;
        //    strOrderBy = " OVERTIMEREWARDID ";

        //    IQueryable<T_HR_OVERTIMEREWARD> ents = dalOvertimeReward.GetOvertimeRewardRdListByMultSearch(strOrderBy, strfilter.ToString(), objArgs);

        //    return ents.Count() > 0 ? ents.ToArray() : null;
        //}

        public EntityObject[] GetLookupData(int pageIndex, int pageSize, string sort, string filterString, IList <object> paras, ref int pageCount, string userID)
        {
            OvertimeRewardDAL dalOvertimeReward = new OvertimeRewardDAL();
            StringBuilder     strfilter         = new StringBuilder();
            List <string>     objArgs           = new List <string>();
            string            strOrderBy        = string.Empty;

            strOrderBy = " OVERTIMEREWARDID ";

            IQueryable <T_HR_OVERTIMEREWARD> ents = dalOvertimeReward.GetOvertimeRewardRdListByMultSearch(strOrderBy, strfilter.ToString(), objArgs);

            return(ents.Count() > 0 ? ents.ToArray() : null);
        }
예제 #2
0
        /// <summary>
        /// 根据条件,获取加班报酬信息
        /// </summary>
        /// <param name="strOwnerID">权限控制,当前记录所有者的员工序号</param>
        /// <param name="strOverTimePayType">加班报酬方式:1 调休方式;2 加班工资方式;3 先调休再付工资方式;4 无报酬方式;</param>
        /// <param name="strOverTimeValID">加班生效方式:1 审核通过的加班申请;2 超过工作时间外自动累计;3 仅节假日累计;</param>
        /// <param name="strSortKey">排序字段</param>
        /// <returns>返回加班报酬信息</returns>
        public IQueryable <T_HR_OVERTIMEREWARD> GetAllOvertimeRewardRdListByMultSearch(string strOwnerID, string strOverTimePayType,
                                                                                       string strOverTimeValID, string strSortKey)
        {
            OvertimeRewardDAL dalOvertimeReward = new OvertimeRewardDAL();

            StringBuilder strfilter  = new StringBuilder();
            List <object> objArgs    = new List <object>();
            string        strOrderBy = string.Empty;
            int           iIndex     = 0;

            if (!string.IsNullOrEmpty(strOverTimePayType))
            {
                strfilter.Append(" OVERTIMEPAYTYPE == @" + strOverTimePayType);
                objArgs.Add(strOverTimePayType);
            }

            if (!string.IsNullOrEmpty(strOverTimeValID))
            {
                if (!string.IsNullOrEmpty(strfilter.ToString()))
                {
                    strfilter.Append(" AND");
                }

                if (objArgs.Count() > 0)
                {
                    iIndex = objArgs.Count();
                }

                strfilter.Append(" OVERTIMEVALID == @" + iIndex.ToString());
                objArgs.Add(strOverTimeValID);
            }

            if (!string.IsNullOrEmpty(strSortKey))
            {
                strOrderBy = strSortKey;
            }
            else
            {
                strOrderBy = " OVERTIMEREWARDID ";
            }

            string filterString = strfilter.ToString();

            SetOrganizationFilter(ref filterString, ref objArgs, strOwnerID, "T_HR_OVERTIMEREWARD");

            var q = dalOvertimeReward.GetOvertimeRewardRdListByMultSearch(strOrderBy, filterString, objArgs.ToArray());

            return(q);
        }