37 lines
810 B
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using VEPROMS.CSLA.Library;
using Csla;
namespace WinApp
{
public partial class frmUserSelect : Form
{
public frmUserSelect()
{
InitializeComponent();
}
private void frmUserSelect_Load(object sender, EventArgs e)
{
userInfoListBindingSource.DataSource = UserInfoList.Get();
}
public int UID
{
get { return (int) lbUsers.SelectedValue; }
}
private void btnOK_Click(object sender, EventArgs e)
{
Console.WriteLine("SelectedValue = {0}", lbUsers.SelectedValue);
DialogResult = DialogResult.OK;
}
private void btnCancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
}
}
}