Added Basecode to Product

Added Voucher Type During Printing
Added Discount Report
Fixed Void bill table not getting cleared error
Added PAX to table
Removed Itital Setup button in MainForm as it was not doing anything
This commit is contained in:
unknown
2011-12-05 15:11:02 +05:30
parent 719dbd49d2
commit 964d0a78bf
54 changed files with 2285 additions and 1028 deletions

View File

@ -1,13 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Linq;
using Tanshu.Accounts.Contracts;
using Tanshu.Accounts.Repository;
using Tanshu.Data;
using Tanshu.Accounts.Entities;
@ -15,11 +8,10 @@ namespace Tanshu.Accounts.Helpers
{
public class SelectCustomer : Tanshu.Data.BaseSelector<Customer>
{
public event CustomerEventHandler customerEvent;
public event CustomerEventHandler CustomerEvent;
public SelectCustomer(GetData<Customer> getData, bool autoClose) : base(getData, true, "List of Products")
{
List<string> filters = new List<string>();
filters.Add("Universal");
var filters = new List<string> {"Universal"};
SetFilterColumns(filters);
grid.Columns["CustomerID"].Visible = false;
}
@ -32,16 +24,14 @@ namespace Tanshu.Accounts.Helpers
}
protected override void UpdateDisplay(Customer item)
{
if (item == null)
DisplayLabel = "";
else
DisplayLabel = string.Format("Chosen Customer is {0} with phone number {1}", item.Name, item.Phone);
DisplayLabel = item == null ? "" : string.Format("Chosen Customer is {0} with phone number {1}", item.Name, item.Phone);
}
protected override Customer HandleKeydown(object sender, ExtendedKeyEventArgs e)
{
Customer customer = bindingSource.Current as Customer;
var customer = bindingSource.Current as Customer;
if (customerEvent == null)
if (CustomerEvent == null)
{
e.Handled = false;
return customer;
@ -52,7 +42,7 @@ namespace Tanshu.Accounts.Helpers
if ((e.KeyCode == Keys.F1) || (e.KeyCode == Keys.F2))
{
customer = customerEvent(sender, new CustomerEventArgs(id, base.filterColumns["Universal"]));
customer = CustomerEvent(sender, new CustomerEventArgs(id, base.filterColumns["Universal"]));
e.Handled = customer != null;
}
return customer;