//----------------------------------------------- public CResultAErreur MajChamps() { CResultAErreur result = CResultAErreur.True; if (m_donneeOperation != null) { CTypeOperation tpOld = m_donneeOperation.GetTypeOperation(m_besoin.ContexteDonnee); CTypeOperation tpNew = m_txtSelectTypeOperation.ElementSelectionne as CTypeOperation; CControleBesoin ctrlBesoin = ControleBesoin; if (ctrlBesoin != null) { if ((tpOld == null || ctrlBesoin.LibelleBesoin.ToUpper() == tpOld.LibelleComplet.ToUpper() || ctrlBesoin.LibelleBesoin.Trim().Length == 0)) { if (tpNew != null) { ctrlBesoin.LibelleBesoin = tpNew.LibelleComplet; } else { ctrlBesoin.LibelleBesoin = ""; } } } m_donneeOperation.SetTypeOperation(tpNew); } return(result); }
//------------------------------------------------------------ private void m_btnCoutVerrouillé_Click(object sender, EventArgs e) { if (m_donneeOperation != null && !LockEdition) { m_donneeOperation.IsCoutTarif = !m_donneeOperation.IsCoutTarif; if (m_donneeOperation.IsCoutTarif) { m_txtCoutUnitaire.LockEdition = true; m_donneeOperation.SetTypeOperation(m_donneeOperation.GetTypeOperation(m_besoin.ContexteDonnee)); m_txtCoutUnitaire.DoubleValue = m_donneeOperation.CoutUnitaire; if (OnCoutChanged != null) { OnCoutChanged(this, null); } } else { m_txtCoutUnitaire.LockEdition = false; } UpdateImageVerrou(); } }