Initial Json commit from 2 years ago

This commit is contained in:
Amritanshu
2018-08-24 16:11:33 +05:30
parent 9301d8d07e
commit d3be8d8481
146 changed files with 3709 additions and 7402 deletions

View File

@ -1,7 +1,8 @@
using System;
using System.Drawing;
using System.Security.Authentication;
using System.Windows.Forms;
using Tanshu.Accounts.Entities.Auth;
using Tanshu.Accounts.Entities;
using Tanshu.Accounts.Repository;
using Tanshu.Common.KeyboardControl;
@ -40,12 +41,15 @@ namespace Tanshu.Accounts.PointOfSale
private void btnLogin_Click(object sender, EventArgs e)
{
using (var bi = new UserBI())
_user = bi.ValidateUser(txtUserName.Text.Trim(), txtPassword.Text);
if (_user != null)
try
{
_user = UserBI.ValidateUser(txtUserName.Text.Trim(), txtPassword.Text);
this.Close();
else
MessageBox.Show("Username or password is not valid");
}
catch (AuthenticationException ex)
{
MessageBox.Show("Username or password is not valid\n" + ex.Message);
}
}
public User User()

View File

@ -1,6 +1,6 @@
using System;
using System.Windows.Forms;
using Tanshu.Accounts.Entities.Auth;
using Tanshu.Accounts.Entities;
using Tanshu.Accounts.Repository;
namespace Tanshu.Accounts.PointOfSale
@ -23,17 +23,14 @@ namespace Tanshu.Accounts.PointOfSale
{
if (!register)
{
using (var bi = new UserBI())
var user = UserBI.MsrValidateUser(_loginString);
if (user != null)
{
var user = bi.MsrValidateUser(_loginString);
if (user != null)
{
this._user = user;
this.Close();
}
else
MessageBox.Show("Unrecognised Card");
this._user = user;
this.Close();
}
else
MessageBox.Show("Unrecognised Card");
}
else
{