private void ContactForm_Load(object sender, EventArgs e) { ContactBindingList contactList = new ContactBindingList(); using (Ambient.DbSession.Activate()) { contactList.Add(OrderingRepositories.Contact.GetAll()); } mHelper.AddAllColumns(); mHelper.DataSource = contactList; }
private void VendorForm_Load(object sender, EventArgs e) { VendorBindingList vendorList = new VendorBindingList(); ContactBindingList contactList = new ContactBindingList(); contactList.AddNew(); using (Ambient.DbSession.Activate()) { vendorList.Add(OrderingRepositories.Vendor.GetAll()); contactList.Add(OrderingRepositories.Contact.GetAll()); } mHelper.AddAllColumns(contactList); mHelper.DataSource = vendorList; }