Код: Выделить всё
ALTER proc [dbo].[check_user]
@u nvarchar(20),
@p nvarchar(20)
AS
BEGIN
declare @count int
declare @res bit
select @count = COUNT(*)
from Account
where username = @u and passwd = @p
if @count > 0
set @res = 1
else
set @res = 0
select @res
end
Код: Выделить всё
Demoentities dm = new Demoentities();
if(dm.checkuser(tb_user.Text,tb.pass.Text) == 1)
MessageBox.Show("Login successfully!");
Оператор '==' нельзя применить к операндам типа 'System.Data.Objects.ObjectResult' и 'int'
Помогите мне!>
Подробнее здесь: https://stackoverflow.com/questions/410 ... -framework