Exemplo n.º 1
0
        public void ProcessRequest(HttpContext context)
        {
            string AutoID = context.Request["AutoID"];

            BLLJIMP.Model.QuestionnaireSet QuestionnaireSetModel = bllQuestion.GetByKey <BLLJIMP.Model.QuestionnaireSet>("AutoID", AutoID);
            QuestionnaireSetModel = bllQuestion.ConvertRequestToModel <BLLJIMP.Model.QuestionnaireSet>(QuestionnaireSetModel);
            apiResp.status        = bllQuestion.Update(QuestionnaireSetModel);
            if (apiResp.status)
            {
                apiResp.code = (int)APIErrCode.IsSuccess;
                apiResp.msg  = "更新完成";
                bllLog.Add(BLLJIMP.Enums.EnumLogType.Marketing, BLLJIMP.Enums.EnumLogTypeAction.Update, bllLog.GetCurrUserID(), "编辑答题[id=" + AutoID + "]");
            }
            else
            {
                apiResp.code = (int)APIErrCode.OperateFail;
                apiResp.msg  = "更新失败";
            }
            bllQuestion.ContextResponse(context, apiResp);
        }
Exemplo n.º 2
0
Arquivo: Add.ashx.cs Projeto: uvbs/mmp
 public void ProcessRequest(HttpContext context)
 {
     BLLJIMP.Model.QuestionnaireSet QuestionnaireSetModel =
         bllQuestion.ConvertRequestToModel <BLLJIMP.Model.QuestionnaireSet>(new BLLJIMP.Model.QuestionnaireSet());
     QuestionnaireSetModel.CreateTime   = DateTime.Now;
     QuestionnaireSetModel.CreateUserId = currentUserInfo.UserID;
     QuestionnaireSetModel.WebsiteOwner = bllQuestion.WebsiteOwner;
     apiResp.status = bllQuestion.Add(QuestionnaireSetModel);
     if (apiResp.status)
     {
         apiResp.code = (int)APIErrCode.IsSuccess;
         apiResp.msg  = "新增完成";
         bllLog.Add(BLLJIMP.Enums.EnumLogType.Marketing, BLLJIMP.Enums.EnumLogTypeAction.Add, bllLog.GetCurrUserID(), "添加答题");
     }
     else
     {
         apiResp.code = (int)APIErrCode.OperateFail;
         apiResp.msg  = "新增失败";
     }
     bllQuestion.ContextResponse(context, apiResp);
 }