예제 #1
0
        //  update item

        private void UpdateData()
        {
            frmSugarForm frm = new frmSugarForm();

            frm.sugar = (objSugar)lvData.SelectedItems[0].Tag;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                LoadAllData();
            }
            frm.Close();
        }
예제 #2
0
        //  open the add form

        private void AddData()
        {
            frmSugarForm frm = new frmSugarForm();

            frm.sugar = new objSugar();
            if (frm.ShowDialog() == DialogResult.OK)
            {
                LoadAllData();
            }
            frm.Close();
        }