Advertisement
Guest User

Untitled

a guest
Mar 31st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.70 KB | None | 0 0
  1. unit PIM.Persistence.Commands;
  2.  
  3. interface
  4.  
  5. uses PIManager.Ado.Commands, DMain, PIManager.Entities, AdoDB;
  6.  
  7. Type
  8.  
  9.   TPIMLogin = class( TADOLoginCommand<TADOStoredProc> )
  10.   strict protected
  11.     function GetChannel: TADOStoredProc;override;
  12.     function Login: boolean;override;
  13.   end;
  14.  
  15. implementation
  16.  
  17. { TPIMLogin }
  18.  
  19. function TPIMLogin.GetChannel: TADOStoredProc;
  20. begin
  21.   Result := DMMain.proc_login_user;
  22. end;
  23.  
  24. function TPIMLogin.Login: boolean;
  25. begin
  26.   Channel.Parameters.ParamByName( '@UserName' ).Value := UserName;
  27.   Channel.Parameters.ParamByName( '@UserPwd' ).Value := Password;
  28.   Channel.ExecProc;
  29.   Result := Channel.Parameters.ParamByName( '@Result' ).Value = 1;
  30. end;
  31.  
  32. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement