コード例 #1
0
 public void OnDialogOpened(IDialogParameters parameters)
 {
     LocoCalculation = parameters.GetValue <LocoCalculationModel>("calculation");
     LocoOrders      = new();
     LocoOrders      = parameters.GetValue <List <LocoOrderModel> >("orders");
     CalculationDate = LocoCalculation.DateOfCalculation;
     PaymentDate     = LocoCalculation.DateOfPayment;
 }
コード例 #2
0
        public int InsertLocoCalculation(LocoCalculationModel locoCalculation)
        {
            try
            {
                _sql.StartTransaction("AccountingConnStr");

                int output = _sql.LoadDataInTransaction <int, dynamic>("dbo.spLocoTravelCalc_Insert", locoCalculation).FirstOrDefault();

                _sql.CommitTransaction();
                return(output);
            }
            catch (System.Exception)
            {
                _sql.RollBackTransaction();
                return(0);
            }
        }
コード例 #3
0
        private async void SaveOrder()
        {
            LocoCalculation.DateOfCalculation = CalculationDate;
            LocoCalculation.DateOfPayment     = PaymentDate;
            TravelOrdersLocoModel order = new()
            {
                LocoCalculation = LocoCalculation,
                LocoOrders      = LocoOrders
            };

            bool isPosted = await _travelOrdersEndpoint.PostLocoTravel(order);

            if (isPosted)
            {
                var result = ButtonResult.OK;
                var p      = new DialogParameters();
                RequestClose?.Invoke(new DialogResult(result, p));
            }
        }
    }