Chore: Removed Waiter as it was not ever used.

Refactor: Changed the user list form to a normal form.
Feature: Service Charge disabled setting removes it from the Product Form.
This commit is contained in:
tanshu
2016-01-18 16:13:43 +05:30
parent caf9b3106c
commit 69560cfb07
30 changed files with 776 additions and 528 deletions

View File

@ -57,7 +57,6 @@ namespace Tanshu.Accounts.PointOfSale.Sales
this.btnDelete = new System.Windows.Forms.Button();
this.btnDiscount = new System.Windows.Forms.Button();
this.btnModifier = new System.Windows.Forms.Button();
this.btnWaiter = new System.Windows.Forms.Button();
this.btnPrintKot = new System.Windows.Forms.Button();
this.btnMoveTable = new System.Windows.Forms.Button();
this.btnPrintBill = new System.Windows.Forms.Button();
@ -67,7 +66,7 @@ namespace Tanshu.Accounts.PointOfSale.Sales
this.btnMore = new System.Windows.Forms.Button();
this.btnMoveKot = new System.Windows.Forms.Button();
this.btnSplitBill = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.lblServiceCharge = new System.Windows.Forms.Label();
this.txtServiceCharge = new System.Windows.Forms.TextBox();
this.txtTableID = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
@ -82,12 +81,10 @@ namespace Tanshu.Accounts.PointOfSale.Sales
this.txtBillID = new System.Windows.Forms.TextBox();
this.txtKotID = new System.Windows.Forms.TextBox();
this.btnCustomer = new System.Windows.Forms.Button();
this.bsWaiter = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.dgvProducts)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource)).BeginInit();
this.pnlBilling.SuspendLayout();
this.flpActions.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.bsWaiter)).BeginInit();
this.SuspendLayout();
//
// label7
@ -244,7 +241,7 @@ namespace Tanshu.Accounts.PointOfSale.Sales
this.pnlBilling.Controls.Add(this.flpMain);
this.pnlBilling.Controls.Add(this.flpGroup);
this.pnlBilling.Controls.Add(this.flpActions);
this.pnlBilling.Controls.Add(this.label1);
this.pnlBilling.Controls.Add(this.lblServiceCharge);
this.pnlBilling.Controls.Add(this.txtServiceCharge);
this.pnlBilling.Controls.Add(this.txtTableID);
this.pnlBilling.Controls.Add(this.label11);
@ -316,7 +313,6 @@ namespace Tanshu.Accounts.PointOfSale.Sales
this.flpActions.Controls.Add(this.btnDelete);
this.flpActions.Controls.Add(this.btnDiscount);
this.flpActions.Controls.Add(this.btnModifier);
this.flpActions.Controls.Add(this.btnWaiter);
this.flpActions.Controls.Add(this.btnPrintKot);
this.flpActions.Controls.Add(this.btnMoveTable);
this.flpActions.Controls.Add(this.btnPrintBill);
@ -382,19 +378,9 @@ namespace Tanshu.Accounts.PointOfSale.Sales
this.btnModifier.UseVisualStyleBackColor = true;
this.btnModifier.Click += new System.EventHandler(this.btnModifier_Click);
//
// btnWaiter
//
this.btnWaiter.Location = new System.Drawing.Point(408, 3);
this.btnWaiter.Name = "btnWaiter";
this.btnWaiter.Size = new System.Drawing.Size(75, 75);
this.btnWaiter.TabIndex = 150;
this.btnWaiter.Text = "Select Waiter - F5";
this.btnWaiter.UseVisualStyleBackColor = true;
this.btnWaiter.Click += new System.EventHandler(this.btnWaiter_Click);
//
// btnPrintKot
//
this.btnPrintKot.Location = new System.Drawing.Point(489, 3);
this.btnPrintKot.Location = new System.Drawing.Point(408, 3);
this.btnPrintKot.Name = "btnPrintKot";
this.btnPrintKot.Size = new System.Drawing.Size(75, 75);
this.btnPrintKot.TabIndex = 145;
@ -404,7 +390,7 @@ namespace Tanshu.Accounts.PointOfSale.Sales
//
// btnMoveTable
//
this.btnMoveTable.Location = new System.Drawing.Point(570, 3);
this.btnMoveTable.Location = new System.Drawing.Point(489, 3);
this.btnMoveTable.Name = "btnMoveTable";
this.btnMoveTable.Size = new System.Drawing.Size(75, 75);
this.btnMoveTable.TabIndex = 158;
@ -414,7 +400,7 @@ namespace Tanshu.Accounts.PointOfSale.Sales
//
// btnPrintBill
//
this.btnPrintBill.Location = new System.Drawing.Point(651, 3);
this.btnPrintBill.Location = new System.Drawing.Point(570, 3);
this.btnPrintBill.Name = "btnPrintBill";
this.btnPrintBill.Size = new System.Drawing.Size(75, 75);
this.btnPrintBill.TabIndex = 144;
@ -424,7 +410,7 @@ namespace Tanshu.Accounts.PointOfSale.Sales
//
// btnClear
//
this.btnClear.Location = new System.Drawing.Point(732, 3);
this.btnClear.Location = new System.Drawing.Point(651, 3);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(75, 75);
this.btnClear.TabIndex = 148;
@ -434,7 +420,7 @@ namespace Tanshu.Accounts.PointOfSale.Sales
//
// btnVoid
//
this.btnVoid.Location = new System.Drawing.Point(813, 3);
this.btnVoid.Location = new System.Drawing.Point(732, 3);
this.btnVoid.Name = "btnVoid";
this.btnVoid.Size = new System.Drawing.Size(75, 75);
this.btnVoid.TabIndex = 143;
@ -444,7 +430,7 @@ namespace Tanshu.Accounts.PointOfSale.Sales
//
// btnSettle
//
this.btnSettle.Location = new System.Drawing.Point(894, 3);
this.btnSettle.Location = new System.Drawing.Point(813, 3);
this.btnSettle.Name = "btnSettle";
this.btnSettle.Size = new System.Drawing.Size(75, 75);
this.btnSettle.TabIndex = 155;
@ -454,7 +440,7 @@ namespace Tanshu.Accounts.PointOfSale.Sales
//
// btnMore
//
this.btnMore.Location = new System.Drawing.Point(3, 84);
this.btnMore.Location = new System.Drawing.Point(894, 3);
this.btnMore.Name = "btnMore";
this.btnMore.Size = new System.Drawing.Size(75, 75);
this.btnMore.TabIndex = 159;
@ -464,7 +450,7 @@ namespace Tanshu.Accounts.PointOfSale.Sales
//
// btnMoveKot
//
this.btnMoveKot.Location = new System.Drawing.Point(84, 84);
this.btnMoveKot.Location = new System.Drawing.Point(3, 84);
this.btnMoveKot.Name = "btnMoveKot";
this.btnMoveKot.Size = new System.Drawing.Size(75, 75);
this.btnMoveKot.TabIndex = 160;
@ -474,7 +460,7 @@ namespace Tanshu.Accounts.PointOfSale.Sales
//
// btnSplitBill
//
this.btnSplitBill.Location = new System.Drawing.Point(165, 84);
this.btnSplitBill.Location = new System.Drawing.Point(84, 84);
this.btnSplitBill.Name = "btnSplitBill";
this.btnSplitBill.Size = new System.Drawing.Size(75, 75);
this.btnSplitBill.TabIndex = 161;
@ -482,16 +468,16 @@ namespace Tanshu.Accounts.PointOfSale.Sales
this.btnSplitBill.UseVisualStyleBackColor = true;
this.btnSplitBill.Click += new System.EventHandler(this.btnSplitBill_Click);
//
// label1
// lblServiceCharge
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(235, 511);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(21, 13);
this.label1.TabIndex = 154;
this.label1.Text = "SC";
this.label1.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.lblServiceCharge.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblServiceCharge.AutoSize = true;
this.lblServiceCharge.Location = new System.Drawing.Point(235, 511);
this.lblServiceCharge.Name = "lblServiceCharge";
this.lblServiceCharge.Size = new System.Drawing.Size(21, 13);
this.lblServiceCharge.TabIndex = 154;
this.lblServiceCharge.Text = "SC";
this.lblServiceCharge.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// txtServiceCharge
//
@ -616,10 +602,6 @@ namespace Tanshu.Accounts.PointOfSale.Sales
this.btnCustomer.UseVisualStyleBackColor = true;
this.btnCustomer.Click += new System.EventHandler(this.btnCustomer_Click);
//
// bsWaiter
//
this.bsWaiter.DataSource = typeof(Tanshu.Accounts.Entities.Waiter);
//
// SalesForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -630,8 +612,8 @@ namespace Tanshu.Accounts.PointOfSale.Sales
this.MaximizeBox = false;
this.Name = "SalesForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "F2-Qty., F3-Discount, F4-Customer, F5-Waiter, F7-Product, F8-LoadBill, F9-Set Amo" +
"unt, F11-Print Bill, F12-Print KOT, ESC-Cancel";
this.Text = "F2-Qty., F3-Discount, F4-Customer, F7-Product, F8-LoadBill, F9-Set Amount, F11-Pr" +
"int Bill, F12-Print KOT, ESC-Cancel";
this.Load += new System.EventHandler(this.SalesForm_Load);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SalesForm_KeyDown);
((System.ComponentModel.ISupportInitialize)(this.dgvProducts)).EndInit();
@ -639,7 +621,6 @@ namespace Tanshu.Accounts.PointOfSale.Sales
this.pnlBilling.ResumeLayout(false);
this.pnlBilling.PerformLayout();
this.flpActions.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.bsWaiter)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@ -648,7 +629,6 @@ namespace Tanshu.Accounts.PointOfSale.Sales
#endregion
private System.Windows.Forms.BindingSource bindingSource;
private System.Windows.Forms.BindingSource bsWaiter;
internal System.Windows.Forms.Label label7;
internal System.Windows.Forms.TextBox txtDiscount;
internal System.Windows.Forms.Label Label12;
@ -679,8 +659,7 @@ namespace Tanshu.Accounts.PointOfSale.Sales
private System.Windows.Forms.Button btnVoid;
private System.Windows.Forms.Button btnRate;
private System.Windows.Forms.Button btnClear;
private System.Windows.Forms.Button btnWaiter;
internal System.Windows.Forms.Label label1;
internal System.Windows.Forms.Label lblServiceCharge;
internal System.Windows.Forms.TextBox txtServiceCharge;
private System.Windows.Forms.Button btnSettle;
private System.Windows.Forms.FlowLayoutPanel flpActions;

