コード例 #1
0
ファイル: PayQuery.xaml.cs プロジェクト: sanlonezhang/ql
        private void Button_BatchUpdateInvoiceStatus_Click(object sender, RoutedEventArgs e)
        {
            List <PayableInfo> selectList = GetSelectedList();

            if (selectList.Count == 0)
            {
                Window.Alert(ResPayQuery.Msg_SelectData);
            }
            else
            {
                var model = new PayInvoiceMaintainVM();
                model.OrderSysNos       = string.Join(",", selectList.Select(s => s.OrderSysNo.ToString()).ToList());
                model.InvoiceStatus     = selectList.FirstOrDefault().InvoiceStatus;
                model.InvoiceFactStatus = selectList.FirstOrDefault().InvoiceFactStatus;
                model.Note   = selectList.FirstOrDefault().Note;
                model.SysNos = string.Join(",", selectList.Select(s => s.SysNo.ToString()).ToList());
                UCPayInvoiceMaintain uctl = new UCPayInvoiceMaintain(model);
                uctl.ShowDialog(ResPayQuery.Dialog_InvoiceMaintain, (s, args) =>
                {
                    if (args.DialogResult == DialogResultType.OK && args.Data != null)
                    {
                        this.DataGrid_QueryResult.Bind();
                    }
                });
            }
        }
コード例 #2
0
ファイル: PayItemQuery.xaml.cs プロジェクト: sanlonezhang/ql
        /// <summary>
        /// 发票状态修改
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Hyperlink_InvoiceStatus_Click(object sender, RoutedEventArgs e)
        {
            var cur = this.dgPayItemQueryResult.SelectedItem as PayItemVM;

            if (cur != null)
            {
                var vm = EntityConverter <PayItemVM, PayInvoiceMaintainVM> .Convert(cur, (s, t) =>
                {
                    t.SysNos      = s.PaySysNo.ToString();
                    t.OrderSysNos = s.OrderID;
                    t.Note        = s.InvoiceNumber;
                });

                var uc = new UCPayInvoiceMaintain(vm);
                uc.ShowDialog(ResPayItemQuery.Message_InvoiceStatusModifyDlgTitle, (_, args) =>
                {
                    if (args.DialogResult == DialogResultType.OK && args.Data != null)
                    {
                        dynamic result = args.Data as dynamic;
                        Window.Alert(result.Result.ToString());
                        this.dgPayItemQueryResult.Bind();
                    }
                });
            }
        }
コード例 #3
0
ファイル: PayQuery.xaml.cs プロジェクト: sanlonezhang/ql
        private void Hyperlink_UpdateInvoiceStatus(object sender, RoutedEventArgs e)
        {
            PayableVM vm = (sender as HyperlinkButton).DataContext as PayableVM;

            var model = new PayInvoiceMaintainVM();

            model.OrderSysNos       = vm.OrderSysNo.ToString();
            model.InvoiceStatus     = vm.InvoiceStatus;
            model.InvoiceFactStatus = vm.InvoiceFactStatus;
            model.Note   = vm.Note;
            model.SysNos = vm.PaySysNo.ToString();
            UCPayInvoiceMaintain uctl = new UCPayInvoiceMaintain(model);

            uctl.ShowDialog(ResPayQuery.Dialog_InvoiceMaintain, (s, args) =>
            {
                if (args.DialogResult == DialogResultType.OK && args.Data != null)
                {
                    dynamic result = args.Data as dynamic;
                    Window.Alert(result.Result.ToString());
                    this.DataGrid_QueryResult.Bind();
                }
            });
        }