コード例 #1
0
            public TestsRow AddTestsRow(string Name, bool IsPractice, string Description, int QuestionTypeId, int QuestionSubtypeId)
            {
                TestsRow rowTestsRow = ((TestsRow)(this.NewRow()));

                rowTestsRow.ItemArray = new object[] {
                    null,
                    Name,
                    IsPractice,
                    Description,
                    QuestionTypeId,
                    QuestionSubtypeId
                };
                this.Rows.Add(rowTestsRow);
                return(rowTestsRow);
            }
コード例 #2
0
            public TestsRow AddTestsRow(string Description, string GUID, bool IsPractice, string Name, int QuestionSubtypeId, int QuestionTypeId, int Version)
            {
                TestsRow rowTestsRow = ((TestsRow)(this.NewRow()));

                rowTestsRow.ItemArray = new object[] {
                    Description,
                    GUID,
                    null,
                    IsPractice,
                    Name,
                    QuestionSubtypeId,
                    QuestionTypeId,
                    Version
                };
                this.Rows.Add(rowTestsRow);
                return(rowTestsRow);
            }
コード例 #3
0
ファイル: DatosSet.cs プロジェクト: aritza15/DataSet
        public List <Pregunta> DevolverPreguntasPorTest(int IdTest, out string msg) // TODO Haces lo que siempre digo que no hay que hacer. Buscas entre TODAS las preguntas (pueden ser miles) en lugar de buscar el test (que por cierto no controlas que puede no existir) y de ese SUS preguntas (que ya serán pocas) --> Error fundamental
        {
            msg = "";

            TestsRow drTests = ds.Tests.FindById(IdTest);

            var             drPreguntas = drTests.GetPreguntasRows();
            List <Pregunta> preguntas   = (from preg in drPreguntas
                                           select new Pregunta(preg.NPregunta, preg.Enunciado, preg.Respuesta)).ToList();

            if (preguntas == null)
            {
                msg = "La lista de preguntas esta vacia";
                return(null);
            }
            return(preguntas);
        }
コード例 #4
0
 public TestsRowChangeEvent(TestsRow row, DataRowAction action)
 {
     eventRow    = row;
     eventAction = action;
 }
コード例 #5
0
 public void RemoveTestsRow(TestsRow row)
 {
     Rows.Remove(row);
 }
コード例 #6
0
 public void AddTestsRow(TestsRow row)
 {
     Rows.Add(row);
 }
コード例 #7
0
 public TestsRowChangeEvent(TestsRow row, System.Data.DataRowAction action)
 {
     this.eventRow    = row;
     this.eventAction = action;
 }
 public TestsRowChangeEvent(TestsRow row, global::System.Data.DataRowAction action) {
     this.eventRow = row;
     this.eventAction = action;
 }
 public void RemoveTestsRow(TestsRow row) {
     this.Rows.Remove(row);
 }
 public void AddTestsRow(TestsRow row) {
     this.Rows.Add(row);
 }