Example #1
0
 public dynamic AddQuestionerrorCorrection(W_QuestionerrorCorrection model)
 {
     model.AddTime = DateTime.Now;
     model.StuID   = this.SafeGetStuId;
     model.Valid   = 0;
     return(Success(mapper.AddQuestionerrorCorrection(model) ? "操作成功" : "操作失败"));
 }
Example #2
0
        /// <summary>
        /// 根据主键ID处理纠错
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool UpdateQuestionerrorCorrectionByID(CampusModel model)
        {
            W_QuestionerrorCorrection coModel = Orm.Single <W_QuestionerrorCorrection>(x => x.ID == model.ID);

            if (coModel == null)
            {
                throw new ApiException("您要操作的数据不存在");
            }
            coModel.Valid = 1;
            return(Orm.Update(coModel) > 0);
        }
Example #3
0
        /// <summary>
        /// 删除纠错
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool DeleteQuestionerrorCorrection(W_QuestionerrorCorrection model)
        {
            W_QuestionerrorCorrection CorrectionModel = Orm.Single <W_QuestionerrorCorrection>(x => x.ID == model.ID);

            if (CorrectionModel == null)
            {
                throw new ApiException("您要操作的数据不存在");
            }

            return(Orm.Delete <W_QuestionerrorCorrection>(x => x.ID == model.ID) > 0);
        }
Example #4
0
 public dynamic DeleteQuestionerrorCorrection(W_QuestionerrorCorrection model)
 {
     return(Success(mapper.DeleteQuestionerrorCorrection(model) ? "操作成功" : "操作失败"));
 }
Example #5
0
 /// <summary>
 /// 添加纠错
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool AddQuestionerrorCorrection(W_QuestionerrorCorrection model)
 {
     return(Orm.Insert(model) > 0);
 }