Exemple #1
0
        /// <summary>
        /// 保存添加的讲座信息
        /// </summary>
        /// <param name="AddLectureName"></param>
        /// <param name="AddArchitectureId"></param>
        /// <returns></returns>
        public JsonResult AddSaveLecture(string AddNum, string AddSubject, string AddSummary,
                                         DateTime AddLectureTime, DateTime AddDeathLine, float AddSpan, int AddExpectPeople,
                                         int AddArchitectureId, int AddPlaceId, double AddScore)
        {
            Model.T_Base_Lecture lecture = new Model.T_Base_Lecture();
            lecture.Subject      = AddSubject;
            lecture.Summary      = AddSummary;
            lecture.LectureTime  = AddLectureTime;
            lecture.DeathLine    = AddDeathLine;
            lecture.Span         = AddSpan;
            lecture.ExpectPeople = AddExpectPeople;
            lecture.Score        = AddScore;
            int result = new BLL.T_Base_Lecture().AddSaveLecture(AddNum, lecture, AddPlaceId);

            if (result > -1)
            {
                return(Json("添加成功"));
            }
            else if (result == -1)
            {
                return(Json("添加失败"));
            }
            else if (result == -2)
            {
                return(Json("该时间段内存在其他讲座"));
            }
            else if (result == -3)
            {
                return(Json("请确保按照格式填入全部信息"));
            }
            else
            {
                return(Json("请联系管理员上报错误"));
            }
        }
Exemple #2
0
        /// <summary>
        /// 报名
        /// </summary>
        /// <param name="Num"></param>
        /// <param name="LectureId"></param>
        /// <returns></returns>
        public JsonResult Order(string Num, int LectureId)
        {
            int result = new BLL.T_Base_Lecture().Order(Num, LectureId);

            switch (result)
            {
            case -1:
                return(Json("报名失败"));

            case -2:
                return(Json("以报名"));

            case 0:
                return(Json("报名失败"));

            case 1:
                return(Json("报名成功"));

            case 2:
                return(Json("人满请注意后续地点通知"));

            default:
                return(Json("报名失败"));
            }
        }
Exemple #3
0
        /// <summary>
        /// 取消报名
        /// </summary>
        /// <param name="Num"></param>
        /// <param name="LectureId"></param>
        /// <returns></returns>
        public JsonResult OrderDelete(string Num, int LectureId)
        {
            int result = new BLL.T_Base_Lecture().OrderDelete(Num, LectureId);

            if (result == 1)
            {
                return(Json("取消成功"));
            }
            else if (result == -1)
            {
                return(Json("取消失败"));
            }
            else if (result == -2)
            {
                return(Json("取消失败,未报名"));
            }
            else
            {
                return(Json("取消失败"));
            }
        }
Exemple #4
0
        /// <summary>
        /// 保存修改后的信息
        /// </summary>
        /// <param name="EditNum"></param>
        /// <param name="EditId"></param>
        /// <param name="EditSubject"></param>
        /// <param name="EditSummary"></param>
        /// <param name="EditLectureTime"></param>
        /// <param name="EditDeathLine"></param>
        /// <param name="EditSpan"></param>
        /// <param name="EditExpectPeople"></param>
        /// <param name="EditArchitectureId"></param>
        /// <param name="EditPlaceId"></param>
        /// <param name="EditScore"></param>
        /// <returns></returns>
        public JsonResult EditSaveLecture(string EditNum, int EditApplyId, int EditLectureId, string EditSubject, string EditSummary,
                                          DateTime EditLectureTime, DateTime EditDeathLine, float EditSpan, int EditExpectPeople,
                                          int EditArchitectureId, int EditPlaceId, double EditScore)
        {
            Model.T_Base_Lecture lecture = new Model.T_Base_Lecture();
            lecture.Id           = EditLectureId;
            lecture.Subject      = EditSubject;
            lecture.Summary      = EditSummary;
            lecture.LectureTime  = EditLectureTime;
            lecture.DeathLine    = EditDeathLine;
            lecture.Span         = EditSpan;
            lecture.ExpectPeople = EditExpectPeople;
            lecture.Score        = EditScore;
            int result = new BLL.T_Base_Lecture().EditSaveLecture(EditNum, EditApplyId, lecture, EditPlaceId);

            if (result > -1)
            {
                return(Json("修改成功"));
            }
            else if (result == -1)
            {
                return(Json("修改失败"));
            }
            else if (result == -2)
            {
                return(Json("该时间段内存在其他讲座"));
            }
            else if (result == -3)
            {
                return(Json("未进行信息的修改"));
            }
            else
            {
                return(Json("请联系管理员上报错误"));
            }
        }