protected void StateBind() { List <WMGoodState> list = WMGoodState.GetList(); StateList.DataSource = list; StateList.DataBind(); }
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); } } }