示例#1
0
        protected void SubmitBtn_Click(object sender, ImageClickEventArgs e)
        {
            try
            {

                var quesModel = new Models.Questionnaire();
                Int32 total = 0;
                quesModel.QuestionnaireId = Guid.NewGuid();
                quesModel.AppraiserId = Profile.CurrentUser.UserId;
                quesModel.AppraiserTime = DateTime.Now;
                quesModel.CourseDevelop = Convert.ToInt32(radCourseDevelop.SelectedValue);
                total +=  (int)quesModel.CourseDevelop;
                quesModel.CourseId = this.courseId;
                quesModel.CourseKey = Convert.ToInt32(radCourseKey.SelectedValue);
                total += (int)quesModel.CourseKey;
                quesModel.CoursePractical = Convert.ToInt32(radCoursePractical.SelectedValue);
                total += (int)quesModel.CoursePractical;
                quesModel.CourseRich = Convert.ToInt32(radContentRich.SelectedValue);
                total += (int)quesModel.CourseRich;
                quesModel.CourseSubject = Convert.ToInt32(radSubject.SelectedValue);
                total += (int)quesModel.CourseSubject;
                quesModel.OrgArrange = Convert.ToInt32(radOrgArrange.SelectedValue);
                total += (int)quesModel.OrgArrange;
                quesModel.OrgService = Convert.ToInt32(radOrgService.SelectedValue);
                total += (int)quesModel.OrgService;
                quesModel.OrgTime = Convert.ToInt32(radOrgTime.SelectedValue);
                total += (int)quesModel.OrgTime;
                quesModel.TeacherBearing = Convert.ToInt32(radTeacherBearing.SelectedValue);
                total += (int)quesModel.TeacherBearing;
                quesModel.TeacherCommunication = Convert.ToInt32(radTeacherCommunication.SelectedValue);
                total += (int)quesModel.TeacherCommunication;
                quesModel.TeacherLanguage = Convert.ToInt32(radTeacherLanguage.SelectedValue);
                total += (int)quesModel.TeacherLanguage;
                quesModel.TeacherPrepare = Convert.ToInt32(radTeacherPrepare.SelectedValue);
                total += (int)quesModel.TeacherPrepare;
                quesModel.TeacherStyle = Convert.ToInt32(radTeacherStyle.SelectedValue);
                total += (int)quesModel.TeacherStyle;
                quesModel.TotalEvaluation = Convert.ToInt32(radAll.SelectedValue);
               // total += (int)quesModel.TotalEvaluation;
                quesModel.Suggest = txtSuggest.InnerText.Trim();
                quesModel.Total = total;
                var queBll = new BLL.Questionnaire();
                if (queBll.Add(quesModel))
                {
                    queBll.SubmitQuestionnaireState(Profile.CurrentUser.UserId, courseId);
                }
                Response.Redirect("MyQuestionnaire.aspx");
            }
            catch (Exception ex)
            {
                Utility.LogHelper.WriteLogofExceptioin(ex);
            }
        }