예제 #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;
            }
        }
    }
예제 #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;
            }
        }
    }
예제 #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");
    }
예제 #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            this.Id.Value = WebParmKit.GetRequestString("key", 0).ToString();

            BindData();
        }
    }
예제 #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);
 }
예제 #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);
            }
        }
    }
예제 #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;
            }
        }
    }
예제 #9
0
    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;
            }
        }
    }
예제 #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);
            }
        }
    }
예제 #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();
            }
        }
    }
예제 #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("请输入正确的账号或密码!");
        }
    }
예제 #13
0
    protected string GetPageUrl()
    {
        string id = WebParmKit.GetRequestString("id", "");

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