예제 #1
0
        //-----------------------------------------------------------------------------
        public CResultAErreur MajChamps()
        {
            CResultAErreur result = CResultAErreur.True;

            if (m_relEq != null && m_relEq.Row.Row.RowState != DataRowState.Detached)
            {
                CEquipement eqpt = m_relEq.Equipement;
                if (eqpt != null)
                {
                    CTypeEquipement tp = m_txtSelectTypeEquipement.SelectedObject as CTypeEquipement;
                    if (tp != null)
                    {
                        m_relEq.TypeEquipement = tp;
                        if (m_cmbRefConst.SelectedValue as string != null)
                        {
                            CTypeEquipementConstructeur tpc = new CTypeEquipementConstructeur(eqpt.Database);
                            if (tpc.ReadIfExist(m_cmbRefConst.SelectedValue as string) &&
                                tpc.TypeEquipement.Id == tp.Id)
                            {
                                m_relEq.TypeEquipementConstructeur = tpc;
                            }
                        }
                    }
                }
            }
            return(result);
        }
예제 #2
0
 private void m_cmbRefConst_SelectedValueChanged(object sender, EventArgs e)
 {
     if (!m_bIsInitializing)
     {
         if (m_cmbRefConst.SelectedValue as string != null)
         {
             CTypeEquipementConstructeur tpc = new CTypeEquipementConstructeur(CTimosInventoryDb.GetTimosDatas());
             if (tpc.ReadIfExist(m_cmbRefConst.SelectedValue as string))
             {
                 m_txtSelectTypeEquipement.SelectedObject = tpc.TypeEquipement;
             }
         }
         if (ValueChanged != null)
         {
             ValueChanged(this, null);
         }
     }
 }