2016-01-04 05:22:01 +00:00
|
|
|
|
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();
|
2018-08-24 10:41:33 +00:00
|
|
|
|
_list = MachineLocationBI.List();
|
2016-01-04 05:22:01 +00:00
|
|
|
|
bsList.DataSource = _list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void MachineListForm_Load(object sender, EventArgs e)
|
|
|
|
|
{
|
2018-08-24 10:41:33 +00:00
|
|
|
|
_list = MachineLocationBI.List();
|
2016-01-04 05:22:01 +00:00
|
|
|
|
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();
|
2018-08-24 10:41:33 +00:00
|
|
|
|
_list = MachineLocationBI.List();
|
2016-01-04 05:22:01 +00:00
|
|
|
|
bsList.DataSource = _list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void btnExit_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
this.Close();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|