huzige0265

导航

 

 

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()));
}
}

 

posted on 2017-03-14 11:33  huzige0265  阅读(487)  评论(0编辑  收藏  举报