Example #1
0
        //Save Company - Also updates the TreeNode and Resets the textboxes so you can't overwrite the newly made entity. Pop-up box with if it saved or not
        private void btnSaveCompany_Click(object sender, EventArgs e)
        {
            CompanyClass cc = new CompanyClass();

            cc.CompanyID    = System.Convert.ToInt32(txtCompanyId.Text);
            cc.CompanyName  = txtCompanyName.Text;
            cc.CompanyCount = System.Convert.ToInt32(txtCompanySize.Text);
            if (cc.SaveMe("") != true)
            {
                MessageBox.Show("Could not save");
            }
            else
            {
                MessageBox.Show("Company Saved");
                LoadAllCompanies();
                ResetCompany();
            }
        }