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)); } } } }
private void BindToolBar() { if (GroupID > 0) { secHeader.Title = LocRM.GetString("EditGroup"); } else if (CloneGroupID > 0) { secHeader.Title = LocRM.GetString("CloneGroup"); } else { using (DataTable table = IMGroup.GetGroup(GroupID)) { if (table.Rows.Count > 0) { secHeader.Title = LocRM.GetString("CreateIMGroup"); } } } secHeader.AddLink("<img alt='' src='../Layouts/Images/cancel.gif'/> " + LocRM.GetString("Back"), "../Directory/Directory.aspx"); }