Beispiel #1
0
        public FORM_PRODUCTS()
        {
            InitializeComponent();

            btn_update.Enabled = false;
            btn_delete.Enabled = false;
            btn_print.Enabled  = false;
            btn_add.Enabled    = true;

            if (frm == null) /*بعين قيمة لل form لو قيمتة ب null وهى تكون قيمتها الحالية  */            // .......[4]
            {
                frm = this;
            }

            this.dataGridView1.DataSource = prd.GET_ALL_PRODUCTS();
        }
        private void productManagementToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FORM_PRODUCTS frm = new FORM_PRODUCTS();

            frm.ShowDialog();
        }
Beispiel #3
0
        private static FORM_PRODUCTS frm;                                          //  ......................[1]

        static void frm_formclosed(object sender, FormClosedEventArgs e)           //  ................[2]
        {
            frm = null;
        }