private void GetGroupName() { //_strGroupName.Clear(); //string sql = "select distinct USER_GROUP_NAME from T_USER_GROUP_INFO_MANAGEMENT"; //if (database.ReturnDS(sql).Tables[0] != null) //{ // int n = database.ReturnDS(sql).Tables[0].Rows.Count; // for (int i = 0; i < n; i++) // { // _strGroupName.Add(database.ReturnDS(sql).Tables[0].Rows[i][0].ToString()); // } //} string[] groupNames = UserInformationManagementBLL.sqlGetUserGroupName(); foreach (string name in groupNames) { _strGroupName.Add(name); } }
private void GetGroupName() { //string sql = "select distinct USER_GROUP_NAME from T_USER_GROUP_INFO_MANAGEMENT"; //if (database.ReturnDS(sql).Tables[0] != null) //{ // int n = database.ReturnDS(sql).Tables[0].Rows.Count; // for (int i = 0; i < n; i++) // { // _cboGroup.Items.Add(database.ReturnDS(sql).Tables[0].Rows[i][0].ToString()); // } // _cboGroup.SelectedIndex = 0; //} string[] groupName = UserInformationManagementBLL.sqlGetUserGroupName(); foreach (string str in groupName) { _cboGroup.Items.Add(str); } if (_cboGroup.Items.Count > 0) { _cboGroup.SelectedIndex = 0; } }