示例#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);

                //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");
    }
示例#2
0
    private void BindGroupList()
    {
        BindKit.BindToListControl(this.GroupCode, _groupBus.Query(""), "Name", "Code");

        //获取字典分组
        string group = WebParmKit.GetQuery("group", "");
        string fix   = WebParmKit.GetQuery("fix", "");

        if (!string.IsNullOrEmpty(group))
        {
            this.GroupCode.SelectedIndex = this.GroupCode.Items.IndexOf(this.GroupCode.Items.FindByValue(group));
        }
        if (fix == "true")
        {
            this.GroupCode.Enabled = false;
        }
    }