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:
@ -20,5 +20,10 @@ namespace Tanshu.Common.Helpers
|
||||
var attribute = (DisplayAttribute)settleOption.GetType().GetField(settleOption.ToString()).GetCustomAttributes(typeof(DisplayAttribute), false)[0];
|
||||
return attribute;
|
||||
}
|
||||
public static DisplayAttribute Attribute(this VoucherType settleOption)
|
||||
{
|
||||
var attribute = (DisplayAttribute)settleOption.GetType().GetField(settleOption.ToString()).GetCustomAttributes(typeof(DisplayAttribute), false)[0];
|
||||
return attribute;
|
||||
}
|
||||
}
|
||||
}
|
||||
26
Tanshu.Accounts.Contracts/Helper Functions/StringHelper.cs
Normal file
26
Tanshu.Accounts.Contracts/Helper Functions/StringHelper.cs
Normal file
@ -0,0 +1,26 @@
|
||||
namespace Tanshu.Common.Helpers
|
||||
{
|
||||
public enum Align
|
||||
{
|
||||
Left = 1,
|
||||
Centre = 2,
|
||||
Right = 4
|
||||
}
|
||||
|
||||
public static class StringHelper
|
||||
{
|
||||
public static string Center(this string input, int width)
|
||||
{
|
||||
if (input.Length > width)
|
||||
return input;
|
||||
var left = ((width - input.Length) / 2) + input.Length;
|
||||
input = string.Format("{0,-" + left + "}", input);
|
||||
return string.Format("{0," + width + "}", input);
|
||||
}
|
||||
|
||||
public static string Center42(this string input)
|
||||
{
|
||||
return Center(input, 42);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user