private string DoSubmit()
        {
            string result = "";

            Model.CCOM.Homework work_model = new BLL.CCOM.Homework().GetModel(Homework_id);
            this.type.InnerText = new BLL.CCOM.Datum_type().GetModel(work_model.DatumType_id).DatumType_name;
            if (work_model.DatumType_id == 1)//周志
            {
                Model.CCOM.Week_log week_model = new BLL.CCOM.Week_log().GetModel(CheckId);
                week_model.Advice = this.txtAdvice.InnerText;
                if (!new BLL.CCOM.Week_log().Update(week_model))
                {
                    result = "评价发生异常";
                }
            }
            else                            //其他
            {
                Model.CCOM.Datum datum_model = new BLL.CCOM.Datum().GetModel(CheckId);
                datum_model.Tutor_advice = this.txtAdvice.InnerText;
                if (!new BLL.CCOM.Datum().Update(datum_model))
                {
                    result = "评价发生异常";
                }
            }

            return(result);
        }
        public void ShowInfo()
        {
            Model.CCOM.Homework work_model = new BLL.CCOM.Homework().GetModel(Homework_id);
            this.type.InnerText = new BLL.CCOM.Datum_type().GetModel(work_model.DatumType_id).DatumType_name;
            if (work_model.DatumType_id == 1)//周志
            {
                this.fileTR.Visible         = false;
                this.logTRcontent.Visible   = true;
                this.logTRproblem.Visible   = true;
                this.logTRplan.Visible      = true;
                this.logTRstarttime.Visible = true;
                this.logTRendtime.Visible   = true;

                Model.CCOM.Week_log       week_model = new BLL.CCOM.Week_log().GetModel(CheckId);
                Model.CCOM.Topic_relation rela_model = new BLL.CCOM.Topic_relation().GetModel(week_model.Topic_relation_id);
                this.name.InnerText         = new BLL.CCOM.User_information().GetModel(rela_model.Student_id).User_realname;
                this.time.InnerText         = week_model.Submit_time.ToString("yyyy年MM月dd日 ddd HH:mm");
                this.txtAdvice.InnerText    = week_model.Advice;
                this.txtStarttime.InnerText = week_model.Start_time.ToString("yyyy-MM-dd");
                this.txtEndtime.InnerText   = week_model.End_time.ToString("yyyy-MM-dd");
                this.lbContent.InnerText    = week_model.Work_condition;
                this.lbProblem.InnerText    = week_model.Problem;
                this.lbPlan.InnerText       = week_model.Work_plan;
            }
            else                            //其他
            {
                this.fileTR.Visible         = true;
                this.logTRcontent.Visible   = false;
                this.logTRproblem.Visible   = false;
                this.logTRplan.Visible      = false;
                this.logTRstarttime.Visible = false;
                this.logTRendtime.Visible   = false;

                Model.CCOM.Datum          datum_model = new BLL.CCOM.Datum().GetModel(CheckId);
                Model.CCOM.Topic_relation rela_model  = new BLL.CCOM.Topic_relation().GetModel(datum_model.Topic_relation_id);
                this.name.InnerText      = new BLL.CCOM.User_information().GetModel(rela_model.Student_id).User_realname;
                this.time.InnerText      = datum_model.Submit_time.ToString("yyyy年MM月dd日 ddd HH:mm");
                this.txtAdvice.InnerText = datum_model.Tutor_advice;

                //this.file.InnerHtml = "<p><a href='" +
                //                "/home/news/Attach.aspx?id=" + DESEncrypt.Encrypt(datum_model.Datum_id.ToString()) +
                //                ("&address=") + (HttpUtility.UrlEncode(datum_model.File_path)) +
                //                ("&name=") + (HttpUtility.UrlEncode(datum_model.File_name)) +
                //                ("' target='_blank' >") +
                //                (datum_model.File_name) +
                //                ("</a>") +
                //                (OnlineViewHelper.GetOnlineViewWrapLink(datum_model.File_path, datum_model.File_name)) + ("</p>");
                this.lbtnDownLoad.Text = datum_model.File_name;
            }
        }
        private string DoSubmit()
        {
            string result = "";

            Model.CCOM.Homework work_model = new BLL.CCOM.Homework().GetModel(homeworkId);
            Model.CCOM.Week_log model      = new BLL.CCOM.Week_log().GetModel(" Homework_id=" + homeworkId);
            try
            {
                if (model == null)          //增加一条数据
                {
                    Model.CCOM.Week_log log_model = new Model.CCOM.Week_log();
                    log_model.Topic_relation_id = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + GetAdminInfo_CCOM().User_id).Topic_relation_id;
                    log_model.Homework_id       = homeworkId;
                    log_model.Start_time        = Convert.ToDateTime(this.txtStarttime.Value);
                    log_model.End_time          = Convert.ToDateTime(this.txtEndtime.Value);
                    log_model.Work_condition    = this.txtContent.InnerText;
                    log_model.Problem           = this.txtProblem.InnerText;
                    log_model.Work_plan         = this.txtPlan.InnerText;
                    log_model.Submit_time       = DateTime.Now;
                    if (log_model.Start_time == null || log_model.End_time == null || log_model.Work_condition == "" || log_model.Problem == "" || log_model.Work_plan == "")
                    {
                        return("请完善所有表项");
                    }
                    new BLL.CCOM.Week_log().Add(log_model);
                }
                else                        //更新一条数据
                {
                    model.Start_time     = Convert.ToDateTime(this.txtStarttime.Value);
                    model.End_time       = Convert.ToDateTime(this.txtEndtime.Value);
                    model.Work_condition = this.txtContent.InnerText;
                    model.Problem        = this.txtProblem.InnerText;
                    model.Work_plan      = this.txtPlan.InnerText;
                    model.Submit_time    = DateTime.Now;
                    if (model.Start_time == null || model.End_time == null || model.Work_condition == "" || model.Problem == "" || model.Work_plan == "")
                    {
                        return("请完善所有表项");
                    }
                    new BLL.CCOM.Week_log().Update(model);
                }
            }
            catch
            {
                result = "提交发生异常";
            }

            return(result);
        }
        public void ShowInfo(int homeworkId)
        {
            Model.CCOM.Homework work_model = new BLL.CCOM.Homework().GetModel(homeworkId);
            this.type.InnerText = new BLL.CCOM.Datum_type().GetModel(work_model.DatumType_id).DatumType_name;
            Boolean isOpen = new BLL.CCOM.Teach_week().GetModel(work_model.Week_id).State;

            if (isOpen)
            {
                this.massage.InnerText     = "";
                this.txtUserUpload.Enabled = true;
                this.btnUpload.Enabled     = true;
                this.btnSubmit.Text        = "提 交";
                this.btnSubmit.Enabled     = true;
            }
            else
            {
                this.massage.InnerText     = "已关闭";
                this.txtUserUpload.Enabled = false;
                this.btnUpload.Enabled     = false;
                this.btnSubmit.Text        = "已关闭";
                this.btnSubmit.Enabled     = false;
            }
            if (work_model.DatumType_id == 1)
            {
                this.fileTR.Visible         = false;
                this.logTRcontent.Visible   = true;
                this.logTRproblem.Visible   = true;
                this.logTRplan.Visible      = true;
                this.logTRstarttime.Visible = true;
                this.logTRendtime.Visible   = true;
                this.btnSubmit.Visible      = true;
                Model.CCOM.Week_log log_model = new BLL.CCOM.Week_log().GetModel(" Homework_id=" + homeworkId);
                if (log_model == null)
                {
                    this.state.InnerText = "未提交";
                }
                else
                {
                    this.state.InnerText      = "已提交";
                    this.time.InnerText       = log_model.Submit_time.ToString("yyyy年MM月dd日 ddd HH:mm");
                    this.advice.InnerText     = log_model.Advice;
                    this.txtStarttime.Value   = log_model.Start_time.ToString("yyyy-MM-dd");
                    this.txtEndtime.Value     = log_model.End_time.ToString("yyyy-MM-dd");
                    this.txtContent.InnerText = log_model.Work_condition;
                    this.txtProblem.InnerText = log_model.Problem;
                    this.txtPlan.InnerText    = log_model.Work_plan;
                    this.btnSubmit.Text       = "重新提交";
                }
            }
            else
            {
                this.fileTR.Visible         = true;
                this.logTRcontent.Visible   = false;
                this.logTRproblem.Visible   = false;
                this.logTRplan.Visible      = false;
                this.logTRstarttime.Visible = false;
                this.logTRendtime.Visible   = false;
                this.btnSubmit.Visible      = false;
                Model.CCOM.View_Datum model = new BLL.CCOM.View_Datum().GetModel(" Homework_id=" + homeworkId);
                if (model == null)
                {
                    this.state.InnerText = "未提交";
                }
                else
                {
                    this.state.InnerText   = "已提交";
                    this.time.InnerText    = model.Submit_time.ToString("yyyy年MM月dd日 ddd HH:mm");
                    this.advice.InnerText  = model.Tutor_advice;
                    this.lbtnDownLoad.Text = model.File_name;
                    this.btnSubmit.Text    = "重新提交";
                }
            }
        }
        public void ShowInfo(int homeworkId)
        {
            Model.CCOM.Homework work_model = new BLL.CCOM.Homework().GetModel(homeworkId);
            this.type.InnerText = new BLL.CCOM.Datum_type().GetModel(work_model.DatumType_id).DatumType_name;
            Boolean isOpen = new BLL.CCOM.Teach_week().GetModel(work_model.Week_id).State;

            if (isOpen)
            {
                this.massage.InnerText     = "";
                this.txtUserUpload.Enabled = true;
                this.btnUpload.Enabled     = true;
                this.btnSubmit.Text        = "提 交";
                this.btnSubmit.Enabled     = true;
            }
            else
            {
                this.massage.InnerText     = "已关闭";
                this.txtUserUpload.Enabled = false;
                this.btnUpload.Enabled     = false;
                this.btnSubmit.Text        = "已关闭";
                this.btnSubmit.Enabled     = false;
            }
            if (work_model.DatumType_id == 1)//周志
            {
                this.fileTR.Visible         = false;
                this.logTRcontent.Visible   = true;
                this.logTRproblem.Visible   = true;
                this.logTRplan.Visible      = true;
                this.logTRstarttime.Visible = true;
                this.logTRendtime.Visible   = true;
                this.btnSubmit.Visible      = true;
                Model.CCOM.Week_log log_model = new BLL.CCOM.Week_log().GetModel(" Homework_id=" + homeworkId);
                if (log_model == null)
                {
                    this.state.InnerText = "未提交";
                }
                else
                {
                    this.state.InnerText      = "已提交";
                    this.time.InnerText       = log_model.Submit_time.ToString("yyyy年MM月dd日 ddd HH:mm");
                    this.advice.InnerText     = log_model.Advice;
                    this.txtStarttime.Value   = log_model.Start_time.ToString("yyyy-MM-dd");
                    this.txtEndtime.Value     = log_model.End_time.ToString("yyyy-MM-dd");
                    this.txtContent.InnerText = log_model.Work_condition;
                    this.txtProblem.InnerText = log_model.Problem;
                    this.txtPlan.InnerText    = log_model.Work_plan;
                    this.btnSubmit.Text       = "重新提交";
                }
            }
            else //开题报告
            {
                this.fileTR.Visible         = true;
                this.logTRcontent.Visible   = false;
                this.logTRproblem.Visible   = false;
                this.logTRplan.Visible      = false;
                this.logTRstarttime.Visible = false;
                this.logTRendtime.Visible   = false;
                this.btnSubmit.Visible      = false;
                Model.CCOM.View_Datum model = new BLL.CCOM.View_Datum().GetModel(" Homework_id=" + homeworkId);
                var user_model = HttpContext.Current.Session[MyKeys.SESSION_ADMIN_INFO] as Model.CCOM.User_information;//获得userid
                //String User_id_String = user_model.User_id.ToString();
                Model.CCOM.View_Datum model_1 = new BLL.CCOM.View_Datum().GetModel("User_id=" + user_model.User_id.ToString() + "and  Homework_id=" + homeworkId);

                if (model_1 == null)
                {
                    this.state.InnerText = "未提交";
                }
                else
                {
                    this.state.InnerText   = "已提交";
                    this.time.InnerText    = model.Submit_time.ToString("yyyy年MM月dd日 ddd HH:mm");
                    this.advice.InnerText  = model.Tutor_advice;
                    this.lbtnDownLoad.Text = model.File_name;
                    this.btnSubmit.Text    = "重新提交";
                }
            }
        }