Exemplo n.º 1
0
        public static void Create(Lop lop, string color, string obrazek, string nadpis, string text, string autor)
        {
            var dao = new LopWorkFlowEventDao();

            dao.Create(new LopWorkFlowEvent()
            {
                Lop     = lop,
                Color   = color,
                Obrazek = obrazek,
                Nadpis  = nadpis,
                Text    = text,
                Datum   = DateTime.Now,
                Autor   = autor
            });
        }
Exemplo n.º 2
0
        public virtual bool IsSame(Lop history)
        {
            bool shoda = true; //kontrola shodnosti materiálů

            if (Materialy.Count == history.Materialy.Count)
            {
                shoda = false;
            }
            else
            {
                for (int i = 0; i < Materialy.Count; i++)
                {
                    if (Materialy[i] != history.Materialy[i])
                    {
                        shoda = false;
                    }
                }
            }

            return(Investice == history.Investice &&
                   LessonLearned == history.LessonLearned &&
                   Action == history.Action &&
                   CheckDate == history.CheckDate &&
                   CloseDate == history.CloseDate &&
                   FinishDate == history.FinishDate
                   //&& LastChangedDate == history.LastChangedDate //nelogické - plníme jen při ukládání
                   && Nazev == history.Nazev &&
                   PlannedCloseDate == history.PlannedCloseDate &&
                   Popis == history.Popis &&
                   Komentar == history.Komentar &&
                   DeniedMessage == history.DeniedMessage &&
                   Resitel.Id == history.Resitel.Id &&
                   StartDate == history.StartDate && //nesedí ?
                   Status == history.Status &&
                   Dilna == history.Dilna &&
                   Zadavatel.Id == history.Zadavatel.Id && //TODO do budoucna přepsat z ID na celé objekty??
                   shoda
                   );
        }