Ejemplo n.º 1
0
    protected void StateBind()
    {
        List <WMGoodState> list = WMGoodState.GetList();

        StateList.DataSource = list;
        StateList.DataBind();
    }
Ejemplo n.º 2
0
    protected void StateBind()
    {
        List <WMGoodState> list = WMGoodState.GetList();

        if (!General.IsNullable(list))
        {
            StateList.Items.Clear();
            foreach (var state in list)
            {
                ListItem item = new ListItem();
                item.Text  = state.StateName;
                item.Value = state.StateId.ToString();
                StateList.Items.Add(item);
            }
        }
    }