예제 #1
0
        public bool GetDataList()
        {
            string functionName = "GetDataList";

            try
            {
                List <AMS.Model.AMS_UserInfo> modelList = new List <Model.AMS_UserInfo>();
                //TODO:获取用户列表
                modelList = AMS.ServiceProxy.IUserInfoService.GetUserInfoList();
                UserInfoList.Clear();
                foreach (AMS.Model.AMS_UserInfo model in modelList)
                {
                    UserInfoList.Add(model);
                }
                return(true);
            }
            catch (AMS.Model.CustomerException ex)
            {
                ErrorMessage = string.Format("{0} 出自{1}.{2}", ex.Message, ex.ErrorSourcesClass, ex.ErrorSourcesFunction);
                return(false);
            }
            catch (Exception ex)
            {
                ErrorMessage = string.Format("{0} 出自{1}.{2}", ex.Message, CLASSNAME, functionName);
                return(false);
            }
        }
예제 #2
0
 /// <summary>
 /// 显示列表
 /// </summary>
 public void ShowUserInfoTable()
 {
     foreach (var model in GetUserInfoList())
     {
         UserInfoList.Add(model);
     }
     ShowUserInfoList();
 }