private async void grid_data_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (null == this.grid_data.SelectedItem) { return; } var selValue = this.grid_data.SelectedItem as FreBusinessSearchPanelMode; SAssert.MustTrue(null != selValue, string.Format("绑定数据异常!")); var dialog = new EditBusinessListPanel(); var toUpdateData = new FreBussinessOpCenterDTO(selValue.SrcData); dialog.Init(toUpdateData); var result = await dialog.SmothShow(); if (result) { var editInfo = dialog.EditInfo; if (null != editInfo) { toUpdateData.Flist_id = toUpdateData.OrderInfo.Flist_id; selValue.SrcData.FixUpdateResult(toUpdateData); if (!toUpdateData.IsNullOrEmpty()) { this.PostAsync("api/UpdateFreBusiness", toUpdateData, new HttpResponseHandler(this.CommOpResponseCommHandler <BaseOpResult>)); } } } }
private async void btn_add_Click(object sender, RoutedEventArgs e) { var dialog = new EditBusinessListPanel(); var result = (bool)await dialog.SmothShow(); if (result) { var editInfo = dialog.EditInfo; if (null != editInfo) { this.PostAsync("api/AddFreBusiness", editInfo, new HttpResponseHandler(this.CommOpResponseCommHandler <BaseOpResult>)); } } }