コード例 #1
0
 /// <summary>
 /// 当当前分发对象是个人时,根据员工ID集合查询员工姓名集合
 /// </summary>
 void personalClient_GetEmployeeByIDsCompleted(object sender, Saas.Tools.PersonnelWS.GetEmployeeByIDsCompletedEventArgs e)
 {
     RefreshUI(RefreshedTypes.HideProgressBar);
     if (e.Error != null)
     {
         ShowMessage("error", "ERROR", "GETDATAFAILED", "", false);
         return;
     }
     try
     {
         int _index = 0;
         foreach (T_OA_DISTRIBUTEUSER convert in distributeuserList)
         {
             if (convert.VIEWER == null)
             {
                 convert.VIEWER = e.Result[_index].EMPLOYEECNAME;
                 _index++;
             }
         }
     }
     catch (IndexOutOfRangeException)
     {
         ShowMessage("error", "ERROR", "DATAOUTOFRANGEEXCEPTION", "", false);
     }
 }
コード例 #2
0
        /// <summary>
        /// 根据应用对象类型,对应用对象赋值(当前类型为员工)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void clientPer_GetEmployeeByIDsCompleted(object sender, Saas.Tools.PersonnelWS.GetEmployeeByIDsCompletedEventArgs e)
        {
            RefreshUI(RefreshedTypes.HideProgressBar);
            if (e.Error == null)
            {
                if (e.Result == null)
                {
                    return;
                }

                List <SMT.Saas.Tools.PersonnelWS.T_HR_EMPLOYEE> entList = e.Result.ToList();

                string strIds = string.Empty, strNames = string.Empty;

                foreach (SMT.Saas.Tools.PersonnelWS.T_HR_EMPLOYEE item in entList)
                {
                    strIds   += item.EMPLOYEEID + ",";
                    strNames += item.EMPLOYEECNAME + ";";
                }

                tbAssignedObjectID.Text = strIds;

                lkAssignObject.IsEnabled = true;
                lkAssignObject.SearchButton.IsEnabled = false;
                lkAssignObject.TipTextValue           = strNames;//设置Tip
            }
            else
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
            }
        }