コード例 #1
0
        private void BrowsingTimesSet(HttpContext context)
        {
            int itemid = Convert.ToInt32(context.Request["ItemId"]);

            jsonModel = bll.GetEntityById(itemid);
            if (jsonModel.errNum == 0)
            {
                Dorm_Activity item = jsonModel.retData as Dorm_Activity;
                item.Id            = itemid;
                item.BrowsingTimes = item.BrowsingTimes + 1;
                jsonModel          = bll.Update(item);
            }
        }
コード例 #2
0
        private void AddDormActivity(HttpContext context)
        {
            Dorm_Activity item = new Dorm_Activity();

            item.Id          = 0;
            item.RoomId      = Convert.ToInt32(context.Request["RoomId"]);
            item.Name        = context.Request["Name"];
            item.StartTime   = Convert.ToDateTime(context.Request["StartTime"]);
            item.EndTime     = Convert.ToDateTime(context.Request["EndTime"]);
            item.Address     = context.Request["Address"];
            item.Content     = context.Request["Content"];
            item.AttachUrl   = context.Request["AttachUrl"];
            item.ActivityImg = context.Request["ActivityImg"];
            item.CreateUID   = context.Request["LoginUID"];
            jsonModel        = bll.EditDormActivity(item);
        }
コード例 #3
0
        private void EditDormActivity(HttpContext context)
        {
            int itemid = Convert.ToInt32(context.Request["ItemId"]);

            jsonModel = bll.GetEntityById(itemid);
            if (jsonModel.errNum == 0)
            {
                Dorm_Activity item = jsonModel.retData as Dorm_Activity;
                item.Id          = itemid;
                item.Name        = context.Request["Name"];
                item.StartTime   = Convert.ToDateTime(context.Request["StartTime"]);
                item.EndTime     = Convert.ToDateTime(context.Request["EndTime"]);
                item.Address     = context.Request["Address"];
                item.Content     = context.Request["Content"];
                item.AttachUrl   = context.Request["AttachUrl"];
                item.ActivityImg = context.Request["ActivityImg"];
                item.EditUID     = context.Request["LoginUID"];
                jsonModel        = bll.EditDormActivity(item);
            }
        }