Numpad User Control and Login Changes
This commit is contained in:
1 parent
232a62f8ca
commit
e32e9f9e74
47 files changed
+1536
-714
No files matched your search
@@ -52,7 +52,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
|
||||
private void btnAdjust_Click(object sender, EventArgs e)
|
||||
{
|
||||
new AdvanceBI().Adjust((Guid)txtNarration.Tag, CurrentUser.user.UserID);
|
||||
new AdvanceBI().Adjust((Guid)txtNarration.Tag, Session.User.UserID);
|
||||
FillDataGrid();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
private void cmbCashier_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
EmployeeStatus();
|
||||
log.Warn(string.Format("User Checkout: {0} by {1}", coProxy.Cashier, CurrentUser.user.Name));
|
||||
log.Warn(string.Format("User Checkout: {0} by {1}", coProxy.Cashier, Session.User.Name));
|
||||
}
|
||||
|
||||
private void EmployeeStatus()
|
||||
@@ -83,7 +83,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
|
||||
private void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
Thermal.PrintClosing(coProxy);
|
||||
Thermal.PrintClosing(Session.printer(), coProxy);
|
||||
}
|
||||
|
||||
private void txtSales_TextChanged(object sender, EventArgs e)
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
if (customer == null)
|
||||
customer = new CustomerBO();
|
||||
UserBO user = CurrentUser.user;
|
||||
UserBO user = Session.User;
|
||||
customer.Name = txtName.Text;
|
||||
customer.LedgerID = (Guid)cmbLedger.SelectedValue;
|
||||
customer.Phone = txtPhone.Text;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
}
|
||||
private void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
UserBO user = CurrentUser.user;
|
||||
UserBO user = Session.User;
|
||||
if (txtAmount.Text == "0" || cmbType.Text == "")
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show("Amount can't be blank", "Blank not Allowed");
|
||||
@@ -37,7 +37,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
|
||||
private void PaymentForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
UserBO user = CurrentUser.user;
|
||||
UserBO user = Session.User;
|
||||
dtpFrom.Value = DateTime.Today;
|
||||
dtpTo.Value = DateTime.Today;
|
||||
GridBind();
|
||||
@@ -50,7 +50,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
MessageBox.Show("You are not authorized to access");
|
||||
else
|
||||
{
|
||||
UserBO user = CurrentUser.user;
|
||||
UserBO user = Session.User;
|
||||
if (dgvPayments.SelectedRows.Count <= 0)
|
||||
return;
|
||||
Guid paymentID = ((PaymentDisplayBO)bindingSource.Current).PaymentID;
|
||||
@@ -65,7 +65,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
userID = null;
|
||||
else
|
||||
{
|
||||
userID = CurrentUser.user.UserID;
|
||||
userID = Session.User.UserID;
|
||||
}
|
||||
paymentList = new PaymentBI().GetPayments(userID, dtpFrom.Value, dtpTo.Value);
|
||||
bindingSource.DataSource = paymentList;
|
||||
|
||||
@@ -39,8 +39,8 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
dtpTo.Format = DateTimePickerFormat.Custom;
|
||||
dtpTo.CustomFormat = "dd-MMM-yyyy";
|
||||
dtpTo.Value = DateTime.Now;
|
||||
txtCashier.Text = CurrentUser.user.Name;
|
||||
txtCashier.Tag = CurrentUser.user.UserID;
|
||||
txtCashier.Text = Session.User.Name;
|
||||
txtCashier.Tag = Session.User.UserID;
|
||||
loading = false;
|
||||
GridBind();
|
||||
}
|
||||
@@ -58,7 +58,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
}
|
||||
private void PrintAdvances()
|
||||
{
|
||||
Thermal.PrintAdvance(txtAmount.Text.Trim(), txtNarration.Text.Trim());
|
||||
Thermal.PrintAdvance(Session.printer(), Session.User.Name, txtAmount.Text.Trim(), txtNarration.Text.Trim());
|
||||
}
|
||||
private string AddDate(string SqlStringP, DateTime FromDate, DateTime ToDate)
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
public frmSaleAnalysisForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
log.Warn(string.Format("Sales Analysis by: {0}", CurrentUser.user.Name));
|
||||
log.Warn(string.Format("Sales Analysis by: {0}", Session.User.Name));
|
||||
}
|
||||
|
||||
private void dtpStart_ValueChanged(object sender, EventArgs e)
|
||||
@@ -91,7 +91,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
DateTime startDate = Convert.ToDateTime(String.Format("{0:dd-MMM-yyyy} 00:00:00", dtpStart.Value));
|
||||
DateTime finishDate = Convert.ToDateTime(String.Format("{0:dd-MMM-yyyy} 23:59:59", dtpFinish.Value));
|
||||
Accounts.Print.Thermal.PrintSale(det, startDate, finishDate);
|
||||
Accounts.Print.Thermal.PrintSale(Session.printer(), Session.User.Name, det, startDate, finishDate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+7
-7
@@ -29,8 +29,8 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.bindingSource = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.bsWaiter = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.bsPending = new System.Windows.Forms.BindingSource(this.components);
|
||||
@@ -270,8 +270,8 @@
|
||||
// printedDataGridViewTextBoxColumn
|
||||
//
|
||||
this.printedDataGridViewTextBoxColumn.DataPropertyName = "Printed";
|
||||
dataGridViewCellStyle1.Format = "N2";
|
||||
this.printedDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle1;
|
||||
dataGridViewCellStyle3.Format = "N2";
|
||||
this.printedDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle3;
|
||||
this.printedDataGridViewTextBoxColumn.HeaderText = "Printed";
|
||||
this.printedDataGridViewTextBoxColumn.Name = "printedDataGridViewTextBoxColumn";
|
||||
this.printedDataGridViewTextBoxColumn.ReadOnly = true;
|
||||
@@ -280,9 +280,9 @@
|
||||
// additionalDataGridViewTextBoxColumn
|
||||
//
|
||||
this.additionalDataGridViewTextBoxColumn.DataPropertyName = "Additional";
|
||||
dataGridViewCellStyle2.Format = "N2";
|
||||
dataGridViewCellStyle2.NullValue = null;
|
||||
this.additionalDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle2;
|
||||
dataGridViewCellStyle4.Format = "N2";
|
||||
dataGridViewCellStyle4.NullValue = null;
|
||||
this.additionalDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle4;
|
||||
this.additionalDataGridViewTextBoxColumn.HeaderText = "Additional";
|
||||
this.additionalDataGridViewTextBoxColumn.Name = "additionalDataGridViewTextBoxColumn";
|
||||
this.additionalDataGridViewTextBoxColumn.ReadOnly = true;
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
InitializeComponent();
|
||||
btnCustomer.Text = customer.Name;
|
||||
lblUser.Text = CurrentUser.user.Name;
|
||||
lblUser.Text = Session.User.Name;
|
||||
}
|
||||
|
||||
public SalesForm(Guid voucherID)
|
||||
@@ -369,7 +369,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
}
|
||||
else
|
||||
{
|
||||
Accounts.Print.Thermal.PrintBill(true, voucherID, bill.Values.ToList());
|
||||
Accounts.Print.Thermal.PrintBill(Session.printer(), true, voucherID, bill.Values.ToList());
|
||||
Accounts.Print.Thermal.PrintCustomerKot("KOT", voucherID, bill.Values.ToList());
|
||||
}
|
||||
}
|
||||
@@ -386,7 +386,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
btnWaiter.Tag = new WaiterBI().GetWaiters()[0].WaiterID;
|
||||
|
||||
#region SaleVoucher
|
||||
UserBO user = CurrentUser.user;
|
||||
UserBO user = Session.User;
|
||||
SaleVoucherBO saleVoucher = new SaleVoucherBO
|
||||
{
|
||||
CustomerID = customer.CustomerID,
|
||||
@@ -416,7 +416,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
if (btnWaiter.Tag == null)
|
||||
btnWaiter.Tag = new WaiterBI().GetWaiters()[0].WaiterID;
|
||||
|
||||
UserBO user = CurrentUser.user;
|
||||
UserBO user = Session.User;
|
||||
#region Voucher and SaleVoucher
|
||||
SaleVoucherBO saleVoucher = new SaleVoucherBO
|
||||
{
|
||||
@@ -572,11 +572,11 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
if (seconds <= 0)
|
||||
lblUser.Text = string.Format("Alarm {0:hh:MM}", al.AlarmTime);
|
||||
else
|
||||
lblUser.Text = CurrentUser.user.Name;
|
||||
lblUser.Text = Session.User.Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
lblUser.Text = CurrentUser.user.Name;
|
||||
lblUser.Text = Session.User.Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -759,14 +759,14 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
|
||||
private void btnPaidCash_Click(object sender, EventArgs e)
|
||||
{
|
||||
UserBO user = CurrentUser.user;
|
||||
UserBO user = Session.User;
|
||||
new SaleVoucherBI().DeclareBillsPaid(user.UserID, selectedBills, false);
|
||||
ListUnpaidBills();
|
||||
}
|
||||
|
||||
private void btnPaidCC_Click(object sender, EventArgs e)
|
||||
{
|
||||
UserBO user = CurrentUser.user;
|
||||
UserBO user = Session.User;
|
||||
new SaleVoucherBI().DeclareBillsPaid(user.UserID, selectedBills, true);
|
||||
ListUnpaidBills();
|
||||
}
|
||||
|
||||
@@ -132,6 +132,15 @@
|
||||
<metadata name="Display.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Display.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="selectDataGridViewCheckBoxColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TableID.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="selectDataGridViewCheckBoxColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
||||
Reference in new issue
Block a user