Exemplo n.º 1
0
 /// <summary>
 /// LoadList
 /// </summary>
 void LoadList()
 {
     using (ProxyDictionary proxy = new ProxyDictionary())
     {
         DataSourceEmpList = proxy.Service.LoadEmpInfo();
         DataSourceEmpList.Sort();
         Viewer.gcEmployee.DataSource = DataSourceEmpList;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// FilterDept
 /// </summary>
 /// <param name="deptCode"></param>
 void FilterDept(string deptCode)
 {
     if (DataSourceEmpList != null)
     {
         if (string.IsNullOrEmpty(deptCode))
         {
             Viewer.gcEmployee.DataSource = DataSourceEmpList;
         }
         else
         {
             Viewer.colDeptName.Visible   = false;
             Viewer.gcEmployee.DataSource = DataSourceEmpList.FindAll(t => t.deptCode == deptCode);
         }
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// FindEmp
        /// </summary>
        /// <param name="val"></param>
        internal void FindEmp(string val)
        {
            if (string.IsNullOrEmpty(val))
            {
                DialogBox.Msg("请输入快速查找条件。");
                Viewer.txtFind.Focus();
                return;
            }

            if (DataSourceEmpList != null)
            {
                Viewer.colDeptName.Visible   = true;
                Viewer.gcEmployee.DataSource = DataSourceEmpList;
                int index = DataSourceEmpList.FindIndex(t => t.operCode == val || t.operName.StartsWith(val) || t.pyCode.StartsWith(val) || t.wbCode.StartsWith(val));
                if (index >= 0)
                {
                    Viewer.gvEmployee.FocusedRowHandle = index;
                }
            }
        }