Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. <script type="text/javascript">
  2. function LoginUser() {
  3. var RequestPath = 'http://'+apiurl+'/api/Values/LoginUser'
  4. var UserName = $('#TxtUName').val();
  5. var Password = $('#TxtPass').val();
  6. RequestPath += '/' + UserName + '/' + Password;
  7. $.get(RequestPath, function (data) {
  8. localStorage.setItem('UserId', data["UserId"]);
  9. localStorage.setItem('CompanyId', data["CompanyId"]);
  10. var loc = '/Users/Index.html';
  11. if (data["ModName"] != null && undefined != data["ModName"] && data["ModName"] != '') {
  12. loc = '/' + data["ModName"] + '/Index.html';
  13. }
  14. window.location = loc;
  15. });
  16.  
  17.  
  18. }
  19. $(function () {
  20.  
  21. });
  22. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement