Ejemplo n.º 1
0
 public AgentAndUserInfoItems(AgentAndUserInfoList AuList)
 {
     ID         = AuList.ID;
     Name       = AuList.Name;
     FullName   = AuList.FullName;
     AuInfoList = AuList;
 }
Ejemplo n.º 2
0
 // 獲取座席、用戶名
 private void GetAuInfoLists()
 {
     try
     {
         mListAuInfoItems = new ObservableCollection <AgentAndUserInfoItems>();
         WebRequest webRequest = new WebRequest();
         webRequest.Session = CurrentApp.Session;
         webRequest.Code    = (int)S3105Codes.GetAuInfoList;
         webRequest.ListData.Add("11");
         //Service31051Client client = new Service31051Client();
         Service31051Client client    = new Service31051Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31051"));
         WebReturn          webReturn = client.UMPTaskOperation(webRequest);
         client.Close();
         if (!webReturn.Result)
         {
             ShowException(string.Format("Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message));
             return;
         }
         if (webReturn.ListData == null)
         {
             ShowException(CurrentApp.GetLanguageInfo("3105T00101", string.Format("ListData is null")));
             return;
         }
         if (webReturn.ListData.Count <= 0)
         {
             return;
         }
         for (int i = 0; i < webReturn.ListData.Count; i++)
         {
             OperationReturn optReturn = XMLHelper.DeserializeObject <AgentAndUserInfoList>(webReturn.ListData[i]);
             if (!optReturn.Result)
             {
                 ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message));
                 continue;
             }
             AgentAndUserInfoList auInfoList = optReturn.Data as AgentAndUserInfoList;
             if (auInfoList == null)
             {
                 return;
             }
             AgentAndUserInfoItems item = new AgentAndUserInfoItems(auInfoList);
             mListAuInfoItems.Add(item);
         }
     }
     catch (Exception ex)
     {
         ShowException(ex.Message);
     }
 }