Ejemplo n.º 1
0
 private void dgridOrderlines_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     try
     {
         OrderLine       ol  = (OrderLine)dgridOrderlines.SelectedItem;
         EditOrderWindow eow = new EditOrderWindow(ol);
         Effect = new System.Windows.Media.Effects.BlurEffect();
         eow.ShowDialog();
         Effect = null;
         if (eow.DialogResult == true)
         {
             var sumS = Olines.Sum(o => Convert.ToDouble(o.Total));
             lblTotalS.Content = String.Format("Итого: {0:0.00}", sumS);
         }
     }
     catch { return; }
 }
Ejemplo n.º 2
0
 private void dgridOrderlines_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     try
     {
         OrderLine       ol  = (OrderLine)dgridOrderlines.SelectedItem;
         EditOrderWindow eow = new EditOrderWindow(ol);
         Effect = new System.Windows.Media.Effects.BlurEffect();
         eow.ShowDialog();
         Effect = null;
         if (eow.DialogResult == true)
         {
             var sumS = olines.Sum(o => Convert.ToDouble(o.Total));
             sumS             = Math.Round(sumS, 2);
             lblTotal.Content = String.Format("Итого: {0:0.00}", sumS.ToString());
         }
     }
     catch
     {
         MessageBox.Show("Не удалось отредактировать строку заказа", "Ошибка формирования заказа", MessageBoxButton.OK, MessageBoxImage.Error);
         return;
     }
 }