예제 #1
0
        //---------------------------------------------
        protected override void MyAppliqueRestriction(
            CRestrictionUtilisateurSurType restrictionSurObjetEdite,
            CListeRestrictionsUtilisateurSurType listeRestrictions,
            IGestionnaireReadOnlySysteme gestionnaireReadOnly)
        {
            if (EditedElement != null && m_dateTimeEx != null)
            {
                ERestriction   rest    = restrictionSurObjetEdite.RestrictionGlobale;
                C2iWndDateTime wndDate = WndAssociee as C2iWndDateTime;
                if (wndDate != null)
                {
                    CDefinitionProprieteDynamique def = wndDate.Property;
                    if (def != null)
                    {
                        rest = def.GetRestrictionAAppliquer(restrictionSurObjetEdite);
                    }
                }
                switch (rest)
                {
                case ERestriction.ReadOnly:
                case ERestriction.Hide:
                {
                    gestionnaireReadOnly.SetReadOnly(m_dateTimeEx, true);
                    break;
                }

                default: break;
                }
            }
        }
예제 #2
0
        private void CWndFor2iDateTime_OnValueChange(object sender, EventArgs e)
        {
            C2iWndDateTime dt = WndAssociee as C2iWndDateTime;

            if (dt != null && dt.AutoSetValue)
            {
                MajChamps(false);
            }
            if (m_gridView != null)
            {
                m_gridView.NotifyCurrentCellDirty(true);
            }
            CUtilControlesWnd.DeclencheEvenement(C2iWndDateTime.c_strIdEvenementValueChanged, this);
        }
예제 #3
0
        protected override void MyCreateControle(
            CCreateur2iFormulaireV2 createur,
            C2iWnd wnd,
            Control parent,
            IFournisseurProprietesDynamiques fournisseurProprietes)
        {
            C2iWndDateTime wndDateTime = wnd as C2iWndDateTime;

            if (wndDateTime != null)
            {
                m_dateTimeEx.Visible      = true;
                m_dateTimeEx.Format       = DateTimePickerFormat.Custom;
                m_dateTimeEx.CustomFormat = CUtilDate.gFormat;//dd/MM/yyyy HH:mm";
                CCreateur2iFormulaireV2.AffecteProprietesCommunes(WndDateTime, m_dateTimeEx);
                parent.Controls.Add(m_dateTimeEx);
            }
        }