Esempio n. 1
0
 /// <summary>
 /// 刷新司机数据
 /// </summary>
 public static async void RefereshDriverInfo()
 {
     var queryParam = new BaseQueryParam()
     {
         IsAllowPagging = false
     };
     await NHttpClientDAL.PostAsync("api/QueryDriverInfoList", queryParam, new HttpResponseHandler((res, context) =>
     {
         res.ServerDataGetEntityListCommHandler(out ServerDriverinfoList);
     }));
 }
Esempio n. 2
0
        private async void pi_del_MouseUp(object sender, MouseButtonEventArgs e)
        {
            if (null == this.grid_data.SelectedItem)
            {
                return;
            }
            var data = this.grid_data.SelectedItem as AirwayEntity;

            SAssert.MustTrue(null != data, string.Format("绑定数据异常!"));

            var promptResult = MessageBox.Show(string.Format("确认删除记录?"), "操作确认", MessageBoxButton.OKCancel);

            if (promptResult == MessageBoxResult.OK)
            {
                WaitingDialog.Show();

                // 删除记录
                await NHttpClientDAL.GetAsync(string.Format("api/DelAirwayInfo/${0}", data.Fid),
                                              new HttpResponseHandler(this.CommOpResponseCommHandler <BaseOpResult>));
            }
        }
Esempio n. 3
0
 /// <summary>
 /// 发起Http Post请求
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="control"></param>
 /// <param name="url"></param>
 /// <param name="param"></param>
 /// <param name="callback"></param>
 /// <param name="context"></param>
 public static async void PostAsync <T>(this Control control, string url, T param = null, HttpResponseHandler callback = null, object context = null)
     where T : class, new()
 {
     WaitingDialog.Show();
     await NHttpClientDAL.PostAsync(url, param, callback);
 }
Esempio n. 4
0
 /// <summary>
 /// 发起Http Get请求
 /// </summary>
 /// <param name="control"></param>
 /// <param name="url"></param>
 /// <param name="callback"></param>
 /// <param name="context"></param>
 /// <returns></returns>
 public static async Task GetAsync(this Control control, string url, HttpResponseHandler callback = null, object context = null)
 {
     WaitingDialog.Show();
     await NHttpClientDAL.GetAsync(url, callback);
 }