/// <summary> /// 将数据填充到组件 /// </summary> /// <param name="lbA"></param> /// <param name="lbF"></param> /// <param name="listA"></param> /// <param name="listF"></param> public static void FillProvideList(ref ListBox lbA, ref ListBox lbF, ref CheckBox cbPublish, string fileID) { lbA.Items.Clear(); lbF.Items.Clear(); List <string> listFollow = BLLControl.GetFollowList(); List <string> listProvide = BLLControl.GetFilePrivideList(fileID); //If it is Publish if (listProvide.Count != 0) { if (listProvide[0] == "All") { cbPublish.Checked = true; listProvide.RemoveAt(0); } else { cbPublish.Checked = false; } } //Fill the All Friends Who is not provided. foreach (string fid in listFollow) { if (!listProvide.Contains(fid)) { lbA.Items.Add(fid); } } //Fill the vssID who is provided foreach (string fid in listProvide) { lbF.Items.Add(fid); } }