using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.Objects;
using System.Data.SqlClient;
namespace Coffeeshope
{
public partial class CostumerOrders : Form
{
private coffeeshopeEntities1 cs = new coffeeshopeEntities1();
private BindingList<tblproduct> products = new BindingList<tblproduct>();
private decimal tt;
public decimal Tt
{
get { return tt; }
set { tt = value;
txttotal.Text = string.Format("{0:c}", tt);
}
}
public CostumerOrders()
{
InitializeComponent();
lstProductsChosen.DataSource = products;
lstProductsChosen.DisplayMember = "Description";
createtabbedpanel();
}
private void createtabbedpanel()
{
foreach (TblProductType pt in cs.TblProductTypes)
{
tabControl1.TabPages.Add(pt.ProductType.ToString(), pt.Description);
}
}
private void addproducts1()
{
int i = 1;
foreach (TabPage tp in tabControl1.TabPages)
{
ObjectQuery<tblproduct> filterdProduct = new ObjectQuery<tblproduct>("SELECT VALUE P FROM TblProducts AS P",cs);
}
}