public void UpdateCell(Branch aBranch, BranchListVC vc) { this._branchListVC = vc; this._aBranch = aBranch; this.titleLabel.Text = aBranch.BranchName; string phone = "Tel: " + aBranch.PhoneNumber; if (string.IsNullOrEmpty(aBranch.PhoneNumber)) { phone = "Tel: " + "N/A"; } string email = "Email: " + aBranch.BranchEmail; if (string.IsNullOrEmpty(aBranch.BranchEmail)) { email = "Email: " + "N/A"; } this.phoneButton.SetTitle(phone, UIControlState.Normal); this.emailButton.SetTitle(email, UIControlState.Normal); this.addressLabel.Text = aBranch.Address + ", " + aBranch.ZipCode + ", " + aBranch.City + " " + aBranch.CountryName; this.emailButton.TouchUpInside += (object sender, System.EventArgs e) => { if (!string.IsNullOrEmpty(aBranch.BranchEmail)) { this._branchListVC.sendMail(this._aBranch.BranchEmail); } }; }
public BranchLocatorTableSource(List <Branch> aBranchList, BranchListVC aBranchListVC) { branchList = aBranchList; _aBranchListVC = aBranchListVC; }