Breaking Changes. Upgrade Script in Sql directory. Deployed

This commit is contained in:
unknown
2011-02-18 22:24:48 +05:30
parent d4cfa92848
commit 9ed5843dbd
86 changed files with 2616 additions and 2358 deletions

View File

@ -1,24 +1,19 @@
using System;
using System.Threading;
using System.Windows.Forms;
using Tanshu.Accounts.Entities.Auth;
using Tanshu.Accounts.Repository;
using Tanshu.Accounts.Helpers;
using Tanshu.Common.KeyboardControl;
namespace Tanshu.Accounts.PointOfSale
{
public partial class LoginForm : Form
{
//size: 296, 123
//private static readonly Tanshu.Logging.SqlLogger log = new Tanshu.Logging.SqlLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private bool isAuthenticated;
private string userName;
private User user;
private IKeyboardControl keyboardControl;
public LoginForm(IKeyboardControl keyboardControl)
{
InitializeComponent();
isAuthenticated = false;
userName = null;
user = null;
this.keyboardControl = keyboardControl;
var control = keyboardControl as UserControl;
@ -47,22 +42,17 @@ namespace Tanshu.Accounts.PointOfSale
private void btnLogin_Click(object sender, EventArgs e)
{
userName = txtUserName.Text.Trim();
isAuthenticated = UserBI.ValidateUser(userName, Tanshu.Common.Md5.Hash(txtPassword.Text, "v2"));
if (isAuthenticated)
{
user = UserBI.ValidateUser(txtUserName.Text.Trim(), Tanshu.Common.Md5.Hash(txtPassword.Text, "v2"));
if (user != null)
this.Close();
}
else
MessageBox.Show("Username or password is not valid");
}
public bool UserName(out string userName)
{
userName = this.userName;
return isAuthenticated;
userName = this.user == null ? "" : this.user.Name;
return this.user != null;
}
private void btnExit_Click(object sender, EventArgs e)