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

@ -0,0 +1,55 @@
using System;
using System.Windows.Forms;
using Tanshu.Accounts.Entities.Auth;
using Tanshu.Accounts.Repository;
namespace Tanshu.Accounts.PointOfSale
{
public partial class MsrLoginForm : Form
{
private string loginString;
private User user;
private bool register;
public MsrLoginForm(bool register)
{
InitializeComponent();
user = null;
loginString = string.Empty;
this.register = register;
this.btnLogin.Enabled = false;
}
private void btnLogin_Click(object sender, EventArgs e)
{
if (!register)
{
var user = UserBI.MsrValidateUser(loginString);
if (user != null)
{
this.user = user;
this.Close();
}
else
MessageBox.Show("Unrecognised Card");
}
else
{
this.user = new User() { Name = loginString };
this.Close();
}
}
public bool UserName(out string userName)
{
userName = this.user == null ? "" : this.user.Name;
return this.user != null;
}
private void MsrLoginForm_KeyPress(object sender, KeyPressEventArgs e)
{
btnLogin.Enabled = true;
this.loginString += e.KeyChar.ToString();
}
}
}