Beispiel #1
0
        public ActionResult EditBaseButton(int id)
        {
            ViewBag.Tab = "button";
            var model = ButtonBLL.Get(id);

            if (model == null)
            {
                model = new Button();
            }
            ViewBag.Entity = model;
            return(View());
        }
Beispiel #2
0
        public ActionResult EditSubButton(int id)
        {
            var model = ButtonBLL.Get(id);
            var list  = ButtonBLL.GetSubButton(id);

            if (model == null)
            {
                return(RedirectToAction("EditButton"));
            }
            ViewBag.Entity = model;
            ViewBag.List   = list;
            return(View());
        }
Beispiel #3
0
        public ActionResult EditSubButtondetail(int id = 0, int baseid = 0)
        {
            ViewBag.Tab = "button";
            var model = ButtonBLL.Get(id);

            if (model == null)
            {
                model = new Button()
                {
                    baseid = baseid
                };
            }
            ViewBag.Entity = model;
            return(View());
        }
Beispiel #4
0
        public ActionResult PostButtonData(int id, string type, string name, string value, int baseid)
        {
            if (id != 0)
            {
                var btn = ButtonBLL.Get(id);
                btn.baseid = baseid;
                btn.value  = value;
                btn.type   = type;
                btn.name   = name;

                ButtonBLL.Modify(btn);
            }
            else
            {
                var btn = new Button();
                btn.baseid = baseid;
                btn.value  = value;
                btn.type   = type;
                btn.name   = name;
                ButtonBLL.Save(btn);
            }
            return(Json(new { status = 1 }));
        }