narsil/Tanshu.Accounts.PointOfSale/Masters/MachineListForm.cs
tanshu caf9b3106c Feature: Added Machine Locations so that setting the location in the config file is not needed.
Feature: Settings database table added to store string based settings.
         It is right now used to store bill header and footer.
         Hard Coded header/footer removed from file.
Feature: Tax Analysis form created to easily show the tax calculation.
Feature: Management form uses background workers.  Dont' know if it is functional though.
Chore: Reorder Table form moved to masters from sales folder.
Refactor: ManagementBI and SalesAnalysisBI
2016-01-04 10:52:01 +05:30

54 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Tanshu.Accounts.Entities;
using Tanshu.Accounts.Repository;
namespace Tanshu.Accounts.PointOfSale
{
public partial class MachineListForm : Form
{
private IList<MachineLocation> _list;
public MachineListForm()
{
InitializeComponent();
}
private void btnAdd_Click(object sender, EventArgs e)
{
using (var frm = new MachineEditForm())
frm.ShowDialog();
using (var bi = new MachineLocationBI())
_list = bi.List();
bsList.DataSource = _list;
}
private void MachineListForm_Load(object sender, EventArgs e)
{
using (var bi = new MachineLocationBI())
_list = bi.List();
bsList.DataSource = _list;
}
private void btnEdit_Click(object sender, EventArgs e)
{
var id = ((MachineLocation)bsList.Current).MachineLocationID;
using (var frm = new MachineEditForm(id))
frm.ShowDialog();
using (var bi = new MachineLocationBI())
_list = bi.List();
bsList.DataSource = _list;
}
private void btnExit_Click(object sender, EventArgs e)
{
this.Close();
}
}
}