Beispiel #1
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            String SALES_ID = dataGridView1.Rows[e.RowIndex].Cells["Column1"].Value.ToString();

            if (dataGridView1.Rows[e.RowIndex].Cells["Column3"].Value.ToString() == "QuickSale")
            {
                //////
                frmSales frmSales = Application.OpenForms["frmSales"] as frmSales;
                if (frmSales != null)
                {
                    frmSales.WindowState = FormWindowState.Normal;
                    frmSales.BringToFront();
                    frmSales.Activate();
                }
                else
                {
                    frmSales           = new frmSales(SALES_ID);
                    frmSales.MdiParent = this.ParentForm;
                    frmSales.Dock      = DockStyle.Fill;
                    frmSales.Show();
                }
                ///////////
            }
            else if (dataGridView1.Rows[e.RowIndex].Cells["Column3"].Value.ToString() == "POS")
            {
                //////
                frmPOS frmPOS = Application.OpenForms["frmPOS"] as frmPOS;
                if (frmPOS != null)
                {
                    frmPOS.WindowState = FormWindowState.Normal;
                    frmPOS.BringToFront();
                    frmPOS.Activate();
                }
                else
                {
                    frmPOS           = new frmPOS(SALES_ID);
                    frmPOS.MdiParent = this.ParentForm;
                    frmPOS.Dock      = DockStyle.Fill;
                    frmPOS.Show();
                }
                ///////////
            }
            else
            {
            }
        }
Beispiel #2
0
        private void advancedPOSToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //Point of Sales
            frmPOS frmPOS = Application.OpenForms["frmPOS"] as frmPOS;

            if (frmPOS != null)
            {
                frmPOS.WindowState = FormWindowState.Normal;
                frmPOS.BringToFront();
                frmPOS.Activate();
            }
            else
            {
                frmPOS           = new frmPOS("0");
                frmPOS.MdiParent = this;
                frmPOS.Dock      = DockStyle.Fill;
                frmPOS.Show();
            }
        }