private void button3_Click(object sender, EventArgs e) { if ((ManagerName.Text != "") && (ManagerYear.Text != "") && (ManagerSalary.Text != "") && (ManagerDayOfHolidays.Text != "") && (ManagerDepartment.Text != "") && (ManagerExperience.Text != "")) { Manager obj = new Manager(ManagerName.Text, int.Parse(ManagerYear.Text), int.Parse(ManagerSalary.Text), int.Parse(ManagerDayOfHolidays.Text), ManagerDepartment.Text, int.Parse(ManagerExperience.Text)); Owner owner = new Owner(OwnerName.Text, int.Parse(OwnerYear.Text), int.Parse(OwnerBudget.Text), obj); OwnerName.Clear(); OwnerYear.Clear(); OwnerBudget.Clear(); ManagerName.Clear(); ManagerYear.Clear(); ManagerSalary.Clear(); ManagerDayOfHolidays.Clear(); ManagerExperience.Clear(); ManagerDepartment.Clear(); OwnerList.Add(owner); Ownerdata.DataSource = null; Ownerdata.DataSource = OwnerList; } else { MessageBox.Show("Заполните поля manager "); } }
public string Serialize() { string result = "{RFM}"; result += OwnerName.MyStringReverse() + "&" + OwnerStatus.MyStringReverse(); result += "{RFM}"; return result; }
private void PrintName_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { OwnerName.Focus(); } }
public override int GetHashCode() { int result; result = Created.GetHashCode(); result = 29 * result + OwnerName.GetHashCode(); return(result); }
public string Serialize() { string result = "{EF}"; result += OwnerName.ToUpper() + "$" + OwnerStatus.ToUpper(); result += "{EF}"; return(result); }
internal string SerializeUnencrypted() { return("Domain: " + Domain.Replace('\n', ' ') + "\n" + "OwnerName: " + OwnerName.Replace('\n', ' ') + "\n" + "Issued: " + Issued.ToString() + "\n" + "Expires: " + Expires.ToString() + "\n" + "Features: " + Join(Features) + "\n"); }
public string SerializeUnencrypted() { string expires = Expires.HasValue ? Expires.Value.ToUniversalTime().ToString() : string.Empty; return("Domain: " + Domain.Replace('\n', ' ') + "\n" + "OwnerName: " + OwnerName.Replace('\n', ' ') + "\n" + "Issued: " + Issued.ToString() + "\n" + "Expires: " + expires + "\n" + "Features: " + Join(Features) + "\n"); }
protected override IEnumerable <object> GetEqualityComponents() { yield return(CompanyName.ToUpper()); yield return(OwnerName.ToUpper()); yield return(TaxIdentificationNumber); yield return(NationalEconomyRegisterNumber); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { int hash = 41; // Suitable nullity checks hash = hash * 59 + Id.GetHashCode(); if (EquipmentType != null) { hash = hash * 59 + EquipmentType.GetHashCode(); } if (OwnerName != null) { hash = hash * 59 + OwnerName.GetHashCode(); } if (OwnerId != null) { hash = hash * 59 + OwnerId.GetHashCode(); } hash = hash * 59 + IsHired.GetHashCode(); if (Make != null) { hash = hash * 59 + Make.GetHashCode(); } if (Model != null) { hash = hash * 59 + Model.GetHashCode(); } if (Size != null) { hash = hash * 59 + Size.GetHashCode(); } hash = hash * 59 + AttachmentCount.GetHashCode(); if (LastVerifiedDate != null) { hash = hash * 59 + LastVerifiedDate.GetHashCode(); } hash = hash * 59 + SenioritySortOrder.GetHashCode(); return(hash); } }
public override int GetHashCode() { unchecked { var hashCode = (DataUrl != null ? DataUrl.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (PhoneNumbers != null ? PhoneNumbers.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (OwnerName != null ? OwnerName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Email != null ? Email.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (PhysicalAddress != null ? PhysicalAddress.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CompanyStockTicker != null ? CompanyStockTicker.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = OwnerName.GetHashCode(); hashCode = (hashCode * 397) ^ MethodName.GetHashCode(); hashCode = (hashCode * 397) ^ (int)Mode; hashCode = (hashCode * 397) ^ (Type != null ? Type.GetHashCode() : 0); hashCode = (hashCode * 397) ^ TargetScriptReference.GetHashCode(); hashCode = (hashCode * 397) ^ TextRangeOwnerPsiPersistentIndex.GetHashCode(); hashCode = (hashCode * 397) ^ TextRangeOwner.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { return(StartUtc.GetHashCode() * 17 + EndUtc.GetHashCode() * 23 + ID.GetHashCode() * 13 + ResourceID.GetHashCode() * 19 + Body.GetHashCode() * 29 + OwnerName.GetHashCode() * 7); }
public override int GetHashCode() { int hash = 1; if (Id != 0UL) { hash ^= Id.GetHashCode(); } if (PokemonId != 0) { hash ^= PokemonId.GetHashCode(); } if (Cp != 0) { hash ^= Cp.GetHashCode(); } if (Stamina != 0) { hash ^= Stamina.GetHashCode(); } if (StaminaMax != 0) { hash ^= StaminaMax.GetHashCode(); } if (Move1 != 0) { hash ^= Move1.GetHashCode(); } if (Move2 != 0) { hash ^= Move2.GetHashCode(); } if (DeployedFortId.Length != 0) { hash ^= DeployedFortId.GetHashCode(); } if (OwnerName.Length != 0) { hash ^= OwnerName.GetHashCode(); } if (IsEgg != false) { hash ^= IsEgg.GetHashCode(); } if (EggKmWalkedTarget != 0D) { hash ^= EggKmWalkedTarget.GetHashCode(); } if (EggKmWalkedStart != 0D) { hash ^= EggKmWalkedStart.GetHashCode(); } if (Origin != 0) { hash ^= Origin.GetHashCode(); } if (HeightM != 0F) { hash ^= HeightM.GetHashCode(); } if (WeightKg != 0F) { hash ^= WeightKg.GetHashCode(); } if (IndividualAttack != 0) { hash ^= IndividualAttack.GetHashCode(); } if (IndividualDefense != 0) { hash ^= IndividualDefense.GetHashCode(); } if (IndividualStamina != 0) { hash ^= IndividualStamina.GetHashCode(); } if (CpMultiplier != 0F) { hash ^= CpMultiplier.GetHashCode(); } if (Pokeball != 0) { hash ^= Pokeball.GetHashCode(); } if (CapturedCellId != 0UL) { hash ^= CapturedCellId.GetHashCode(); } if (BattlesAttacked != 0) { hash ^= BattlesAttacked.GetHashCode(); } if (BattlesDefended != 0) { hash ^= BattlesDefended.GetHashCode(); } if (EggIncubatorId.Length != 0) { hash ^= EggIncubatorId.GetHashCode(); } if (CreationTimeMs != 0UL) { hash ^= CreationTimeMs.GetHashCode(); } if (NumUpgrades != 0) { hash ^= NumUpgrades.GetHashCode(); } if (AdditionalCpMultiplier != 0F) { hash ^= AdditionalCpMultiplier.GetHashCode(); } if (Favorite != 0) { hash ^= Favorite.GetHashCode(); } if (Nickname.Length != 0) { hash ^= Nickname.GetHashCode(); } if (FromFort != 0) { hash ^= FromFort.GetHashCode(); } if (BuddyCandyAwarded != 0) { hash ^= BuddyCandyAwarded.GetHashCode(); } if (BuddyTotalKmWalked != 0F) { hash ^= BuddyTotalKmWalked.GetHashCode(); } if (DisplayPokemonId != 0) { hash ^= DisplayPokemonId.GetHashCode(); } if (DisplayCp != 0) { hash ^= DisplayCp.GetHashCode(); } return(hash); }
public bool IsEqual(object obj) { if (obj == null) { return(false); } if (object.ReferenceEquals(this, obj)) { return(true); } if (obj.GetType() != this.GetType()) { return(false); } DefaultListingPdfReportSetting setting = (DefaultListingPdfReportSetting)obj; if (string.IsNullOrEmpty(OwnerName)) { if (!string.IsNullOrEmpty(setting.OwnerName)) { return(false); } } else { if (!OwnerName.Equals(setting.OwnerName)) { return(false); } } if (IsEmployerVisible != setting.IsEmployerVisible) { return(false); } if (IsOwnerNameVisible != setting.IsOwnerNameVisible) { return(false); } if (AreShortHalfHoursEnabled != setting.AreShortHalfHoursEnabled) { return(false); } if (AreWorkedHoursVisible != setting.AreWorkedHoursVisible) { return(false); } if (AreLunchHoursVisible != setting.AreLunchHoursVisible) { return(false); } if (AreOtherHoursVisible != setting.AreOtherHoursVisible) { return(false); } if (AreTotalWorkedHoursVisible != setting.AreTotalWorkedHoursVisible) { return(false); } if (IsVacationVisible != setting.IsVacationVisible) { return(false); } if (AreSiknessHoursVisible != setting.AreSiknessHoursVisible) { return(false); } if (AreHolidaysHoursVisible != setting.AreHolidaysHoursVisible) { return(false); } if (IsHourlyWageVisible != setting.IsHourlyWageVisible) { return(false); } if (AreVacationDaysVisible != setting.AreVacationDaysVisible) { return(false); } if (AreDietsVisible != setting.AreDietsVisible) { return(false); } if (ArePaidHolidaysVisible != setting.ArePaidHolidaysVisible) { return(false); } if (AreBonusesVisible != setting.AreBonusesVisible) { return(false); } if (AreDollarsVisible != setting.AreDollarsVisible) { return(false); } if (IsPrepaymentVisible != setting.IsPrepaymentVisible) { return(false); } if (IsSicknessVisible != setting.IsSicknessVisible) { return(false); } return(true); }
private Owner(OwnerName name) { _owner = (byte) name; }
/// <summary> /// Returns true if SeniorityViewModel instances are equal /// </summary> /// <param name="other">Instance of SeniorityViewModel to be compared</param> /// <returns>Boolean</returns> public bool Equals(SeniorityViewModel other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id.Equals(other.Id) ) && ( EquipmentType == other.EquipmentType || EquipmentType != null && EquipmentType.Equals(other.EquipmentType) ) && ( OwnerName == other.OwnerName || OwnerName != null && OwnerName.Equals(other.OwnerName) ) && ( OwnerId == other.OwnerId || OwnerId != null && OwnerId.Equals(other.OwnerId) ) && ( SeniorityString == other.SeniorityString || SeniorityString != null && SeniorityString.Equals(other.SeniorityString) ) && ( Seniority == other.Seniority || Seniority != null && Seniority.Equals(other.Seniority) ) && ( Make == other.Make || Make != null && Make.Equals(other.Make) ) && ( Model == other.Model || Model != null && Model.Equals(other.Model) ) && ( Size == other.Size || Size != null && Size.Equals(other.Size) ) && ( EquipmentCode == other.EquipmentCode || EquipmentCode != null && EquipmentCode.Equals(other.EquipmentCode) ) && ( LastCalled == other.LastCalled || LastCalled != null && LastCalled.Equals(other.LastCalled) ) && ( YearsRegistered == other.YearsRegistered || YearsRegistered != null && YearsRegistered.Equals(other.YearsRegistered) ) && ( YtdHours == other.YtdHours || YtdHours != null && YtdHours.Equals(other.YtdHours) ) && ( HoursYearMinus1 == other.HoursYearMinus1 || HoursYearMinus1 != null && HoursYearMinus1.Equals(other.HoursYearMinus1) ) && ( HoursYearMinus2 == other.HoursYearMinus2 || HoursYearMinus2 != null && HoursYearMinus2.Equals(other.HoursYearMinus2) ) && ( HoursYearMinus3 == other.HoursYearMinus3 || HoursYearMinus3 != null && HoursYearMinus3.Equals(other.HoursYearMinus3) ) && ( SenioritySortOrder == other.SenioritySortOrder || SenioritySortOrder.Equals(other.SenioritySortOrder) )); }
/// <summary> /// Returns true if EquipmentViewModel instances are equal /// </summary> /// <param name="other">Instance of EquipmentViewModel to be compared</param> /// <returns>Boolean</returns> public bool Equals(EquipmentViewModel other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id.Equals(other.Id) ) && ( EquipmentType == other.EquipmentType || EquipmentType != null && EquipmentType.Equals(other.EquipmentType) ) && ( OwnerName == other.OwnerName || OwnerName != null && OwnerName.Equals(other.OwnerName) ) && ( OwnerId == other.OwnerId || OwnerId != null && OwnerId.Equals(other.OwnerId) ) && ( IsHired == other.IsHired || IsHired.Equals(other.IsHired) ) && ( SeniorityString == other.SeniorityString || SeniorityString != null && SeniorityString.Equals(other.SeniorityString) ) && ( Make == other.Make || Make != null && Make.Equals(other.Make) ) && ( Model == other.Model || Model != null && Model.Equals(other.Model) ) && ( Size == other.Size || Size != null && Size.Equals(other.Size) ) && ( EquipmentCode == other.EquipmentCode || EquipmentCode != null && EquipmentCode.Equals(other.EquipmentCode) ) && ( AttachmentCount == other.AttachmentCount || AttachmentCount.Equals(other.AttachmentCount) ) && ( LastVerifiedDate == other.LastVerifiedDate || LastVerifiedDate != null && LastVerifiedDate.Equals(other.LastVerifiedDate) ) && ( SenioritySortOrder == other.SenioritySortOrder || SenioritySortOrder.Equals(other.SenioritySortOrder) )); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { int hash = 41; // Suitable nullity checks hash = hash * 59 + Id.GetHashCode(); if (EquipmentType != null) { hash = hash * 59 + EquipmentType.GetHashCode(); } if (OwnerName != null) { hash = hash * 59 + OwnerName.GetHashCode(); } if (OwnerId != null) { hash = hash * 59 + OwnerId.GetHashCode(); } if (SeniorityString != null) { hash = hash * 59 + SeniorityString.GetHashCode(); } if (Seniority != null) { hash = hash * 59 + Seniority.GetHashCode(); } if (Make != null) { hash = hash * 59 + Make.GetHashCode(); } if (Model != null) { hash = hash * 59 + Model.GetHashCode(); } if (Size != null) { hash = hash * 59 + Size.GetHashCode(); } if (LastCalled != null) { hash = hash * 59 + LastCalled.GetHashCode(); } if (YearsRegistered != null) { hash = hash * 59 + YearsRegistered.GetHashCode(); } if (YtdHours != null) { hash = hash * 59 + YtdHours.GetHashCode(); } if (HoursYearMinus1 != null) { hash = hash * 59 + HoursYearMinus1.GetHashCode(); } if (HoursYearMinus2 != null) { hash = hash * 59 + HoursYearMinus2.GetHashCode(); } if (HoursYearMinus3 != null) { hash = hash * 59 + HoursYearMinus3.GetHashCode(); } hash = hash * 59 + SenioritySortOrder.GetHashCode(); return(hash); } }
private void UpdateInternal(object owner, SlimProfilerEntry entry, bool forcePropertyUpdate = false) { if (entry == null) { if (!OwnerName.Equals(_noData) || forcePropertyUpdate) { OwnerName = _noData; OnPropertyChanged(nameof(OwnerName)); } // ReSharper disable once CompareOfFloatsByEqualityOperator if (UpdateTime != 0 || forcePropertyUpdate) { UpdateTime = 0; OnPropertyChanged(nameof(UpdateTime)); } if (Children.Count > 0) { Children.Clear(); } return; } string ownerId = ProfilerObjectIdentifier.Identify(owner); if (!ownerId.Equals(OwnerName) || forcePropertyUpdate) { OwnerName = ownerId; OnPropertyChanged(nameof(OwnerName)); } UpdateTime = entry.UpdateTime; OnPropertyChanged(nameof(UpdateTime)); if (entry is FatProfilerEntry fat) { if (ChildrenSorted.IsObserved || Children.IsObserved || forcePropertyUpdate) { _childrenUpdateDeferred = false; ICollection <object> keys = fat.ChildUpdateKeys(); var id = 0; foreach (object key in keys) { if (fat.ChildUpdateTime.TryGetValue(key, out SlimProfilerEntry child) && child.UpdateTime > DisplayTimeThreshold) { if (id >= Children.Count) { var result = new ProfilerEntryViewModel(); result.UpdateInternal(key, child, forcePropertyUpdate); Children.Add(result); id++; } else { Children[id++].UpdateInternal(key, child, forcePropertyUpdate); } } } while (Children.Count > id) { Children.RemoveAt(Children.Count - 1); } using (ChildrenSorted.DeferredUpdate()) { var sortedEnumerable = Children.OrderBy(x => (int)(-x.UpdateTime / DisplayTimeThreshold)); if (Children.Count > PaginationCount) { var pageCount = (int)Math.Ceiling(Children.Count / (float)PaginationCount); if (_wasPaged) { while (ChildrenSorted.Count > pageCount) { ChildrenSorted.RemoveAt(ChildrenSorted.Count - 1); } } else { ChildrenSorted.Clear(); } while (ChildrenSorted.Count < pageCount) { ChildrenSorted.Add(new ProfilerEntryViewModel()); } using (var iterator = sortedEnumerable.GetEnumerator()) { for (var i = 0; i < pageCount; i++) { ChildrenSorted[i].OwnerName = $"Items {i * PaginationCount + 1} to {i * PaginationCount + PaginationCount}"; ChildrenSorted[i].OnPropertyChanged(nameof(OwnerName)); FillPage(ChildrenSorted[i], iterator); } } _wasPaged = true; } else { ChildrenSorted.Clear(); foreach (var k in sortedEnumerable) { ChildrenSorted.Add(k); } _wasPaged = false; } } } else { _childrenUpdateDeferred = true; } } else { Children.Clear(); ChildrenSorted.Clear(); } }
public string FTP_JohnsonKS(string houseno, string sname, string stype, string account, string parcelNumber, string ownername, string searchType, string orderNumber, string direction) { GlobalClass.global_orderNo = orderNumber; HttpContext.Current.Session["orderNo"] = orderNumber; GlobalClass.global_parcelNo = parcelNumber; IJavaScriptExecutor js = driver as IJavaScriptExecutor; string strmulti = ""; string StartTime = "", AssessmentTime = "", TaxTime = "", CitytaxTime = "", LastEndTime = ""; var driverService = PhantomJSDriverService.CreateDefaultService(); driverService.HideCommandPromptWindow = true; //driver = new PhantomJSDriver(); // driver = new ChromeDriver(); var option = new ChromeOptions(); option.AddArgument("No-Sandbox"); using (driver = new ChromeDriver(option)) { try { StartTime = DateTime.Now.ToString("HH:mm:ss"); driver.Navigate().GoToUrl("https://land.jocogov.org/default.aspx"); Thread.Sleep(8000); IWebElement iframset = driver.FindElement(By.Id("mapiframe")); driver.SwitchTo().Frame(iframset); gc.CreatePdf_WOP(orderNumber, "Iframe Switch", driver, "KS", "Johnson"); Thread.Sleep(3000); string addAddress = ""; if (direction != "") { addAddress = houseno + " " + direction.ToUpper() + " " + sname.ToUpper() + " " + stype.ToUpper() + " " + account.ToUpper(); } else { addAddress = houseno + " " + sname.ToUpper() + " " + stype.ToUpper() + " " + account.ToUpper(); } if (searchType == "titleflex") { gc.TitleFlexSearch(orderNumber, "", ownername.Replace(",", ""), addAddress.Trim(), "KS", "Johnson"); if ((HttpContext.Current.Session["TitleFlex_Search"] != null && HttpContext.Current.Session["TitleFlex_Search"].ToString() == "Yes")) { driver.Quit(); return("MultiParcel"); } else if (HttpContext.Current.Session["titleparcel"].ToString() == "") { HttpContext.Current.Session["Nodata_JohnsonKS"] = "Yes"; driver.Quit(); return("No Data Found"); } parcelNumber = HttpContext.Current.Session["titleparcel"].ToString(); searchType = "parcel"; } if (searchType == "address") { //IWebElement InputAddress = driver.FindElement(By.Id("tbSearchID")); //IList<IWebElement> InputAddressrow = InputAddress.FindElements(By.TagName("input")); //IList<IWebElement> inputaddresstd; //foreach (IWebElement Input in InputAddressrow) //{ // Input.Clear(); //} driver.FindElement(By.Id("tbSearchID")).Clear(); driver.FindElement(By.Id("tbSearchID")).SendKeys(addAddress.Trim()); driver.FindElement(By.Id("btnSimpleSearch")).Click(); Thread.Sleep(3000); gc.CreatePdf_WOP(orderNumber, "Address click", driver, "KS", "Johnson"); try { driver.FindElement(By.Id("btnDisclaimerYes")).Click(); Thread.Sleep(8000); } catch { } // gc.CreatePdf_WOP(orderNumber, "Address Alert click", driver, "KS", "Johnson"); try { Thread.Sleep(3000); IWebElement IAddress = driver.FindElement(By.XPath("/html/body/ul")); IList <IWebElement> IAddressRow = IAddress.FindElements(By.TagName("li")); IList <IWebElement> IAddressTD; foreach (IWebElement address in IAddressRow) { IAddressTD = address.FindElements(By.TagName("a")); if (address.Text != "" && IAddressRow.Count < 2 && address.Text.Contains(houseno) && address.Text.Contains(sname.ToUpper()) && address.Text.Contains(stype.ToUpper())) { IAddressTD[0].Click(); } } } catch { } gc.CreatePdf_WOP(orderNumber, "Address Search", driver, "KS", "Johnson"); // driver.FindElement(By.Id("btnName")).SendKeys(Keys.Enter); //try //{ // strmulti = driver.FindElement(By.Id("lblRecords")).Text; // if (Convert.ToInt32(strmulti) > 25) // { // HttpContext.Current.Session["multiParcel_Johnson_Maximum"] = "Maximum"; // return "Maximum"; // } // IWebElement Imultitable = driver.FindElement(By.XPath("//*[@id='grdResults']/tbody")); // IList<IWebElement> ImutiRow = Imultitable.FindElements(By.TagName("tr")); // IList<IWebElement> ImultiTD; // foreach (IWebElement multi in ImutiRow) // { // ImultiTD = multi.FindElements(By.TagName("td")); // if (ImultiTD.Count != 0 && !multi.Text.Contains("Address")) // { // string strmultiDetails = ImultiTD[0].Text + "~" + ImultiTD[2].Text + "~" + ImultiTD[3].Text; // gc.insert_date(orderNumber, ImultiTD[1].Text, 579, strmultiDetails, 1, DateTime.Now); // } // } // HttpContext.Current.Session["multiParcel_Johnson"] = "Yes"; // driver.Quit(); // return "Multiparcel"; //} //catch { } } if (searchType == "parcel") { driver.FindElement(By.Id("tbSearchID")).Clear(); driver.FindElement(By.Id("tbSearchID")).SendKeys(parcelNumber.Replace(".", "").Replace("-", "").Trim()); Thread.Sleep(3000); try { IWebElement IParcel = driver.FindElement(By.XPath("/html/body/ul")); IList <IWebElement> IParcelRow = IParcel.FindElements(By.TagName("li")); IList <IWebElement> IParcelTD; foreach (IWebElement parcel in IParcelRow) { IParcelTD = parcel.FindElements(By.TagName("a")); if (parcel.Text != "" && IParcelRow.Count < 2 && parcel.Text.Contains(parcelNumber.Replace(".", "").Replace("-", "").Trim())) { IParcelTD[0].Click(); } } } catch { } gc.CreatePdf(orderNumber, parcelNumber, "Parcel Search", driver, "KS", "Johnson"); driver.FindElement(By.Id("btnName")).SendKeys(Keys.Enter); } else if (searchType == "ownername") { driver.FindElement(By.Id("tbSearchID")).Clear(); driver.FindElement(By.Id("tbSearchID")).SendKeys(ownername.Trim()); Thread.Sleep(3000); try { IWebElement IOwner = driver.FindElement(By.XPath("/html/body/ul")); IList <IWebElement> IOwnerRow = IOwner.FindElements(By.TagName("li")); IList <IWebElement> IOwnerTD; foreach (IWebElement OwnerName in IOwnerRow) { IOwnerTD = OwnerName.FindElements(By.TagName("a")); if (OwnerName.Text != "" && IOwnerRow.Count < 2 && OwnerName.Text.Contains(ownername.ToUpper().Trim())) { IOwnerTD[0].Click(); } } } catch { } gc.CreatePdf(orderNumber, parcelNumber, "Owner Search", driver, "KS", "Johnson"); driver.FindElement(By.Id("btnName")).SendKeys(Keys.Enter); } if (searchType == "kup") { driver.FindElement(By.Id("tbSearchID")).Clear(); driver.FindElement(By.Id("tbSearchID")).SendKeys(account.Replace(".", "").Replace("-", "").Trim()); Thread.Sleep(3000); try { IWebElement IAccount = driver.FindElement(By.XPath("/html/body/ul")); IList <IWebElement> IAccountRow = IAccount.FindElements(By.TagName("li")); IList <IWebElement> IAccountTd; foreach (IWebElement Accno in IAccountRow) { IAccountTd = Accno.FindElements(By.TagName("a")); if (Accno.Text != "" && IAccountRow.Count < 2 && Accno.Text.Contains(account.Replace(".", "").Replace("-", "").Trim())) { IAccountTd[0].Click(); } } } catch { } gc.CreatePdf(orderNumber, parcelNumber, "Account No Search", driver, "KS", "Johnson"); driver.FindElement(By.Id("btnName")).SendKeys(Keys.Enter); } string nodata = driver.FindElement(By.Id("spanTaxPropertyID")).Text; if (nodata.Trim() == "") { HttpContext.Current.Session["Nodata_JohnsonKS"] = "Yes"; driver.Quit(); return("No Data Found"); } //Property Details string Address = "", ParcelId = "", KUP = "", QuickRef = "", Description = "", YearBuilt = ""; string Splitaddress1 = driver.FindElement(By.Id("spanSitAddline1")).Text; string Splitaddress2 = driver.FindElement(By.Id("spanMailCityLine")).Text; Address = Splitaddress1 + " " + Splitaddress2; ParcelId = driver.FindElement(By.Id("spanTaxPropertyID")).Text.Trim().Replace(" ", ""); KUP = driver.FindElement(By.Id("spanKUPN")).Text; QuickRef = driver.FindElement(By.Id("spanQuickRefID")).Text; Description = driver.FindElement(By.Id("spanLegalDesc")).Text; YearBuilt = driver.FindElement(By.Id("spanYearbuilt2")).Text; string Block = driver.FindElement(By.Id("spanGeoBlock")).Text; string Lot = driver.FindElement(By.Id("spanGeoLot")).Text; string blocklot = Block + "/" + Lot; string Subdivision = driver.FindElement(By.Id("spanSbdvName")).Text; gc.CreatePdf(orderNumber, ParcelId, "Property Details", driver, "KS", "Johnson"); string Ownerid = driver.FindElement(By.Id("tblOwnerInfo")).Text; string[] ownername11 = Ownerid.Split('\n'); string Ownersplit1 = ownername11[0].Replace("Owner 1: ", ""); string MailAddress = ownername11[1]; string Ownersplit2 = ""; try { Ownersplit2 = ownername11[3].Replace("Owner 2:", ""); } catch { } string Owner = Ownersplit1 + " " + Ownersplit2; string zoning = driver.FindElement(By.Id("spanZoningDescription")).Text; string propertytype = driver.FindElement(By.Id("spanPrPlTypDsc")).Text; string Taxunit = driver.FindElement(By.Id("spanTaxUnit")).Text; string PropertyDetails = Address + "~" + KUP + "~" + QuickRef + "~" + blocklot + "~" + Subdivision + "~" + MailAddress + "~" + Owner + "~" + zoning + "~" + propertytype + "~" + Taxunit + "~" + Description + "~" + YearBuilt; gc.insert_date(orderNumber, ParcelId, 590, PropertyDetails, 1, DateTime.Now); ByVisibleElement(driver.FindElement(By.XPath("//*[@id='divOwnerInfo']/div/div[1]/table/tbody/tr/td"))); Thread.Sleep(2000); gc.CreatePdf(orderNumber, ParcelId, "Property Details1", driver, "KS", "Johnson"); //Assessment Details string AssesseedDetails = "", strAssessType = ""; // strAssessType = driver.FindElement(By.XPath("//*[@id='Form1']/div/div[8]/div")).Text; ByVisibleElement(driver.FindElement(By.XPath("//*[@id='aprdetailsquarebox']/div[1]/table/tbody/tr/td"))); Thread.Sleep(2000); gc.CreatePdf(orderNumber, ParcelId, "Appraisal Information", driver, "KS", "Johnson"); IWebElement IAssessTable = driver.FindElement(By.XPath("//*[@id='divAPRDetail']/table[1]/tbody")); IList <IWebElement> IAssessRow = IAssessTable.FindElements(By.TagName("tr")); IList <IWebElement> IAssessTD; foreach (IWebElement assess in IAssessRow) { IAssessTD = assess.FindElements(By.TagName("td")); if (IAssessTD.Count != 0) { AssesseedDetails = IAssessTD[0].Text + "~" + IAssessTD[1].Text + "~" + IAssessTD[2].Text; gc.insert_date(orderNumber, ParcelId, 591, AssesseedDetails, 1, DateTime.Now); } } ByVisibleElement(driver.FindElement(By.Id("spanaprcomponents"))); Thread.Sleep(2000); gc.CreatePdf(orderNumber, ParcelId, "Sub Division", driver, "KS", "Johnson"); ByVisibleElement(driver.FindElement(By.XPath("//*[@id='tblInfo']/div[1]/div/div[8]/div[1]/table/tbody"))); Thread.Sleep(2000); gc.CreatePdf(orderNumber, ParcelId, "utility", driver, "KS", "Johnson"); ByVisibleElement(driver.FindElement(By.XPath("//*[@id='tblInfo']/div[1]/div/div[10]/div[1]/table/tbody"))); Thread.Sleep(2000); gc.CreatePdf(orderNumber, ParcelId, "Census", driver, "KS", "Johnson"); AssessmentTime = DateTime.Now.ToString("HH:mm:ss"); //ViwePRC //try //{ // IWebElement IViewPRC = driver.FindElement(By.LinkText("View PRC")); // string strViewLink = IViewPRC.GetAttribute("href"); // gc.downloadfile(strViewLink, orderNumber, ParcelId, "Bill_PDF", "KS", "Johnson"); //} //catch { } //Tax Information driver.Navigate().GoToUrl("https://taxbill.jocogov.org/"); string AssessValue = "", PropertyStatus = "", PropertyAddress = "", PropertyType = "", LegalDescription = "", TaxingUnit = "", Neighborhood = "", RETaxID = "", MapNO = "", TaxAuthority = "", strYear = "", TaxYear = "", strCurrentType = "", TaxInstallType = ""; driver.FindElement(By.Id("SearchText")).SendKeys(ParcelId.Replace(" ", "")); //IWebElement ITaxBill = driver.FindElement(By.LinkText("Tax Bill")); //string strTaxBill = ITaxBill.GetAttribute("href"); //driver.Navigate().GoToUrl(strTaxBill); gc.CreatePdf(orderNumber, ParcelId, "Tax Search Result1", driver, "KS", "Johnson"); driver.FindElement(By.Id("dnn_PropertySearch_SearchButtonDiv")).Click(); Thread.Sleep(3000); //js.ExecuteScript("arguments[0].click();", IDetails); gc.CreatePdf(orderNumber, ParcelId, "Tax Search Result", driver, "KS", "Johnson"); driver.FindElement(By.XPath("//*[@id='grid']/div[2]/table/tbody/tr/td[2]")).Click(); Thread.Sleep(2000); //dnn_ctr377_View_divPaymentHistoryInfo //tdDetailsTab IWebElement IDetails = driver.FindElement(By.Id("tdDetailsTab")); IDetails.Click(); // dnn_ctr377_View_tdOITitle strYear = driver.FindElement(By.Id("dnn_ctr377_View_tdOITitle")).Text; ByVisibleElement(driver.FindElement(By.Id("dnn_ctr377_View_tdOITitle"))); Thread.Sleep(2000); gc.CreatePdf(orderNumber, ParcelId, "Detail", driver, "KS", "Johnson"); TaxYear = GlobalClass.Before(strYear, " OWNER INFORMATION"); try { Owner = driver.FindElement(By.Id("dnn_ctr377_View_divOwnersLabel")).Text; } catch { } try { if (Owner == "") { IWebElement Iowner = driver.FindElement(By.Id("dnn_ctr377_View_ddOwners")); SelectElement Sowner = new SelectElement(Iowner); Owner = Sowner.SelectedOption.Text; } } catch { } ByVisibleElement(driver.FindElement(By.Id("dnn_ctr377_View_tdOITitle"))); Thread.Sleep(2000); gc.CreatePdf(orderNumber, ParcelId, "Detail1", driver, "KS", "Johnson"); PropertyAddress = driver.FindElement(By.Id("dnn_ctr377_View_tdPropertyAddress")).Text; AssessValue = driver.FindElement(By.Id("dnn_ctr377_View_tdTotalAssessedValue")).Text; PropertyStatus = driver.FindElement(By.Id("dnn_ctr377_View_tdGIPropertyStatus")).Text; PropertyType = driver.FindElement(By.Id("dnn_ctr377_View_tdGIPropertyType")).Text; LegalDescription = driver.FindElement(By.Id("dnn_ctr377_View_tdGILegalDescription")).Text; TaxingUnit = driver.FindElement(By.Id("dnn_ctr377_View_tdTUG")).Text; Neighborhood = driver.FindElement(By.Id("dnn_ctr377_View_tdGINeighborhood")).Text; RETaxID = driver.FindElement(By.Id("dnn_ctr377_View_tdRETaxID")).Text; MapNO = driver.FindElement(By.Id("dnn_ctr377_View_tdGIMapNumber")).Text; // Current Appraised Value //strCurrentType = driver.FindElement(By.Id("dnn_ctr377_View_tdCAVTitle")).Text; //IWebElement ICurrentAppraise = driver.FindElement(By.Id("dnn_ctr377_View_tblCurrentAppraisedValueData")); //IList<IWebElement> ICurrentAppraiseRow = ICurrentAppraise.FindElements(By.TagName("tr")); //IList<IWebElement> ICurrentAppraisedTd; //foreach (IWebElement current in ICurrentAppraiseRow) //{ // ICurrentAppraisedTd = current.FindElements(By.TagName("td")); // if (ICurrentAppraisedTd.Count != 0) // { // try // { // string currentAppraised = strCurrentType + "~" + ICurrentAppraisedTd[0].Text + "~" + ICurrentAppraisedTd[1].Text + "~" + ICurrentAppraisedTd[2].Text + "~" + ""; // gc.insert_date(orderNumber, RETaxID, 591, currentAppraised, 1, DateTime.Now); // } // catch { } // } //} //Value History IWebElement IValueHistory = driver.FindElement(By.Id("dnn_ctr377_View_tblValueHistoryDataRP")); IList <IWebElement> IValueHistoryRow = IValueHistory.FindElements(By.TagName("tr")); IList <IWebElement> IValueHistoryTd; foreach (IWebElement value in IValueHistoryRow) { IValueHistoryTd = value.FindElements(By.TagName("td")); if (IValueHistoryTd.Count != 0) { try { string valueHistory = IValueHistoryTd[0].Text + "~" + IValueHistoryTd[1].Text + "~" + IValueHistoryTd[2].Text + "~" + IValueHistoryTd[3].Text + "~" + IValueHistoryTd[4].Text + "~" + IValueHistoryTd[5].Text + "~" + IValueHistoryTd[6].Text; gc.insert_date(orderNumber, RETaxID, 593, valueHistory, 1, DateTime.Now); } catch { } } } //Tax Bills IWebElement IBills = driver.FindElement(By.Id("tdBillsTab")); IBills.Click(); //js.ExecuteScript("arguments[0].click();", IBills); //gc.CreatePdf(orderNumber, ParcelId, "Tax Bill Result", driver, "KS", "Johnson"); ByVisibleElement(driver.FindElement(By.XPath("//*[@id='dnn_ctr377_View_divBillDetails']/div[1]/table[1]/tbody"))); Thread.Sleep(2000); gc.CreatePdf(orderNumber, ParcelId, "Bills", driver, "KS", "Johnson"); IWebElement ITaxInstallment = driver.FindElement(By.XPath("//*[@id='dnn_ctr377_View_divBillDetails']/div[1]/table[2]")); IList <IWebElement> ITaxInstallmentRow = ITaxInstallment.FindElements(By.TagName("tr")); IList <IWebElement> ITaxInstallmentTd; foreach (IWebElement install in ITaxInstallmentRow) { ITaxInstallmentTd = install.FindElements(By.TagName("td")); if (ITaxInstallmentTd.Count != 0 && !install.Text.Contains("Installment")) { string TaxInstallment = TaxInstallType + "~" + ITaxInstallmentTd[0].Text + "~" + ITaxInstallmentTd[1].Text + "~" + ITaxInstallmentTd[2].Text + "~" + ITaxInstallmentTd[3].Text + "~" + ITaxInstallmentTd[4].Text; gc.insert_date(orderNumber, RETaxID, 594, TaxInstallment, 1, DateTime.Now); TaxInstallType = ""; } if (ITaxInstallmentTd.Count != 0 && install.Text.Contains("Installment") && ITaxInstallmentTd.Count < 5) { TaxInstallType = ITaxInstallmentTd[0].Text; } } ByVisibleElement(driver.FindElement(By.XPath("//*[@id='dnn_ctr377_View_divBillDetails']/div[1]/table[2]/tbody/tr[15]"))); Thread.Sleep(2000); gc.CreatePdf(orderNumber, ParcelId, "Bills1", driver, "KS", "Johnson"); //Tax Due string strTaxDueBill = "", strEffectiveDate = "", TaxDue = "", NextTaxDue = ""; try { strEffectiveDate = DateTime.Now.Date.ToShortDateString(); IWebElement Ibillstatus = driver.FindElement(By.Id("btnPayMyBills")); strTaxDueBill = Ibillstatus.GetAttribute("value"); } catch { } ByVisibleElement(driver.FindElement(By.XPath("//*[@id='dnn_ctr377_View_divBillDetails']/div[3]/table[1]/tbody"))); Thread.Sleep(2000); gc.CreatePdf(orderNumber, ParcelId, "Bills2", driver, "KS", "Johnson"); IWebElement ITaxDueTable = driver.FindElement(By.XPath("//*[@id='dnn_ctr377_View_divPaymentModal']/table/tbody/tr[2]/td/table/tbody")); IList <IWebElement> ITaxDueRow = ITaxDueTable.FindElements(By.TagName("tr")); IList <IWebElement> ITaxTD; foreach (IWebElement due in ITaxDueRow) { ITaxTD = due.FindElements(By.TagName("td")); if (ITaxTD.Count != 0 && !due.Text.Contains("No Bills Due") && ITaxTD.Count > 1) { TaxDue += ITaxTD[1].Text + "~"; } } gc.insert_date(orderNumber, RETaxID, 595, strEffectiveDate + "~" + TaxDue.Remove(TaxDue.Length - 1, 1), 1, DateTime.Now); if (strTaxDueBill.Trim() == "Pay My Bills") { string currDate = DateTime.Now.ToString("MM/dd/yyyy"); string dateChecking = DateTime.Now.ToString("MM") + "/15/" + DateTime.Now.ToString("yyyy"); if (Convert.ToDateTime(currDate) > Convert.ToDateTime(dateChecking)) { string nextEndOfMonth = ""; if ((Convert.ToInt16(Convert.ToInt16(DateTime.Now.ToString("MM"))) < 12)) { nextEndOfMonth = new DateTime(Convert.ToInt16(DateTime.Now.ToString("yyyy")), Convert.ToInt16(Convert.ToInt16(DateTime.Now.ToString("MM")) + 1), DateTime.DaysInMonth(Convert.ToInt16(DateTime.Now.ToString("yyyy")), Convert.ToInt16(DateTime.Now.ToString("MM")) + 1)).ToString("MM/dd/yyyy"); driver.FindElement(By.Id("effectiveDatePicker")).SendKeys(nextEndOfMonth); } else { int nxtYr = Convert.ToInt16(DateTime.Now.ToString("yyyy")) + 1; nextEndOfMonth = nextEndOfMonth = new DateTime(nxtYr, 1, DateTime.DaysInMonth(Convert.ToInt16(DateTime.Now.ToString("yyyy")), 1)).ToString("MM/dd/yyyy"); driver.FindElement(By.Id("effectiveDatePicker")).SendKeys(nextEndOfMonth); } strEffectiveDate = nextEndOfMonth; } else { string EndOfMonth = new DateTime(Convert.ToInt16(DateTime.Now.ToString("yyyy")), Convert.ToInt16(Convert.ToInt16(DateTime.Now.ToString("MM"))), DateTime.DaysInMonth(Convert.ToInt16(DateTime.Now.ToString("yyyy")), Convert.ToInt16(DateTime.Now.ToString("MM")))).ToString("MM/dd/yyyy"); strEffectiveDate = EndOfMonth; } driver.FindElement(By.Id("effectiveDatePicker")).Clear(); driver.FindElement(By.Id("effectiveDatePicker")).SendKeys(strEffectiveDate); driver.FindElement(By.Id("effectiveDatePicker")).SendKeys(Keys.Enter); Thread.Sleep(2000); IWebElement ITaxDueNext = driver.FindElement(By.XPath("//*[@id='dnn_ctr377_View_divPaymentModal']/table/tbody/tr[2]/td/table/tbody")); IList <IWebElement> ITaxDueNextRow = ITaxDueNext.FindElements(By.TagName("tr")); IList <IWebElement> ITaxNextTD; foreach (IWebElement next in ITaxDueNextRow) { ITaxNextTD = next.FindElements(By.TagName("td")); if (ITaxNextTD.Count != 0 && !next.Text.Contains("*Total Due shown may not reflect current amount due.")) { try { NextTaxDue += ITaxNextTD[1].Text + "~"; } catch { } } } gc.insert_date(orderNumber, RETaxID, 595, strEffectiveDate + "~" + NextTaxDue.Remove(NextTaxDue.Length - 1, 1), 1, DateTime.Now); gc.CreatePdf(orderNumber, ParcelId, "Tax Due Result" + strEffectiveDate.Replace("/", ""), driver, "KS", "Johnson"); } //Payment History List <string> URL = new List <string>(); IWebElement IPaymentClick = driver.FindElement(By.XPath("//*[@id='dnn_ctr377_View_divPaymentHistoryExpandCollapse']/i")); IPaymentClick.Click(); Thread.Sleep(3000); gc.CreatePdf(orderNumber, ParcelId, "Payment History Reciept", driver, "KS", "Johnson"); int Pyear = 0, PaymentBill = 0; IWebElement IlistPaymenttable = driver.FindElement(By.Id("dnn_ctr377_View_divPaymentHistoryInfo")); IList <IWebElement> IlistPayment = driver.FindElements(By.TagName("li")); foreach (IWebElement reciept in IlistPayment) { if (reciept.Text != "" && reciept.Text.Contains("Transaction Date")) { PaymentBill++; } } for (int i = 1; i <= PaymentBill; i++) { //if (Pyear < 3) //{ try { string PaymentYear = driver.FindElement(By.XPath("//*[@id='dnn_ctr377_View_divPaymentHistoryInfo']/ul/li[" + i + "]/table/tbody/tr/td[2]")).Text; IWebElement IPaymentHistoryTable = driver.FindElement(By.XPath("//*[@id='dnn_ctr377_View_divPaymentHistoryInfo']/ul/li[" + i + "]/div/table/tbody")); IList <IWebElement> IPaymentHistoryRow = IPaymentHistoryTable.FindElements(By.TagName("tr")); IList <IWebElement> IPaymentHistortTd; foreach (IWebElement Payment in IPaymentHistoryRow) { IPaymentHistortTd = Payment.FindElements(By.TagName("td")); if (IPaymentHistortTd.Count != 0) { string PaymentHistory = PaymentYear + "~" + IPaymentHistortTd[0].Text + "~" + IPaymentHistortTd[1].Text + "~" + IPaymentHistortTd[2].Text.Trim().Replace("View", ""); gc.insert_date(orderNumber, RETaxID, 596, PaymentHistory, 1, DateTime.Now); } } // Pyear++; } catch { } //} } //TaxStatement try { IWebElement ITaxStatement = driver.FindElement(By.XPath("//*[@id='dnn_ctr377_View_divBillDetails']/div[1]/table[1]/tbody")); IList <IWebElement> ITaxStatementRow = ITaxStatement.FindElements(By.TagName("tr")); IList <IWebElement> ITaxSyayementTD; foreach (IWebElement statement in ITaxStatementRow) { ITaxSyayementTD = statement.FindElements(By.TagName("td")); if (ITaxSyayementTD.Count != 0) { IWebElement Istatement = ITaxSyayementTD[2].FindElement(By.TagName("input")); string strStatement = Istatement.GetAttribute("value"); if (strStatement.Contains("Tax Statement")) { Istatement.Click(); Thread.Sleep(5000); gc.downloadfile(driver.Url, orderNumber, ParcelId, " Tax Statement ", "KS", "Johnson"); } } } } catch { } //Payment Bill Download Through Chrome string strPaymentYear = "", PreviousYear = ""; List <string> StrBill = new List <string>(); var chromeOptions = new ChromeOptions(); using (var chDriver = new ChromeDriver(chromeOptions)) { try { chDriver.Navigate().GoToUrl("https://land.jocogov.org/default.aspx"); chDriver.FindElement(By.Id("btnYes")).Click(); Thread.Sleep(6000); chDriver.FindElement(By.Id("tbSearchID")).Clear(); Thread.Sleep(3000); chDriver.FindElement(By.Id("tbSearchID")).SendKeys(ParcelId.Replace(".", "").Replace("-", "").Trim()); Thread.Sleep(6000); try { IWebElement IParcel = chDriver.FindElement(By.XPath("/html/body/ul")); IList <IWebElement> IParcelRow = IParcel.FindElements(By.TagName("li")); IList <IWebElement> IParcelTD; foreach (IWebElement parcel in IParcelRow) { IParcelTD = parcel.FindElements(By.TagName("a")); if (parcel.Text != "" && IParcelRow.Count < 2 && parcel.Text.Contains(ParcelId.Replace(".", "").Replace("-", "").Trim())) { IParcelTD[0].Click(); Thread.Sleep(3000); } } } catch { } chDriver.FindElement(By.Id("btnName")).SendKeys(Keys.Enter); Thread.Sleep(3000); IWebElement IBillDownload = chDriver.FindElement(By.Id("navTaxBill")); IBillDownload.Click(); chDriver.SwitchTo().Window(chDriver.WindowHandles.Last()); IWebElement IBill = chDriver.FindElement(By.Id("tdBillsTab")); IBill.Click(); IWebElement IPayClick = chDriver.FindElement(By.XPath("//*[@id='dnn_ctr377_View_divPaymentHistoryExpandCollapse']/i")); IPayClick.Click(); int bill = 0; for (int i = 1; i <= PaymentBill; i++) { try { try { IWebElement Ibill = chDriver.FindElement(By.XPath("//*[@id='dnn_ctr377_View_divPaymentHistoryInfo']/ul/li[" + i + "]/div")); js.ExecuteScript("arguments[0].scrollIntoView();", Ibill); gc.CreatePdf(orderNumber, ParcelId, "Tax Due Details" + bill, chDriver, "KS", "Johnson"); } catch { } if (bill < 3) { try { strPaymentYear = driver.FindElement(By.XPath("//*[@id='dnn_ctr377_View_divPaymentHistoryInfo']/ul/li[" + i + "]/table/tbody/tr/td[2]")).Text; if (strPaymentYear != PreviousYear) { PreviousYear = strPaymentYear; bill++; } } catch { } IWebElement IPayHistory = chDriver.FindElement(By.XPath("//*[@id='dnn_ctr377_View_divPaymentHistoryInfo']/ul/li[" + i + "]/div/table/tbody")); IList <IWebElement> IPayHistoryRow = IPayHistory.FindElements(By.TagName("tr")); IList <IWebElement> IPayHistoryTd; foreach (IWebElement pay in IPayHistoryRow) { IPayHistoryTd = pay.FindElements(By.TagName("td")); if (pay.Text.Contains("View")) { IWebElement Iviewlink = IPayHistoryTd[2].FindElement(By.TagName("a")); string view = gc.Between(Iviewlink.GetAttribute("onclick"), "return OpenReceiptPDF(", ")").Replace("'", ""); string[] taxbillno = view.Split(','); string BillURL = "https://taxbill.jocogov.org/proxy/APIProxy.ashx?/API/api/v1/documents/pdf/Receipt-" + taxbillno[0].Trim() + "-" + taxbillno[1].Trim() + ".pdf/"; string strCurrent = chDriver.CurrentWindowHandle; var windowHandles = chDriver.WindowHandles; chDriver.ExecuteScript(string.Format("window.open('{0}', '_blank');", chDriver.Url)); var newWindowHandles = chDriver.WindowHandles; var openedWindowHandle = newWindowHandles.Except(windowHandles).Single(); chDriver.SwitchTo().Window(openedWindowHandle); IWebElement IPayClic = chDriver.FindElement(By.XPath("//*[@id='dnn_ctr377_View_divPaymentHistoryExpandCollapse']/i")); IPayClic.Click(); IWebElement IPayHis = chDriver.FindElement(By.XPath("//*[@id='dnn_ctr377_View_divPaymentHistoryInfo']/ul/li[" + i + "]/div/table/tbody")); IList <IWebElement> IPayHisRow = IPayHis.FindElements(By.TagName("tr")); IList <IWebElement> IPayHisTd; foreach (IWebElement payH in IPayHisRow) { try { IPayHisTd = payH.FindElements(By.TagName("td")); if (payH.Text.Contains("View")) { string billno = IPayHisTd[2].Text.Trim().Replace("View", ""); IWebElement IviewlinkCheck = IPayHisTd[2].FindElement(By.TagName("a")); string viewCheck = gc.Between(IviewlinkCheck.GetAttribute("onclick"), "return OpenReceiptPDF(", ")").Replace("'", ""); string[] taxbillnoCheck = viewCheck.Split(','); if (taxbillno[0] == taxbillnoCheck[0] && taxbillno[1] == taxbillnoCheck[1]) { IviewlinkCheck.Click(); Thread.Sleep(3000); try { gc.downloadfile(chDriver.Url, orderNumber, ParcelId, taxbillnoCheck[1] + billno + i, "KS", "Johnson"); } catch { } chDriver.Close(); break; } } } catch { } } chDriver.SwitchTo().Window(strCurrent); } } } } catch { } } chDriver.Quit(); } catch (Exception Ex) { } } try { driver.Navigate().GoToUrl("https://taxbill.jocogov.org/"); IWebElement ITaxAuthority = driver.FindElement(By.XPath("//*[@id='dnn_ctr443_HtmlModule_lblContent']/table/tbody/tr[4]/td/table/tbody/tr[2]/td[1]/table/tbody")); TaxAuthority = gc.Between(ITaxAuthority.Text, "Johnson County Treasurer", "Fax:"); gc.CreatePdf(orderNumber, ParcelId, "Tax Authority", driver, "KS", "Johnson"); } catch { } string TaxAssessmentDetails = PropertyAddress + "~" + TaxYear + "~" + AssessValue + "~" + PropertyStatus + "~" + PropertyType + "~" + LegalDescription + "~" + TaxingUnit + "~" + Neighborhood + "~" + RETaxID + "~" + MapNO + "~" + TaxAuthority; gc.insert_date(orderNumber, RETaxID, 592, TaxAssessmentDetails, 1, DateTime.Now); TaxTime = DateTime.Now.ToString("HH:mm:ss"); LastEndTime = DateTime.Now.ToString("HH:mm:ss"); gc.insert_TakenTime(orderNumber, "KS", "Johnson", StartTime, AssessmentTime, TaxTime, CitytaxTime, LastEndTime); driver.Quit(); gc.mergpdf(orderNumber, "KS", "Johnson"); return("Data Inserted Successfully"); } catch (Exception ex) { driver.Quit(); throw ex; } } }