예제 #1
0
        private void cbSave_Click(Object eventSender, EventArgs eventArgs)
        {
            try
            {
                m_savedCustomerID = Convert.ToInt32(MainModule.SaveNewCustomer(txtFirstName.Text, txtLastName.Text, txtEmail.Text, txtCompany.Text, txtPhone.Text, txtStreetAddress1.Text, txtStreetAddress2.Text, txtState.Text, txtCity.Text, txtZipCode.Text, txtCounty.Text));
                ClearFields();
                m_savedCustomer = true;
                this.Hide();
            }
            catch
            {
            }

            m_savedCustomer = false;
        }
예제 #2
0
        private void cbLogOff_Click(Object eventSender, EventArgs eventArgs)
        {
            DialogResult result = (DialogResult)0;
            frmCashCount cash   = null;

            if (MainModule.IsShiftStarted())
            {
                result = MessageBox.Show("Are you ready to end your shift", Application.ProductName, MessageBoxButtons.YesNo);
                if (result == System.Windows.Forms.DialogResult.Yes)
                {
                    cash = frmCashCount.CreateInstance();
                    cash.ShowDialog();
                    this.Hide();
                }
            }
        }
예제 #3
0
        //UPGRADE_NOTE: (7001) The following declaration (ReturnFromPause) seems to be dead code More Information: https://www.mobilize.net/vbtonet/ewis/ewi7001
        //private void ReturnFromPause()
        //{
        //Reset();
        //}

        public void SearchAndAddProduct(string productCode)
        {
            string  ProductDescription = "";
            decimal ProductPrice       = 0;

            if (productCode != "")
            {
                if (MainModule.FindProductByCode(productCode, ref ProductDescription, ref ProductPrice))
                {
                    // If product was found add line
                    AddLine(productCode, ProductDescription, ProductPrice);
                }
            }
            // Clear keypad
            ucNumericKeyPad.Value = "";
        }
        private void cbLogOff_Click(Object eventSender, EventArgs eventArgs)
        {
            Mobilize.Web.DialogResult result = (Mobilize.Web.DialogResult) 0;
            frmCashCount cash = null;

            if (MainModule.IsShiftStarted())
            {
                result = Mobilize.Web.MessageBox.Show("Are you ready to end your shift", System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).ProductName, Mobilize.Web.MessageBoxButtons.YesNo);
                if (result == Mobilize.Web.DialogResult.Yes)
                {
                    cash = frmCashCount.CreateInstance();
                    cash.ShowDialog();
                    this.Hide();
                }
            }
        }
        private void cbCreditCard_Click(Object eventSender, EventArgs eventArgs)
        {
            string amount  = ucNumbers.Value;
            string invoice = MainModule.CurrentTicketID.ToString();

            resultString = "";
            resultString = MainModule.RunCreditCardPayment(invoice, amount);

            string[] results = (string[])resultString.Split(',');
            if (results[0] == "SUCCESS")
            {
                AddPayment(amount, "Credit", resultString);
            }
            else
            {
                MessageBox.Show(resultString, Application.ProductName);
            }
        }
        private void cbCreditCard_Click(Object eventSender, EventArgs eventArgs)
        {
            string amount  = ucNumbers.Value;
            string invoice = MainModule.CurrentTicketID.ToString();

            resultString = "";
            resultString = MainModule.RunCreditCardPayment(invoice, amount);

            string[] results = (string[])resultString.Split(',');
            if (results[0] == "SUCCESS")
            {
                AddPayment(amount, "Credit", resultString);
            }
            else
            {
                Mobilize.Web.MessageBox.Show(resultString, System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).ProductName);
            }
        }
예제 #7
0
        //UPGRADE_WARNING: (2080) Form_Load event was upgraded to Form_Load method and has a new behavior. More Information: https://www.mobilize.net/vbtonet/ewis/ewi2080

        private void Form_Load()
        {
            int CurrentUserID = 0;

            m_BreakId = 0;
            // There is a Current Shift Then Register a Break
            if (MainModule.CurrentShift.ShiftID != 0)
            {
                m_BreakId = MainModule.RegisterBreakStart(MainModule.CurrentPOS.POSID, MainModule.CurrentShift.ShiftID, DateTime.Now);
            }
            else
            {
                if (CurrentUserID == 0)
                {
                    lblPauseMessage.Text = "No user Logged In";
                }
            }
        }
예제 #8
0
        private void cbReturn_Click(Object eventSender, EventArgs eventArgs)
        {
            decimal      MINIMUM_CASH = 0;
            decimal      Total        = 0;
            frmCashCount cash         = null;
            int          ShiftID      = 0;

            if (MainModule.CurrentShift.UserID == 0)
            {
                // And we need a shift
                MessageBox.Show("You are starting your shift, please count cash on drawer", Application.ProductName);
                Total = 0;
                while (Total < 300)
                {
                    cash = frmCashCount.CreateInstance();
                    cash.ShowDialog();
                    Total = cash.Total;
                    // Validate that the POS has enough cash on Drawer to
                    // Begin shift
                    if (Total > MINIMUM_CASH)
                    {
                        // Start a shift and register it into database
                        ShiftID = MainModule.StartShiftWithAmount(MainModule.CurrentPOS.POSID, MainModule.CurrentShift.UserID, DateTime.Now, Total);
                        if (ShiftID > 0)
                        {
                            this.Hide();
                            MainModule.CurrentShift.ShiftID = ShiftID;
                        }
                    }
                    else
                    {
                        MessageBox.Show("You need to have a minimum of " + MINIMUM_CASH.ToString() + " to Start a Shift", Application.ProductName);
                    }
                }
            }
            else
            {
                this.Hide();
            }
        }
예제 #9
0
        private void cbPayment_Click(Object eventSender, EventArgs eventArgs)
        {
            OrderedDictionary payments = null;
            frmPayment        pay      = frmPayment.CreateInstance();

            pay.TransactionAmount = m_total;
            pay.UpdateTotals();
            // We need a ticket number
            // Because it will be needed when sending it to
            // credit card processor
            if (MainModule.CurrentTicketID == 0)
            {
                MainModule.CurrentTicketID = MainModule.CreateTicket(m_CurrentCustomer, MainModule.CurrentPOS.POSID, MainModule.CurrentShift.UserID);
            }
            OrderedDictionary items = GetItems();

            if (items.Count > 0)
            {
                pay.ShowDialog();
                if (pay.PaymentDone)
                {
                    payments = pay.GetPayments();
                    if (MainModule.SaveSale(m_SubTotal, m_Taxes, m_total, payments, items, m_CurrentCustomer, MainModule.CurrentPOS.POSID, MainModule.CurrentShift.UserID))
                    {
                        Reset();
                        UpdateTotals();
                    }
                    else
                    {
                        MessageBox.Show("Error saving sale", Application.ProductName);
                    }
                }
            }
            else
            {
                MessageBox.Show("Error no items registered", Application.ProductName);
            }
        }
예제 #10
0
        public void LoadCustomerInfo(int customerInfo)
        {
            string customer = MainModule.GetCustomerInfo(customerInfo);

            lblCustomerInfo.Text = customer;
        }