コード例 #1
0
        /// <summary>
        /// 编辑课时
        /// </summary>
        /// <param name="args"></param>
        /// <returns></returns>
        public CommandResult <int> UpdateAttendClass(UpdateAttendClassArgs args)
        {
            ArgumentHelper.Require(args.SchoolId, "SchoolId", Arguments.Positive);
            ArgumentHelper.Require(args.ModifyBy, "ModifyBy", Arguments.Positive);

            return(ContainerFactory <IClassesRepository> .Instance.UpdateAttendClass(args));
        }
コード例 #2
0
 public string UpdateAttendClass(UpdateAttendClassArgs model)
 {
     if (model != null)
     {
         model.ModifyBy = ApplicationContext.UserId;
         model.SchoolId = ApplicationContext.SchoolId;
         var result = ClassesService.Instance.UpdateAttendClass(model);
         return(JsonHelper.Serialize(result));
     }
     return(JsonHelper.Serialize(CommandResult.Failure <int>()));
 }
コード例 #3
0
        public CommandResult <int> UpdateAttendClass(UpdateAttendClassArgs args)
        {
            try
            {
                var result = ContainerFactory <ISqlExcuteContext> .Instance.ExcuteProceDure(args.SchoolId, "update_attend_class", args);

                return(result);
            }
            catch (Exception e)
            {
                LogHelper.Error(this.GetType(), "班级管理-编辑课时失败,AttendClassId:" + args.AttendClassId, e);
                return(CommandResult.Failure <int>(e.ToString()));
            }
        }