public void BindBranchToUpdate() { BranchModel model = client.EditBranchbyID(BranchID, ParlourId); if ((model == null) || (model.Parlourid != ParlourId)) { Response.Write("<script>alert('Sorry!you are not authorized to perform edit on this Branch.');</script>"); } else { BranchID = model.Brancheid; txtBranchName.Text = model.BranchName; txtPhone.Text = model.TelNumber; txtCellPhone.Text = model.CellNumber; txtline1.Text = model.Address1; txtline2.Text = model.Address2; txtline3.Text = model.Address3; txtline4.Text = model.Address4; txtpostalcode.Text = model.Code; txtBranchCode.Text = model.BranchCode; txtRegion.Text = model.Region; btnSubmite.Text = "Update"; } }