/// <summary> /// 修改清单状态 /// </summary> /// <returns></returns> public JsonResult AddRefuseReason(int type, int id, string reason = "") { if (type == 0) //审批拒绝 { try { var model = new Tr_TrainTeacherOrder(); model.ClassId = id; model.CreateUserID = CurrentUser.UserId; model.CreateTime = DateTime.Now; model.OrderStatu = 2; model.OrderTime = DateTime.Now; model.Reason = reason; model.IsDelete = 0; var aa = _teacherManager.AddTrainTeacherOrder(model); SendYuyue(id, type, reason); return(Json(new { result = 1, content = LanguageResources.Common.SaveSuccess }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(new { result = 0, content = LanguageResources.Common.SaveFailed }, JsonRequestBehavior.AllowGet)); } } else //审批通过 { try { var model = new Tr_TrainTeacherOrder(); model.ClassId = id; model.CreateUserID = CurrentUser.UserId; model.CreateTime = DateTime.Now; model.OrderStatu = 1; model.OrderTime = DateTime.Now; model.IsDelete = 0; var aa = _teacherManager.AddTrainTeacherOrder(model); SendYuyue(id, type, reason); return(Json(new { result = 1, content = LanguageResources.Common.SaveSuccess }, JsonRequestBehavior.AllowGet)); } catch { return(Json(new { result = 0, content = LanguageResources.Common.SaveFailed }, JsonRequestBehavior.AllowGet)); } } }
/// <summary> /// 新增一个讲师预约 /// </summary> /// <returns></returns> public int AddTrainTeacherOrder(Tr_TrainTeacherOrder model) { return(_dataAccess.AddEntity(model)); }
/// <summary> ///修改讲师预约理由 /// </summary> /// <param name="reply"></param> /// <returns></returns> public int EditTrainTeacherOrder(Tr_TrainTeacherOrder Order) { return(_dataAccess.UpdateEntity(Order)); }