Ejemplo n.º 1
0
        public static FormPOS Instance()
        {
            if (sForm == null)
            {
                sForm = new FormPOS();
            }

            return(sForm);
        }
Ejemplo n.º 2
0
        private void pointOfSalesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CloseAllChild();
            Form sForm = FormPOS.Instance();

            sForm.MdiParent = this;
            sForm.Show();
            sForm.Activate();
        }
Ejemplo n.º 3
0
        private void FormPOS_Load(object sender, EventArgs e)
        {
            daFormPOSList = new MySqlDataAdapter("", clsConnection.CN);

            cmdAddInvoice = new MySqlCommand("INSERT INTO tblsales( invoiceno , productautoid, unitprice, quantity, subtotal, cash, changecash, dateadded, totalamount)" +
                                             "VALUES (@getInvoice,@getProductID,@getUnitPrice,@getQuantity,@getSubTotal,@getCash,@getChange,@getDateAdded,@getTotalAmount)", clsConnection.CN);

            NewInvoice();

            cmdAddInvoice.Parameters.Add("@getInvoice", MySqlDbType.VarChar);
            cmdAddInvoice.Parameters.Add("@getProductID", MySqlDbType.Int16);
            cmdAddInvoice.Parameters.Add("@getUnitPrice", MySqlDbType.Decimal);
            cmdAddInvoice.Parameters.Add("@getQuantity", MySqlDbType.Int16);
            cmdAddInvoice.Parameters.Add("@getSubTotal", MySqlDbType.Decimal);
            cmdAddInvoice.Parameters.Add("@getCash", MySqlDbType.Decimal);
            cmdAddInvoice.Parameters.Add("@getChange", MySqlDbType.Decimal);
            cmdAddInvoice.Parameters.Add("@getDateAdded", MySqlDbType.Date);
            cmdAddInvoice.Parameters.Add("@getTotalAmount", MySqlDbType.Decimal);

            publicFormPOS = this;
        }