public UCUpLoadPage() { InitializeComponent(); fileItemInfo = new FilesItemInfo(); this.Loaded += UCUpLoadPage_Loaded; butSelectFiles.Click += butSelectFiles_Click; }
private void GetBrowseHistory() { mListBrowseInfo.Clear(); string strSql = string.Empty; if (mFileInto != null) { strSql = string.Format("SELECT * FROM T_31_059_{0} WHERE C001={1} ORDER BY C002,C006", CurrentApp.Session.RentInfo.Token, mFileInto.FileID); } try { WebRequest webRequest = new WebRequest(); webRequest.Session = CurrentApp.Session; webRequest.Code = (int)S3106Codes.GetBrowseHistory; webRequest.ListData.Add(strSql); Service31061Client client = new Service31061Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session), WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31061")); //Service31061Client client = new Service31061Client(); WebReturn webReturn = client.UMPTreeOperation(webRequest); client.Close(); if (!webReturn.Result) { return; } if (webReturn.ListData.Count <= 0) { return; } for (int i = 0; i < webReturn.ListData.Count; i++) { OperationReturn optReturn = XMLHelper.DeserializeObject <FilesItemInfo>(webReturn.ListData[i]); if (!optReturn.Result) { ShowException(string.Format("Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message)); continue; } FilesItemInfo filesItem = optReturn.Data as FilesItemInfo; if (filesItem == null) { ShowException(string.Format("Fail. filesItem is null")); return; } filesItem.RowNumber = i + 1; mListBrowseInfo.Add(filesItem); } } catch (Exception ex) { ShowException(ex.Message); } }