77 lines
2.3 KiB
C#
77 lines
2.3 KiB
C#
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.Data;
|
|
|
|
namespace Tanshu.Accounts.Helpers
|
|
{
|
|
|
|
public class SelectVoidReason : Tanshu.Data.BaseSelector<StringType>
|
|
{
|
|
public SelectVoidReason(GetData<StringType> getData, bool autoClose)
|
|
: base(getData, autoClose, "Reason for Voiding Bill")
|
|
{
|
|
List<string> filters = new List<string>();
|
|
filters.Add("Name");
|
|
SetFilterColumns(filters);
|
|
}
|
|
|
|
protected override void FilterChanged(Dictionary<string, string> filter)
|
|
{
|
|
//data = originalData.Where(d => d.Description.ToLower().Contains(filter["Name"].ToLower())).ToList();
|
|
data = getData(filter);
|
|
bindingSource.DataSource = data;
|
|
}
|
|
protected override void UpdateDisplay(StringType item)
|
|
{
|
|
if (item == null)
|
|
DisplayLabel = "";
|
|
else
|
|
DisplayLabel = string.Format("Reason for Voiding: {0}", item);
|
|
}
|
|
protected override StringType 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
|
|
|
|
}
|
|
}
|