예제 #1
0
        public ActionResult Create()
        {
            Class_SocialPractice practice = new Class_SocialPractice();

            practice.ID     = Guid.NewGuid();
            ViewBag.Classes =
                StudentAffarisHelper.GetTeacherChargeClass(userid)
                .Select(p => new SelectListItem()
            {
                Text = p.Value, Value = p.Key.ToString()
            })
                .ToList();
            return(View(practice));
        }
예제 #2
0
 public JsonResult CreateSend(Class_SocialPractice model)
 {
     try
     {
         model.DateTime   = model.DateTime.Replace("-", "");
         model.Creator    = userName;
         model.CreateTime = DateTime.Now.ToString("yyyyMMddHHmmss");
         model.LogID      = userid;
         model.TermID     = StudentAffarisHelper.GetSchoolCurrentTerm(xxid);
         var flag = StudentAffarisHelper.AddOrUpdateClassSocialPractice(model);
         return(Json(new { flag }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception e)
     {
         return(Json(new { flag = false, message = e.Message }, JsonRequestBehavior.AllowGet));
     }
 }