Example #1
0
        public List <AccVouch> Load(ApplyNoBasicEntity applyNoBasicEntity)
        {
            List <AccVouch> listAccVouch = new List <AccVouch>();
            ISapLinksQueue  iQueue       = SapLinksQueueFactory.Init();

            applyNos = iQueue.Load(applyNoBasicEntity);
            foreach (ApplyNoEntity item in applyNos)
            {
                //拦截:判断是有偿单据还是无偿单据
                //if (item.BasicEntity.Company + "06" == item.ApplyNo.Substring(0, item.BasicEntity.Company.Length + 2))
                if (item.ApplyNo.StartsWith(ApplyNoConvert(item.BasicEntity.Company + "06")))
                {
                    item.BasicEntity.ApplyNoPrefix    = ApplyNoConvert(item.BasicEntity.Company) + "06";
                    item.BasicEntity.FktzsProcessType = new FKTZSProcessType(FKTZSProcessType.FKTZS_YC);
                    item.BasicEntity.FktzsYcWcType    = new FKTZSYCWCType(FKTZSYCWCType.YC);
                }
                //if (item.BasicEntity.Company + "08" == item.ApplyNo.Substring(0, item.BasicEntity.Company.Length + 2))
                if (item.ApplyNo.StartsWith(ApplyNoConvert(item.BasicEntity.Company + "08")))
                {
                    item.BasicEntity.ApplyNoPrefix    = ApplyNoConvert(item.BasicEntity.Company) + "08";
                    item.BasicEntity.FktzsProcessType = new FKTZSProcessType(FKTZSProcessType.FKTZS_WC);
                    item.BasicEntity.FktzsYcWcType    = new FKTZSYCWCType(FKTZSYCWCType.WC);
                }
                FKTZSServiceEntity fktzsServiceEntity = FKTZSServiceEntity.Load(item);
                List <AccVouch>    list = FKTZSServiceManager.Load(fktzsServiceEntity, InitFKTZSServiceManagerEntity(item));
                list.MergeListAccVouch(listAccVouch);
            }
            return(listAccVouch);
        }
        public static ApplyNoEntityCollection Load(ApplyNoBasicEntity applyNoBasicEntity)
        {
            //ApplyNoBasicEntity applyNoBasicEntity = new ApplyNoBasicEntity();
            //applyNoBasicEntity.ApplyNoPrefix = "DSC04";
            //applyNoBasicEntity.Company = "DSC";
            //applyNoBasicEntity.ConnStr = ConnStr;
            //applyNoBasicEntity.LinksType = new LinkType(LinkType.LinksFalse);
            ISapLinksQueue          iQueue   = SapLinksQueueFactory.Init();
            ApplyNoEntityCollection applyNos = iQueue.Load(applyNoBasicEntity);

            return(applyNos);
        }