public Framework.Common.CommonBase.DtoContainer GetAll()
        {
            UserRequestDtoContainer container = new UserRequestDtoContainer();

            container.UserRequestList = requestBs.GetAll().OrderByDescending(e => e.SerReqId).ToList();
            return(container);
        }
        public UserRequestDtoContainer GetRequestAttachment(int requestId)
        {
            UserRequestDtoContainer      container    = new UserRequestDtoContainer();
            RequestAttachmentTDataAccess attachmentDa = new RequestAttachmentTDataAccess();
            var attachments = attachmentDa.GetAll(it => it.Requestid == requestId);

            container.RequestAttachmentList.AddRange(attachments);
            return(container);
        }
        public Framework.Common.CommonBase.DtoContainer GetAllByCondition(string predicate)
        {
            var pars = EntityHelper.ConvertExpression <SdUserRequest>(predicate);
            var lst  = requestBs.GetAll(pars);
            UserRequestDtoContainer container = new UserRequestDtoContainer();

            container.UserRequestList.AddRange(lst);
            return(container);
        }
        public UserRequestDtoContainer GetRequestWorkList(int requestId)
        {
            UserRequestDtoContainer container = new UserRequestDtoContainer();
            PersonelTDataAccess     pda       = new PersonelTDataAccess();
            RequestWorkTDataAccess  requestDa = new RequestWorkTDataAccess();
            BaseDataTDataAccess     baseDa    = new BaseDataTDataAccess();
            var dtoList = requestDa.GetAll(it => it.RequestId == requestId);
            var wList   = baseDa.GetWorks();

            foreach (var item in dtoList)
            {
                var pers = pda.GetPersonId(item.UserId ?? 0);
                item.Work = wList.Where(it => it.WorkId == item.SdWorkId).FirstOrDefault();
                item.User = pers;
            }
            if (dtoList != null)
            {
                container.SdRequestWorkDtolist.AddRange(dtoList);
            }
            return(container);
        }