Пример #1
0
        public void addTaskSubmit(string groupid, string taskid, DateTime submittime, string userId, string submittimes, int taskgrade, string taskcomment, string submitterid, string courseid, string taskurl)
        {
            //TermInformationDBContext tIdb = new TermInformationDBContext();
            //TermInformation term = new TermInformation();
            int num;
            TaskSubmitDBContext tsdb = new TaskSubmitDBContext();
            TaskSubmit          ts   = new TaskSubmit();

            try
            {
                ts.groupId     = groupid;
                ts.taskId      = taskid;
                ts.submitTime  = submittime;
                ts.userId      = userId;
                ts.submitTimes = submittimes;
                ts.taskGrade   = taskgrade;
                ts.taskComment = taskcomment;
                ts.submitterId = submitterid;
                ts.courseId    = courseid;
                ts.taskUrl     = taskurl;
                tsdb.taskSubmits.Add(ts);
                num = tsdb.SaveChanges();
                // tIdb.termInformations.Add(term);
                //tIdb.SaveChanges();
            }
            catch (Exception e)
            {
            }
        }
Пример #2
0
        public List <TaskSubmit> getTaskSubmits()
        {
            TaskSubmitDBContext tasksubmitdb = new TaskSubmitDBContext();
            List <TaskSubmit>   taskSubmits  = tasksubmitdb.taskSubmits.ToList();

            tasksubmitdb = null;
            return(taskSubmits);
        }