Exemplo n.º 1
0
 public void PutinAllPop()
 {
     //AllPop.AllPopList.Add(new Population { PopList=p.PopList});
     PopList.Clear();
     for (int i = 0; i < TempPop.Count; i++)
     {
         PopList.Add(TempPop[i]);
     }
     TempPop.Clear();
 }
Exemplo n.º 2
0
 /// <summary>
 /// 选择了部门/资产状态/资产大类
 /// </summary>
 /// <param name="popList"></param>
 /// <param name="button"></param>
 public void setBtnTag(PopList popList, Button button)
 {
     if (String.IsNullOrEmpty(popList.Selection.Text) == false)
     {
         if (button.Tag == null)
         {
             button.Tag = popList.Selection.Value;         //选择大类编号
             SearchData();
         }
         else if (popList.Selection.Value != button.Tag.ToString())
         {
             button.Tag = popList.Selection.Value;         //选择大类编号
             SearchData();
         }
     }
 }
Exemplo n.º 3
0
        private void PopList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (curTextBox != null)
            {
                ShowData data = PopList.SelectedValue as ShowData;
                if (null != data)
                {
                    int    index    = curTextBox.SelectionStart;
                    string strHead  = curTextBox.Text.Substring(0, index);
                    string strTrail = curTextBox.Text.Substring(index);

                    curTextBox.Text           = strHead + data.ShowText + strTrail;
                    curTextBox.SelectionStart = strHead.Length + data.ShowText.Length;
                }
            }
            Pop.IsOpen = false;
            PopList.UnselectAll();
            curTextBox.Focus();
        }
 /// <summary>
 /// 获取数据
 /// </summary>
 public void GetDate()
 {
     try
     {
         List <SeatManage.ClassModel.AMS_Advertisement> modelList = SeatManage.Bll.AdvertisementOperation.GetAdList(null, SeatManage.EnumType.AdType.PopAd);
         PopList.Clear();
         foreach (SeatManage.ClassModel.AMS_Advertisement model in modelList)
         {
             SeatManage.ClassModel.PopAdvertInfo view = SeatManage.ClassModel.PopAdvertInfo.ToModel(model.AdContent);
             view.AdContent = model.AdContent;
             view.ID        = model.ID;
             PopList.Add(view);
         }
     }
     catch (Exception ex)
     {
         ErrorMessage = ex.Message;
         SeatManage.SeatManageComm.WriteLog.Write("获取学校通知失败" + ex.Message);
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// 选择了部门/资产状态/资产大类
 /// </summary>
 /// <param name="popList"></param>
 /// <param name="button"></param>
 public void setBtnTag(PopList popList, Button button)
 {
     //MessageBox.Show(popList.Selection.Text);
     if (String.IsNullOrEmpty(popList.Selection.Text) == false)
     //if (popList.Selection.Text != "-1")
     {
         if (button.Tag == null && popList.Selection.Value != "-1")
         {
             button.Tag = popList.Selection.Value;             //选择大类编号
             SearchData();
         }
         else if (popList.Selection.Value == "-1")
         {
             button.Tag = null;
             SearchData();
         }
         else if (popList.Selection.Value != button.Tag.ToString())
         {
             button.Tag = popList.Selection.Value;         //选择大类编号
             SearchData();
         }
     }
 }
Exemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PopList`1+Enumerator"/> class.
 /// </summary>
 /// <param name="list">List.</param>
 public Enumerator(PopList <T> list)
 {
     m_list          = list;
     m_startingCount = m_list.Count;
 }