Exemplo n.º 1
0
        /*   private void twFamily_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
         * {
         *     twFamilyMembers.Nodes.Clear();
         * }*/

        #endregion --- Company ---

        #region --- Trivet ---

        public void LoadAllTrivets()
        {
            twTrivet.Nodes.Clear();
            List <TrivetClass> _trivet = TrivetClass.GetAllTrivet();

            foreach (TrivetClass trivet in _trivet)
            {
                TreeNode tn = new TreeNode(trivet.TrivetName + "     (" + trivet.TrivetType + ")");
                tn.Tag = trivet;
                twTrivet.Nodes.Add(tn);
            }
        }
Exemplo n.º 2
0
        //Save Trivet
        private void btnSaveTrivet_Click(object sender, EventArgs e)
        {
            TrivetClass tc = new TrivetClass();

            tc.TrivetID   = System.Convert.ToInt32(txtTrivetId.Text);
            tc.TrivetName = txtTrivetName.Text;
            tc.TrivetType = System.Convert.ToInt32(textTrivetCount.Text);
            if (tc.SaveMe("") != true)
            {
                MessageBox.Show("Could not save");
            }
            else
            {
                MessageBox.Show("Trivet Saved");
                ResetTrivet();
                LoadAllTrivets();
            }
        }