Ejemplo n.º 1
0
        private void btnNewLabour_Click(object sender, EventArgs e)
        {
            var mlv = new MaintainceLabourView();
            var ml  = new MaintenanceLabour();

            mlv.ShowObject(ml);
            var result = mlv.ShowDialog();

            if (result == DialogResult.OK)
            {
                _workOrder.LaborUnits.Add(mlv.CurrentObject);
            }
        }
Ejemplo n.º 2
0
 private void gridControl3_DoubleClick(object sender, EventArgs e)
 {
     _selectedLabour = (MaintenanceLabour)laboursBindingSource.Current;
     if (_selectedLabour != null)
     {
         var mlv = new MaintainceLabourView();
         mlv.ShowObject(_selectedLabour);
         var result = mlv.ShowDialog();
         if (result == DialogResult.OK)
         {
             _workOrder.LaborUnits.Add(mlv.CurrentObject);
         }
     }
 }
Ejemplo n.º 3
0
        private void gridControl2_DoubleClick(object sender, EventArgs e)
        {
            btnDeleteLabour.Enabled = true;
            _selectedLabour         = (MaintenanceLabour)labourBindingSource.Current;
            var mlv = new MaintainceLabourView();

            mlv.ShowObject(_selectedLabour);
            var result = mlv.ShowDialog();

            if (result == DialogResult.OK)
            {
                _maintenanceTask.Labours.Add(mlv.CurrentObject);
            }
        }