private System.Data.DataTable RangeToDataTable(CompanyName name, ProductType type, Range range) { System.Data.DataTable dataTable = new System.Data.DataTable(); dataTable.TableName = "" + name + type; object[,] rawData = (object[, ])range?.Value2; if (rawData == null) { return(dataTable); } for (int i = 1; i <= rawData.GetLength(1); ++i) { if (rawData[1, i] == null) { continue; } dataTable.Columns.Add(rawData[1, i].ToString(), rawData[1, i].GetType()); } for (int i = 2; i <= rawData.GetLength(0); ++i) { DataRow row = dataTable.NewRow(); for (int j = 1; j <= rawData.GetLength(1); ++j) { if (rawData[1, j] == null) { continue; } row[rawData[1, j].ToString()] = rawData[i, j]; } dataTable.Rows.Add(row); } return(dataTable); }
public static IEnumerable <DataTable> Extract() { Logger.Info("Analyzing Downloaded Excels and Extracting Data..."); foreach (var xls in Directory.GetFiles(DownloadPath, "*" + ConfigurationManager.AppSettings["DownloadedFileType"]) ) { CompanyName company = default(CompanyName); foreach (CompanyName name in Enum.GetValues(typeof(CompanyName))) { if (Path.GetFileNameWithoutExtension(xls)?.Contains(name.ToString()) ?? false) { company = name; } } var tableList = new HTMLParser(xls).Process().ToList(); var cleared = tableList.First(dt => dt.TableName == Headers[0]); cleared.TableName = "" + company + ProductType.Swap; var future = tableList.First(dt => dt.TableName == Headers[1]); future.TableName = "" + company + ProductType.Futures; TrimDataTable(cleared); TrimDataTable(future); yield return(cleared); yield return(future); } }
private string CreateBatchHeaderRecord(List <Transaction> transactions, string standardEntryClass, string entryDescription, DateTime companyDescriptiveDate, DateTime effectiveEntryDate, string originatingTransitRoutingNumber, int batchNumber) { numberOfRecords += 1; numberInCurrentBatch = 0; StringBuilder sb = new StringBuilder(); sb.Append("5".PadLeft(1, PaddingCharacter)); //Record Type Code sb.Append("200".PadLeft(3, PaddingCharacter)); //Service Class Code sb.Append(CompanyName.Truncate(16).PadRight(16, ' ')); //Company Name sb.Append(CompanyDiscretionaryData.Truncate(20).PadRight(20, ' ')); //Descrtionary Data sb.Append(CompanyIdentificationNumber.Truncate(10).PadLeft(10, ' ')); //Company Identification sb.Append(standardEntryClass.Truncate(3).PadLeft(3, ' ')); //Standard Entry Class //sb.Append(client.EBPPData.ACHEntryDescription.PadRight(10, ' ')); //Company Entry Description sb.Append(entryDescription.Truncate(10).PadRight(10, ' ')); //Company Entry Description sb.Append(companyDescriptiveDate.ToString("yyMMdd")); //Company Descriptive Date* sb.Append(effectiveEntryDate.ToString("yyMMdd")); //Effective Entry Date* sb.Append("".PadLeft(3, ' ')); //SettlementDate (Julian) sb.Append("1".PadLeft(1, ' ')); //Originator Status Code sb.Append(originatingTransitRoutingNumber.Truncate(8).PadLeft(8, ' ')); //Originating Financial Institution sb.Append(batchNumber.ToString().PadLeft(7, '0')); //Batch Number return(sb.ToString()); }
public virtual void ValidateNewOrUpdateCompany() { TestCondition(CNPJ.IsNullOrEmpty(), CnpjRequired); TestCondition(!CNPJ.IsCnpj(), CnpjInvalid); TestCondition(CompanyName.IsNullOrEmpty(), NameEmpty); TestCondition(!State.HasValue || State.Value.Equals(Enums.State.EscolhaUmEstado), StateEmpty); }
public void GetCompany() { Mock <CompanyService.CompanyServiceClient> mockGrpcClient = new Mock <CompanyService.CompanyServiceClient>(MockBehavior.Strict); GetCompanyRequest expectedRequest = new GetCompanyRequest { CompanyName = new CompanyName("[PROJECT]", "[COMPANY]"), }; Company expectedResponse = new Company { CompanyName = new CompanyName("[PROJECT]", "[COMPANY]"), DisplayName = "displayName1615086568", ExternalId = "externalId-1153075697", HeadquartersAddress = "headquartersAddress-1879520036", HiringAgency = false, EeoText = "eeoText-1652097123", WebsiteUri = "websiteUri-2118185016", CareerSiteUri = "careerSiteUri1223331861", ImageUri = "imageUri-877823864", Suspended = false, }; mockGrpcClient.Setup(x => x.GetCompany(expectedRequest, It.IsAny <CallOptions>())) .Returns(expectedResponse); CompanyServiceClient client = new CompanyServiceClientImpl(mockGrpcClient.Object, null); CompanyName name = new CompanyName("[PROJECT]", "[COMPANY]"); Company response = client.GetCompany(name); Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public override int GetHashCode() { int hash = 1; if (CompanyId.Length != 0) { hash ^= CompanyId.GetHashCode(); } if (CompanyName.Length != 0) { hash ^= CompanyName.GetHashCode(); } if (Status != 0) { hash ^= Status.GetHashCode(); } if (AreaCode.Length != 0) { hash ^= AreaCode.GetHashCode(); } if (CreateTime.Length != 0) { hash ^= CreateTime.GetHashCode(); } if (Address.Length != 0) { hash ^= Address.GetHashCode(); } return(hash); }
internal void FillTheDataAndDownload() { log.Info("Filling data on client case page"); JobtTitle.SendKeys(Helper.RandomString(10)); FirstName.SendKeys(Helper.RandomString(10)); LastName.SendKeys(Helper.RandomString(10)); EmailAddress.SendKeys(Helper.RandomString(10) + "@wp.pl"); BusinessPhone.SendKeys("435345"); CompanyName.SendKeys(Helper.RandomString(10)); new SelectElement(Country).SelectByIndex(3); CheckBox.Click(); Padlock.Click(); ButtonSubmit.Click(); String downloadPath = DownloadCustomerCase.GetAttribute("href"); string[] tokens = downloadPath.Split(new[] { "%2f" }, StringSplitOptions.None); DownloadCustomerCase.Click(); string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, tokens[tokens.Length - 1]); log.Info("Downloading file to : " + filePath); Thread.Sleep(2300); Assert.True(File.Exists(filePath)); log.Info("Deleteing file : " + tokens[tokens.Length - 1]); File.Delete(filePath); }
public List <tbl_Company> SearchByComName() { using (var context = new CashCarryEntities3()) { return(context.tbl_Company.Where(a => a.CompanyName.Contains(CompanyName.ToLower())).ToList()); } }
public async stt::Task CompleteQueryRequestObjectAsync() { moq::Mock <Completion.CompletionClient> mockGrpcClient = new moq::Mock <Completion.CompletionClient>(moq::MockBehavior.Strict); CompleteQueryRequest request = new CompleteQueryRequest { TenantAsTenantName = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]"), Query = "queryf0c71c1b", LanguageCodes = { "language_codes1de1a181", }, PageSize = -226905851, CompanyAsCompanyName = CompanyName.FromProjectTenantCompany("[PROJECT]", "[TENANT]", "[COMPANY]"), Scope = CompleteQueryRequest.Types.CompletionScope.Unspecified, Type = CompleteQueryRequest.Types.CompletionType.Combined, }; CompleteQueryResponse expectedResponse = new CompleteQueryResponse { CompletionResults = { new CompleteQueryResponse.Types.CompletionResult(), }, Metadata = new ResponseMetadata(), }; mockGrpcClient.Setup(x => x.CompleteQueryAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <CompleteQueryResponse>(stt::Task.FromResult(expectedResponse), null, null, null, null)); CompletionClient client = new CompletionClientImpl(mockGrpcClient.Object, null); CompleteQueryResponse responseCallSettings = await client.CompleteQueryAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); xunit::Assert.Same(expectedResponse, responseCallSettings); CompleteQueryResponse responseCancellationToken = await client.CompleteQueryAsync(request, st::CancellationToken.None); xunit::Assert.Same(expectedResponse, responseCancellationToken); mockGrpcClient.VerifyAll(); }
public void UpdateCompany() { moq::Mock <CompanyService.CompanyServiceClient> mockGrpcClient = new moq::Mock <CompanyService.CompanyServiceClient>(moq::MockBehavior.Strict); UpdateCompanyRequest request = new UpdateCompanyRequest { Company = new Company(), UpdateMask = new wkt::FieldMask(), }; Company expectedResponse = new Company { CompanyName = CompanyName.FromProjectTenantCompany("[PROJECT]", "[TENANT]", "[COMPANY]"), DisplayName = "display_name137f65c2", ExternalId = "external_id9442680e", Size = CompanySize.Mini, HeadquartersAddress = "headquarters_address64cd7eb7", HiringAgency = true, EeoText = "eeo_text70a1a576", WebsiteUri = "website_urid0c5dfce", CareerSiteUri = "career_site_uri62d45b74", ImageUri = "image_urieba3b1bc", KeywordSearchableJobCustomAttributes = { "keyword_searchable_job_custom_attributese72ec77c", }, DerivedInfo = new Company.Types.DerivedInfo(), Suspended = true, }; mockGrpcClient.Setup(x => x.UpdateCompany(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse); CompanyServiceClient client = new CompanyServiceClientImpl(mockGrpcClient.Object, null); Company response = client.UpdateCompany(request.Company, request.UpdateMask); xunit::Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public async Task CreateProfileAsync() { Mock <ProfileService.ProfileServiceClient> mockGrpcClient = new Mock <ProfileService.ProfileServiceClient>(MockBehavior.Strict); CreateProfileRequest expectedRequest = new CreateProfileRequest { Parent = new CompanyName("[PROJECT]", "[COMPANY]").ToString(), Profile = new Profile(), }; Profile expectedResponse = new Profile { Name = "name3373707", ExternalId = "externalId-1153075697", Source = "source-896505829", Uri = "uri116076", GroupId = "groupId506361563", ResumeHrxml = "resumeHrxml1834730555", Processed = true, KeywordSnippet = "keywordSnippet1325317319", }; mockGrpcClient.Setup(x => x.CreateProfileAsync(expectedRequest, It.IsAny <CallOptions>())) .Returns(new Grpc.Core.AsyncUnaryCall <Profile>(Task.FromResult(expectedResponse), null, null, null, null)); ProfileServiceClient client = new ProfileServiceClientImpl(mockGrpcClient.Object, null); string formattedParent = new CompanyName("[PROJECT]", "[COMPANY]").ToString(); Profile profile = new Profile(); Profile response = await client.CreateProfileAsync(formattedParent, profile); Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public void CompleteQueryRequestObject() { moq::Mock <Completion.CompletionClient> mockGrpcClient = new moq::Mock <Completion.CompletionClient>(moq::MockBehavior.Strict); CompleteQueryRequest request = new CompleteQueryRequest { TenantAsTenantName = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]"), Query = "queryf0c71c1b", LanguageCodes = { "language_codes1de1a181", }, PageSize = -226905851, CompanyAsCompanyName = CompanyName.FromProjectTenantCompany("[PROJECT]", "[TENANT]", "[COMPANY]"), Scope = CompleteQueryRequest.Types.CompletionScope.Unspecified, Type = CompleteQueryRequest.Types.CompletionType.Combined, }; CompleteQueryResponse expectedResponse = new CompleteQueryResponse { CompletionResults = { new CompleteQueryResponse.Types.CompletionResult(), }, Metadata = new ResponseMetadata(), }; mockGrpcClient.Setup(x => x.CompleteQuery(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse); CompletionClient client = new CompletionClientImpl(mockGrpcClient.Object, null); CompleteQueryResponse response = client.CompleteQuery(request); xunit::Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public override int GetHashCode() { int hash = 1; if (Id.Length != 0) { hash ^= Id.GetHashCode(); } if (Company.Length != 0) { hash ^= Company.GetHashCode(); } if (LanguageId.Length != 0) { hash ^= LanguageId.GetHashCode(); } if (CompanyName.Length != 0) { hash ^= CompanyName.GetHashCode(); } if (CompanyDescription.Length != 0) { hash ^= CompanyDescription.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (BankAccountIban != null) { hashCode = hashCode * 59 + BankAccountIban.GetHashCode(); } if (CompanyName != null) { hashCode = hashCode * 59 + CompanyName.GetHashCode(); } if (ContactDetails != null) { hashCode = hashCode * 59 + ContactDetails.GetHashCode(); } if (MandateAddress != null) { hashCode = hashCode * 59 + MandateAddress.GetHashCode(); } if (PersonalInformation != null) { hashCode = hashCode * 59 + PersonalInformation.GetHashCode(); } return(hashCode); } }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is Customer other && ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) && ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) && ((UpdatedAt == null && other.UpdatedAt == null) || (UpdatedAt?.Equals(other.UpdatedAt) == true)) && ((Cards == null && other.Cards == null) || (Cards?.Equals(other.Cards) == true)) && ((GivenName == null && other.GivenName == null) || (GivenName?.Equals(other.GivenName) == true)) && ((FamilyName == null && other.FamilyName == null) || (FamilyName?.Equals(other.FamilyName) == true)) && ((Nickname == null && other.Nickname == null) || (Nickname?.Equals(other.Nickname) == true)) && ((CompanyName == null && other.CompanyName == null) || (CompanyName?.Equals(other.CompanyName) == true)) && ((EmailAddress == null && other.EmailAddress == null) || (EmailAddress?.Equals(other.EmailAddress) == true)) && ((Address == null && other.Address == null) || (Address?.Equals(other.Address) == true)) && ((PhoneNumber == null && other.PhoneNumber == null) || (PhoneNumber?.Equals(other.PhoneNumber) == true)) && ((Birthday == null && other.Birthday == null) || (Birthday?.Equals(other.Birthday) == true)) && ((ReferenceId == null && other.ReferenceId == null) || (ReferenceId?.Equals(other.ReferenceId) == true)) && ((Note == null && other.Note == null) || (Note?.Equals(other.Note) == true)) && ((Preferences == null && other.Preferences == null) || (Preferences?.Equals(other.Preferences) == true)) && ((Groups == null && other.Groups == null) || (Groups?.Equals(other.Groups) == true)) && ((CreationSource == null && other.CreationSource == null) || (CreationSource?.Equals(other.CreationSource) == true)) && ((GroupIds == null && other.GroupIds == null) || (GroupIds?.Equals(other.GroupIds) == true)) && ((SegmentIds == null && other.SegmentIds == null) || (SegmentIds?.Equals(other.SegmentIds) == true))); }
private void frmLogin_Load(object sender, EventArgs e) { Conf.dbs ds = new Conf.dbs(); if (ds.GetMACAddress() == login.matchMac(ds.GetMACAddress())) { terminalNo = login.getIndentifier(ds.GetMACAddress()); String nows; this.autoComplete(); if (DateTime.Now.Year.ToString() == "2014") { nows = ""; } else { nows = DateTime.Now.Year.ToString(); } label3.Text = CompanyName.ToString(); lblProgversion.Text = ProductName + " v" + ProductVersion; lblAdlib.Text = "© Copyright 2014 - " + nows; } else { MessageBox.Show("System Access Restricted!\nContact Technical Support Immediately", "nPOS", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); Application.ExitThread(); } }
public async Task <IActionResult> Edit(int id, [Bind("CompanyNameId,CompanyNameName")] CompanyName companyName) { if (id != companyName.CompanyNameId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(companyName); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CompanyNameExists(companyName.CompanyNameId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(companyName)); }
void ReleaseDesignerOutlets() { if (CompanyName != null) { CompanyName.Dispose(); CompanyName = null; } if (CompanySize != null) { CompanySize.Dispose(); CompanySize = null; } if (RevenueLabel != null) { RevenueLabel.Dispose(); RevenueLabel = null; } if (SizeLabel != null) { SizeLabel.Dispose(); SizeLabel = null; } }
public void CreateProfile() { Mock <ProfileService.ProfileServiceClient> mockGrpcClient = new Mock <ProfileService.ProfileServiceClient>(MockBehavior.Strict); CreateProfileRequest expectedRequest = new CreateProfileRequest { ParentAsCompanyName = new CompanyName("[PROJECT]", "[COMPANY]"), Profile = new Profile(), }; Profile expectedResponse = new Profile { ProfileName = new ProfileName("[PROJECT]", "[COMPANY]", "[PROFILE]"), ExternalId = "externalId-1153075697", Source = "source-896505829", Uri = "uri116076", GroupId = "groupId506361563", ResumeHrxml = "resumeHrxml1834730555", Processed = true, KeywordSnippet = "keywordSnippet1325317319", }; mockGrpcClient.Setup(x => x.CreateProfile(expectedRequest, It.IsAny <CallOptions>())) .Returns(expectedResponse); ProfileServiceClient client = new ProfileServiceClientImpl(mockGrpcClient.Object, null); CompanyName parent = new CompanyName("[PROJECT]", "[COMPANY]"); Profile profile = new Profile(); Profile response = client.CreateProfile(parent, profile); Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public void UpdateApplication() { moq::Mock <ApplicationService.ApplicationServiceClient> mockGrpcClient = new moq::Mock <ApplicationService.ApplicationServiceClient>(moq::MockBehavior.Strict); UpdateApplicationRequest request = new UpdateApplicationRequest { Application = new Application(), }; Application expectedResponse = new Application { ApplicationName = ApplicationName.FromProjectTenantProfileApplication("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]"), Profile = "profile1b48977d", JobAsJobName = JobName.FromProjectJob("[PROJECT]", "[JOB]"), CompanyAsCompanyName = CompanyName.FromProjectCompany("[PROJECT]", "[COMPANY]"), ApplicationDate = new gt::Date(), Stage = Application.Types.ApplicationStage.OfferAccepted, State = Application.Types.ApplicationState.Unspecified, Interviews = { new Interview(), }, Referral = new bool?(), CreateTime = new wkt::Timestamp(), UpdateTime = new wkt::Timestamp(), OutcomeNotes = "outcome_notes38ed921d", Outcome = Outcome.Neutral, IsMatch = new bool?(), JobTitleSnippet = "job_title_snippet4f14afe7", ExternalId = "external_id9442680e", }; mockGrpcClient.Setup(x => x.UpdateApplication(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse); ApplicationServiceClient client = new ApplicationServiceClientImpl(mockGrpcClient.Object, null); Application response = client.UpdateApplication(request.Application); xunit::Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
protected override void SetSearchCriteria(ref SearchBuilder sb) { SortExpressions.Clear(); sb.SortExpressions.Clear(); sb.TableAlias = "U"; sb.Fields.Add("UserId"); if (!StringUtils.IsBlank(CompanyName) && CompanyName.ToLower() != "all") { sb.Criteria.Add(string.Format("CompanyName='{0}'", SqlUtils.SafeValue(CompanyName))); } if (BrandId.HasValue) { switch (BrandId.Value) { case 0: sb.Criteria.Add(string.Format("{0} IS NULL", User.Columns.PrimaryBrandId)); break; default: sb.Criteria.Add(string.Format("{0}={1}", User.Columns.PrimaryBrandId, BrandId.Value)); break; } } }
public string getAddressHTMLFormat() { string Address = Name + " " + LastName + "<br>"; if (CompanyName == null || CompanyName.Equals("") || CompanyName.Equals(" ")) { Address += ""; } else { Address += CompanyName + "<br>"; } Address += Address1 + "<br>"; if (Address2 == null || Address2.Equals("") || Address2.Equals(" ")) { Address += ""; } else { Address += Address2 + "<br>"; } Address += City + ", " + Stat + " " + Zip + "<br>" + Country; return(Address); }
private void UpdateRootNamespace() { if (rootNamespaceLocked) { RootNamespace = GetSafeName(CompanyName.Split(' ')) + ".Modules." + GetSafeName(ModuleName); } }
public async Task GetCompanyAsync() { Mock <CompanyService.CompanyServiceClient> mockGrpcClient = new Mock <CompanyService.CompanyServiceClient>(MockBehavior.Strict); GetCompanyRequest expectedRequest = new GetCompanyRequest { Name = new CompanyName("[PROJECT]", "[COMPANY]").ToString(), }; Company expectedResponse = new Company { Name = "name2-1052831874", DisplayName = "displayName1615086568", ExternalId = "externalId-1153075697", HeadquartersAddress = "headquartersAddress-1879520036", HiringAgency = false, EeoText = "eeoText-1652097123", WebsiteUri = "websiteUri-2118185016", CareerSiteUri = "careerSiteUri1223331861", ImageUri = "imageUri-877823864", Suspended = false, }; mockGrpcClient.Setup(x => x.GetCompanyAsync(expectedRequest, It.IsAny <CallOptions>())) .Returns(new Grpc.Core.AsyncUnaryCall <Company>(Task.FromResult(expectedResponse), null, null, null, null)); CompanyServiceClient client = new CompanyServiceClientImpl(mockGrpcClient.Object, null); string formattedName = new CompanyName("[PROJECT]", "[COMPANY]").ToString(); Company response = await client.GetCompanyAsync(formattedName); Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public override int GetHashCode() { int hashCompanyName = CompanyName == null ? 0 : CompanyName.GetHashCode(); int hashRegionName = RegionName == null ? 0 : RegionName.GetHashCode(); int hashSiteName = SiteName == null ? 0 : SiteName.GetHashCode(); return(hashCompanyName ^ hashRegionName ^ hashSiteName); }
public ActionResult DeleteConfirmed(int id) { CompanyName companyName = db.CompanyNames.Find(id); db.CompanyNames.Remove(companyName); db.SaveChanges(); return(RedirectToAction("Index")); }
public override XElement GenerateAddRq() { XElement Add = new XElement("CustomerAdd"); Add.Add(Name?.ToQBXML(nameof(Name))); Add.Add(IsActive.ToQBXML(nameof(IsActive))); Add.Add(ClassRef?.ToQBXML(nameof(ClassRef))); Add.Add(ParentRef?.ToQBXML(nameof(ParentRef))); Add.Add(CompanyName?.ToQBXML(nameof(CompanyName))); Add.Add(Salutation?.ToQBXML(nameof(Salutation))); Add.Add(FirstName?.ToQBXML(nameof(FirstName))); Add.Add(MiddleName?.ToQBXML(nameof(MiddleName))); Add.Add(LastName?.ToQBXML(nameof(LastName))); Add.Add(JobTitle?.ToQBXML(nameof(JobTitle))); Add.Add(BillAddress?.ToQBXML(nameof(BillAddress))); Add.Add(ShipAddress?.ToQBXML(nameof(ShipAddress))); Add.Add(ShipToAddress?.ToQBXML(nameof(ShipToAddress))); Add.Add(Phone?.ToQBXML(nameof(Phone))); Add.Add(AltPhone?.ToQBXML(nameof(AltPhone))); Add.Add(Fax?.ToQBXML(nameof(Fax))); Add.Add(Email?.ToQBXML(nameof(Email))); Add.Add(Cc?.ToQBXML(nameof(Cc))); Add.Add(Contact?.ToQBXML(nameof(Contact))); Add.Add(AltContact?.ToQBXML(nameof(AltContact))); Add.Add(AdditionalContactRef?.ToQBXML(nameof(AdditionalContactRef))); Add.Add(Contacts?.ToQBXML <Contacts>(nameof(Contacts))); Add.Add(CustomerTypeRef?.ToQBXML(nameof(CustomerTypeRef))); Add.Add(TermsRef?.ToQBXML(nameof(TermsRef))); Add.Add(SalesRepRef?.ToQBXML(nameof(SalesRepRef))); Add.Add(OpenBalance?.ToQBXML(nameof(OpenBalance))); Add.Add(OpenBalanceDate?.ToQBXML(nameof(OpenBalanceDate))); Add.Add(SalesTaxCodeRef?.ToQBXML(nameof(SalesTaxCodeRef))); Add.Add(ItemSalesTaxRef?.ToQBXML(nameof(ItemSalesTaxRef))); Add.Add(ResaleNumber?.ToQBXML(nameof(ResaleNumber))); Add.Add(AccountNumber?.ToQBXML(nameof(AccountNumber))); Add.Add(CreditLimit?.ToQBXML(nameof(CreditLimit))); Add.Add(PreferredPaymentMethodRef?.ToQBXML(nameof(PreferredPaymentMethodRef))); Add.Add(CreditCardInfo?.ToQBXML(nameof(CreditCardInfo))); Add.Add(JobStatus.ToQBXML(nameof(JobStatus))); Add.Add(JobStartDate?.ToQBXML(nameof(JobStartDate))); Add.Add(JobProjectedEndDate?.ToQBXML(nameof(JobProjectedEndDate))); Add.Add(JobEndDate?.ToQBXML(nameof(JobEndDate))); Add.Add(JobDesc?.ToQBXML(nameof(JobDesc))); Add.Add(JobTypeRef?.ToQBXML(nameof(JobTypeRef))); Add.Add(Notes?.ToQBXML(nameof(Notes))); Add.Add(AdditionalNotes?.ToQBXML(nameof(AdditionalNotes))); Add.Add(PreferredDeliveryMethod.ToQBXML(nameof(PreferredDeliveryMethod))); Add.Add(PriceLevelRef?.ToQBXML(nameof(PriceLevelRef))); Add.Add(ExternalGUID?.ToQBXML(nameof(ExternalGUID))); Add.Add(CurrencyRef?.ToQBXML(nameof(CurrencyRef))); XElement AddRq = new XElement("CustomerAddRq"); AddRq.Add(Add); AddRq.Add(IncludeRetElement?.ToQBXML(nameof(IncludeRetElement))); return(AddRq); }
/// <summary> /// Returns true if PaymentProduct840CustomerAccount instances are equal /// </summary> /// <param name="other">Instance of PaymentProduct840CustomerAccount to be compared</param> /// <returns>Boolean</returns> public bool Equals(PaymentProduct840CustomerAccount other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( AccountId == other.AccountId || AccountId != null && AccountId.Equals(other.AccountId) ) && ( BillingAgreementId == other.BillingAgreementId || BillingAgreementId != null && BillingAgreementId.Equals(other.BillingAgreementId) ) && ( CompanyName == other.CompanyName || CompanyName != null && CompanyName.Equals(other.CompanyName) ) && ( CountryCode == other.CountryCode || CountryCode != null && CountryCode.Equals(other.CountryCode) ) && ( CustomerAccountStatus == other.CustomerAccountStatus || CustomerAccountStatus != null && CustomerAccountStatus.Equals(other.CustomerAccountStatus) ) && ( CustomerAddressStatus == other.CustomerAddressStatus || CustomerAddressStatus != null && CustomerAddressStatus.Equals(other.CustomerAddressStatus) ) && ( FirstName == other.FirstName || FirstName != null && FirstName.Equals(other.FirstName) ) && ( PayerId == other.PayerId || PayerId != null && PayerId.Equals(other.PayerId) ) && ( Surname == other.Surname || Surname != null && Surname.Equals(other.Surname) )); }
public async Task <Company> GetCompany(CompanyName name) { var filter = new FilterDefinitionBuilder <CompanyDto>().Eq(dto => dto.Name, name.Value); var resultCursor = await _companyCollection.FindAsync(filter); var resultDto = await resultCursor.FirstOrDefaultAsync(); return(resultDto?.FromDto()); }
public IEnumerable <ValidationResult> Validate(ValidationContext validationContext) { var property = new[] { "TaxIdNumber" }; if (CompanyName.Contains("aaaaaaaasdasdasdasd") && TaxIdNumber == "1") { yield return(new ValidationResult("Regla boba 1 para test en Tax", property)); } }