예제 #1
0
 public async void SearchData(string parameter)
 {
     HttpWebRequestUtils _httpWebRequestUtils = new HttpWebRequestUtils();
     _httpWebRequestUtils._getDataEvent += OnSearchDataProgressEvent;
     await _httpWebRequestUtils.GetStringAsync(string.Format(_searchUrl, parameter));
     _httpWebRequestUtils._getDataEvent -= OnSearchDataProgressEvent;
 }
예제 #2
0
 /// <summary>
 /// 得到用户信息
 /// </summary>
 public async void GetUserInfo(string session)
 {
     string info = string.Format("info?session={0}", session);
     _httpWebRequestUtils = new HttpWebRequestUtils();
     _httpWebRequestUtils._getDataEvent += OnUserInfoProgressEvent;
     await _httpWebRequestUtils.GetStringAsync(string.Format(_userAboutUrl, info));
     _httpWebRequestUtils._getDataEvent -= OnUserInfoProgressEvent;
 }
예제 #3
0
 /// <summary>
 /// 添加图书收藏
 /// </summary>
 public async void AddFav(string parameter)
 {
     HttpWebRequestUtils _httpWebRequestUtils = new HttpWebRequestUtils();
     _httpWebRequestUtils._getDataEvent += OnAddFavProgressEvent;
     await _httpWebRequestUtils.GetStringAsync(string.Format(_userAddFavUrl, parameter));
     _httpWebRequestUtils._getDataEvent -= OnAddFavProgressEvent;
 }
예제 #4
0
 public async void RankBookData(string parameter)
 {
     HttpWebRequestUtils _httpWebRequestUtils = new HttpWebRequestUtils();
     _httpWebRequestUtils._getDataEvent += OnRankDataProgressEvent;
     await _httpWebRequestUtils.GetStringAsync(string.Format(_rankUrl, parameter));
     _httpWebRequestUtils._getDataEvent -= OnRankDataProgressEvent;
 }
예제 #5
0
 /// <summary>
 /// 请求图书详情
 /// </summary>
 /// <param name="parameter"></param>
 public async void SearchBookDetail(string parameter)
 {
     HttpWebRequestUtils _httpWebRequestUtils = new HttpWebRequestUtils();
     _httpWebRequestUtils._getDataEvent += OnSearchBookDetailEvent;
     await _httpWebRequestUtils.GetStringAsync(string.Format(_searchBook, parameter));
     _httpWebRequestUtils._getDataEvent -= OnSearchBookDetailEvent;
 }
예제 #6
0
 /// <summary>
 /// 公告详情
 /// </summary>
 public async void GetReportDetial(string id)
 {
     HttpWebRequestUtils reqUtils = new HttpWebRequestUtils();
     reqUtils._getDataEvent += OnNewsReportDetialProgressEvent;
     await reqUtils.GetStringAsync(string.Format(newsReportDetialUrl, "announce", id));
     reqUtils._getDataEvent -= OnNewsReportDetialProgressEvent;
 }
예제 #7
0
 /// <summary>
 /// 公告列表
 /// </summary>
 public async void GetReportList(string page)
 {
     HttpWebRequestUtils reqUtils = new HttpWebRequestUtils();
     reqUtils._getDataEvent += OnNewsReprotListProgressEvent;
     await reqUtils.GetStringAsync(string.Format(newsReportListUrl, "announce", page));
     reqUtils._getDataEvent -= OnNewsReprotListProgressEvent;
 }
예제 #8
0
 /// <summary>
 /// 登陆
 /// </summary>
 public async void UserLogin(string username, string password)
 {
     HttpWebRequestUtils _httpWebRequestUtils = new HttpWebRequestUtils();
     _httpWebRequestUtils._getDataEvent += OnLoginProgressEvent;
     await _httpWebRequestUtils.GetStringAsync(string.Format(_userLoginUrl, username, password));
     _httpWebRequestUtils._getDataEvent -= OnLoginProgressEvent;
 }
예제 #9
0
        /// <summary>
        /// 修改密码
        /// </summary>
        public async void ModifyPassword(string info)
        {

            HttpWebRequestUtils _httpWebRequestUtils = new HttpWebRequestUtils();
            _httpWebRequestUtils._getDataEvent += OnModifyPasswordEvent;
            await _httpWebRequestUtils.PostStringAsync(_userChangedPwd, info);
            _httpWebRequestUtils._getDataEvent -= OnModifyPasswordEvent;
        }
예제 #10
0
 /// <summary>
 /// 带有图片图书收藏
 /// </summary>
 public async void GetFavoriteWithImgBookInfo(string session)
 {
     string info = string.Format("favoriteWithImg?session={0}", session);
     HttpWebRequestUtils _httpWebRequestUtils = new HttpWebRequestUtils();
     _httpWebRequestUtils._getDataEvent += OnFavoriteWithImgBook;
     await _httpWebRequestUtils.GetStringAsync(string.Format(_userAboutUrl, info));
     _httpWebRequestUtils._getDataEvent -= OnFavoriteWithImgBook;
 }
예제 #11
0
 /// <summary>
 /// 续借图书
 /// </summary>
 public async void RenewBook(string parameter)
 {
     string info = string.Format("renew?{0}", parameter);
     HttpWebRequestUtils _httpWebRequestUtils = new HttpWebRequestUtils();
     _httpWebRequestUtils._getDataEvent += OnRenew;
     await _httpWebRequestUtils.GetStringAsync(string.Format(_userAboutUrl, info));
     _httpWebRequestUtils._getDataEvent -= OnRenew;
 }