Breaking Change: Changed Kot/Voucher Table Name to Guid Foreign key

Breaking Change: Renamed Discontinued to IsActive and added NA field to products.
Cleanup: Removed not used attributes
Change: RoleConstants changed to simple string
Feature: Table Create/Edit/Reorder and Modifier Create/Edit Form
Feature: Bills now show the Tax name from the database and not a hack
This commit is contained in:
tanshu
2014-10-16 16:41:55 +05:30
parent 69617949bd
commit da929ad036
76 changed files with 3472 additions and 1175 deletions

View File

@ -77,6 +77,8 @@ namespace Tanshu.Accounts.Helpers
control = GetButton(string.Format("p{0}", i), item.Units == string.Empty ? item.Name : string.Format("{0} ({1})", item.Name, item.Units), size, item, bcDelegate);
if (item.Price == 0)
control.BackColor = Color.Yellow;
if (item.IsNotAvailable)
control.BackColor = Color.Red;
}
panel.Controls.Add(control);
}
@ -150,17 +152,22 @@ namespace Tanshu.Accounts.Helpers
panel.Controls.Clear();
var marginWidth = panel.Margin.Right + panel.Margin.Left;
var marginHeight = panel.Margin.Top + panel.Margin.Bottom;
pageLength = (panel.ClientSize.Height / (marginHeight + size.Y));
pageLength *= (panel.ClientSize.Width / (marginWidth + size.X));
pageLength -= 2;
pageLength = panel.ClientSize.Height / (marginHeight + size.Y);
pageLength *= panel.ClientSize.Width / (marginWidth + size.X);
if (inList.Count <= pageLength)
{
start = 0;
if (start == 0)
pageLength += 1;
stop = start + pageLength;
if (stop > inList.Count)
stop = inList.Count;
}
else
{
pageLength -= 2;
if (start == 0)
pageLength += 1;
stop = start + pageLength;
if (stop > inList.Count)
stop = inList.Count;
}
}
private static Button GetButton(string name, string text, Point size, object tag, ButtonClickDelegate bcDelegate)
{

View File

@ -1,73 +0,0 @@
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.Data;
namespace Tanshu.Accounts.Helpers
{
public class SelectBill : Tanshu.Data.BaseSelector<PendingBills>
{
public SelectBill(GetData<PendingBills> getData, bool autoClose)
: base(getData, true, "List of Bills")
{
//grid.Columns["CustomerID"].Visible = false;
//grid.Columns["LedgerID"].Visible = false;
}
protected override void FilterChanged(Dictionary<string, string> filter)
{
//data = CustomerProxy.GetCustomers(filter["Universal"].Split(' ')).ToList();
//bindingSource.DataSource = data;
}
protected override void UpdateDisplay(PendingBills item)
{
//if (item == null)
// DisplayLabel = "";
//else
// DisplayLabel = string.Format("Chosen Customer is {0} with phone number {1}", item.Name, item.Phone);
}
protected override PendingBills HandleKeydown(object sender, ExtendedKeyEventArgs e)
{
e.Handled = false;
return null;
}
#region Designer Code
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
}
#endregion
#endregion
}
}

View File

@ -70,9 +70,6 @@
<Compile Include="CustomStructs.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="SelectBill.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SelectVoidReason.cs">
<SubType>Form</SubType>
</Compile>