Pro_GetYz
CREATE PROCEDURE Pro_GetYz
@yhname varchar(30),
@yhpw varchar(36)
AS
declare @state varchar(4),
@info varchar(100),
@realpw varchar(36),
@yhqx varchar(360),
@softqx varchar(360),
@yhbm varchar(20),
@yhskin varchar(6),
@yhid varchar(7),
@recorduser int
Set @state='0011' --0014表示软件过期或者机器没注
set @info='EIP企业信息门户网站'
set @yhqx=''
set @softqx=''
set @recorduser=(select count(*) from YgInfo where (YgGh=@yhname and Del='0'))
if @recorduser=0
begin
Set @info='警告:用户名输入有误或不存在,请重新输入!!'
Set @state='0014'
end
else
begin
set @realpw=( select YgPw from YgInfo where (YgGh=@yhname and Del='0'))
if @yhPw<>@realpw
begin
Set @info='警告:对不起您输入的密码有误,请重试一次!!'
Set @state='0014'
end
else
begin
set nocount on
select @softqx=SoftQx,@yhqx=ModeQx,@yhbm=YgBm,@yhskin =Skin, @yhid =UserId from YgInfo where (YgGh=@yhname and Del='0')
set nocount off
end
end
select @state as state ,@info as info,@softqx as SoftQx,@yhqx as yhqx,@yhbm as ygbm,@yhskin as yhskin,@yhid as userid
GO