public async void DownloadSiteForNumberCVZ() { await Task.Run(() => { try { string path = $"http://gms.dengisrazy.ru/search.php?id={SelectedIP.Owner.NumberCVZ}"; System.Windows.Forms.MessageBox.Show(path); TableFromSite dict = new TableFromSite(new Url(path)); SelectedIP.Owner.FillCustomerFromDict(dict.CreateDictFromSite()); SelectedIP.Owner.PopulateInfo(); } catch (Exception ex) { Log(ex.Message, true, true, ex.StackTrace); } }); }
public Customer GetCVZFromSearchList(string selCustFromSearchList) { TableFromSite tfs = new TableFromSite(); DataTable curTable = tfs.GetTableFromSite(); Customer newCLB; for (int i = 0; i < curTable.Rows.Count; i++) { if (curTable.Rows[i][3].ToString().Contains(selCustFromSearchList) /*int.Parse(row.ItemArray[0].ToString())==int.Parse(searchCVZ)*/) { newCLB = new Customer(null); newCLB.NumberCVZ = int.Parse(curTable.Rows[i][0].ToString()); newCLB.City = curTable.Rows[i][1].ToString(); newCLB.Address = curTable.Rows[i][2].ToString(); newCLB.Lan_Ip = curTable.Rows[i][3].ToString(); newCLB.WanIP = curTable.Rows[i][4].ToString(); newCLB.JasperIP = curTable.Rows[i][5].ToString(); newCLB.IPSECPass = curTable.Rows[i][6].ToString(); return(newCLB); } } return(new Customer(null)); }