Ejemplo n.º 1
0
 private void manageUserToolStripMenuItem_Click(object sender, EventArgs e)
 {
     frmUser frmUser = new frmUser();
     frmUser.ShowDialog();
 }
Ejemplo n.º 2
0
        void ShowDialog(string button)
        {
            Form frm = null;
            bool ShopInfoRequired = false;
            if (button != "btnShop")
            {
                DataTable dtShop = shop.SelectAllShop();
                if (dtShop.Rows.Count != 1)
                {
                    MessageBox.Show("Error ! Please provide the shop information to continue", "Shop Information Required", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    ShopInfoRequired = true;
                    frm = new frmShop();
                }
            }
            if (!ShopInfoRequired)
            {
                switch (button)
                {
                    case "btnPOS":
                        frm = new frmPOS();
                        break;
                    case "btnSystemLog":
                        frm = new frmSystemLog();
                        break;
                    case "btnShop":
                        frm = new frmShop();
                        break;
                    case "btnUser":
                        frm = new frmUser();
                        break;
                    case "btnCompany":
                        frm = new frmCompany();
                        break;
                    case "btnCustomer":
                        frm = new frmCustomer();
                        break;
                    case "btnItem":
                        frm = new frmItem();
                        break;
                    case "btnInvoice":
                        //frm = new frmInvoice();
                        frm = new frmInvoiceWithBatch();
                        break;
                    case "btnOrder":
                        frm = new frmOrder();
                        break;
                    case "btnStock":
                        frm = new frmStock();
                        break;
                    default:
                        break;
                }
            }
            if (frm != null)
            {
                //this.Visible = false;

                if (Common.ShowModelDialogs)
                {
                    frm.ShowDialog();
                    if (!this.IsDisposed)
                        this.Visible = true;
                }
                else
                {
                    frm.Show();
                }
            }
        }
Ejemplo n.º 3
0
 private void btnUserManagement_Click(object sender, EventArgs e)
 {
     frmUser frm = new frmUser();
     frm.ShowDialog();
 }