示例#1
0
        public void Delete(int id)
        {
            List <SqlParameter> pars = new List <SqlParameter>();

            pars.Add(new SqlParameter("id", id));
            EnterpriseDAO.Delete("DeleteTestConfiguration", System.Data.CommandType.StoredProcedure, pars);
        }
示例#2
0
        public TestConfiguration Get(int id)
        {
            List <SqlParameter> pars = new List <SqlParameter>();

            pars.Add(new SqlParameter("id", id));
            var dt = EnterpriseDAO.Get("GetTestConfigurations", System.Data.CommandType.StoredProcedure, pars);

            return(DataHelper.DataTableToObjects <TestConfiguration>(dt, ToObject).FirstOrDefault());
        }
示例#3
0
        public List <TestSubject> Get(int testid)
        {
            List <SqlParameter> pars = new List <SqlParameter>();

            pars.Add(new SqlParameter("testID", testid));
            var dt = EnterpriseDAO.Get("GetTestSubjects", System.Data.CommandType.StoredProcedure, pars);

            return(DataHelper.DataTableToObjects <TestSubject>(dt, ToObject));
        }
示例#4
0
        public List <Entities.IDNamePair> Get(string tableName)
        {
            var dt = EnterpriseDAO.Get("select * from " + tableName, System.Data.CommandType.Text, null);

            return(DataHelper.DataTableToObjects <IDNamePair>(dt, ToObject));
        }
示例#5
0
 public void Update(TestConfiguration item)
 {
     EnterpriseDAO.Update("UpdateTestConfiguration", System.Data.CommandType.StoredProcedure, DataHelper.GetParamsForTestConfiguration(item));
 }
示例#6
0
        public List <TestConfiguration> Get()
        {
            var dt = EnterpriseDAO.Get("GetTestConfigurations", System.Data.CommandType.StoredProcedure, null);

            return(DataHelper.DataTableToObjects <TestConfiguration>(dt, ToObject));
        }
示例#7
0
 public void Update(Topic item)
 {
     EnterpriseDAO.Update("UpdateTopic", System.Data.CommandType.StoredProcedure, DataHelper.GetParamsForTopic(item));
 }
示例#8
0
 public void Add(TestSubject item)
 {
     EnterpriseDAO.Update("AddTestSubject", System.Data.CommandType.StoredProcedure, DataHelper.GetParamsForTestSubject(item));
 }
示例#9
0
        public List <Subject> Get()
        {
            var dt = EnterpriseDAO.Get("GetSubjects", System.Data.CommandType.StoredProcedure, null);

            return(DataHelper.DataTableToObjects <Subject>(dt, ToObject));
        }