Added inverse Attribute to ProductGroup.

BillInventory Renamed.
Refactored Bill to be more usable.
Added Bill Detail Report.
Added Open Bill and Bill Details Roles.
Zero Rate Products have Yellow background Color.
Refactored UserBI, FoodTableBI, ModifierBI, PrintLocationBI, ProductBI, ProductGroupBI, TaxBI, UserBI,
Cached the Products List.
Product and Product Group Form Working.
This commit is contained in:
unknown
2011-06-23 18:17:48 +05:30
parent 0cb7d3cf09
commit d8ecec8bb6
85 changed files with 3520 additions and 2264 deletions

View File

@ -7,14 +7,14 @@ namespace Tanshu.Accounts.PointOfSale
{
public partial class MsrLoginForm : Form
{
private string loginString;
private User user;
private bool register;
private string _loginString;
private User _user;
private readonly bool register;
public MsrLoginForm(bool register)
{
InitializeComponent();
user = null;
loginString = string.Empty;
_user = null;
_loginString = string.Empty;
this.register = register;
this.btnLogin.Enabled = false;
}
@ -23,33 +23,36 @@ namespace Tanshu.Accounts.PointOfSale
{
if (!register)
{
var user = UserBI.MsrValidateUser(loginString);
if (user != null)
using (var bi = new UserBI())
{
this.user = user;
this.Close();
var user = bi.MsrValidateUser(_loginString);
if (user != null)
{
this._user = user;
this.Close();
}
else
MessageBox.Show("Unrecognised Card");
}
else
MessageBox.Show("Unrecognised Card");
}
else
{
this.user = new User() { Name = loginString };
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;
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();
this._loginString += e.KeyChar.ToString();
}
}
}