Multiple settlement options. Upgrade SQL Script included.

This commit is contained in:
unknown
2011-03-12 00:19:48 +05:30
parent 9ed5843dbd
commit aea41a9d24
42 changed files with 1917 additions and 1550 deletions

View File

@ -1,4 +1,5 @@
using System;
using System.Drawing;
using System.Windows.Forms;
using Tanshu.Accounts.Entities.Auth;
using Tanshu.Accounts.Repository;
@ -8,23 +9,20 @@ namespace Tanshu.Accounts.PointOfSale
{
public partial class LoginForm : Form
{
private User user;
private IKeyboardControl keyboardControl;
private User _user;
private IKeyboardControl _keyboardControl;
public LoginForm(IKeyboardControl keyboardControl)
{
InitializeComponent();
user = null;
this.keyboardControl = keyboardControl;
_user = null;
this._keyboardControl = keyboardControl;
var control = keyboardControl as UserControl;
if (control != null)
{
control.Location = new System.Drawing.Point(6, 87);
var border = (this.Width - this.ClientSize.Width) / 2;
var titlebarHeight = this.Height - this.ClientSize.Height - (2 * border);
this.Controls.Add(control);
this.Width = 6 + control.Width + 6 + (border * 2);
this.Height = titlebarHeight + 87 + control.Height + 6 + (border * 2);
this.Size = this.SizeFromClientSize(new Size(6 + control.Width + 6, 87 + control.Height + 6));
}
}
@ -42,8 +40,8 @@ namespace Tanshu.Accounts.PointOfSale
private void btnLogin_Click(object sender, EventArgs e)
{
user = UserBI.ValidateUser(txtUserName.Text.Trim(), Tanshu.Common.Md5.Hash(txtPassword.Text, "v2"));
if (user != null)
_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");
@ -51,8 +49,8 @@ namespace Tanshu.Accounts.PointOfSale
public bool UserName(out string userName)
{
userName = this.user == null ? "" : this.user.Name;
return this.user != null;
userName = this._user == null ? "" : this._user.Name;
return this._user != null;
}
private void btnExit_Click(object sender, EventArgs e)