示例#1
0
        private void LoadDept()
        {
            DeptList.Clear();
            foreach (var model in SharedPreference.Instance.DeptList)
            {
                DeptList.Add(model);
                Title = "DEPT";
            }
            var list = DeptList.OrderBy(p => p.DEPT_CODE);

            DeptList = new ObservableCollection <DeptModel>(list);
        }
 /// <summary>
 /// 取得本社團之科系限制
 /// </summary>
 private void GetDept()
 {
     if (!string.IsNullOrEmpty(_ClubObj.DeptRestrict))
     {
         FISCA.DSAUtil.DSXmlHelper dsx = new FISCA.DSAUtil.DSXmlHelper();
         dsx.Load(_ClubObj.DeptRestrict);
         foreach (System.Xml.XmlElement xml in dsx.BaseElement.SelectNodes("Dept"))
         {
             if (!DeptList.Contains(xml.InnerText))
             {
                 DeptList.Add(xml.InnerText);
             }
         }
     }
 }
示例#3
0
 /// <summary>
 /// 设置部门
 /// </summary>
 /// <param name="depts"></param>
 public void SetDept(List <Dept> depts)
 {
     DeptList.Clear();
     depts.ForEach(p => DeptList.Add(p));
 }