Beispiel #1
0
        public ActionResult AddTransactionDetail(TransactionDetail transactionDetail)
        {
            if (!transactionDetail.Update())
            {
                return(Json("0"));
            }

            return(Json(transactionDetail.TransactionID));
        }
Beispiel #2
0
        private void Update(object sender, RoutedEventArgs e)
        {
            if (!ValidateInputs())
            {
                return;
            }
            try
            {
                if (_transactionHeader.TransactionHeaderId == 0)
                {
                    _transactionHeader.Create();
                }

                _transactionDetail.TransactionHeaderId = _transactionHeader.TransactionHeaderId;

                if (_transactionDetail.TransactionDetailId == 0)
                {
                    _transactionDetail.Create();
                }
                else
                {
                    _transactionDetail.Update();
                }

                DialogResult = true;

                Close();
                //_voucherView.RefreshDisplay();

                //txtMemberCode.Focus();
            }
            catch (Exception exception)
            {
                Logger.ExceptionLogger(this, exception);
            }
        }