narsil/Tanshu.Accounts.PointOfSale/Authentication/KeyboardLogin.cs
tanshu 3ca8b29e04 Regression: BillItemKey added the compare methods back
Regression: PrintLocation added the compare methods back
Breaking: Kot.Code is now integers
Breaking: Kot Update is now via Stored Procedure to get DB Values
Breaking: Reprints Insert is now via Stored Procedure to get DV Values
Breaking: Voucher.BillID and KotID are now integers
Breaking: Voucher Insert/Update is now via Stored Procedures to get DV Values also Dirty Checking for Voucher has been overwritten to set dirty for LastEditDate update
Fix: Login forms simplified
Feature: PrintLocation and Products are cached application wide.
2014-11-02 13:33:31 +05:30

40 lines
902 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tanshu.Accounts.Repository;
using System.Threading;
using Tanshu.Accounts.Contracts;
using Tanshu.Common.KeyboardControl;
namespace Tanshu.Accounts.PointOfSale
{
class KeyboardLogin : ILogin
{
public bool LoginUser()
{
return LoginUser(true);
}
bool LoginUser(bool setSession)
{
using (LoginForm frm = new LoginForm(new KeyboardControl()))
{
frm.ShowDialog();
var user = frm.User();
if (user != null && setSession)
{
Session.User = user;
}
return user != null;
}
}
public bool LogoutUser()
{
Session.User = null;
return true;
}
}
}