Ejemplo n.º 1
0
        public void fillseller()
        {
            ClsUser     objusr = new ClsUser();
            List <User> usrs   = new List <BusinessObjects.User>();

            usrs = objusr.AllUsers().Where(p => p.UserTypeId.Equals("3")).ToList();
            if (usrs.Count > 0)
            {
                ddlsell.DataSource     = usrs;
                ddlsell.DataTextField  = "FirstName";
                ddlsell.DataValueField = "UserId";
                ddlsell.DataBind();
            }
            else
            {
                ddlsell.DataSource = null;
                ddlsell.DataBind();
            }
            ddlsell.Items.Insert(0, new ListItem("<-- Select -->", "0"));
            ddlsell.SelectedIndex = 0;
        }