private void OKInvButton_Click(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(CountTextBox.Text)) { Infinium.LightMessageBox.Show(ref TopForm, false, "Введите остаток", "Ошибка"); CountTextBox.Focus(); CountTextBox.SelectAll(); return; } FactCount = Convert.ToDecimal(CountTextBox.Text); if ((FactCount != CurrentCount || CurrentCount < FactCount) && string.IsNullOrWhiteSpace(NotesRichTextBox.Text)) { Infinium.LightMessageBox.Show(ref TopForm, false, "Введите примечание", "Ошибка"); NotesRichTextBox.Focus(); NotesRichTextBox.SelectAll(); return; } Notes = NotesRichTextBox.Text; IsOKPress = true; FormEvent = eClose; AnimateTimer.Enabled = true; }
public void TbClear() { ShTextBox.Clear(); ArtTextBox.Clear(); NameTextBox.Clear(); CountTextBox.Clear(); comboBox1.SelectedIndex = -1; }
public AddInventoryRestForm(decimal iCurrentCount, string sInvNotes) { InitializeComponent(); CurrentCount = iCurrentCount; Notes = sInvNotes; Initialize(); NotesRichTextBox.Text = Notes.ToString(); CountTextBox.Text = CurrentCount.ToString(); CountTextBox.Focus(); CountTextBox.SelectAll(); while (!SplashForm.bCreated) { ; } }
private void AddButton_Click(object sender, EventArgs e) { int Count = 0; if (ObjectNameTextBox.Text == "") { Infinium.LightMessageBox.Show(ref TopForm, false, "Введите название!", "Ошибка"); } else { try { Count = Convert.ToInt32(CountTextBox.Text); } catch { Infinium.LightMessageBox.Show(ref TopForm, false, "Некорректное кол-во!", "Ошибка"); return; } try { Convert.ToDecimal(CostTextBox.Text); } catch { Infinium.LightMessageBox.Show(ref TopForm, false, "Некорректно задана цена!", "Ошибка"); return; } ConnectUnloads.AddGoods(ObjectNameTextBox.Text, Count, CostTextBox.Text, MeasureComboBox.SelectedValue.ToString(), CurrencyComboBox.SelectedValue.ToString()); ObjectNameTextBox.Clear(); CountTextBox.Clear(); CostTextBox.Clear(); } }
public void FocusCount() { CountTextBox.Focus(); }