Exemplo n.º 1
0
 //-------------------------------------------------------------------------------------
 // this message handler gets called when the user checks/unchecks an item the combo box
 //----------------------------------------------------------------------------------------
 private void cmboRSBMachines_CheckStateChanged(object sender, EventArgs e)
 {
     if (sender is Spinning.CheckComboBoxItem && formloaded)
     {
         Spinning.CheckComboBoxItem item = (Spinning.CheckComboBoxItem)sender;
         if (item.CheckState)
         {
             QueryParms.Machines.Add(repo.LoadMachine(item._Pk));
         }
         else
         {
             var value = QueryParms.Machines.Find(it => it.MD_Pk == item._Pk);
             if (value != null)
             {
                 QueryParms.Machines.Remove(value);
             }
         }
     }
 }
Exemplo n.º 2
0
 private void cmboYarnOrder_CheckStateChanged(object sender, EventArgs e)
 {
     if (sender is Spinning.CheckComboBoxItem && formLoaded)
     {
         Spinning.CheckComboBoxItem item = (Spinning.CheckComboBoxItem)sender;
         if (item.CheckState)
         {
             QueryParms.YarnOrders.Add(repo.LoadYarnOrders(item._Pk));
         }
         else
         {
             var value = QueryParms.YarnOrders.Find(it => it.YarnO_Pk == item._Pk);
             if (value != null)
             {
                 QueryParms.YarnOrders.Remove(value);
             }
         }
     }
 }