Ejemplo n.º 1
0
        private void submit_Click(object sender, EventArgs e)
        {
            try
            {
                if (voidPassword.Text != string.Empty)
                {
                    TextBox[] cancel = new TextBox[]
                    {
                        cancelSales.txtId,
                        cancelSales.txtpcode,
                        cancelSales.txtqty,
                        cancelSales.txtcancelledBy,
                        cancelSales.txtreasons,
                        cancelSales.txtcancelQty,
                        cancelSales.txtprice
                    };

                    ComboBox[] inventory = new ComboBox[] { cancelSales.inventory };
                    pos.cancelItems(voidUsername.Text, voidPassword.Text, cancel, inventory);
                    cancelSales.refreshRecords();
                    cancelSales.Hide();
                    this.Hide();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }