protected void btnAdd_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(txtGroupName.Text)) { ConfigDAL dal = new ConfigDAL(); if (!dal.GetAllConfigGroup().Exists(c => c.ConfigGroup_Name == txtGroupName.Text)) { dal.AddConfigGroup(new ConfigGroup() { ConfigGroup_Name = txtGroupName.Text }); dal.Save(); } BindTreeView(); } }