Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit PIM.Persistence.Commands;
- interface
- uses PIManager.Ado.Commands, DMain, PIManager.Entities, AdoDB;
- Type
- TPIMLogin = class( TADOLoginCommand<TADOStoredProc> )
- strict protected
- function GetChannel: TADOStoredProc;override;
- function Login: boolean;override;
- end;
- implementation
- { TPIMLogin }
- function TPIMLogin.GetChannel: TADOStoredProc;
- begin
- Result := DMMain.proc_login_user;
- end;
- function TPIMLogin.Login: boolean;
- begin
- Channel.Parameters.ParamByName( '@UserName' ).Value := UserName;
- Channel.Parameters.ParamByName( '@UserPwd' ).Value := Password;
- Channel.ExecProc;
- Result := Channel.Parameters.ParamByName( '@Result' ).Value = 1;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement