Exemple #1
0
        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;
        }
Exemple #2
0
 public void TbClear()
 {
     ShTextBox.Clear();
     ArtTextBox.Clear();
     NameTextBox.Clear();
     CountTextBox.Clear();
     comboBox1.SelectedIndex = -1;
 }
Exemple #3
0
        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)
            {
                ;
            }
        }
Exemple #4
0
        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();
            }
        }
Exemple #5
0
 public void FocusCount()
 {
     CountTextBox.Focus();
 }