コード例 #1
0
        /// <summary>
        /// 查询  搜索模式 1 => 按工号查找  2 => 按部门查找  3 => 按领取月查找
        /// </summary>
        /// <param name="qryDto">数据传输对象 </param>
        /// <returns></returns>
        public List <WorkClothesManageModel> FindBy(QueryGeneralAffairsDto qryDto)
        {
            if (qryDto == null)
            {
                return(new List <WorkClothesManageModel>());
            }
            try
            {
                switch (qryDto.SearchMode)
                {
                case 1:     //依据按工号查找
                    return(irep.Entities.Where(m => m.WorkerId == (qryDto.WorkerId)).ToList());

                case 2:     //依据按部门查找
                    return(irep.Entities.Where(m => m.Department == (qryDto.Department)).ToList());

                case 3:     //按领取月查找
                    return(irep.Entities.Where(m => m.ReceiveMonth == qryDto.ReceiveMonth).ToList());

                default:
                    return(new List <WorkClothesManageModel>());
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.InnerException.Message);
            }
        }
コード例 #2
0
 /// <summary>
 /// 获取领用记录  搜索模式 1 => 按工号查找  2 => 按部门查找  3 => 按领取月查找
 /// </summary>
 /// <param name="dto">总务数据查询数据传输对象</param>
 /// <returns></returns>
 public List <WorkClothesManageModel> FindReceiveRecordBy(QueryGeneralAffairsDto dto)
 {
     _workClothesmangeModelList = CrudFactory.WorkerClothesCrud.FindBy(dto);
     return(_workClothesmangeModelList);
 }