Example #1
0
        public ActionResult FindPageList()
        {
            int count = 0;
            var list  = ProductDataVerService.GetPageList(Request.Params, out count);

            return(ToDataGrid(list, count));
        }
Example #2
0
        public ActionResult SaveData(int id, string runSql)
        {
            var data = new ProductDataSql()
            {
                Id     = id,
                RunSql = runSql
            };
            var re = ProductDataVerService.SaveData(data, 0);

            return(new OpActionResult(re));
        }
Example #3
0
        public ActionResult SeeData(int id)
        {
            var obj = ProductDataVerService.SeeData(id);
            var sql = "";

            if (obj != null)
            {
                sql = obj.RunSql;
            }
            ViewBag.sql = sql;
            return(View());
        }
Example #4
0
        public ActionResult AppendData(int menuId, string runSql, string verId, int productId, string modelId)
        {
            var data = new ProductDataSql()
            {
                MenuId = menuId,
                DataId = verId,
                RunSql = runSql
            };
            var re = ProductDataVerService.SaveData(data, productId);

            return(new OpActionResult(re));
        }
Example #5
0
        public ActionResult Save(string verId)
        {
            string modelId = "";
            var    obj     = ProductDataVerService.Get(verId);

            if (obj != null)
            {
                ViewBag.products = ListToSelect(ProductVerService.GetList().Select(o => new SelectListItem()
                {
                    Text = "(" + o.ProductId + ")" + o.SysName, Value = o.ProductId.ToString()
                }), emptyTitle: "请选择", selectValue: obj.ProductId);
                ViewBag.state  = obj.VerStatusTitle + "," + obj.StatusTitle;
                ViewBag.status = obj.VerCode == 0 ? "--" : "v" + obj.VerCode.ToString("f1");
                modelId        = obj.ModuleId;
            }
            else
            {
                ViewBag.products = ListToSelect(ProductDataVerService.GetProductVers().Select(o => new SelectListItem()
                {
                    Text = "(" + o.ProductId + ")" + o.SysName, Value = o.ProductId.ToString()
                }), emptyTitle: "请选择");
                ViewBag.state  = "未发布,未生效";
                ViewBag.status = "--";
            }
            var pmenus = new List <DropdownItem>();

            if (!modelId.IsNullOrEmpty())
            {
                var model = ProductModelVerService.Get(modelId);
                if (model != null)
                {
                    pmenus.AddRange(model.ProductMenuLimits.Where(o => o.PMenuId <= 0).OrderBy(o => o.SortOrder).Select(o => new DropdownItem()
                    {
                        Text = o.Title, Value = o.MenuId.ToString()
                    }));
                }
            }
            ViewBag.pmenus  = pmenus.ToJson();
            ViewBag.modelId = modelId;
            return(View());
        }
Example #6
0
        public ActionResult Copy(string verId)
        {
            var re = ProductDataVerService.Copy(verId);

            return(new OpActionResult(re));
        }
Example #7
0
        public ActionResult Publish(string verId, short state)
        {
            var re = ProductDataVerService.Publish(verId, state);

            return(new OpActionResult(re));
        }
Example #8
0
 public ActionResult Delete(int[] ids)
 {
     return(new JsonNetResult(ProductDataVerService.Deletes(ids)));
 }
Example #9
0
 public void MoveItem(short mode, int sn, string verId)
 {
     ProductDataVerService.MoveItem(mode, sn, verId);
 }
Example #10
0
 public void RemoveData(int id)
 {
     ProductDataVerService.RemoveData(id);
 }
Example #11
0
        public ActionResult DataList(string verId)
        {
            var list = ProductDataVerService.DataList(verId);

            return(ToDataGrid(list, 0));
        }