private void btnChooseReasonCode_Click(object sender, RoutedEventArgs e) { UCReasonCodePicker uc = new UCReasonCodePicker(); uc.ReasonCodeType = BizEntity.Common.ReasonCodeType.RMA; IDialog dialog = CPApplication.Current.CurrentPage.Context.Window.ShowDialog(ResRMATracking.Dialog_ReasonCode, uc, (obj, args) => { if (args.DialogResult == DialogResultType.OK) { var vm = this.DataContext as RMATrackingVM; if (args.Data != null) { var data = (KeyValuePair <string, string>)args.Data; vm.ReasonCodePath = data.Value; vm.ReasonCodeSysNo = int.Parse(data.Key); } else { vm.ReasonCodePath = string.Empty; vm.ReasonCodeSysNo = null; } } }); uc.Dialog = dialog; }
private void HyperlinkButton_Click(object sender, RoutedEventArgs e) { UCReasonCodePicker uc = new UCReasonCodePicker(); uc.ReasonCodeType = BizEntity.Common.ReasonCodeType.PreSell; IDialog dialog = CPApplication.Current.CurrentPage.Context.Window.ShowDialog(ResCustomerCallingMaintain.hlb_SlelectReasonCode, uc, (obj, args) => { if (args.DialogResult == DialogResultType.OK) { if (args.Data != null) { var data = (KeyValuePair <string, string>)args.Data; viewModel.NewCallingLog.ReasonCodeSysNo = int.Parse(data.Key); viewModel.NewCallingLog.ReasonCodePath = data.Value; } else { viewModel.NewCallingLog.ReasonCodeSysNo = null; viewModel.NewCallingLog.ReasonCodePath = string.Empty; } } }); uc.Dialog = dialog; }
private void btnBatchAbandon_Click(object sender, RoutedEventArgs e) { List <int> list = new List <int>(); var dynamic = this.dataGridList.ItemsSource as dynamic; if (dynamic != null) { foreach (var item in dynamic) { if (item.IsCheck == true) { list.Add((int)item["SysNo"]); } } } if (list.Count == 0) { this.Window.Alert(ResSO.Msg_PleaseSelect); return; } Window.Confirm(ResSO.Info_AbandonConfirm, (s, confirmEvent) => { if (confirmEvent.DialogResult == DialogResultType.OK) { UCReasonCodePicker content = new UCReasonCodePicker(); content.ReasonCodeType = ReasonCodeType.Order; content.Dialog = Window.ShowDialog(ResSOMaintain.Info_SOMaintain_AbandSO, content, (obj, args) => { if (args.Data != null) { KeyValuePair <string, string> data = (KeyValuePair <string, string>)args.Data; (new SOFacade(this.Page)).AbandonSO(list, false, (vm) => { if (vm != null) { SOInternalMemoFacade SOInternalMemoFacade = new SOInternalMemoFacade(); for (int i = 0; i < list.Count; i++) { SOInternalMemoFacade.Create(new SOInternalMemoInfo { SOSysNo = list[i], Content = data.Value, LogTime = DateTime.Now, ReasonCodeSysNo = int.Parse(data.Key), CompanyCode = CPApplication.Current.CompanyCode, Status = SOInternalMemoStatus.FollowUp }, null); } Bind(); Window.Alert(ResSOMaintain.Info_SOMaintain_SO_Abanded, MessageType.Information); } }); } }); } }); }
private void SelectPath_Click(object sender, RoutedEventArgs e) { UCReasonCodePicker uc = new UCReasonCodePicker(); uc.ReasonCodeType = ReasonCodeType.Order; uc.ShowType = ReasonCodeTreeShowType.Active; IDialog dialog = CPApplication.Current.CurrentPage.Context.Window.ShowDialog(ResSOInternalMemo.hlb_SlelectReasonCode, uc, (obj, args) => { if (args.DialogResult == DialogResultType.OK) { KeyValuePair <string, string> item = (KeyValuePair <string, string>)args.Data; if (item.Key.Length > 0) { txtReasonCode.Text = item.Key; txtReasonCodePath.Text = item.Value; } } }); uc.Dialog = dialog; }
private void Abandon(bool immediatelyReturnInventory) { Window.Confirm(ResSO.Info_AbandonConfirm, (s, e) => { if (e.DialogResult == DialogResultType.OK) { UCReasonCodePicker content = new UCReasonCodePicker(); content.ReasonCodeType = ReasonCodeType.Order; content.Dialog = Window.ShowDialog(ResSOMaintain.Info_SOMaintain_AbandSO, content, (obj, args) => { if (args.Data != null) { KeyValuePair <string, string> data = (KeyValuePair <string, string>)args.Data; SOFacade.AbandonSO(SelectedSOSysNoList, immediatelyReturnInventory, (vm) => { if (vm != null) { SOInternalMemoFacade SOInternalMemoFacade = new SOInternalMemoFacade(); for (int i = 0; i < SelectedSOSysNoList.Count; i++) { SOInternalMemoFacade.Create(new SOInternalMemoInfo { SOSysNo = SelectedSOSysNoList[i], Content = data.Value, LogTime = DateTime.Now, ReasonCodeSysNo = int.Parse(data.Key), CompanyCode = CPApplication.Current.CompanyCode, Status = SOInternalMemoStatus.FollowUp }, null); } QuerySO(); Window.Alert(ResSOMaintain.Info_SOMaintain_SO_Abanded, MessageType.Information); } }); } }); } }); }
private void Abandon(bool immediatelyReturnInventory) { Page.Context.Window.Confirm("确定要作废订单吗?", (s, e) => { if (e.DialogResult == DialogResultType.OK) { UCReasonCodePicker content = new UCReasonCodePicker(); content.ReasonCodeType = BizEntity.Common.ReasonCodeType.Order; content.Dialog = Window.ShowDialog(ResSO.Info_SO_Processer_SO_Void, content, (obj, args) => { if (args.Data != null) { KeyValuePair <string, string> data = (KeyValuePair <string, string>)args.Data; if (CurrentSOVM.BaseInfoVM.SplitType == SOSplitType.SubSO) { SOFacade.GetIsAllSubSONotOutStock(SOSysNo, (subSOSender, subSOargs) => { if (!subSOargs.FaultsHandle()) { if (subSOargs.Result) { ConfirmAbandonAllSubSO(); } else { AbandonSO(immediatelyReturnInventory, data); } } }); } else { AbandonSO(immediatelyReturnInventory, data); } } }); } }); }
private void SelectPath_Click(object sender, RoutedEventArgs e) { UCReasonCodePicker uc = new UCReasonCodePicker(); uc.ReasonCodeType = ReasonCodeType.Complain; IDialog dialog = CPApplication.Current.CurrentPage.Context.Window.ShowDialog(ResSOInternalMemo.hlb_SlelectReasonCode, uc, (obj, args) => { if (args.DialogResult == DialogResultType.OK) { if (args.Data != null) { KeyValuePair <string, string> item = (KeyValuePair <string, string>)args.Data; if (item.Key.Length > 0) { this.DataVM.ProcessInfo.ReasonCodeSysNo = int.Parse(item.Key); } } } }); uc.Dialog = dialog; }