Пример #1
0
        public async Task <SupplierInfoStatusModel> GOSICertificateInquiry(string GOSIId)
        {
            var parameter = new GOSICertificateInquiryRequestModel {
                GOSIId = GOSIId, GOSIIdType = GOSIIdType.GosiRegistrationID, GOSIOwnerPersonIdType = GOSIOwnerPersonIdType.NationalID
            };
            var result = await _IYasserproxy.GOSICertificateInquiry(parameter);

            var res = new SupplierInfoStatusModel();

            if (result == null)
            {
                res.enSupplierInfoType = Enums.SupplierInfoType.Warnning;
                res.StatusName         = Resources.TenderResources.ErrorMessages.CantFindRecord;
            }
            else
            {
                res.enSupplierInfoType = Enums.SupplierInfoType.Success;
                res.StatusName         = Resources.TenderResources.Messages.Valid;
                foreach (var company in result.CompanyInformationList)
                {
                    if (result.CompanyInformationList.IndexOf(company) == 0)
                    {
                        res.CompanyName = company.BusinessNameAr;
                    }
                    else
                    {
                        res.CompanyName = res.CompanyName + " / " + company.BusinessNameAr;
                    }
                }
            }

            return(res);
        }
Пример #2
0
        public async Task ShouldGOSICertificateInquiry()
        {
            //Arrange
            var model = new GOSICertificateInquiryRequestModel
            {
                GOSIId     = "13253331",
                GOSIIdType = GOSIIdType.GosiRegistrationID
                ,
                GOSIOwnerPersonIdType = GOSIOwnerPersonIdType.NationalID
            };
            //Act
            var result = await _YesserProxy.GOSICertificateInquiry(model);

            //Assert
            Assert.NotNull(result);
        }