예제 #1
0
파일: CGel.cs 프로젝트: ykebaili/Timos
        //------------------------------------------------------------------
        public static CResultAErreur Degeler(IElementGelable elt, DateTime dateTime, string strInfo)
        {
            CResultAErreur result      = CResultAErreur.True;
            CGel           gelADegeler = null;

            foreach (CGel gel in elt.Gels)
            {
                if (gel.DateFin == null)
                {
                    gelADegeler = gel;
                    break;
                }
            }
            if (gelADegeler == null)
            {
                result.EmpileErreur(I.T("Unfreezing impossible for an element not freezed|551"));
                return(result);
            }

            gelADegeler.BeginEdit();
            gelADegeler.InfosFinGel = strInfo;
            gelADegeler.DateFin     = dateTime;
            result = gelADegeler.CommitEdit();
            return(result);
        }
예제 #2
0
파일: CGel.cs 프로젝트: ykebaili/Timos
        //------------------------------------------------------------------
        public static CResultAErreur ModifDegeler(CGel elt, DateTime dateTime, string strInfo)
        {
            CResultAErreur result = CResultAErreur.True;

            elt.BeginEdit();
            elt.InfosFinGel = strInfo;
            elt.DateFin     = dateTime;
            return(elt.CommitEdit());
        }
예제 #3
0
파일: CGel.cs 프로젝트: ykebaili/Timos
        //------------------------------------------------------------------
        public static CResultAErreur ModifGeler(CGel elt, DateTime dateTime, CCauseGel cCauseGel, string strInfo)
        {
            CResultAErreur result = CResultAErreur.True;

            elt.BeginEdit();
            elt.CauseGel      = cCauseGel;
            elt.InfosDebutGel = strInfo;
            elt.DateDebut     = dateTime;
            return(elt.CommitEdit());
        }
예제 #4
0
파일: CGel.cs 프로젝트: ykebaili/Timos
        //------------------------------------------------------------------
        public static CResultAErreur Geler(IElementGelable elt, DateTime dateTime, CCauseGel cCauseGel, string strInfo)
        {
            CResultAErreur result = CResultAErreur.True;

            //Vérifie qu'il n'y a pas déjà un gel ouvert
            if (elt.EstGelee)
            {
                result.EmpileErreur(I.T("Freezing impossible for an element already freezed|546"));
                return(result);
            }
            CGel gel = new CGel(elt.ContexteDonnee);

            gel.CreateNew();
            gel.DateDebut      = dateTime;
            gel.CauseGel       = cCauseGel;
            gel.InfosDebutGel  = strInfo;
            gel.ElementGelable = elt;
            result             = gel.CommitEdit();
            return(result);
        }