Esempio n. 1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            try
            {
                if (MessageBox.Show("Are you sure you want to remove the selected text?", RMSGlobal.MessageBoxTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    Int32 kitchenTextID = Convert.ToInt32("0" + dgvKitchenText.CurrentRow.Cells[0].Value);
                    SystemManager objSystem = new SystemManager();

                    if (m_specialModifyText == false)
                    {
                        objSystem.DeleteKitchenText(kitchenTextID);
                    }
                    else
                    {
                        objSystem.DeleteSpecialText(kitchenTextID);
                    }
                    this.LoadKitchenText();
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }
        }