Example #1
0
        /// <summary> 更新数据 </summary>
        public void Update()
        {
            try
            {
                // 获取请求Id
                int tempRequstQTID = Common.GetRequest("Index").ToInt();


                QuestionTypeService.QuestionType tempQuestionType = new QuestionTypeService.QuestionType();
                tempQuestionType.QTName         = Common.GetRequest("Name");
                tempQuestionType.Describe       = Common.GetRequest("Describe");
                tempQuestionType.QTCreatePerson = GetUserId();
                tempQuestionType.EnterpriseCode = EnterpriseCode;

                if (tempRequstQTID == 0)
                {
                    MgrServices.QuestionTypeService.AddQuestionType(tempQuestionType);
                }
                else if (tempRequstQTID > 0)
                {
                    tempQuestionType.QTID = tempRequstQTID;
                    MgrServices.QuestionTypeService.EditQuestionType(tempQuestionType);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #2
0
        /// <summary> 获取问题类型信息 </summary>
        public void GetQutestionTypeInfo()
        {
            try
            {
                // 获取请求Id
                int tempRequstQTID = Common.GetRequest("Index").ToInt();


                QuestionTypeService.QuestionType tempQuestionType = MgrServices.QuestionTypeService.GetQuestionInfo(tempRequstQTID);
                String json = Common.ObjectToJson(tempQuestionType);
                Context.Response.Write(json);
            }
            catch (Exception)
            {
                throw;
            }
        }