Example #1
0
        private void SaveButton_Click(object sender, EventArgs e)
        {
            if (stockQuantityTextBox.Text == "")
            {
                msgLabel.Text      = "Enter a stock unit";
                msgLabel.ForeColor = Color.Red;
                return;
            }
            StockOut   stockOut   = new StockOut();
            StockOutVM stockOutVm = new StockOutVM();

            //database
            stockOut.Item           = Convert.ToInt64(itemComboBox.SelectedValue);
            stockOut.Company        = Convert.ToInt64(companyComboBox.SelectedValue);
            stockOut.Quantity       = Convert.ToInt64(stockQuantityTextBox.Text);
            stockOut.AvailableItems = Convert.ToInt64(availableQuantituLabel.Text);
            _stockOuts.Add(stockOut);
            //grid only
            stockOutVm.Item    = itemComboBox.Text;
            stockOutVm.Company = companyComboBox.Text;
            stockOutVm.StockIn = Convert.ToInt64(stockQuantityTextBox.Text);
            _stockOutVms.Add(stockOutVm);
            stockOutGridView.DataSource = null;
            stockOutGridView.DataSource = _stockOutVms;
        }
        private void SaveButton_Click(object sender, EventArgs e)
        {
            if (stockQuantityTextBox.Text == "")
            {
                msgLabel.Text      = "Enter a stock unit";
                msgLabel.ForeColor = Color.Red;
                return;
            }
            StockOut stockOut = new StockOut();

            stockOut.Item     = Convert.ToInt64(itemComboBox.SelectedValue);
            stockOut.Company  = Convert.ToInt64(companyComboBox.SelectedValue);
            stockOut.Quantity = Convert.ToInt64(stockQuantityTextBox.Text);


            _stockOuts.Add(stockOut);



            // DataTable dt = _stockInManager.GridUpdate();
            stockOutGridView.DataSource = null;
            stockOutGridView.DataSource = _stockOuts;
        }
Example #3
0
        private void stockOutLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            StockOut stockOut = new StockOut();

            stockOut.Show();
        }