예제 #1
0
 public void Loadgroup()
 {
     try
     {
         var list = db.GROUPs.ToList();
         Drgroup.DataValueField = "GROUP_ID";
         Drgroup.DataTextField  = "GROUP_NAME";
         Drgroup.DataSource     = list;
         Drgroup.DataBind();
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #2
0
        public void Loadgroup()
        {
            try
            {
                var list = db.GROUPs.ToList();
                Drgroup.DataValueField = "GROUP_ID";
                Drgroup.DataTextField  = "GROUP_NAME";
                Drgroup.DataSource     = list;
                Drgroup.DataBind();

                ListItem l = new ListItem("---Chọn chức vụ---", "0", true);
                Drgroup.Items.Insert(0, l);
                Drgroup.SelectedIndex = 0;
            }
            catch (Exception)
            {
                throw;
            }
        }