protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.Page.IsPostBack)
            {
                B_Admin badmin = new B_Admin();
                if (!B_ARoleAuth.Check(ZLEnum.Auth.page, "PageModelManage"))
                {
                    function.WriteErrMsg("没有权限进行此项操作");
                }
                DataBaseList();
            }
            string menu = base.Request.QueryString["menu"];

            if (menu == "del")
            {
                int modeid = DataConverter.CLng(Request.QueryString["id"]);
                if (bll.DelModel(modeid))
                {
                    Response.Write("<script language=javascript>alert('删除成功!');location.href='UserModelManage.aspx';</script>");
                }
                else
                {
                    Response.Write("<script language=javascript>alert('删除失败!');</script>");
                }
            }
            Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='PageManage.aspx'>企业黄页</a></li><li class='active'>黄页申请设置<a href='UserModel.aspx'>[添加申请模型]</a></li>" + Call.GetHelp(85));
        }
예제 #2
0
        public string Model_API()
        {
            string ids    = DataConvert.CStr(RequestEx["ids"]);
            string action = Request.Query["action"];

            switch (action)
            {
            case "del":
            {
                bll.DelModel(DataConvert.CLng(ids));
            }
            break;

            case "copy":
            {
                M_ModelInfo model = bll.SelReturnModel(DataConvert.CLng(ids));
                model.ModelID   = 0;
                model.ModelName = model.ModelName + "_拷贝";
                model.TableName = model.TableName + "_" + function.GetRandomString(4);
                bll.AddModel(model);
                //return WriteOK("拷贝模型成功", "ModelManage?ModelType=" + ModelType);
            }
            break;

            case "template":    //为模型绑定模板
            {
                int    id          = DataConvert.CLng(Request.Query["id"]);
                string templateUrl = DataConvert.CStr(RequestEx["url"]);
                bll.UpdateTemplate(templateUrl, id);
            }
            break;

            default:
                break;
            }
            return(Success.ToString());
        }