Esempio n. 1
0
        public ScheduleForm()
        {
            InitializeComponent();
            this.okΒutton.Click += okΒutton_Click;

            using (MachinesRepository repo = new MachinesRepository())
            {
                this.machineBindingSource.DataSource = repo.Get();
            }
            using (EmployeesRepository repo = new EmployeesRepository())
            {
                this.employeeBindingSource.DataSource = repo.Get();
            }
        }
Esempio n. 2
0
 public void Get(ObjectListView olv)
 {
     using (MachinesRepository repo = new MachinesRepository())
     {
         var list = repo.Get();
         olv.ModelFilter = null;
         olv.Columns.Clear();
         olv.Columns.Add(new BrightIdeasSoftware.OLVColumn()
         {
             Text         = "Μηχάνημα",
             AspectGetter = delegate(object row) { return(((Machine)row).Title); },
             TextAlign    = System.Windows.Forms.HorizontalAlignment.Left,
             Width        = 200
         });
         olv.SetObjects(list);
     }
 }