Click here to Skip to main content
15,883,623 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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);
}
}
Posted
Updated 4-Sep-15 4:05am
v3
Comments
Sinisa Hajnal 21-Aug-15 9:07am    
WHAT error? What have you tried to correct it? Which lines throws the error? Please use improve question, you are more likely to get an answer with good, understandable question. Thank you.
Member 11882360 4-Sep-15 10:06am    
i am getting error at that underlined place
Richard Deeming 4-Sep-15 13:16pm    
If you're not going to tell us WHAT error you're getting, then we can't help you.
Member 11882360 15-Sep-15 3:19am    
ObjectQuery<TblProduct> filteredProduct = new ObjectQuery<TblProduct>("SELECT VALUE P FROM TblProducts AS P WHERE PRODUCTTYPE=" + i , cs);

getting red underline a this place . not accepting the code
. it is not debbuging
Richard Deeming 15-Sep-15 7:41am    
Let's try this again:

For the third time, you have told us WHERE the error is. You have still not told us WHAT the error is.

Hover over the red underline and you will see an error message. Post that error message here.

If you don't tell us WHAT the error is, then we cannot help you.

1 solution

See https://msdn.microsoft.com/en-us/library/bb738995(v=vs.110).aspx[^]. If the error persists, then you really need to give us the full details.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900