The type or namespace name 'tblapplicationTypes' could not be found (are you missing a using directive or an assembly reference?)
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;
namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
dbDataContextDataContext dbDataContext = new dbDataContextDataContext();
private BindingSource source = null;
private dbDataContextDataContext context = null;
public Form1()
{
InitializeComponent();
if (context == null)
context = new dbDataContextDataContext();
if (source == null)
source = new BindingSource();
}
private void OnLoad(object sender, EventArgs e)
{
source.DataSource = context.GetTable(typeof(tblapplicationTypes));
checkedListBox1.DataSource = source;
checkedListBox1.DisplayMember = "ApplicationType";
checkedListBox1.ValueMember = "ID";
}
private void OnItemCheck(object sender, ItemCheckEventArgs e)
{
MessageBox.Show(string.Format("You have {0} {1}", e.NewValue == CheckState.Checked ? "checked" : "unchecked", (checkedListBox1.Items[e.Index] as tblApplicationType).ApplicationType));
}
}
}
please help.
I'm newbie to c# . I'll watch some videos on that, but acn any one help with the code step by step. please
thanks Bob Learned .