Пример #1
0
        private void btnView_Click(object sender, RoutedEventArgs e)
        {
            ValueAddedTaxInfoVM        vm  = (sender as HyperlinkButton).DataContext as ValueAddedTaxInfoVM;
            ValueAddedTaxInvoiceDetail vat = new ValueAddedTaxInvoiceDetail(vm);

            vat.SetAllReadOnlyOrEnable();
            var     window = CPApplication.Current.CurrentPage.Context.Window;
            IDialog dialog = window.ShowDialog(ResCustomerMaintain.Title_ValueAddedTaxInfo, vat, (obj, args) =>
            {
            });

            vat.Dialog = dialog;
        }
Пример #2
0
        private void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Customer_TaxInfoEdit))
            {
                CPApplication.Current.CurrentPage.Context.Window.Alert(ResValueAddedTaxInfo.Msg_NoRights_Edit);
                return;
            }
            ValueAddedTaxInfoVM        vm  = (sender as HyperlinkButton).DataContext as ValueAddedTaxInfoVM;
            ValueAddedTaxInvoiceDetail vat = new ValueAddedTaxInvoiceDetail(vm);
            var     window = CPApplication.Current.CurrentPage.Context.Window;
            IDialog dialog = window.ShowDialog(ResCustomerMaintain.Title_ValueAddedTaxInfo, vat, (obj, args) =>
            {
                if (args.DialogResult == DialogResultType.OK)
                {
                    OnVATUpdated(this, null);
                }
            });

            vat.Dialog = dialog;
        }