Quantcast
Viewing all articles
Browse latest Browse all 12583

How to new row in Database use EF & BindingSource

I'm writing a Windows application (.NET 4), SQL Server 2008 and EDF 4.0:

Table "Currencies" in SQL Server is:

ID smallint (auto increment) PK
Name nvarchar(100) NOT NULL
Code nvarchar(10) NOT NULL
Rate float NOT NULL
IsAfter smallint NOT NULL (Default Value = 0)

Window Form Currency.cs:

Name: TextBox with property DataBinding.Text = bindingCurrency - Name
Code: TextBox with property DataBinding.Text = bindingCurrency - Code
Rate: TextBox with property DataBinding.Text = bindingCurrency - Rate
Show before/after money: ComboBox with property DataBinding.Text = bindingCurrency - IsAfter
    ComboBox follow:
        0 | Before money
        1 | After money

bindingCurrency: BindingSource with property DataSource is entity of EF

Now I want to add currency but it's error. Can you help me???


Viewing all articles
Browse latest Browse all 12583

Trending Articles