Пример #1
0
        public GenericData startNewSession(Int64 ouid, string modality, string language, DateTime starttime)
        {
            GenericData gd = new GenericData();

            object[] arg = new Object[4] {
                ouid, modality, language, starttime
            };
            StoredProcedureGrab storedprocedure = new StoredProcedureGrab(serverName, dbName, userName, passWord, "sp_start_session", arg);

            spData = storedprocedure.GetReader();

            if (!spData.getErrorStatus())
            {
                gd.setGenericData(spData.getTheOnlyValue());
            }
            else
            {
                gd.setGenericData(spData.getErrorDetails());
            }
            //=>
            //reader.Read();
            //gd.setGenericData(reader["S_id"].ToString());
            //reader.Close();

            return(gd);
        }
Пример #2
0
        //sp_ws_insert_survey_item adding user_wpl
        public GenericData insertSurveyItemUserWpl(Int32 OUId, string timeString, DateTime dateTime, string languageDatabaseName, Int32 sa1, Int32 sa2,
                                                   Int32 sa3, Int32 sb1, Int32 sb2, Int32 sb3, Int32 sb4, Int32 sc1, Int32 sc2, Int32 sc3, Int32 sc4, Int32 sc5, Int32 sc6,
                                                   Int32 sd1, Int32 sd2, Int32 sd3, Int32 se1, Int32 se2, string se3)
        {
            GenericData gd = new GenericData();

            Object[] arg = new Object[23] {
                OUId, timeString, dateTime, languageDatabaseName, sa1, sa2, sa3, sb1, sb2, sb3, sb4, sc1,
                sc2, sc3, sc4, sc5, sc6, sd1, sd2, sd3, se1, se2, se3
            };
            StoredProcedureGrab storedprocedure = new StoredProcedureGrab(serverName, dbName, userName, passWord, "sp_ws_insert_survey_item_user_wpl", arg);

            spData = storedprocedure.GetReader();

            if (!spData.getErrorStatus())
            {
                gd.setGenericData(spData.getTheOnlyValue());
            }
            else
            {
                gd.setGenericData(spData.getErrorDetails());
            }

            return(gd);
        }
Пример #3
0
        public GenericData insertProfileData(Int64 ouid, string lngdesc, string moddesc, int wrkplid, int clngplid, DateTime prfdate,
                                             string timestring, string prflink, string cdata, Int64 sessionid)
        {
            GenericData gd = new GenericData();

            Object[] arg = new Object[10] {
                ouid, lngdesc, moddesc, wrkplid, clngplid, prfdate, timestring, prflink, cdata, sessionid
            };
            StoredProcedureGrab storedprocedure = new StoredProcedureGrab(serverName, dbName, userName, passWord, "sp_insert_profiles", arg);

            spData = storedprocedure.GetReader();


            if (!spData.getErrorStatus())
            {
                gd.setGenericData(spData.getTheOnlyValue());
            }
            else
            {
                gd.setGenericData(spData.getErrorDetails());
            }
            //=>
            //reader.Read();
            //gd.setGenericData(reader["PRF_id"].ToString());
            //reader.Close();

            return(gd);
        }
Пример #4
0
        public GenericData insertItemsTracker(string ansrfldid, int tstgrpid, string matches, string useranswer, double userscore,
                                              double possiblepoints, double pointsgained, int passorfail, string judgingkeys)
        {
            GenericData gd = new GenericData();

            Object[] arg = new Object[9] {
                ansrfldid, tstgrpid, matches, useranswer, userscore, possiblepoints, pointsgained,
                passorfail, judgingkeys
            };
            StoredProcedureGrab storedprocedure = new StoredProcedureGrab(serverName, dbName, userName, passWord, "sp_insert_items_tracker", arg);

            spData = storedprocedure.GetReader();

            if (!spData.getErrorStatus())
            {
                gd.setGenericData(spData.getTheOnlyValue());
            }
            else
            {
                gd.setGenericData(spData.getErrorDetails());
            }
            //=>
            //reader.Read();
            ///////////gd.setGenericData(reader["genstring"].ToString());
            //reader.Close();

            return(gd);
        }
