Пример #1
0
        private void EditBtn_Click(object sender, EventArgs e)
        {
            if (idselected != "" && table == "products")
            {
                using (var editform = new productForm())
                {
                    editform.idtouse = idselected;
                    editform.ShowDialog();
                }
            }

            if (idselected != "" && table == "sales")
            {
                using (var sales = new salesForm())
                {
                    sales.idtouse = idselected;
                    sales.ShowDialog();
                }
            }

            if (idselected != "" && table == "receipts")
            {
                using (var resibo = new receiptForm())
                {
                    resibo.idtouse = idselected;
                    resibo.ShowDialog();
                }
            }
        }
Пример #2
0
        private void CreateBtn_Click(object sender, EventArgs e)
        {
            if (table == "products")
            {
                using (var prodForm = new productForm())
                {
                    prodForm.ShowDialog();
                }
            }

            if (table == "sales")
            {
                using (var salesform = new salesForm())
                {
                    salesform.ShowDialog();
                }
            }

            if (table == "receipts")
            {
                using (var resibo = new receiptForm())
                {
                    resibo.ShowDialog();
                }
            }
        }