69617949bd
Important! : This version will not work. It is pre-alpha and saved in case of catastrophic failure Refactor: Remove dependency on Fluent Nhibernate. Refactor: All Primary keys are now Guids. Refactor: Class Mappings changed from AutoMap to Explicit Mappings. Breakage: All Cascading is now disabled and entities must be explicitly saved/updated/deleted Breakage: Auto Commiting is now off and "SaveChanges()" needs to be called on all BIs. Refactor: Changed the pattern where all relevant db code for an operation is basically in the same function. Chore: Removed Advance and Payments options.
58 lines
1.6 KiB
C#
58 lines
1.6 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.Contracts;
|
|
using Tanshu.Accounts.Helpers;
|
|
|
|
namespace Tanshu.Accounts.PointOfSale
|
|
{
|
|
public partial class ModifierForm : Form
|
|
{
|
|
private IList<Modifier> selection;
|
|
private IList<Modifier> source;
|
|
private IList<CheckBox> list;
|
|
public ModifierForm(IList<Modifier> source, IList<Modifier> selection)
|
|
{
|
|
InitializeComponent();
|
|
this.selection = selection;
|
|
this.source = source;
|
|
list = new List<CheckBox>();
|
|
}
|
|
|
|
private void button_Click(object sender, EventArgs e)
|
|
{
|
|
CheckBox button = sender as CheckBox;
|
|
if (button == null)
|
|
return;
|
|
if (button.CheckState == CheckState.Checked)
|
|
selection.Add((Modifier)button.Tag);
|
|
else
|
|
selection.Remove((Modifier)button.Tag);
|
|
}
|
|
public IList<Modifier> Selection
|
|
{
|
|
get
|
|
{
|
|
return selection;
|
|
}
|
|
}
|
|
|
|
private void btnClose_Click(object sender, EventArgs e)
|
|
{
|
|
this.Close();
|
|
}
|
|
|
|
private void ModifierForm_Load(object sender, EventArgs e)
|
|
{
|
|
ControlFactory.GenerateModifiers(ref flpModifier, ref list, selection, new Point(75, 75), 30, source, new ButtonClickDelegate(button_Click));
|
|
}
|
|
|
|
}
|
|
}
|