using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Tanshu.Accounts.Entities; using Tanshu.Accounts.Repository; namespace Tanshu.Accounts.PointOfSale { public partial class ProductGroupListForm : Form { public ProductGroupListForm() { InitializeComponent(); } private void btnAdd_Click(object sender, EventArgs e) { using (var frm = new ProductGroupForm(null)) frm.ShowDialog(); using (var bi = new ProductGroupBI()) bsList.DataSource = bi.List(); } private void ProductGroupListForm_Load(object sender, EventArgs e) { using (var bi = new ProductGroupBI()) bsList.DataSource = bi.List(); } private void btnEdit_Click(object sender, EventArgs e) { var id = ((ProductGroup)bsList.Current).ProductGroupID; using (var frm = new ProductGroupForm(id)) frm.ShowDialog(); using (var bi = new ProductGroupBI()) bsList.DataSource = bi.List(); } private void btnExit_Click(object sender, EventArgs e) { this.Close(); } } }