public void TestMethod1() { var company = new Company(); var item = new Item(); }
public async Task<ActionResult> Edit(Company companyInfo) { try { if (!ModelState.IsValid) return View(companyInfo); await new CompanyHelper().SaveCompany(companyInfo); return RedirectToAction("Index"); } catch { return View(); } }
public async Task<object> SaveCompany(Company company) { var companyParseObject = new ParseObject("Company"); if (!string.IsNullOrEmpty(company.Id)) companyParseObject.ObjectId = company.Id; companyParseObject["Name"] = company.Name; companyParseObject["Description"] = company.Description; companyParseObject["AddressLine1"] = company.AddressLine1; companyParseObject["AddressLine2"] = company.AddressLine2; companyParseObject["City"] = company.City; companyParseObject["State"] = company.State; companyParseObject["Country"] = company.Country; await companyParseObject.SaveAsync(); return companyParseObject; }