Пример #1
0
        public void CopyValues(Historia source)
        {
            if (source == null)
            {
                return;
            }

            _record.CopyValues(source.Base.Record);
        }
        // called to copy objects data from list
        private void Fetch(IDataReader reader)
        {
            this.RaiseListChangedEvents = false;

            IsReadOnly = false;

            while (reader.Read())
            {
                this.AddItem(Historia.GetChild(reader).GetInfo());
            }

            IsReadOnly = true;

            this.RaiseListChangedEvents = true;
        }
Пример #3
0
        public virtual void CheckChanges(Respuesta respuesta, Pregunta parent)
        {
            Historia historia = parent.Historias.NewItem(parent);

            if (Codigo != respuesta.Codigo)
            {
                historia.Texto += System.Environment.NewLine
                                  + "Modificado el campo Codigo en Respuesta " + Opcion + "; Usuario: " + AppContext.User.Name
                                  + "; Valor anterior : " + respuesta.Correcta + ";";
                historia.Fecha = DateTime.Now.Date;
                historia.Hora  = DateTime.Now;
            }

            if (Texto != respuesta.Texto)
            {
                historia.Texto += System.Environment.NewLine
                                  + "Modificado el campo Texto en Respuesta " + Opcion + "; Usuario: " + AppContext.User.Name
                                  + "; Valor anterior : " + respuesta.Texto + ";";
                historia.Fecha = DateTime.Now.Date;
                historia.Hora  = DateTime.Now;
            }

            if (Opcion != respuesta.Opcion)
            {
                historia.Texto += System.Environment.NewLine
                                  + "Modificado el campo Opcion en Respuesta " + Opcion + "; Usuario: " + AppContext.User.Name
                                  + "; Valor anterior : " + respuesta.Opcion + ";";
                historia.Fecha = DateTime.Now.Date;
                historia.Hora  = DateTime.Now;
            }

            if (Correcta != respuesta.Correcta)
            {
                historia.Texto += System.Environment.NewLine
                                  + "Modificado el campo Correcta en Respuesta " + Opcion + "; Usuario: " + AppContext.User.Name
                                  + "; Valor anterior : " + respuesta.Correcta + ";";
                historia.Fecha = DateTime.Now.Date;
                historia.Hora  = DateTime.Now;
            }

            if (historia.Texto == string.Empty)
            {
                parent.Historias.Remove(historia);
            }
        }
Пример #4
0
 public void CopyFrom(Historia source)
 {
     _base.CopyValues(source);
 }