예제 #1
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     using (frmCompany frm = new frmCompany())
     {
         DialogResult result = frm.ShowDialog(this);
         if (result == DialogResult.OK)
         {
             LoadCompany();
         }
     }
 }
예제 #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (lstCompany.SelectedIndex == -1)
            {
                return;
            }

            Item item = (Item)lstCompany.SelectedItem;

            using (frmCompany frm = new frmCompany(item))
            {
                DialogResult result = frm.ShowDialog(this);
                if (result == DialogResult.OK)
                {
                    LoadCompany();
                }
            }
        }