View File

@ -31,11 +31,6 @@ namespace Tanshu.Accounts.PointOfSale.Sales
btnCustomer.Text = name;
}
public void SetWaiterDisplay(string name)
{
btnWaiter.Text = string.Format("{0} - F5", name);
}
public void ShowInfo(Voucher voucher)
{
if (voucher.VoucherID == Guid.Empty)
@ -53,7 +48,6 @@ namespace Tanshu.Accounts.PointOfSale.Sales
btnCustomer.Text = voucher.Customer.Name;
txtTableID.Text = voucher.Table.Name;
txtPax.Text = voucher.Pax.ToString();
btnWaiter.Text = string.Format("{0} - F5", voucher.Waiter.Name);
}
}
@ -89,11 +83,6 @@ namespace Tanshu.Accounts.PointOfSale.Sales
_billController.ShowCustomers(false);
break;
}
case Keys.F5:
{
btnWaiter_Click(sender, new EventArgs());
break;
}
case Keys.F7:
{
//using (var selectProduct = new SelectProduct(ProductBI.GetFilteredProducts, true))
@ -157,6 +146,12 @@ namespace Tanshu.Accounts.PointOfSale.Sales
private void SalesForm_Load(object sender, EventArgs e)
{
using (var bis = new SettingBI())
{
var showSC = bis.Get(x => x.Name == "Service Charge Enabled").Details == "yes";
txtServiceCharge.Visible = showSC;
lblServiceCharge.Visible = showSC;
}
_billController.FormLoad();
FormState = SaleFormState.Waiting;
}
@ -218,11 +213,6 @@ namespace Tanshu.Accounts.PointOfSale.Sales
}
}
private void btnWaiter_Click(object sender, EventArgs e)
{
_billController.ShowWaiters(false);
}
private void btnSettle_Click(object sender, EventArgs e)
{
_billController.SettleBill();
@ -290,7 +280,6 @@ namespace Tanshu.Accounts.PointOfSale.Sales
txtLastEditDate.Text = "";
txtTableID.Text = "";
txtPax.Text = "";
btnWaiter.Text = "Waiter - F5";
txtGrossTax.Text = "0.00";
txtDiscount.Text = "0.00";
txtServiceCharge.Text = "0.00";

View File

@ -123,9 +123,6 @@
<metadata name="bindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="bsWaiter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>148, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>81</value>
</metadata>