Esempio n. 1
0
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            var flag = ValidationManager.Validate(this.LayoutRoot);

            if (flag)
            {
                var sysNoList = new List <int>(new int[] { m_CurSaleIncome.SysNo.Value });
                if (CurrentActionType == ActionType.SetReferenceID)
                {
                    m_SaleIncomeFacade.BatchSetReferenceID(sysNoList, m_CurSaleIncome.ReferenceID,
                                                           msg => CloseDialog(DialogResultType.OK));
                }
                else
                {
                    m_SaleIncomeFacade.SetIncomeAmount(m_CurSaleIncome.SysNo.Value, m_CurSaleIncome.IncomeAmt.Value,
                                                       () => CloseDialog(DialogResultType.OK));
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 批量设置凭证号
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnBatchSetReferenceID_Click(object sender, RoutedEventArgs e)
        {
            var selectedSysNoList = GetSelectedSOIncomeSysNoList();

            if (selectedSysNoList.Count <= 0)
            {
                Window.Alert(ResCommon.Message_AtLeastChooseOneRecord);
                return;
            }

            new UCReferenceIDSetter().ShowDialog(ResSaleIncomeQuery.Message_BatchSetReferenceIDDlgTitle, (obj, args) =>
            {
                if (args.DialogResult == DialogResultType.OK)
                {
                    soIncomeFacade.BatchSetReferenceID(selectedSysNoList, args.Data.ToString(), msg =>
                    {
                        Window.Alert(msg, () => this.dgSaleIncomeQueryResult.Bind());
                    });
                }
            });
        }