Exemple #1
0
        private void deleteBtn_Click(object sender, EventArgs e)
        {
            // Exit if no project list
            if (m_List == null)
            {
                return;
            }

            //Set the binfingList to current item BindingSource
            GroupHargaItem m_Item = (GroupHargaItem)bindingSource1.Current;

            CommandDeleteGroupHarga deleteGroup = new CommandDeleteGroupHarga(m_List, m_Item);

            m_AppController.ExecuteCommand(deleteGroup);
        }
Exemple #2
0
        private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            // Exit if no project list
            if (m_List == null)
            {
                return;
            }

            //Set the binfingList to current item BindingSource
            GroupHargaItem m_Item = (GroupHargaItem)bindingSource1.Current;

            // Confirm Delete
            string       invoiceNumber = String.Format("{0}", m_Item.GroupCode);
            string       message       = String.Format("Delete Invoice '{0}' and all of its item?", invoiceNumber);
            DialogResult result        = MessageBox.Show(message, "Confirm Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            // Delete author
            if (result == DialogResult.Yes)
            {
                CommandDeleteGroupHarga deleteGroup = new CommandDeleteGroupHarga(m_List, m_Item);
                m_AppController.ExecuteCommand(deleteGroup);
            }
        }