コード例 #1
0
 private void BtnAdd_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var form = new OrdersForm(_service);
         form.ShowDialog();
         FillGrids();
     }
     catch (Exception ex)
     {
         FormHelper.MessageError(ex);
     }
 }
コード例 #2
0
        private void BtnUpdate_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                var orderTemp = gridOrders.SelectedItem as OrderInput;
                if (orderTemp is null)
                {
                    return;
                }

                var order = _service.Get(orderTemp.Id);
                var form  = new OrdersForm(_service, order);
                form.ShowDialog();
                FillGrids();
            }
            catch (Exception ex)
            {
                FormHelper.MessageError(ex);
            }
        }