コード例 #1
0
 public JsonResult StudentApply(Uchome_StudentAskLeaveApply studentAskLeaveApply, Guid teacherId, string teacherName)
 {
     studentAskLeaveApply.Id          = Guid.NewGuid();
     studentAskLeaveApply.CreateTime  = DateTime.Now;
     studentAskLeaveApply.Status      = (int)StudentAskLeaveStatus.Applyed;
     studentAskLeaveApply.ApplyerId   = userid;
     studentAskLeaveApply.ApplyerName = userName;
     studentAskLeaveApply.SchoolId    = xxid;
     try
     {
         var flag = StudentAskLeaveHelper.AddStudentLeaveApply(studentAskLeaveApply);
         Uchome_StudentAskLeaveAudit adAudit = new Uchome_StudentAskLeaveAudit()
         {
             ApplyId     = studentAskLeaveApply.Id,
             ApplyerId   = studentAskLeaveApply.ApplyerId,
             ApplyerName = studentAskLeaveApply.ApplyerName,
             AuditorId   = teacherId,
             AuditorName = teacherName,
             CreateTime  = DateTime.Now,
             Status      = (int)StudentAskLeaveStatus.Applyed,
             Id          = Guid.NewGuid()
         };
         flag = StudentAskLeaveHelper.AddStudentLeaveAudit(adAudit);
         return(Json(new
         {
             flag
         }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception e)
     {
         return(Json(new { flag = false, message = e.Message }, JsonRequestBehavior.AllowGet));
     }
 }
コード例 #2
0
        public ActionResult StudentAsk()
        {
            var teacher = StudentAskLeaveHelper.GetStudentClassInfo(userid);

            if (teacher.JSID != null)
            {
                ViewBag.teacherId   = teacher.JSID;
                ViewBag.teacherName = teacher.JSMC;
            }
            return(View());
        }
コード例 #3
0
 public JsonResult StudentLeaveSchool(Guid applyId)
 {
     try
     {
         var flag = StudentAskLeaveHelper.StudentLeaveSchool(applyId);
         return(Json(new
         {
             flag
         }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception e)
     {
         return(Json(new
         {
             flag = false,
             message = e.Message
         }));
     }
 }
コード例 #4
0
 public JsonResult DeleteApply(Guid applyId)
 {
     try
     {
         var flag = StudentAskLeaveHelper.DeleteStudentApply(applyId);
         return(Json(new
         {
             flag,
             message = "null"
         }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception e)
     {
         return(Json(new
         {
             flag = false,
             message = e.Message
         }, JsonRequestBehavior.AllowGet));
     }
 }
コード例 #5
0
 public JsonResult DetailApply(Guid applyid)
 {
     try
     {
         var detail = StudentAskLeaveHelper.GetApplyDetail(applyid);
         return(Json(new
         {
             flag = true,
             Detail = detail
         }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception e)
     {
         return(Json(new
         {
             flag = false,
             message = e.Message
         }, JsonRequestBehavior.AllowGet));
     }
 }
コード例 #6
0
 public JsonResult TeacherAudit(Guid applyId, string auditResult, string remark)
 {
     try
     {
         if (auditResult == "transe")
         {
             StudentAskLeaveHelper.AuditApplyTranse(userid, userName, applyId, remark);
         }
         else if (auditResult == "pass")
         {
             StudentAskLeaveHelper.AuditApply(userid, applyId, true);
         }
         else if (auditResult == "deny")
         {
             StudentAskLeaveHelper.AuditApply(userid, applyId, false);
         }
         return(Json(new { flag = true }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception e)
     {
         return(Json(new { flag = false, message = e.Message }, JsonRequestBehavior.AllowGet));
     }
 }
コード例 #7
0
        public ActionResult StudentApplyList()
        {
            var list = StudentAskLeaveHelper.GetStudentApplyList(userid);

            return(View(list));
        }
コード例 #8
0
        public ActionResult SchoolIndex()
        {
            var list = StudentAskLeaveHelper.GetSchoolApplyList(xxid);

            return(View(list));
        }
コード例 #9
0
        public ActionResult Teacherindex()
        {
            var list = StudentAskLeaveHelper.GetTeacherAuditApplyList(userid);

            return(View(list));
        }