Esempio n. 1
0
    private void BindData()
    {
        var userId = WebParmKit.GetRequestString("key", 0);

        if (userId > 0)
        {
            var model = _userBus.QueryModel("Id=" + userId);
            if (model != null)
            {
                BindKit.BindModelToContainer(this.editor, model);

                var data = _dataBus.QueryModel("UserAccount='" + model.Account + "'");
                if (data != null)
                {
                    BindKit.BindModelToContainer(this.editor, data);

                    this.Id.Value = model.Id.ToString();
                }

                this._userOrg.Visible  = true;
                this._userRole.Visible = true;
            }
        }
        else
        {
            this._userOrg.Visible  = false;
            this._userRole.Visible = false;
        }
    }
    private void BindData()
    {
        int dataId = WebParmKit.GetRequestString("key", 0);

        if (dataId > 0)
        {
            string whereString = "GroupCode='" + this.GroupCode + "' and Id=" + dataId;

            var model = _infoBus.QueryModel(whereString);
            if (model != null)
            {
                BindKit.BindModelToContainer(this.editor, model);
                this.InfoTitle.Text = model.Title;

                ShowThumb(model.Thumb);
            }
        }
        if (Request.QueryString["m"] == "content")
        {
            string whereString = "GroupCode='" + this.GroupCode + "'";

            var model = _infoBus.QueryModel(whereString);
            if (model != null)
            {
                BindKit.BindModelToContainer(this.editor, model);
                this.InfoTitle.Text = model.Title;
            }
        }
    }
Esempio n. 3
0
    /// <summary>
    /// 绑定待授权目标数据
    /// </summary>
    private void BindTargetData()
    {
        string moduleName = WebParmKit.GetRequestString("m", "");
        int    dataId     = WebParmKit.GetRequestString("key", 0);
        string pageUrl    = WebParmKit.GetRequestString("p", "");

        this.TargetType.Value = moduleName;
        this.TargetId.Value   = dataId.ToString();

        if (dataId > 0 && !string.IsNullOrEmpty(moduleName))
        {
            switch (moduleName)
            {
            case "Role":
                ShowRoleAuth();
                break;

            case "User":
                ShowUserAuth();
                break;

            case "Org":
                ShowOrgAuth();
                break;
            }
        }
    }
Esempio n. 4
0
    private void BindData()
    {
        var userId = WebParmKit.GetRequestString("key", 0);

        if (userId > 0)
        {
            var model = _userBus.QueryModel("Id=" + userId);
            if (model != null)
            {
                BindKit.BindModelToContainer(this.editor, model);

                //this.Account.ReadOnly = true;

                var data = _dataBus.QueryModel("UserAccount='" + model.Account + "'");
                if (data != null)
                {
                    BindKit.BindModelToContainer(this.editor, data);

                    this.Id.Value = model.Id.ToString();
                }
            }
        }

        BindKit.BindToListControl(this.Partner, _dibbus.Query(" GroupCode ='partner' and IsEnabled =1"), "Name", "Name");
    }
Esempio n. 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            this.Id.Value = WebParmKit.GetRequestString("key", 0).ToString();

            BindData();
        }
    }
Esempio n. 6
0
 protected string GetInfoContent()
 {
     try {
         InfoContentPageBus bus = new InfoContentPageBus();
         var model = bus.QueryModel("GroupCode='" + WebParmKit.GetRequestString("code", "") + "'");
         this.Title = "云南亮剑" + model.Title;
         return(model.Content);
     } catch (Exception ex) {
         Logger.Error("读取 InfoContentPage 内容报错", ex);
     }
     return(string.Empty);
 }
Esempio n. 7
0
    private void BindData()
    {
        var dataId = WebParmKit.GetRequestString("key", 0);

        if (dataId > 0)
        {
            var model = _bus.QueryModel("Id=" + dataId);
            if (model != null)
            {
                BindKit.BindModelToContainer(this.editor, model);
            }
        }
    }
Esempio n. 8
0
    private void BindData()
    {
        int Id = WebParmKit.GetRequestString("key", 0);

        if (Id > 0)
        {
            var model = _bus.QueryModel("Id=" + Id);
            if (model != null)
            {
                BindKit.BindModelToContainer(this.container, model);
                //this.Value.Color = model.Value;
            }
        }
    }
    private void DataBind()
    {
        int Id = WebParmKit.GetRequestString("key", 0);

        if (Id > 0)
        {
            var model = _bus.QueryModel("Id=" + Id);
            if (model != null)
            {
                BindKit.BindModelToContainer(this.container, model);
                this.OldCode.Value = model.Code;
            }
        }
    }
Esempio n. 10
0
    private void BindData()
    {
        var contentId = WebParmKit.GetRequestString("id", 0);

        if (contentId > 0)
        {
            var model = _bus.QueryModel("Id=" + contentId);
            if (model != null)
            {
                BindKit.BindModelToContainer(this.editor, model);
                this.ContentTitle.Text = model.Title;

                ShowThumb(model.Thumb);
            }
        }
    }
Esempio n. 11
0
    private void BindData()
    {
        int parentId = WebParmKit.GetRequestString("id", 0);

        if (parentId > 0)
        {
            var bus = new SysMenuBusEx();
            var dt  = bus.GetSubMenuByAuth(parentId, this.CurrentUserId);

            if (dt != null)
            {
                _menus           = dt.DefaultView;
                _menus.RowFilter = "ParentId=" + parentId;

                this.menu.DataSource = _menus;
                this.menu.DataBind();
            }
        }
    }
Esempio n. 12
0
    /// <summary>
    /// 登陆
    /// </summary>
    public void Login()
    {
        string account = txtAccount.Text;
        string pwd     = this.txtPassword.Text;
        var    user    = LoginKit.AdminExist(account, pwd);

        if (user != null)
        {
            LoginKit.AdminLogin(user);
            string url = WebParmKit.GetRequestString("url", "");
            if (!string.IsNullOrEmpty(url))
            {
                Response.Redirect(url);
            }
            else
            {
                Response.Redirect("Main.aspx");
            }
        }
        else
        {
            this.Alert("请输入正确的账号或密码!");
        }
    }
Esempio n. 13
0
    protected string GetPageUrl()
    {
        string id = WebParmKit.GetRequestString("id", "");

        return("Sidebar.aspx?id=" + id);
    }