Пример #1
0
        protected bool Insert(string fecha, string codigo_paciente, double desviacion, double media, TypeOf_AS_Test tipo_prueba, int total_aciertos, int total_aciertos_ext, int total_omisiones, int total_equivocaciones, bool completo)
        {
            int code = this.Connection.Connect();

            if (code != 0)
            {
                return(false);
            }
            string query = string.Format("INSERT INTO {0} ( {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10} ) VALUES ('{11}','{12}',{13},{14},{15},{16},{17},{18},{19},{20})",
                                         TN, FechaColumnName, CodigoPacienteColumnName, DesviacionColumnName, MediaColumnName, TipoPruebaColumnName, TotalAciertosColumnName, TotalAciertosEXTColumnName, TotalOmisionesColumnName, TotalEquivocacionesColumnName, CompletoColumnName,
                                         fecha, codigo_paciente, FunctionLibrary.ConvertPointBased(desviacion), FunctionLibrary.ConvertPointBased(media), (int)tipo_prueba, total_aciertos, total_aciertos_ext, total_omisiones, total_equivocaciones, completo);
            var comm = new OleDbCommand(query, this.Connection.OleDB_Connection);

            this.Connection.Open();
            comm.ExecuteNonQuery();
            this.Connection.Disconnect();
            return(true);
        }
Пример #2
0
        public bool Insert(string fecha, string codigo_paciente, int bloque, int equivocaciones, int aciertos, int aciertos_ext, int omisiones, double media_tr, double desv_tr)
        {
            int code = this.Connection.Connect();

            if (code != 0)
            {
                return(false);
            }
            string query = string.Format("INSERT INTO {0} ( {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9} ) VALUES ('{10}','{11}',{12},{13},{14},{15},{16},{17},{18})",
                                         TN, FechaColumnName, CodigoPacienteColumnName, BloqueColumnName, EquivocacionesColumnName, AciertosColumnName, AciertosEXTColumnName, OmisionesColumnName, MediaTRColumnName, DesviacionTRColumnName,
                                         fecha, codigo_paciente, bloque, equivocaciones, aciertos, aciertos_ext, omisiones, FunctionLibrary.ConvertPointBased(media_tr), FunctionLibrary.ConvertPointBased(desv_tr));
            var comm = new OleDbCommand(query, this.Connection.OleDB_Connection);

            this.Connection.Open();
            comm.ExecuteNonQuery();
            this.Connection.Disconnect();
            return(true);
        }