private void CreateTableLine(Class_Information.Products product) { TableLine line = new TableLine(); line.Size = new Size(this.Size.Width, line.Size.Height); line.SetData(product); flpProductInfo.Controls.Add(line); }
private void RemoveZeroNumberProducts() { for (int i = 0; i < Billinfo.ProductInTable.Count; i++) { Class_Information.Products product = Billinfo.ProductInTable[i]; if (product.NumberProduct == 0) { Billinfo.ProductInTable.Remove(product); i--; } } }
public void SetData(Class_Information.Products product) { if (product != null) { this.product = product; lbNumber.DataBindings.Add("Text", product, "NumberProduct", true, DataSourceUpdateMode.OnValidation); onInfoChanged(this, new EventArgs()); } else { MessageBox.Show("Không thể truy cập dữ liệu món ăn", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } }