Ejemplo n.º 1
0
        // 1e
        /// <summary>
        /// 读取列表信息
        /// </summary>
        void LoadData()
        {
            loadbar.Start();
            int    pageCount = 0;
            string filter = "", sType = "", sValue = "";

            System.Collections.ObjectModel.ObservableCollection <string> paras = new System.Collections.ObjectModel.ObservableCollection <string>();

            if (myDetail)
            {
                // 1s 冉龙军
                //filter += "APPRAISEEID==@" + paras.Count().ToString();
                filter += "T_HR_KPIRECORD.APPRAISEEID==@" + paras.Count().ToString();
                // 1e
                paras.Add(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
            }
            else
            {
                TextBox txtEmpName = Utility.FindChildControl <TextBox>(expander, "txtEmpName");
                TextBox txtEmpCode = Utility.FindChildControl <TextBox>(expander, "txtEmpCode");

                if (!string.IsNullOrEmpty(txtEmpCode.Text.Trim()))
                {
                    filter += "@" + paras.Count().ToString() + ".Contains(EMPLOYEECODE)";;
                    paras.Add(txtEmpCode.Text.Trim());
                }
                if (!string.IsNullOrEmpty(txtEmpName.Text.Trim()))
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += "@" + paras.Count().ToString() + ".Contains(EMPLOYEECNAME)";;
                    paras.Add(txtEmpName.Text.Trim());
                }

                sType  = treeOrganization.sType;
                sValue = treeOrganization.sValue;
                if (string.IsNullOrEmpty(sType))
                {
                    loadbar.Stop();
                    return;
                }
            }


            DatePicker dpStartDate = Utility.FindChildControl <DatePicker>(expander, "dpStartDate");
            DatePicker dpEndDate   = Utility.FindChildControl <DatePicker>(expander, "dpEndDate");

            string StartDate = string.Empty;
            string EndDate   = string.Empty;

            if (dpStartDate != null)
            {
                StartDate = dpStartDate.Text;
            }
            if (dpEndDate != null)
            {
                EndDate = dpEndDate.Text;
            }

            string strState = "";

            //if (Checkstate != Convert.ToInt32(CheckStates.All).ToString())
            //{
            //    strState = Checkstate;
            //}
            kpiClient.GetKPIRecordPagingAsync(dataPager.PageIndex, dataPager.PageSize, "T_HR_KPIRECORD.UPDATEDATE", filter, paras, pageCount, sType, sValue, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID, StartDate, EndDate, strState);
        }