• 绑定checkedComboBox


    using System;

    namespace CommonLib
    {
    /// <summary>
    /// CommonCode 的摘要说明。
    /// </summary>
    [Serializable]
    public class CommonCode
    {
    private string m_ID = string.Empty;
    private string m_Name = string.Empty;

    /// <summary>
    /// 代码
    /// </summary>
    ///

    public CommonCode()
    {
    }

    public CommonCode(string id,string name)
    {
    this.m_ID = id;
    this.m_Name = name;
    }

    public string ID
    {
    get{return this.m_ID;}
    set{this.m_ID = value;}
    }
    /// <summary>
    /// 名称
    /// </summary>
    public string Name
    {
    get{return this.m_Name;}
    set{this.m_Name = value;}
    }
    }
    }

    public void SetStatusList(List<CommonCode> commonCodes)
    {
    checkedComboBoxEdit1.Properties.Items.Clear();
    LookupEditSetter.Setup(checkedComboBoxEdit1, commonCodes.ToArray(), true);
    }

    //获取值方法

    public List<string> Status
    {
    get
    {
    var v = CanHelper.ob2Str(checkedComboBoxEdit1.EditValue);
    if (string.IsNullOrEmpty(v)) return null;
    var list = v.Split(',');
    return list.ToList();
    }
    set
    {
    checkedComboBoxEdit1.SetEditValue(value == null ? null : string.Join(",", value.ToArray()));
    }
    }

  • 相关阅读:
    后缀自动机在复习
    冬令营模拟day2总结
    割点(模板)
    黑匣子
    挤牛奶
    上白泽慧音
    lca最小公共祖先祖先
    最小花费
    牛的旅行(标程)
    骑马修栅栏
  • 原文地址:https://www.cnblogs.com/huzige/p/6547659.html
Copyright © 2020-2023  润新知