Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        public async Task <SupplierInfoStatusModel> LicenseStatusInquiry(string licenseNumber)
        {
            var parameter = new LicenseDetailsRequestModel {
                LicenseNumber = licenseNumber
            };
            var result = await _IYasserproxy.LicenseStatusInquiry(parameter);

            var res = new SupplierInfoStatusModel();

            if (result != null)
            {
                if (result.hasLicense)
                {
                    res.enSupplierInfoType = Enums.SupplierInfoType.Success;
                    if (result.LicenseInfo.LicenseStatus != "Invalid" && result.LicenseInfo.LicenseStatus != "Cancelled")
                    {
                        res.StatusName = Resources.TenderResources.Messages.Valid;
                        res.Date       = result.LicenseInfo.ExpiryDt.ToLongDateString();
                    }
                    else
                    {
                        res.enSupplierInfoType = Enums.SupplierInfoType.Wrong;
                        res.StatusName         = Resources.TenderResources.Messages.NotActive;
                        res.Date = result.LicenseInfo.ExpiryDt.ToLongDateString();
                    }
                }
                else
                {
                    res.enSupplierInfoType = Enums.SupplierInfoType.Wrong;
                    res.StatusName         = Resources.TenderResources.Messages.recordNotFound;
                }
            }

            return(res);
        }
Ejemplo n.º 3
0
        public async Task <SupplierInfoStatusModel> ZakatCertificateInquiryByCR(string CR)
        {
            var parameter = new ZakatCertificateInquiryRequestModel {
                CommercialRegistrationNumber = CR
            };
            var result = await _IYasserproxy.ZakatCertificateInquiryByCR(parameter);

            var res = new SupplierInfoStatusModel();

            if (result == null)
            {
                res.enSupplierInfoType = Enums.SupplierInfoType.Warnning;
                res.StatusName         = Resources.TenderResources.ErrorMessages.CantFindRecord;
                res.Date = string.Empty;
            }
            else
            {
                res.enSupplierInfoType = Enums.SupplierInfoType.Success;
                if (result.ZakatCertificate.ExpiryDate < DateTime.Now)
                {
                    res.StatusName = Resources.TenderResources.Messages.Valid;
                    res.Date       = result.ZakatCertificate.IssueDateHjri;
                }
                else
                {
                    res.enSupplierInfoType = Enums.SupplierInfoType.Wrong;
                    res.StatusName         = Resources.TenderResources.Messages.Ended;
                    res.Date = string.Empty;
                }
            }
            return(res);
        }
Ejemplo n.º 4
0
        public async Task <SupplierInfoStatusModel> GetCOCSubscriptionBySijilNumber(string LicenseNumber, string CityCode)
        {
            var parameter = new COCSubscriptionInquiryRequestModel {
                LicenseNumber = LicenseNumber, CityCode = CityCode
            };
            var result = await _IYasserproxy.GetCOCSubscriptionBySijilNumber(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;
                if (result.MembershipSijil.SijilToDate < DateTime.Now)
                {
                    res.StatusName = Resources.TenderResources.Messages.Valid;
                    res.Date       = result.MembershipSijil.SijilToDateHjr;
                }
                else
                {
                    res.enSupplierInfoType = Enums.SupplierInfoType.Wrong;
                    res.StatusName         = Resources.TenderResources.Messages.Ended;
                }
            }
            return(res);
        }
Ejemplo n.º 5
0
        public async Task <SupplierInfoStatusModel> ValidateMCICRAndGetInfo(string CR)
        {
            var res       = new SupplierInfoStatusModel();
            var parameter = new MCICRInfoModelRequest {
                CommercialRegistrationNumber = CR
            };
            var result = await _IYasserproxy.ValidateMCICRAndGetInfo(parameter);

            if (result == null)
            {
                res.enSupplierInfoType = Enums.SupplierInfoType.Warnning;
                res.StatusName         = Resources.TenderResources.ErrorMessages.CantFindRecord;
            }
            else if (result.ResponseCode == "E001199")
            {
                res.enSupplierInfoType = Enums.SupplierInfoType.Warnning;
                res.StatusName         = Resources.SharedResources.ErrorMessages.CrExpired;
            }
            else
            {
                res.enSupplierInfoType = Enums.SupplierInfoType.Success;
                if (result.ExpiryDateHjri > DateTime.Now)
                {
                    res.StatusName = Resources.TenderResources.Messages.Valid;
                    res.Date       = result.ExpiryDateHjri.ToLongDateString();
                }
                else
                {
                    res.enSupplierInfoType = Enums.SupplierInfoType.Wrong;
                    res.StatusName         = Resources.TenderResources.Messages.Ended;
                }
            }

            return(res);
        }
Ejemplo n.º 6
0
        public async Task <SupplierInfoStatusModel> NitaqatInformationInquiry(string EstablishmentLaborOfficeId, string EstablishmentSequenceNumber)
        {
            var parameter = new NitaqatInformationRequestModel {
                EstablishmentLaborOfficeId = EstablishmentLaborOfficeId, EstablishmentSequenceNumber = EstablishmentSequenceNumber
            };
            var result = await _IYasserproxy.NitaqatInformationInquiry(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;
                res.CompanyName        = result.EstablishmentName;
                res.Notes           = result.EntityColor.EntityColorName;
                res.SaudiPercentage = result.SaudiPercentage;
            }
            return(res);
        }
Ejemplo n.º 7
0
        public async Task <SupplierInfoStatusModel> ContractorDetailsInquiry(string partyNumberId)
        {
            var parameter = new ContractorDetailsRequestModel {
                PartyId = new PartyIdModel {
                    PartyIdNumber = partyNumberId, PartyIdType = PartyType.NationalId
                }
            };
            var result = await _IYasserproxy.ContractorDetailsInquiry(parameter);

            var res = new SupplierInfoStatusModel();

            if (result == null)
            {
                res.enSupplierInfoType = Enums.SupplierInfoType.Warnning;
                res.StatusName         = Resources.TenderResources.ErrorMessages.CantFindRecord;
            }
            else
            {
                var cultureInfo = new CultureInfo("ar-SA");
                cultureInfo.DateTimeFormat.Calendar = new UmAlQuraCalendar();
                res.enSupplierInfoType = Enums.SupplierInfoType.Success;
                DateTime date = DateTime.MinValue;
                if (date < DateTime.Now)
                {
                    res.StatusName = Resources.TenderResources.Messages.Valid;
                    res.Date       = result.ContractorInfo.ClassificationDtHjr;
                }
                else
                {
                    res.enSupplierInfoType = Enums.SupplierInfoType.Wrong;

                    res.StatusName = Resources.TenderResources.Messages.Ended;
                }
            }
            return(res);
        }