Esempio n. 1
0
        void menuItem_CloneAdd_Click(object sender, EventArgs e)
        {
            //throw new NotImplementedException();

            FormAmmAdd form = new FormAmmAdd();

            form.CurrentData = (P_AmmeterInfo)this.SelectedNode.Tag;
            // form.ShowDialog(this);
            if (form.ShowDialog() == DialogResult.OK)
            {
                this.LoadData(AmmeterDB.LoadAmmInfoFromDatabase());
            }
        }
Esempio n. 2
0
        void toolStripLoadData(object sender, EventArgs e)
        {
            this.autoToolStrip1.Enabled = false;
            try
            {
                var results = AmmeterDB.LoadAmmInfoFromDatabase();
                treeView_Ammeter.ClearData();
                this.treeView_Ammeter.AddData(results);
                this.treeView_Ammeter.BuildTree();
            }

            finally
            {
                this.autoToolStrip1.Enabled = true;
            }
        }
Esempio n. 3
0
        private void OpeNode(DataOpeMode ope)
        {
            if (this.SelectedNode != null)
            {
                var groupnode = this.SelectedNode.Tag as LevelBase;
                if (groupnode != null)
                {
                    FormNodeModifyDelete form = new FormNodeModifyDelete();
                    form.Ope  = ope;
                    form.Info = this.SelectedNode.Tag as LevelBase;
                    if (form.ShowDialog() == DialogResult.OK)
                    {
                        this.LoadData(AmmeterDB.LoadAmmInfoFromDatabase());
                    }
                }
                else
                {
                    if (ope == DataOpeMode.Del)
                    {
                        FormAmmDel form = new FormAmmDel();

                        form.CurrentData = (P_AmmeterInfo)this.SelectedNode.Tag;
                        // form.ShowDialog(this);
                        if (form.ShowDialog() == DialogResult.OK)
                        {
                            this.LoadData(AmmeterDB.LoadAmmInfoFromDatabase());
                        }
                    }
                    else if (ope == DataOpeMode.Mod)
                    {
                        FormAmmMod form = new FormAmmMod();

                        form.CurrentData = (P_AmmeterInfo)this.SelectedNode.Tag;
                        // form.ShowDialog(this);
                        if (form.ShowDialog() == DialogResult.OK)
                        {
                            this.LoadData(AmmeterDB.LoadAmmInfoFromDatabase());
                        }
                    }
                }
            }
        }