public static void AddProductCheck(XElement element, decimal qty) { CassieService.OpenProductsCheck(); if (ClassProMode.ModePro) { element = ClassProMode.Replace(new[] { element }).First(); } var product = ProductType.FromXElement(element); product = RepositoryProduct.Products.FirstOrDefault(p => p.CustomerId == product.CustomerId); if (product.Balance) { if (GetBallance(product) == null) { var button = new Button { ToolTip = "ShowBallance" }; FunctionsService.Click(button, product); } else { AddProductCheck(product, product.Qty); } } else { AddProductCheck(product, qty); } }
private void ButtonClick(object sender, RoutedEventArgs e) { if (((Button)sender).Name == "Save") { string error = ""; foreach (TextBox bs in ClassEtcFun.FindVisualChildren <TextBox>(this)) { if (!Valid(bs)) { error += (bs.Name + " incorrect") + Environment.NewLine; } } if (error.Length == 0) { FunctionsService.Click(sender); } else { FunctionsService.ShowMessageTimeList(error); } } else { FunctionsService.Click(sender); } }
private void ButtonClick(object sender, RoutedEventArgs e) { decimal money; if (!string.IsNullOrEmpty(tbS.Text) && decimal.TryParse(tbS.Text.Trim(), out money) && FunctionsService.PayWithValidation(sender, money, MaxMoney, PayType)) { FunctionsService.Click(sender); } }
private void ButtonClick(object sender, RoutedEventArgs e) { var button = sender as Button; if (button?.ToolTip != null && button.ToolTip.ToString() == "WNumPadMini") { string getValue = button.Name.Remove(0, 1); switch (getValue) { case "Sup": TextBox.Text = ""; break; case "Entree": var window = Tag as WPayEtc; if (window != null) { decimal money; if (!string.IsNullOrEmpty(window.tbS.Text) && decimal.TryParse(window.tbS.Text.Trim(), out money) && FunctionsService.PayWithValidation(sender, money, window.MaxMoney, window.PayType)) { FunctionsService.Click(BEnter); } } else { FunctionsService.Click(BEnter); } break; case "Point": TextBox.Text += ","; break; default: if (Clr) { TextBox.Text = ""; } int f; if (int.TryParse(getValue, out f)) { TextBox.Text += getValue; } break; } Clr = false; } }
private void ButtonClick(object sender, RoutedEventArgs e) { var barCode = codebare.Text.Trim(); var check = GetCheck(barCode); if (check != null) { FunctionsService.Click(button, check); } else { FunctionsService.ShowMessageTime(Properties.Resources.LabelNofFound); } codebare.Text = ""; }
private void ButtonClick(object sender, RoutedEventArgs e) { var button = sender as Button; if (button != null) { var b = button; if (b.ToolTip != null) { if (b.ToolTip.ToString() == "WNumPadComplet") { string getValue = b.Name.Remove(0, 1); if (Clr) { Box.Text = ""; } switch (getValue) { case "Sup": Box.Text = ""; break; case "Entree": FunctionsService.Click(BEnter); break; case "Point": Box.Text += ","; break; default: int f; if (int.TryParse(getValue, out f)) { Box.Text += getValue; } break; } Clr = false; } } } }
public void WindowLoaded(object sender, RoutedEventArgs e) { var rec = RepositoryHistoryChangeProduct.Document.GetXElements("HistoryChangeProducts", "rec"); var xElements = rec as XElement[] ?? rec.ToArray(); var first = xElements.FirstOrDefault(); if (first != null) { SelectGroup = first.GetXElementValue("group").ToInt(); dataGrid1.DataContext = xElements.Where(l => l.GetXElementValue("group") == first.GetXElementValue("group")); var p = xElements.Count(l => l.GetXElementValue("group") == (SelectGroup + 1).ToString()); xP.IsEnabled = p != 0; xN.IsEnabled = xElements.Count(l => l.GetXElementValue("group") == (SelectGroup - 1).ToString()) != 0; } foreach (var bs in ClassEtcFun.FindVisualChildren <Button>(this)) { bs.Click += (o, a) => { FunctionsService.Click(o); } } ; } }
private void BokClick(object sender, RoutedEventArgs e) { DialogResult = true; FunctionsService.Click(sender); }
private void ButtonClick1(object sender, RoutedEventArgs e) { FunctionsService.Click(sender, ((WStat)Owner).B, dataGrid.SelectedItem); }
private void ButtonClick(object sender, RoutedEventArgs e) { FunctionsService.Click(sender, ((WStat)Owner).B); }
private static void ButtonClick(object sender, RoutedEventArgs e) { FunctionsService.Click(sender); }
private void ButtonClick1(object sender, RoutedEventArgs e) { FunctionsService.Click(sender); Close(); }
private void XEnterClick(object sender, RoutedEventArgs e) { FunctionsService.Click(sender); }
private void AddClick(object sender, RoutedEventArgs e) { FunctionsService.Click(sender, (ProductType)DataGrid.SelectedItem); }
private void ButtonClick(object sender, RoutedEventArgs e) { _countTick = 0; FunctionsService.Click(sender); }