コード例 #1
0
        public ActionResult Create(string name, StringList keywords)
        {
            byte[] icon;
            string filename;

            GetFileFromRequest(out icon, out filename);
            var res = MasterLocator.ChalkableDepartmentService.Add(name, keywords, icon);

            return(Json(ChalkableDepartmentViewData.Create(res), contentType));
        }
コード例 #2
0
 protected ClassInfoViewData(ClassDetails cClass, Room room, ChalkableDepartment department)
     : base(cClass)
 {
     if (room != null)
     {
         Room = RoomViewData.Create(room);
     }
     if (department != null)
     {
         Department = ChalkableDepartmentViewData.Create(department);
     }
 }
コード例 #3
0
        public ActionResult Update(Guid chalkableDepartmentId, string name, StringList keywords)
        {
            byte[] icon;
            string filename;

            GetFileFromRequest(out icon, out filename);
            if (icon == null)
            {
                icon = MasterLocator.DepartmentIconService.GetPicture(chalkableDepartmentId.ToString(), null, null);
            }
            var res = MasterLocator.ChalkableDepartmentService.Edit(chalkableDepartmentId, name, keywords, icon);

            return(Json(ChalkableDepartmentViewData.Create(res), contentType));
        }
コード例 #4
0
        public ActionResult Info(Guid chalkableDepartmentId)
        {
            var res = MasterLocator.ChalkableDepartmentService.GetChalkableDepartmentById(chalkableDepartmentId);

            return(Json(ChalkableDepartmentViewData.Create(res)));
        }
コード例 #5
0
        public ActionResult List()
        {
            var res = MasterLocator.ChalkableDepartmentService.GetChalkableDepartments();

            return(Json(ChalkableDepartmentViewData.Create(res)));
        }