private void BindSavedData() { int id = 0; if (GroupID > 0) { id = GroupID; } else if (CloneGroupID > 0) { id = CloneGroupID; } if (id > 0) { using (DataTable table = IMGroup.GetGroup(id)) { if (table.Rows.Count > 0) { DataRow row = table.Rows[0]; if (CloneGroupID == 0) { tbGroupTitle.Text = HttpUtility.HtmlDecode(row["IMGroupName"].ToString()); } tbColor.Text = HttpUtility.HtmlDecode(row["Color"].ToString()); } } using (DataTable table = IMGroup.GetListIMGroupsYouCanSee(id)) { foreach (DataRow row in table.Rows) { CommonHelper.SafeMultipleSelect(lbVisible, ((int)row["IMGroupId"]).ToString(CultureInfo.InvariantCulture)); } } using (DataTable table = IMGroup.GetListIMGroupsCanSeeYou(id)) { foreach (DataRow row in table.Rows) { CommonHelper.SafeMultipleSelect(lbCU, ((int)row["IMGroupId"]).ToString(CultureInfo.InvariantCulture)); } } } }