private void SetCompanies() { int[] companies = GetCompanies(); Company ins; for(int i=0; i<companies.Length; i++) { ins = new Company(companies[i], this.PostUrl); this.WetuSystem.Add(ins); } }
public void AddCompany() { string Name = GenerateRandomString(8); var values = new NameValueCollection(); values["CompanyName"] = Name; int result = post.GetDataInstance<int>(this.PostUrl + URLs.AddCompany, values); if(result != 0) { Company ins = new Company(result, this.PostUrl); this.WetuSystem.Add(ins); Console.WriteLine("Company Added: " + result.ToString()); } else { Console.WriteLine("Failed to insert Company"); } }