Пример #5
0
        public GenericData insertTestGroup(Int64 sessionid, String timestring, String updnscore, String dproscore, String rawresponse,
                                           String moddesc, String lngdesc, Int64 userid, DateTime datein)
        {
            GenericData gd = new GenericData();

            Object[] arg = new Object[9] {
                sessionid, timestring, updnscore, dproscore, rawresponse, moddesc, lngdesc, userid, datein
            };
            StoredProcedureGrab storedprocedure = new StoredProcedureGrab(serverName, dbName, userName, passWord, "sp_insert_test_group", arg);

            spData = storedprocedure.GetReader();

            if (!spData.getErrorStatus())
            {
                gd.setGenericData(spData.getTheOnlyValue());
            }
            else
            {
                gd.setGenericData(spData.getErrorDetails());
            }

            //=>
            //reader.Read();
            //gd.setGenericData(reader["TG_id"].ToString());
            //reader.Close();

            return(gd);
        }
Пример #6
0
        public string InsertProfileData(string dbName, Int64 OUid, string lngDesc, string modDesc, int wrkPLid, int clngPLid,
                                        DateTime prfDate, string timeString, string prfLink, string CData, Int64 sessionID)
        {
            DB          db = new DB(dbName);
            GenericData gd = new GenericData();

            return(db.insertProfileData(OUid, lngDesc, modDesc, wrkPLid, clngPLid, prfDate, timeString, prfLink, CData, sessionID).toJSON());
        }
Пример #7
0
        } //sp_ws_get_test_recovery_item

        public GenericData deleteTestRecoveryItemByTRid(Int64 TRid)
        {
            GenericData gd = new GenericData();

            Object[] arg = new Object[1] {
                TRid
            };
            StoredProcedureGrab storedprocedure = new StoredProcedureGrab(serverName, dbName, userName, passWord, "sp_ws_delete_test_recovery_item_by_TRid", arg);

            spData = storedprocedure.GetReader();

            if (!spData.getErrorStatus())
            {
                gd.setGenericData(spData.getTheOnlyValue());
            }
            else
            {
                gd.setGenericData(spData.getErrorDetails());
            }

            return(gd);
        }
Пример #8
0
        //sp_ws_insert_test_recovery_item
        public GenericData insertTestRecoveryItem(Int32 OUId, Int32 langId, Int32 modId, Int64 sessionId, String startTime, String testletNames, String lastSubmittedSet)
        {
            GenericData gd = new GenericData();

            Object[] arg = new Object[7] {
                OUId, langId, modId, sessionId, startTime, testletNames, lastSubmittedSet
            };
            StoredProcedureGrab storedprocedure = new StoredProcedureGrab(serverName, dbName, userName, passWord, "sp_ws_insert_test_recovery_item", arg);

            spData = storedprocedure.GetReader();

            if (!spData.getErrorStatus())
            {
                gd.setGenericData(spData.getTheOnlyValue());
            }
            else
            {
                gd.setGenericData(spData.getErrorDetails());
            }

            return(gd);
        }
Пример #9
0
        public GenericData insertODAError(string errdesc, string errurl, string errdata, string langdesc, string moddesc)
        {
            GenericData gd = new GenericData();

            Object[] arg = new Object[5] {
                errdesc, errurl, errdata, langdesc, moddesc
            };
            StoredProcedureGrab storedprocedure = new StoredProcedureGrab(serverName, dbName, userName, passWord, "sp_insert_oda_error", arg);

            spData = storedprocedure.GetReader();

            if (!spData.getErrorStatus())
            {
                gd.setGenericData(spData.getTheOnlyValue());
            }
            else
            {
                gd.setGenericData(spData.getErrorDetails());
            }

            return(gd);
        }