Example #1
0
        /// <summary>
        /// double checks that register and name have been changed and then totals and drops everything
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnTotal_Click(object sender, EventArgs e)
        {
            int numCheques = int.Parse(txtbNumCheques.Text);

            if (cheques > 0 && numCheques == 0)
            {
                MessageBox.Show("Please make sure you have entered the number of cheques.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            else
            {
                if (combxRegister.Text == "Register#")
                {
                    MessageBox.Show("Please Change the Register number AND make sure the float is right.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }
                else
                {
                    if (drop <= 0)
                    {
                        //txtbFloat.Text = subTotal.ToString();
                    }
                    ClearDrop();

                    Update();

                    cu.Drop();
                }
            }
        }
Example #2
0
        private void LoadData(string ID)
        {
            if (cu.LoadFromDB(ID))
            {
                log.Info("Till data Successfully loaded from DB");
            }
            else
            {
                log.Error("couldnt load data from DB");
            }

            log.Debug("cu.wssCash before drop  is: " + cu.WSSCash.ToString());
            cu.Drop();
            log.Debug("cu.wssCash after drop  is: " + cu.WSSCash.ToString());
            setTextBoxes();
        }