37 lines
850 B
C#
37 lines
850 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Drawing;
|
|||
|
using System.Windows.Forms;
|
|||
|
using Tanshu.Accounts.Helpers;
|
|||
|
|
|||
|
namespace Tanshu.Accounts.PointOfSale
|
|||
|
{
|
|||
|
public partial class PaxForm : Form
|
|||
|
{
|
|||
|
int _pax;
|
|||
|
public PaxForm()
|
|||
|
{
|
|||
|
InitializeComponent();
|
|||
|
}
|
|||
|
|
|||
|
public int Pax
|
|||
|
{
|
|||
|
get { return _pax; }
|
|||
|
}
|
|||
|
|
|||
|
private void txtAmount_KeyDown(object sender, KeyEventArgs e)
|
|||
|
{
|
|||
|
if (e.KeyCode == Keys.Return && int.TryParse(txtAmount.Text, out _pax))
|
|||
|
{
|
|||
|
this.DialogResult = DialogResult.OK;
|
|||
|
this.Close();
|
|||
|
}
|
|||
|
else if (e.KeyCode == Keys.Escape)
|
|||
|
{
|
|||
|
this.DialogResult = DialogResult.Cancel;
|
|||
|
this.Close();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|